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

Hi Olivier,

Don’t forget that you have to put two files :

vaillant.py in components, (https://raw.githubusercontent.com/samueldumont/home-assistant/added_vaillant/homeassistant/components/vaillant.py)
and vaillant.py in components/climate (https://raw.githubusercontent.com/samueldumont/home-assistant/added_vaillant/homeassistant/components/climate/vaillant.py)

You can see the same thing with netatmo, with a netatmo.py in each of those folders.

After that, it should work :slight_smile:

Thank you, I was confused by the name that was the same.
Now it seems better but something is wrong with the configuration … Maybe I did not get correctly what to put in the configuration.yalm file.

2018-01-05 12:00:55 WARNING (MainThread) [homeassistant.setup] Setup of climate is taking over 10 seconds.
2018-01-05 12:00:59 ERROR (Thread-6) [homeassistant.components.vaillant] Unable to connect to Netatmo API
2018-01-05 12:00:59 ERROR (MainThread) [homeassistant.setup] Setup failed for vaillant: Component failed to initialize.
2018-01-05 12:01:00 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of climate.vaillant. Setup failed for dependencies: vaillant
2018-01-05 12:01:00 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.vaillant: Could not setup all dependencies.
2018-01-05 12:01:01 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2018-01-05 12:01:03 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.

# Vaillant vSmart
vaillant:
  api_key: na_client_android_vaillant
  secret_key: <what you provided me>
  username: <my mail address as it is in the smartphone app>
  password: <my secret vaillant password>
  discovery: False

climate:
  - platform: vaillant

api_key is the part that is not clear to me (sorry to bother you with my problem)
I have an android Samsung J5 and don’t know where to find the info neither in my iPhone 6s.
I’m feeling that I’m very close to the solution but not quiet yet.

Hey Olivier,

The api_key should stay like that, this is fixed. The issue here is that it can’t connect to the API but it would be good to have a tracelog for this error, so I would know what’s the issue.

Did you install my version of lnetatmo ?
When installed, it appears at this place : /config/deps/lib/python3.6/site-packages/lnetatmo.py (but this may vary per system so take it with a grain of salt)

You can run :
pip -v install --upgrade git+https://github.com/samueldumont/netatmo-api-python.git
then
pip show lnetatmo

This should output

Name: lnetatmo
Version: 0.9.2-vaillant
Summary: Simple API to access Vaillant vSmart thermostat data (rebranded Netatmo thermostat)
Home-page: https://github.com/samueldumont/netatmo-api-python
Author: Samuel Dumont, forked from Philippe Larduinat
Author-email: [email protected], [email protected]
License: Open Source
Location: /usr/local/lib/python3.6/site-packages
Requires:

After that, it should be able to connect

1 Like

Thank you for your help Samuel.
It works now.
The library was the good one but I thought that my password, containing some special characters, needed to be escaped with some backslashes.
That was the issue, it is not needed.

Excellent job Samuel, All running here now. :smiley:

Hi all,

All working here also !!

Nice job !!

I had same issues as the other folks and I needed to re-install Netatmo.

but at the end it worked !!

merci Samuel.

Hi all,

something happened and now stopped working…

when I take a look at the daemon status I can see this:

pi@raspberrypi:/home/homeassistant/.homeassistant $ sudo systemctl status homeassistant.service
● homeassistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/homeassistant.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-01-08 12:55:28 CET; 12s ago
Main PID: 2643 (hass)
CGroup: /system.slice/homeassistant.service
├─2643 /srv/homeassistant/bin/python3 /srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant
└─2674 /srv/homeassistant/bin/python3 -m pip install --quiet https://github.com/jabesq/netatmo-api-python/archive/v0.9.2.1.zip#lnetatmo==0.9.2.1 --upgrade --constraint /srv/homeassistant/lib/python3.5/site-packages

which seems to update the Netatmo to 9.2.1

after this I can see:

● homeassistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/homeassistant.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-01-08 12:55:28 CET; 35s ago
Main PID: 2643 (hass)
CGroup: /system.slice/homeassistant.service
├─2643 /srv/homeassistant/bin/python3 /srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant
├─2693 /srv/homeassistant/bin/python3 -m pip install --quiet https://github.com/samueldumont/netatmo-api-python/archive/v0.9.2-vaillant.zip#lnetatmo==0.9.2-vaillant

any clue ?

now it is not working :frowning:

Hi macmanu,

I’ll look into that, HomeAssistant was upgraded a few days ago and I’m working on keeping my version up to date. I bumped the lnetatmo lib version and it’s currently building on dockerhub. As soon as it’s finished, I’ll check everything and keep you posted :slight_smile:

Hi macmanu,

I updated the files so the version of my fork is now higher. I tested with HA 0.60.1 and I don’t have any issue. Should be good for you after an update :slight_smile:

is it working in HA v0.64 ?
my configuration gives error after the update :-/

Hi tarbax,

I don’t have any issues with the version 0.64, can you give me the error ?

i will re enable Vsmart once my new SD card is in the Pi

Great work, can you pls provide me secret_key? I am not strong enough to decompile android app. Will be great to have this component in HA mainline.

Thanks for your effort!

Maybe stupid question, what should I see on default view? I install all files and log looks ok. (If I put wrong password I can see error in log file) so seems all is right. But I can’t se nothing on default view. (I disabled own default_view) and also nothing if climate.vaillant added to some group. Thank you . Jan

Hi Samuel

Could you PM me the secret key or tell me where i can find it in my android app ?

Thanks

My fault. No works as charm. Thank you for great work!

Dear Samuel,
I have decompiled the apk file, but I cannot find the API key or the secret key. If i understand it correct, I have to leave the api_key like this : na_client_android_vaillant. Thank you very much ! My email is [email protected]. My regards

Can please someone send me the secret key? Thanks in advance.

Can anyone send me the key as well please?

Hey, Can I have API key aswell? I dont have android device to extract it myself.