From what I can see, it’s because it doesn’t load my fork of the lnetatmo lib, and uses the standard one : I had to change the login to add support for vaillant thermostat (2 supplementary parameters)
What’s strange is that is should be automatically downloaded :
I always use a docker containter and did not test on a “regular” server, but I see that at first launch, it tries to download the lnetatmo lib I specified.
What I could do is change the name of the lib instead of the version, so it wouldn’t impact the currently installed lnetatmo but I thought HA would download automatically my version.
Can you manually install my version ? It’s backward compatible so if you have a netatmo device, it will still work. You can do it with this command :
Hi samueldumont, I think i have the same issue as tarbax!
I read through your github files and found the required section and then manually installed it
using the way you suggested to tarbax see below
:/home/pi $ pip3 install --upgrade git+git://github.com/samueldumont/netatmo-api-python.git
Collecting git+git://github.com/samueldumont/netatmo-api-python.git
Cloning git://github.com/samueldumont/netatmo-api-python.git to /tmp/pip-t4qyn0me-build
Installing collected packages: lnetatmo
Found existing installation: lnetatmo 0.9.2-vaillant
Uninstalling lnetatmo-0.9.2-vaillant:
Successfully uninstalled lnetatmo-0.9.2-vaillant
Running setup.py install for lnetatmo … done
Successfully installed lnetatmo-0.9.2-vaillant
the log entry is now
2018-01-02 16:47:23 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 247, in async_add_entity
yield from entity.async_update_ha_state()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 231, in async_update_ha_state
attr)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 333, in _attr_setter
value = getattr(self, name)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/init.py”, line 736, in supported_features
raise NotImplementedError()
NotImplementedError
i added netatmo.py files in the custom compoments and subfolder climate and now everything is working fine!
just put everything in custom components and it should work.
Cooool ! I’m glad that it’s working I will try to see if we can integrate this in the main codebase. I’ll keep the code updated with future releases anyway so keep an eye on the repo when a new version of HA is released.
Hi,
Yes that’s working now :- so for me on a rpi3 with a python virtual env
I put the above files into the /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/vaillant.py
and the other in
/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/vaillant.py
and manually installed the netatmo, after activating my virtual env
with pip install --upgrade git+git://github.com/samueldumont/netatmo-api-python.git
then followed config that samueldumont suggested.
Great job that you did!
I contacted Vaillant a few weeks ago asking for “Google Home”, “Apple HomeKit” or “Amazon Alexa” support and they replied : “no way, we will never do that, just use IFTTT”.
I’m so happy to see that there is an alternative.
I’ve questions for you:
Where in the Android app do I find the API key that you’re talking about?
You can find it if you decompile the APK and search for “na_client_android_vaillant”. The key will be somewhere around that.
I will send it to you by PM so you don’t have to worry to much about finding it.
The IP of the gateway is not needed : the communication is done directly to Netatmo’s API, which sends the control back to the gateway (same way as when you use the app)
If I put the vaillant.py in components/climate (and do “pip install --upgrade …” as suggested by sampras):
2018-01-05 10:55:39 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.vaillant
2018-01-05 10:55:45 ERROR (MainThread) [homeassistant.loader] Circular dependency detected: vaillant -> vaillant
2018-01-05 10:55:45 ERROR (MainThread) [homeassistant.setup] Setup failed for vaillant: Unable to resolve component or dependencies.
If I put it in components directly (as suggested by you):
2018-01-05 10:58:21 ERROR (MainThread) [homeassistant.loader] Unable to find component vaillant
2018-01-05 10:58:21 ERROR (MainThread) [homeassistant.setup] Setup failed for vaillant: Component not found.
2018-01-05 10:58:23 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of climate.vaillant. Setup failed for dependencies: vaillant
2018-01-05 10:58:23 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.vaillant: Could not setup all dependencies.
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.
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:
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.
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
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