Added support for Vaillant Thermostat, how to integrate in official release

Hello,

I have Hassio with HASS v0.84.6. I’ve copied the files you mention to /config/custom-components. And added the configuration lines (I still need the secret key).

But I get an error when setting the component:

2019-01-03 11:53:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component vaillant
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/vaillant.py”, line 61, in setup
config[DOMAIN][CONF_APP_VERSION], config[DOMAIN][CONF_USER_PREFIX])
TypeError: init() takes from 1 to 6 positional arguments but 8 were given
2019-01-03 11:53:05 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of climate.vaillant. Setup failed for dependencies: vaillant
2019-01-03 11:53:05 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.vaillant: Could not set up all dependencies.

Do you have any clue what can be missing? Should I do what you suggested one year ago?:
pip install --upgrade git+git://github.com/samueldumont/netatmo-api-python.git

Thank you in advance.

Best regards,
Lukeid

Thanks for this integration!

For anyone having a Bulex MiGo, I just got this component working with my MiGo Personal Heating Assistant, but I had to change a few things:

In components\vaillant.py I had to change the following lines in CONFIG_SCHEMA:

vol.Optional(CONF_APP_VERSION, default="1.2.0.2"): cv.string,
vol.Optional(CONF_USER_PREFIX, default="sdbg"): cv.string,

I retrieved these values from decompiling the MiGo Heating Assistant apk.

The api_key and secret_key are also different for the MiGo (don’t use the Vaillant ones!). The values can be found by decompiling the MiGo apk. If you have a Bulex MiGo and can’t find them, feel free to send me a message.

If you get the following message:

TypeError: ‘NoneType’ object is not subscriptable

This means that authentication failed. Either your credentials are wrong, or the api_key or secret_key are wrong, or you didn’t change the prefix and/or app_version.

@samueldumont would it be possible to merge this with your code? But this would require the variables to be configurable, preferably in config.yaml and not in the python file itself. Especially if this sensor would be added to the official release, it would be nice if Bulex MiGo was also supported.

Thank you Tarbax. I did everything as described. Now I’m only missing “the secret key” - do you happen to have it?

Hi pjmaenh are you using the same_BASE_URL from pyatmo or lnetatmo of vaillant Vsmart hardware?

I need to use a specific API url for MIGO, at least in my country: Spain.

I suppose that Bulex MiGo is the same as Saunier Duval Migo, at least colours are matching!

I made a fork based on Samuel code for my Migo. I have it working now and we are trying to merge both codes in one. Now I think we are so busy at work, so if you want to contribute, please, contact Samuel.

I didn’t have to change the _BASE_URL, and I’m using the pyatmo 1.4.1-vaillant directly from Samuel.
I only did the changes described above and the component started working (Bulex MiGo in Belgium).

Good news!

I’m using the old version lnetatmo in hassbian environment. I’ll make some tests and I’ll post here the results. If Saunier Duval works as Bulex merge will be easy!

Thanks pjmaenh!

I think Saunier Duval is nowadays the same brand as Bulex. Historical speaking, Bulex was a Belgian company and Saunier Duval was Italian (but also available in Spain), but both companies are now part of the Vaillant group. In fact, even the logo is the same for Saunier Duval and Bulex. The only difference might be that for Bulex I didn’t have to change the BASE_URL, but I am communicating directly with https://api.netatmo.com/.

As a test, I tried installing the Vaillant vSmart app, created a Vaillant account and tried adding my thermostat. The app however wouldn’t allow to connect as the identifier of the thermostat is different from vSmart (and the app literally told me to install the correct app from my manufacturer). That’s also the reason why I had to change the CONF_APP_VERSION and CONF_USER_PREFIX, as they are validated server-side.
Both apps however do look very similar, they only use different colours (the Vaillant app has a green theme, the Bulex app a red theme).

Anyhow, thanks for the great work! Let me know if there is a (beta) version available, it will be my pleasure to test it out with my Bulex.

Thank you for putting this together Samuel. I’m hoping to add to my HA (Hassio), could I get the “secret_key” please?

Hi pjmaenh,

I made today the tests I promised. Saunier Duval Migo is actually working with the new integration of Samuel, using pyatmo.

Also the current mode heat/idle/off seems not to be updated, neither mode selection seems to be working in my case. Can you confirm if you can set summer/winter or away modes using HA?

Regards!

Thanks for the update!

With my current version, I cannot set the winter mode, only the desired temperature and I can turn on away. When turning off away, the thermostat doesn’t seem to respond (turning on away is no problem). Furthermore, the thermostat always shows idle, even when the heating is on, so this is not updated.

I didn’t know it should be possible to change the mode (winter/summer), but indeed this seems quite useful.

pjmaenh : I also am in Belgium, and have a Migo thermostat. Could you explain me how to get this to work. I already got the api_client & secret from de apk.
I’m using the docker file from samual ( Or do I use the official one ) ??

Please help

working now

Yes,

I’m experiencing same behaviour as you described. @samueldumont, can you confirm same results with Vaillant vSmart version?

If both are responding with same behaviour, we should take a look to the API calls, which for sure will be different from Netatmo Thermostat.

Regards!

Hi @DaltonSr,

You have Hass.io, haven’t you?

What did you do to make it working?

I added the configuration part and copied both files to:
-rwxrwxr-- 1 root root 2210 Jan 3 11:22 /config/custom_components/vaillant.py
-rwxrwxr-- 1 root root 5902 Jan 3 11:22 /config/custom_components/climate/vaillant.py

But it fails to load: “Error during setup of component vaillant” (see my previous post for details).

Should I do something else?

Maybe the “pip install netatmo-api-python.git” part? The problem is that I have Hass.io and I don’t know how to do a “pip install” directly (pip is not found).

I will apreciate any help.

Thank you in advance.

Best regards,
Lukeid

Hi Lukeid!
I have the exact same problem. I get the same error. I’m sure, it netatmo needs to be installed somehow, but I don’t know how… I hope someone on this forum can explain us how to do it on Hassio.
If I get some information elsewhere, I’ll let you know… and if you found out, let me know aswell.
Good luck!

I am trying to get the integration work, can someone help me with the secret key?

If someone would be so kind to send me the Vaillant vSmart Api Keys pretty please… :slight_smile: tx

I would also love to have them… thanks in advance!!!

I’m having exactly the same problem, running HA 0.88.0 on a Pi3. Worked for quite some time… but only recently (after a new restart of HA) I ran into this issue. And I am not alone apparently.

Running pip install --upgrade git+git://github.com/samueldumont/netatmo-api-python.git did not fix the problem.

@samueldumont Could you have a look please?
Thanks.

EDIT: okay, seems I had Python 2.7 and 3.5 on my Pi3. Thus had to make sure I used the right pip command, i.e. the following one.

`pip3 -v install --upgrade git+https://github.com/samueldumont/netatmo-api-python.git`

Now it is working again on HA 0.88.0

The latest version of Home Assistant (0.88.0) changes the way how custom components work.
Instead of climate/vaillant.py, the file should now be called vaillant/climate.py.
This however breaks the component, and gives an error, indicating that a dependency is missing.

For now, you can still use the old files (custom_components/vaillant.py and custom_components/climate/vaillant.py) but this wil most likely stop working in the future.

@Dixietoom, @samueldumont any ideas how to solve this? The code likely needs to be refactored to comply with the new naming schemes? This section in the config will also no longer be valid:

climate:
  - platform: vaillant
1 Like