Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for VRC700 #47

Closed
krmarien opened this issue Jan 26, 2024 · 57 comments
Closed

Support for VRC700 #47

krmarien opened this issue Jan 26, 2024 · 57 comments

Comments

@krmarien
Copy link
Contributor

3 days ago Vaillant added support for VRC700 to their apps, after this I was able to migrate to MyVaillant.

But this library is not working, I'm getting the following error:

aiohttp.client_exceptions.ClientResponseError: 404, message='Resource Not Found', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/<system_id>/vrc700')

So it looks like something special is happening for the vrc700 control identifier.

I tried to use mitmproxy to figure out what is happening with the app, but when doing that I can't use the app (authentication fails). Can you explain how you used mitmproxy?

@signalkraft
Copy link
Owner

Please try again with this version: pip install git+https://github.com/signalkraft/myPyllant.git@fixed-tli

If that doesn't fix it, there may really be something special going on with your controller. There's an explanation for mitmproxy here, look out for the bypass setting: https://signalkraft.com/mypyllant-component/3-reverse-engineering/

@krmarien
Copy link
Contributor Author

I tried fixed-tli and get this error:

aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/<system_id>/tli')

I don't own an android device, but I will check with the extra info if I can get the app to work with mitmproxy.

@signalkraft
Copy link
Owner

You could try installing Android Studio and running the Android emulator.

Another idea would be to try pip install myPyllant==0.2.3, which is an old version that used another API endpoint.

@signalkraft
Copy link
Owner

@krmarien I made another stab in the dark, can you try pip install -U git+https://github.com/signalkraft/myPyllant.git@fixed-tli?

@pepsonEL
Copy link

When Vaillant update my gateway VR920 i also can help....

@krmarien
Copy link
Contributor Author

I was able to follow the reverse engineer guide and found the correct URL: https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/{system_id}

However looks like the data returned is also different. I will investigate one of these days

@pepsonEL
Copy link

thanks for your job

@krmarien
Copy link
Contributor Author

@signalkraft maybe it is easier for you to understand how everything should be mapped: data.json

@signalkraft
Copy link
Owner

That looks similar, on first glance. I'll adapt the test branch, then you could try to generate a full test data set.

@signalkraft
Copy link
Owner

@krmarien could you try again?

pip install -U git+https://github.com/signalkraft/myPyllant.git@fixed-tli
python -m myPyllant.tests.generate_test_data

@krmarien
Copy link
Contributor Author

Test data PR available: #50

@signalkraft
Copy link
Owner

Thank you! I merged it separately, since I worked on a different branch. The latest release should work now with VRC700. There's also a new pre-release for the home assistant component here: https://github.com/signalkraft/mypyllant-component/releases/tag/v0.7.2b1

@krmarien
Copy link
Contributor Author

Thank you! Seems to be working

@krmarien
Copy link
Contributor Author

Closed it too early, some calls are not working. I will list them with the correct url's tomorrow

@krmarien krmarien reopened this Jan 31, 2024
@Tharanis
Copy link

Tharanis commented Jan 31, 2024

My VRC700 and the Rest was found after installation of the beta-Version mypayllant-component v.0.7.2b1 (Home assistant). It looks good at the first view. Thank you.

EDIT: My little Testing show errors, i try to get some debug-Infos and will post them in the mypyllant-component-Discussion from me.

@krmarien
Copy link
Contributor Author

krmarien commented Feb 1, 2024

API calls that I checked and are not working:

  • Quick Veto:
    https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/<system_id>/zone/0/heating/quick-veto
    {
        "desiredRoomTemperatureSetpoint": 19.5,
        "duration": 3
    }
  • Operation Mode:
    https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/<system_id>/zone/0/heating/operation-mode
    {
        "operationMode": "DAY" // Or AUTO/OFF/SET_BACK
    }
  • Holiday:
    https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/<system_id>/holiday
    {
        "endDateTime": "2099-01-01T23:59:59.999+01:00",
        "setpoint": 10,
        "startDateTime": "2024-02-01T07:47:49.580Z"
    }

@signalkraft
Copy link
Owner

Thanks for the API calls, I adapted the corresponding functions. Could you try the following?

pip install -U git+https://github.com/signalkraft/myPyllant.git
python -m myPyllant.tests.run_function_test

The test should run through all API calls, without changing anything. Worst case it leaves holiday mode on, or sets a wrong temperature. But it's a quick way to test that everything is working.

@vozda
Copy link

vozda commented Feb 2, 2024

Thank you for v0.7.2b1. Partly works with VRC700. Unfortunately water heater entity is missing (missing temperature of the water heater, set up of temperature, on/off )

@krmarien
Copy link
Contributor Author

krmarien commented Feb 2, 2024

#51 has updates to the URL's, now python -m myPyllant.tests.run_function_test works on my side.

@signalkraft
Copy link
Owner

Thanks for the PR, there's a new release with your fixes.

Regarding the water heater: I'm missing endpoints as well, and in the testdata @krmarien provided there is no domestic hot water data.

@krmarien
Copy link
Contributor Author

krmarien commented Feb 3, 2024

I don't think I'm able to control that (even through the MyVaillant app).

However on my side I also have one more issue: Unable to fetch RTS data, @signalkraft can you explain what this is, so I can find the correct URL on my side?

@fhensch85
Copy link

Do you need some Testdata from vcr700 and vr920 with waterheater ?

@signalkraft
Copy link
Owner

@krmarien RTS data is related to this issue: signalkraft/mypyllant-component#87

@fhensch85 yes, that would help! Here's the documentation: https://signalkraft.com/mypyllant-component/3-contributing/#contributing-test-data

@krmarien
Copy link
Contributor Author

krmarien commented Feb 3, 2024

@signalkraft, ok thanks. My setup doesn’t provide this info. I don’t know if this is specific for the vrc700…

@fhensch85
Copy link

I hope thats what you need.
testfile.txt

@signalkraft
Copy link
Owner

@fhensch85 that's perfect! I made a new pre-release, based on that. There's only one value in test data for operation mode and special function of the water heater. So things may break, if you try to set different modes. You can attach another test data file, if you find a mode that doesn't work.

The endpoints for setting values are probably also different. Finding the right ones takes some reverse engineering, see above.

@fhensch85
Copy link

And a new one
testfile (1).txt
Screenshot_20240203_230916_Chrome

@signalkraft
Copy link
Owner

There's a new pre-release that should fix this issue!

@fhensch85
Copy link

fhensch85 commented Feb 4, 2024

Sorry that did not fix it.
Uploading error_log-3.txt…

@signalkraft
Copy link
Owner

@fhensch85 that log didn't upload, you can just look at system > logs and copy the error related to the holiday mode.

@pepsonEL
Copy link

pepsonEL commented Feb 5, 2024

Anybody has info that gateway VR920 will get update to new version of app myVaillant ?

@sbeier23
Copy link

sbeier23 commented Feb 5, 2024

I have a VR920 and already got the update, but I was waiting about half a year after the first mail from Vaillaint about the update. Right now HA integration shows all of my needed information and I can set all of my personal needed setting as well. Its way faster, that the old MultiMatic control via HA. Good work and thank you @ the devs!!!

@pepsonEL
Copy link

pepsonEL commented Feb 5, 2024

I also wait more than year....
Good info that is faster than Multimatic.

@pepsonEL
Copy link

pepsonEL commented Feb 5, 2024

I have a VR920 and already got the update, but I was waiting about half a year after the first mail from Vaillaint about the update. Right now HA integration shows all of my needed information and I can set all of my personal needed setting as well. Its way faster, that the old MultiMatic control via HA. Good work and thank you @ the devs!!!

Tell me also
First you got e-mail from Vaillant? Then info about update in app Multimatic that is available ?

From which address e-mail you got info and which topic?

@fhensch85
Copy link

Ok here is the first one.
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.mypyllant
Source: helpers/update_coordinator.py:332
Integration: myVAILLANT (documentation, issues)
First occurred: 4. Februar 2024 um 21:14:18 (4 occurrences)
Last logged: 09:26:14

Error fetching myVAILLANT data: 404, message='Resource Not Found', url=URL('https://api.vaillant-group.com/service-connected-control/vrc700/v1/emf/v2/8fd1ea13-d0c7-4177-90ac-24cc728b7a0e/devices/647360da-0e2e-5755-b71b-54d3e6376aac/buckets?resolution=DAY&operationMode=DOMESTIC_HOT_WATER&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-02-04T00:00:00Z&endDate=2024-02-05T00:00:00Z')
Error fetching myVAILLANT data: 503, message='Service Temporarily Unavailable', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/8fd1ea13-d0c7-4177-90ac-24cc728b7a0e/meta-info/connection-status')
Error fetching myVAILLANT data: 500, message='Internal Server Error', url=URL('https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/8fd1ea13-d0c7-4177-90ac-24cc728b7a0e')
Error fetching myVAILLANT data: 403, message='Forbidden', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/8fd1ea13-d0c7-4177-90ac-24cc728b7a0e/meta-info/time-zone')

@fhensch85
Copy link

Second

Logger: myPyllant.api
Source: /usr/local/lib/python3.11/site-packages/myPyllant/api.py:1008
First occurred: 09:11:19 (1 occurrences)
Last logged: 09:11:19

Could not get diagnostic trouble codes
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/myPyllant/api.py", line 1003, in get_diagnostic_trouble_codes
response = await self.aiohttp_session.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 691, in _request
await raise_for_status(resp)
File "/usr/local/lib/python3.11/site-packages/myPyllant/api.py", line 102, in on_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/8fd1ea13-d0c7-4177-90ac-24cc728b7a0e/diagnostic-trouble-codes')

I have a lot of these Errors with funktions that don't Work. For example the consumed energy from water heater.

@vozda
Copy link

vozda commented Feb 5, 2024

Thank you! I merged it separately, since I worked on a different branch. The latest release should work now with VRC700. There's also a new pre-release for the home assistant component here: https://github.com/signalkraft/mypyllant-component/releases/tag/v0.7.2b1

Today this prerelease version stopped working completely (message that entities are not supported). Also mypyllant-component-0.7.2b6 does not work.

@fhensch85
Copy link

Something happend today. Nothing is working right now

@krmarien
Copy link
Contributor Author

krmarien commented Feb 5, 2024

@vozda Vailliant changed something on their side, I have a fix (that works for me) #54

@sbeier23
Copy link

sbeier23 commented Feb 5, 2024

I have a VR920 and already got the update, but I was waiting about half a year after the first mail from Vaillaint about the update. Right now HA integration shows all of my needed information and I can set all of my personal needed setting as well. Its way faster, that the old MultiMatic control via HA. Good work and thank you @ the devs!!!

Tell me also First you got e-mail from Vaillant? Then info about update in app Multimatic that is available ?

From which address e-mail you got info and which topic?

I dont have the first mail anymore, but the last two mails from january, i still have in my mbox:

  1. i got the information from vaillant, that they will switch from MultiMatic to myVaillaint and they inform me, as soon as the update is ready (this was about 6-9 month ago).
  2. on jan 31st i got the information, that my update will be ready within the next days
  3. on feb 2nd i got the ready information and should have a look in my MultiMatic app
  4. there i found the update notification as well and i run the update

@signalkraft
same as the others here, since around 2pm GMT+1 the service doesnt respond anymore :-( same errors as anyone else here...

but it started already way earlier:

logger: custom_components.mypyllant
Source: helpers/update_coordinator.py:332
Integration: myVAILLANT ([documentation](https://github.com/signalkraft/mypyllant-component#readme), [issues](https://github.com/signalkraft/mypyllant-component/issues))
First occurred: 08:44:46 (6 occurrences)
Last logged: 09:32:46

Error fetching myVAILLANT data: 503, message='Service Temporarily Unavailable', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/xxxxx/meta-info/connection-status')
Error fetching myVAILLANT data: 403, message='Forbidden', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/xxxxx/currentSystem')
Error fetching myVAILLANT data: 500, message='Internal Server Error', url=URL('https://api.vaillant-group.com/service-connected-control/vrc700/v1/systems/xxxxx')
Error fetching myVAILLANT data: 403, message='Forbidden', url=URL('https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/xxxxx/meta-info/time-zone')

@signalkraft
Copy link
Owner

I released the latest fix from @krmarien in a new pre-release.

But API errors with code 503 and 500 are probably on Vaillant's side.

@vozda
Copy link

vozda commented Feb 6, 2024

I released the latest fix from @krmarien in a new pre-release.

But API errors with code 503 and 500 are probably on Vaillant's side.

Thank you

@signalkraft
Copy link
Owner

Have things started working again @vozda @sbeier23?

@sbeier23
Copy link

sbeier23 commented Feb 6, 2024

@signalkraft yes, its working for me. Thank you for your work.

@vozda
Copy link

vozda commented Feb 6, 2024

@signalkraft mypyllant is working again including water heater entities :-) Thank you. Only small bug, If I switch the water heater from Auto to Day mode in myVaillant app than mypyllant stops working (message unsupported entities),

@signalkraft
Copy link
Owner

@vozda AFAIK someone else reported that already and it should be fixed in the latest pre-release.

@switschel
Copy link

switschel commented Feb 10, 2024

For missing environment data with vrc700 check my comment here: signalkraft/mypyllant-component#92 (comment)

Only for systems the vrc700 API should be used. For everything else it should be: end-user-app-api

Here the wrong URL base is retrieved:

f"{await self.get_api_base(device.system_id)}/emf/v2/{device.system_id}/"

Might be fixed here by not retrieving the "vrc700" URL Base but only for system API.

def get_api_base(control_identifier: ControlIdentifier | str | None = None) -> str:

@pepsonEL
Copy link

Hi all
Today i get update firmware for my gateway Vaillant VR920. I step to new app myVaillant. All works perfect and now controll by app works at the same time.... when change setting on phone by 1-2secund is setting on my heating.... It is more more faster than multimatic....

I also inastalled your integration in my Home Assistant and also all works ok.
My setup Vaillant to confirm support:

  • boiler EcoComapct VSC206 4-5
  • controller VRC700/6 Multimatic
  • gateway VR920

Additional module Vaillant:
-VR 71

  • remote controller VR91

Thanks for all and developer for you works.....

@krmarien
Copy link
Contributor Author

@signalkraft In 4c0988c a lot of the VRC700 calls are broken.

For example: in quick_veto_zone_temperature you are calling self.get_system_api_base without the systems set to True. This caused the base url to be the one for component_identifier TLI

@signalkraft
Copy link
Owner

That was intentional, to try and fix another issue in signalkraft/mypyllant-component#101

It's since been reverted in the latest release.

@pepsonEL
Copy link

pepsonEL commented Feb 17, 2024

Climate control on VRC700 no working. When try change from HA mode example from auto to OFF i get error:
image

I can not change any mode on climate zone. The same problem is on How water , when try change to off also get error:
image

Also can not change temperature...., activate boost for hot water also can not....

@signalkraft
Copy link
Owner

Please updated to the latest beta release of the component and try again.

@pepsonEL
Copy link

Looks good , now no errors
Thanks

@krmarien
Copy link
Contributor Author

As vrc700 seems to be all fine now, I will close this issue.

@sbeier23
Copy link

Hi, just for the record of the documentation: My system is working perfect and I use the following Vaillant hardware:

  • ecoVIT /4 [226]
  • VIH R/6 uniSTORE [150 B]
  • VR920

thank you for the good work!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants