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

Hi rddoove,
Could you send me the secret key in pm ? I didn’t succeed to get it from apk vaillant application.

Thank you

Hi everybody, im trying to connect my migo on HA, but dont work.
i have this error

Unable to prepare setup for platform vaillant.climate: Unable to set up component.

15:53:49 – setup.py (ERROR)

Error during setup of component vaillant

15:53:49 – custom_components/vaillant/init.py (ERROR)

Netatmo API returned invalid_client

15:53:49 – custom_components/vaillant/init.py (ERROR)

The Netatmo API returned 400

15:53:49 – custom_components/vaillant/init.py (ERROR)

@pjmaenh, Can u send me API Key, secret key, app_version ans User_prefix. I am on Saunier Duval.

Thanks.

Dear @pjmaenh,

could you be so kind and send me via PM the information (API_KEY, SECRET_KEY, APP_VERSION and USER_PREFIX)?

I am using a Vaillant eRELAX WiFi module, hope it will also work.

Thank you in advance,
Toni

Hi @samueldumont,
Hi @pjmaenh,
I’m a french new user of hass.io. I have a Vaillant thermostat too and want to include it in my hassio.
So, could you please send me the information (API_KEY, SECRET_KEY, APP_VERSION and USER_PREFIX) via PM please ?
BTW, great job. :smiley:
Hope it can work for me.
Last word : how can you/i have/find those 4 informations ?
Regards,
DK

Hi @dekarch ,

I’ve just done it so here are the infos. The only info you need to get yourself is the secret key.

To do that :

  • download the vSmart application file here
  • change the extension from .apk to .zip (if you don’t see the extension you need to enable the option in windows explorer
  • unzip the file
  • rename classes.dex to classes.txt
  • open the file with an editor such as Notepad++, VS code or Wordpad (it is too big for notepad)
  • search for the string “45f0”
  • the secret key is the line starting by 929 and ending by 45f0 !

To be noted : strangely (or it was just a coincidence) it worked better with the version “1.0.4.0” than the current version “1.2.0.2”.

Thanks very much @pjmaenh for your modules they work perfectly!

Here is the full configuration :

vaillant:
  api_key: na_client_android_vaillant
  secret_key: 929****************45f0
  username: ****************
  password: ****************
  discovery: False
  app_version: 1.0.4.0
  user_prefix: vaillant 

climate:
  - platform: vaillant
6 Likes

@alexbelgium: 1.2.0.2 is the version used by Bulex/Saunierduval MiGo, 1.0.4.0 is the version used by vSmart. So if you have a vSmart, you indeed need to use 1.0.4.0. This info can also be found by decompiling the app (following the steps you mentioned).

But instead of using wordpad I would highly recommend a decent text editor (e.g. visual studio code or sublime text) that has no issues opening larger files.

3 Likes

Please also note that these values are specific for vaillant, and won’t work for Bulex/SaunierDuval MiGo (but can be found by decompiling the MiGo app that can be downloaded from the app store).

1 Like

Hello, thanks a lot for this great job @pjmaenh.
F.

Hi @pjmaenh,
I followed the same methode as for vaillant but couldn’t locate the key in the MiGO apk. Could please send me in PM API_KEY, SECRET_KEY, APP_VERSION and USER_PREFIX for MiGO app.
Thank You

I’m running Hassio on a Raspi 4.
I tried to implement this Vaillant component into it but when doing a check on my config I get the followingerror config
I don’t seem to have acces to the raspi os since I’m using the Hassio image.
Any thoughts on a solution or tips?

Thank you

Hi,

this is working great along side my netatmo thermostat. I have multiple thermostat could someone help me out on how to display them all?

@pjmaenh I see this in my HA logs since upgrade to recent Update:

ClimateDevice is deprecated, modify VaillantThermostat to extend ClimateEntity

Can we expect a new version?

Thanks.


2020-06-01 00:43:01 WARNING (MainThread) [homeassistant.components.climate] ClimateDevice is deprecated, modify VaillantThermostat to extend ClimateEntity
2020-06-01 00:43:02 ERROR (MainThread) [homeassistant.setup] Error during setup of component vaillant
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 175, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/vaillant/init.py”, line 55, in setup
config[DOMAIN][CONF_API_KEY], config[DOMAIN][CONF_SECRET_KEY],
KeyError: ‘vaillant’
2020-06-01 00:43:03 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform vaillant.climate: Unable to set up component.


Same here. It is hard to understand why the homeassistant comunity always touch the netatmo interface.

Is there anyone solved?

@netweaver, @Kenan_Elmas
Hi, you just need to rename the two instances of “ClimateDevice” to “ClimateEntity” in the climate.py then reboot. I’ve created a pull here on the repo.

I’ve tested it on my installation (0.111) and it seems to work fine (after reboot, lovelace card is still updated without any modification needed, and changes made on the Vaillant app are instantly visible in hassio).

@JanR Hi, I’ve installed it also on Hassio. It is actually very straightfoward as described by pjmaenh. Did you copy the whole “vaillant” directory in “/config/custom_components/” ? In lovelace, I only added a Thermostat card with the entity “climate.thermostat”. For the configuration.yaml it is described in the github readme or in the previous posts

@alexbelgium Still getting error below;

ModuleNotFoundError: No module named ‘custom_components.vaillant.remote’

I have already configured, and seems to be ok.

Thank you very much!!!

Which version you use for HA? I’m getting some strange error named vaillant.remote. No idea why.

Hi, I have the last version, because I have installed it yesterday (Version 0.111.4)

You only need to change the two lines in which ClimateDevice exists for ClimateEntity, and it works without any warning, you must change these lines on climate.py file