Core: the netatmo thermostat does not appear

Created on 13 Apr 2019  Â·  32Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue:

Home Assistant 0.91.3

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Component/platform:

Description of problem:

104/5000
Netatmo thermostat not showing.
Works properly with your application.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

netatmo:
   api_key: 5xxxxxxxxxxxxxxxxxxxxxxxxxxa
   secret_key: uxxxxxxxxxxxxxxxxxxxxxxxxxx8
   username: [email protected]
   password: fxxxxxxxxP


climate:
   platform: netatmo

Traceback (if applicable):


Additional information:
From Log File:

2019-04-13 16:09:02 WARNING (MainThread) [homeassistant.components.http] Configuring api_password via the http component has been deprecated. Use the legacy api password auth provider instead. For instructions, see https://www.home-assistant.io/docs/authentication/providers/#legacy-api-password
2019-04-13 16:09:02 WARNING (MainThread) [homeassistant.components.http.auth] legacy_api_password support has been enabled.
2019-04-13 16:09:07 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-04-13 16:09:10 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 96, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 344, in get_room_ids
    if not self.setup():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 355, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
netatmo

All 32 comments

+1

Seeing the same issue. Often it can be resolved by rebooting my Hass.IO server completely (not just by restarting Home Assistant)

Same issue here:

2019-04-15 21:59:18 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 96, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 344, in get_room_ids
    if not self.setup():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 355, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

I have the netatmo Thermostat, the Welcome camera and the Weather Station. All works fine in previous versions (0.89), but now the thermostat don't show up and report this error :/

I try with the discovery: false and the climate: platform: netatmo but still reports the same error.

Might be related to #23380 and fixed with #23429.

Waiting for the next hassio release :)

Should ship soon. 0.91.1 has just been merged. #23448

Is this still an issue?

I haven't seen any issues for the last 2 versions (.92 and .92.1)

@fviscon How about you?

Same issue with the last hassio version (.92.1) :(

i still have the same problem, also with 92.1.
I try to use a fresh new netatmo api/secret, but the problem is still here :/

2019-05-01 06:11:00 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 97, in setup_platform
for room_id in room_data.get_room_ids():
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
if not self.setup():
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 356, in setup
self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 130, in __init__
raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

Home Assistant 92.1 on Synology Docker, same issue.

I take my comment back - today I have the issue again, on HA .92.1

@MTrab If you're currently experiencing this can you please check your app page in the dev section over at Netatmo if your app is banned? If so, unban it and try again after after a while. I noticed this error (No device found, errors in response) yesterday evening I unbaned it and when I tried to investigate this morning it worked fine.

If I restart my HA, when experiencing this issue, then all is back to normal again - so I'd recon that it have nothing to do with the app in netatmo dev.

It was worth a shot. This is really difficult to debug as I cannot reproduce it.

2019-05-19 15:31:44 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 97, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
    if not self.setup():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 358, in setup
    self.update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 382, in update
    homestatus_room['therm_setpoint_temperature']
KeyError: 'therm_setpoint_temperature'

This is what I get in the log. After upgrade to 0.93.1 it will not connect, no matter how many times I reboot/restart HA :(

Screenshot from the app:

image

Just realised that this is not the same error as the initial issue.
Creating a new issue report with this issue.

@fviscon is this still an issue in 0.95.4?

@fviscon is this still an issue in 0.95.4?

Yes:

Tue Jul 09 2019 08:57:58 GMT+0200 (hora de verano de Europa central)
Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 98, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 346, in get_room_ids
    if not self.setup():
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 357, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Thermostat.py", line 156, in __init__
    raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response

@JesCR could you please provide your Netatmo related config?

@JesCR could you please provide your Netatmo related config?

Sure!, here it's:

netatmo:
  api_key: !secret netatmo_apikey
  secret_key: !secret netatmo_secretkey
  username: !secret netatmo_username
  password: !secret netatmo_password
  webhooks: true
  discovery: true

I also try with

discovery: false

and

climate:
  - platform: netatmo

And i use a new netatmo app and check that the App State is ACTIVATE.

But always get the same error

@JesCR Could you run this script and check what it returns for python gen_test_data.py --USERNAME <your_username> --PASSWORD <your_password> --CLIENT_ID <your_client_id> --CLIENT_SECRET <your_client_secret> --modules Thermostat?

python gen_test_data.py --USERNAME --PASSWORD --CLIENT_ID --CLIENT_SECRET --modules Thermostat

Done!
result:

Traceback (most recent call last): File "gen_test_data.py", line 3, in <module> import pyatmo ImportError: No module named pyatmo

BTW i'm running hassio in a nuc (but i had the problem in a pi too)

PS: i put the get_test_data.py in the roor of my hassio (folder workspace) and runned it from a cloud9 ide addon

after

➜  /workspace pip install pyatmo  
Collecting pyatmo
  Downloading https://files.pythonhosted.org/packages/e8/e1/41bcecaabb49f774986af755c884a3473f7ecb60ef76782bb18213542e02/pyatmo-2.1.1.tar.gz
Installing collected packages: pyatmo
  Running setup.py install for pyatmo ... done
Successfully installed pyatmo-2.1.1

still get:

Traceback (most recent call last):
  File "gen_test_data.py", line 3, in <module>
    import pyatmo
  File "/usr/lib/python2.7/site-packages/pyatmo.py", line 14, in <module>
    from smart_home import _BASE_URL, NoDevice, postRequest
  File "/usr/lib/python2.7/site-packages/smart_home/__init__.py", line 4, in <module>
    import requests

Oops, you've been installing with python 2.7. You probably need pip3 install pyatmo. Feel free to ping me on Discord (might be quicker).

@cgtobi sorry but i don't use Discord :/

So i need to install python 3.7.4 first. After that pip3 and then pyatmo?
In my ubuntu host?
So my hassio docker can use the pyatmo and netatmo thermostat will work?

I don't want you to fiddle with your live environment too much. But you should be able to run this anywhere where you have python 3.6+, which includes your HA docker container. But I have hardly any docker experience so I can't help you much with this.

I will try when i get home and will ping back with the results!

@cgtobi i was able to run the script (after install python3, pip3 and request)
A lot of info printed, the last lines:

INFO:smart_home:Response: INFO:smart_home:{"status": "ok", "time_server": 1562685646} ERROR:__main__:warning, no thermostat available for testing

I can access my thermostat without problem with the app and through the web, so why this warning? is that warning the problem?

1) Please log into the Netatmo developer page.
2) Then go to Netatmo Energy - Homesdata, click that yellow arrow and hit try it.
image

This should give you some results. If it returns more than just {"status": "ok", "time_server": 1562685646} then something is probably wrong on in pyatmo.

@JesCR are you on the HA forum, so we can discuss this via PM?

@cgtobi , you have a PM in the HA forum ;)

Was this page helpful?
0 / 5 - 0 ratings