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

I can confirm that inner temp shows an empty value in Migo official app. At same time, the old configuration in HA of the thermostat also shows an error on temperature request (0.86). But is interesting that the true inner temp is well registered over the official app graphs. Seems to be a bug from netatmo-vaillant servers.

Great @pjmaenh , thank you so much :slight_smile:

I would be more than happy to test this for you, unfortunately restoring my hass.io resulted in a malformed database disk image, still hoping that I can some repair this file so I’ll not lose my history data (https://community.home-assistant.io/t/db-image-malformed-how-to-fix-it/76413/4)

Quick update:
The issue with inside temperature no longer showing seems to be a general issue, cfr. https://play.google.com/store/apps/details?id=com.vaillantgroup.migo.thermostat&showAllReviews=true and https://play.google.com/store/apps/details?id=com.vaillantgroup.vaillant.thermostat.

Recently, a lot of users have been complaining that they no longer get the indoor temperature in the app, so probably netatmo changed its API, breaking the functionality of the Bulex MiGo and Vaillant vSmart apps.

Let’s hope that Bulex/Vaillant fixes this quickly.

@pjmaenh Thank you for the effort and time. After you latest message i noticed in my Vsmart app that the inside temp is indeed not shown.
Have send Valliant a message about it, probably won’t get an answer, but it the least i can do.

UPDATE.
Checked the Vsmart app today and it is reporting the inside temp again.

@pjmaenh Today MiGo App returned again the inside temp at about 11AM. Using the old version with pyatmo and HA 0.84.3 is now working well again.

Just pushed a new version to GitHub, that should work with the latest version of HA (tested on 0.94.3). It’s a temporary fix, as I will soon be refactoring and updating the pyatmo-vaillant library.

@Derk @Dixietoom @rudgr

2 Likes

Hello @pjmaenh I am trying to get this working on my HA.
Please can you share with me the private key for Vaillant?
Thank you

@filipfajmon I’ve sent you a message

Component is no longer working in Home Assistant 0.96, most likely due to refactoring of climate component (https://www.home-assistant.io/blog/2019/07/17/release-96/).

Currently working on a fix…

4 Likes

Thanks for the effort!

awesome @pjmaenh :slight_smile:

Apologies for the slow reply, here’s a quick update:

It didn’t take long before I got the component working again with 0.96+, but with very limited functionality. As the climate component changed a log with HA 0.96 I decided to go back to the drawing board…

The netatmo API is nowadays very different from the Vaillant API due to the introduction of valves and rooms. Both netatmo and vailland/bulex use the same base URL, but that is the only thing they share. Therefore I decided to investigate the API a bit and developed a custom library specifically for Vaillant and Bulex/SaunierDuval to replace the pyatmo library.

Next, I started rewriting the Home Assistant component, and it now seems to be working again. Thanks to the new library, I could add a lot of functionality:

  • The component now supports 3 HVAC modes: heat (manual heat, for example when setting a new desired temperature), auto (following predefined program) and off (frostguard mode). The component will automatically update the HVAC mode based on the current thermostat state

  • The component now has 4 working presets, which can be activated through Home Assistant: away (similar to button in app), hot water boost (turn on hot water for 1 hour, similar to button app), summer (switch to summer system mode: only hot water, no heating) and winter (switch to winter system mode).

  • The component has 3 working HVAC operations: Auto (switch back to predefined program for current system mode), Boost (Hot Water Boost for 1 hour) and OFF (switch to frost guard system mode).

  • When using the Lovelace climate component, the thermostat will display whether it is heating or idle, and also the current preset.

Some screenshots:
32


I have been testing the component now for a few days, and so far it seems to be working fine. Had some minor issues in the beginning, but I was able to fix them.

Some remaining issues:

  • Sometimes, the component will give a warning in HA when triggering an action (e.g. activating a preset). This warning can be ignored, and I could easily implement a quick workaround, but I’m working on a cleaner solution. The issue is that sometimes the API returns an incomplete response, and it also sometimes takes some time before it returns an updated state of the thermostat.
  • The component currently supports only a single thermostat. Extending the component to support multiple thermostats is possible, but I cannot test this as I only have a single thermostat. If someone needs support for multiple thermostats, send me a message and I’ll make this high priority.

TL;DR: Got the component working again in HA 0.96+, with more functionality.

EDIT updated component now available on GitHub: https://github.com/pjmaenh/home-assistant-vaillant

5 Likes

Hi all!
@pjmaenh, I think should be a good idea to pull the final code as an official platform on Hassio.

Thanks for your job! :wink:

2 Likes

I am a bit confused by this one. Away mode should be independend of the summer/winter mode I would think? Normally there should be an away on and off? (while keeping winter of summer in the background)
(the same for hot water boost. On/or off and auto off after one hour?)

@huuub away mode and hot water boost are indeed independent of the mode (summer/winter) and will not change the current system mode. After these presets are deactivated (manually or after time period), the thermostat returns to the schedule belonging to the current system mode.

How I currently implemented it:

  • away mode stays on until deactivated (I can change this if needed)
  • hot water boost is enabled for 1 hour
  • a manual temperature is set for 2 hours
    (This behaviour mimics the official app).

When switching between summer and winter mode, the thermostat will clear all other presets (away, hot water boost and custom target temp) and returns to the default schedule.

I agree that it seems a bit confusing at first, but the official climate component is a bit limited (there are only HVAC modes and presets available, and I cannot use HVAC modes for switching between summer and winter). The official climate component is not (yet) designed to support only water heating, therefore I had to be a bit creative when implementing the component for Vaillant and Bulex.

However, once you get the hang of it, you’ll notice that you now can do most most normal operations as with the official app.

1 Like

And how do I turn off away mode?

Select summer or winter preset

I changed the state from away to winter. But I believe after 2 hours it switched back to away.
Sorry… It just seems that putting it to winter just doesn’t seem to to anything, nor summer :(.
I do it in nodered. Only putting it to away does work. Weird…

Strange… but the whole away thing is indeed a bit tricky. And the vaillant/bulex/netatmo API is also very slow sometimes, when changing things the thermostat itself is updated immediately but it can take a while before the new values are visible in the app or Home Assistant. For example, when setting a target temperature, the thermostat will quickly change the desired temperature, but the next API requests will still return the old target temperature.

Note that I only tested the component with Bulex MiGo, so no idea how responsive the API is when using a Vaillant vSmart…

I am using nodered in combination with it.
Case is important so for those struggeling:
hvac_modes: heat,auto,off
preset_modes: away,Hot Water Boost,Summer,Winter

This can be found in development tools.