Vaillant/MultiMATIC integration

Hi,

since few days, API is quite unstable I also have same kind of error (HTTP 409 response with errors like “FACILITY_NOT_ONLINE”).

I’m busy working on a next version that will handle this kind of error. Most of the development part is done, i’m currently testing it (which is quite hard because I don’t have any control over the API).

Normally this kind of error should not really affect HA. Actually, HA is asking every 2 minutes for changes in your vaillant system. If you have this error only once, it means HA won’t be updated now, but in the next iteration (2 minutes later).

You can also try to restart HA (I know this is annoying :confused:, this is why I’m working on a new version).

Thanks for the Answer!
I restart HA more tahn 3 times and what also is little bit strange i that i do not receive entities after the integration. i also lock out in the app to controll if the passwort and user is right - i can say this is 100 % correct

I just released the 1.1.0 version, see https://github.com/thomasgermain/vaillant-component/releases/tag/1.1.0

As explained in the release note, you might still have the error logged (if something goes wrong, I want the user to be aware of it), but this is now handled, so HA should still be updated with data coming from vaillant.

Directly install the new release, but please look

2020-04-03 15:10:40 ERROR (MainThread) [custom_components.vaillant.hub] Unable to fetch data from vaillant API, API says: {‘errorCode’: ‘FACILITY_NOT_ONLINE’}, status: 409
Traceback (most recent call last):
File “/config/custom_components/vaillant/hub.py”, line 68, in _update_system
self.system = await self._manager.get_system()
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 83, in get_system
full_system = await full_system_req
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 582, in _call_api
return await self._connector.request(method, url, payload)
File “/usr/local/lib/python3.7/site-packages/pymultimatic/api/connector.py”, line 171, in request
payload=payload)
pymultimatic.api.error.ApiError: Cannot get https://smart.vaillant.com/mobile/api/v4/facilities/21153100201971160933009649N3/systemcontrol/v1
2020-04-03 15:10:41 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up vaillant platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/vaillant/sensor.py”, line 34, in async_setup_entry
for report in hub.system.reports:
AttributeError: ‘NoneType’ object has no attribute ‘reports’
2020-04-03 15:10:41 ERROR (MainThread) [homeassistant.components.water_heater] Error while setting up vaillant platform for water_heater
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/vaillant/water_heater.py”, line 40, in async_setup_entry
if hub.system.dhw.hotwater:
AttributeError: ‘NoneType’ object has no attribute ‘dhw’

Thanks for the time you invest !!!

There is actually two errors :

first, It seems your vaillant system is not connected to the internet. Are you able control it through the multiMATIC application ?

second error is related to the first one actually, since the component cannot fetch anything from vaillant, there is nothing to play with for HA.

I cannot do anything for the first one, I can do a cleaner code for the second issue, but it won’t fix anything

I found the issue !!! And now everything is super!!! Thanks

I’m glad to hear that !
Could share the issue and the solution ? Maybe I can improve something in the component.

I had in the past the VR900 and since 1 Year the VR920. But i never remove the 900 out of the app.
So i think that our application is only able to handle one environment.
After i remove the vr900 and reinstall vaillant over the integration - he found the entities -perfekt!

Hmm yes, the underlying pymultimatic (the connector the component is using to get data from vaillant) is able to handle only one facility. By default, the component will take the first facility it finds, but I improve the component so you can choose your facility during the set up of the integration.

Thanks for your input !

I just look inside the lof file - is this output from your point of view normal ?

2020-04-04 11:11:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/config/custom_components/vaillant/hub.py”, line 51, in _hvac_update
await self._manager.request_hvac_update()
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 546, in request_hvac_update
state = mapper.map_hvac_sync_state(await self._call_api(urls.hvac))
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 582, in _call_api
return await self._connector.request(method, url, payload)
File “/usr/local/lib/python3.7/site-packages/pymultimatic/api/connector.py”, line 171, in request
payload=payload)
pymultimatic.api.error.ApiError: Cannot get https://smart.vaillant.com/mobile/api/v4/facilities/21174800202529220938009066N7/hvacstate/v1/overview

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/config/custom_components/vaillant/hub.py”, line 58, in _hvac_update
exec_info=True,
File “/usr/local/lib/python3.7/logging/init.py”, line 1390, in warning
self._log(WARNING, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument ‘exec_info’

I the scrennshot are my entities and the last update

Screenshot looks good, I already received an issue for the error, I did a typo -_-. I’ll provide a fix this week end.

Version 1.2.0 released ! See https://github.com/thomasgermain/vaillant-component/releases/tag/1.2.0

TOP - MY LOG FILE LOOKS PERFECT - great job !

1 Like

short update: i receive every 2 min in the log:

020-04-06 12:29:31 ERROR (MainThread) [custom_components.vaillant.hub] Unable to fetch data from vaillant API, API says: {‘errorCode’: ‘NullPointerException’}, status: 500
Traceback (most recent call last):
File “/config/custom_components/vaillant/hub.py”, line 67, in _update_system
self.system = await self._manager.get_system()
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 77, in get_system
hvac_state = await hvac_state_req
File “/usr/local/lib/python3.7/site-packages/pymultimatic/systemmanager.py”, line 582, in _call_api
return await self._connector.request(method, url, payload)
File “/usr/local/lib/python3.7/site-packages/pymultimatic/api/connector.py”, line 171, in request
payload=payload)
pymultimatic.api.error.ApiError: Cannot get https://smart.vaillant.com/mobile/api/v4/facilities/21174800202529220938009066N7/hvacstate/v1/overview

After reboot the component receive Data again…

I have exactly the same issue. Approx every 24 hours. If needed, I can help to debug it.

Can I ask you to raise an issue here https://github.com/thomasgermain/vaillant-component/issues ? This is easier for me to track.

I’m currently working on a next version including a more aggressive re-connection. It means you may still have the error, but It should happen only once. It seems there are a lot of “fake” errors when the session last too long.

@tgermain I created an issue on GitHub.

BTW, it is not just repeating error messages. There are no sensors readings. Moreover, after some period of time after the first error message the whole HA freezes. Only restart helps :frowning:

I’m looking forward for a new version. I really appreciate your effort! Good job!

Hi tgermain,

I have been using your Vaillant component for quite some time now and I really appreciate the amount of work you have been doing on this component - thank you very much.

Yesterday I have upgraded to the latest version 1.3 after setting up HA via docker on my Synology NAS. Unfortunately now I always get an error message after installing the application:

Logger: homeassistant.setup
Source: setup.py:249
First occurred: 7:19:44 (3 occurrences)
Last logged: 7:19:44

* Unable to prepare setup for platform vaillant.binary_sensor: Platform not found (cannot import name 'BinarySensorEntity' from 'homeassistant.components.binary_sensor' (/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py)).
* Unable to prepare setup for platform vaillant.climate: Platform not found (cannot import name 'ClimateEntity' from 'homeassistant.components.climate' (/usr/src/homeassistant/homeassistant/components/climate/__init__.py)).
* Unable to prepare setup for platform vaillant.water_heater: Platform not found (cannot import name 'WaterHeaterEntity' from 'homeassistant.components.water_heater' (/usr/src/homeassistant/homeassistant/components/water_heater/__init__.py)).

As you can see I am missing some sensors - do you have an idea what could be the cause of this?

Do you want me to raise this as issue on Github as well?

Regards,

Hi,

Thanks for your input :slight_smile:

the latest version (1.3) is only working with HA 0.110 and later. What version do you have ?
If you are not on version 0.110, then you can downgrade the component to 1.2.2.
If you have the version 0.110, you can raise a github issue :slight_smile:

I just re-read the release notes and I must confess, the is not clear :frowning: (I will update the release notes).

Regards,

Thomas

Hi,

that seems plausible as I am still on v.0.109.6. I will update to 0.110 and report back on the issue.

Regards,

@tgermain: downgrading to v.1.2.2 of Vaillant component solved the issue for me.
I will also upgrade HA to 0.110 in the next couple of days and test v.1.3 of Vaillant component.

Thank you