Closed vincenzosuraci closed 5 years ago
@vincenzosuraci 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.
@cgtobi many thanks for your reply. I followed your suggestion, but I was not banned:
Thanks again for taking care of it.
VS
Well, it was worth a try. This is really difficult as I can't reliably reproduce the issue.
I hope to get more debugging code included into the next upstream release of pyatmo. I rarely get any errors myself, therefore it is difficult to debug this issue. @vincenzosuraci which devices do you have associated with your account?
@vincenzosuraci please DM me on Discord or HA forum if you want to provide more test data.
I think I have the same issue at the moment. When I debug I get the following error: {"error":{"code":13,"message":"Application does not have the good scope rights"}}, I think it's an issue on netatmo side (my app have all the scopes + it was working an hour ago)
I also see that we are using the getthermostatdata/ call which is now deprecated..
@bend Where do you see getthermostatdata
being used?
@cgtobi I think I made a mistake, it was not on getthermostatdata. However I've seen a Forbidden error yesterday in the logs, but I've restarted HA since then, so lost the logs. I will see if the error happens again. Yesterday my netatmo thermostat and valves where not updating and I couldn't modify their temp neither. the error was Forbidden. It works again since I've restarted. I use the latest 0.94
@cgtobi
I have the error again:
home-assistant | 2019-06-07 13:02:47 ERROR (SyncWorker_14) [smart_home] Traceback (most recent call last): home-assistant | File "/usr/local/lib/python3.7/site-packages/smart_home/__init__.py", line 41, in postRequest home-assistant | if params home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen home-assistant | return opener.open(url, data, timeout) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open home-assistant | response = meth(req, response) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response home-assistant | 'http', request, response, code, msg, hdrs) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 569, in error home-assistant | return self._call_chain(*args) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain home-assistant | result = func(*args) home-assistant | File "/usr/local/lib/python3.7/urllib/request.py", line 649, in http_error_default home-assistant | raise HTTPError(req.full_url, code, msg, hdrs, fp) home-assistant | urllib.error.HTTPError: HTTP Error 403: Forbidden
The requested URL is https://api.netatmo.com/api/homesdata
Params are: {'access_token': 'XXXX'}
So I don't know why we get an access forbidden ?
@cgtobi I have the error also with https://api.netatmo.com/api/setroomthermpoint in HA. However when I call directly the pyatmo lib, the call works... Could be a problem of token expired ?
so from what I see in the logs: token created at: 09:58:59 with correct scopes token refreshed at 12:29:11 First error at 13:01:38. So the error happens after the token is being refreshed.
Good find @bend. I’ll take a look shortly.
I discovered that when you turn off the thermostat in the app and you try to call setroomthermpoint you get a forbiden error.
Response from netatmo support : Hello,
Thank you for the details of your return.
Please try these two options:
This should solve your situation.
Have a nice day
@bend thanks for the investigation.
I'm still experiencing issues with the Netatmo component. Right now, I cannot see anymore the Netatmo thermostat in the Lovelace web GU. I get an entity not availbale: climate.netatmo_disimpegno
warning (I translated the message from Italian to English).
The LOG is:
2019-06-09 21:14:35 ERROR (MainThread) [homeassistant.components.climate] 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 97, in setup_platform
for room_id in room_data.get_room_ids():
File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
if not self.setup():
File "/usr/src/homeassistant/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 160, in __init__
raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
2019-06-09 21:14:37 ERROR (MainThread) [homeassistant.components.climate] 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 97, in setup_platform
for room_id in room_data.get_room_ids():
File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 345, in get_room_ids
if not self.setup():
File "/usr/src/homeassistant/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 160, in __init__
raise NoDevice("No device found, errors in response")
smart_home.NoDevice: No device found, errors in response
Response from netatmo support : Hello,
Thank you for the details of your return.
Please try these two options:
- Skip the frequency from 5 to 10 minutes since the data is updated every 10 min only
- Please refresh the token every 3 hr(10800 sec) sharp
This should solve your situation.
Have a nice day
Very good point.
Sorry for the dummy question but... Where (in which config file) and how (which parameters must be edited) can I change the Netatmo component configuration?
VS
@vincent-k It's not a config value, you'll have to change the value in the pyatmo code.
@vincenzosuraci I've changed the time between the updates to 5 minutes in https://github.com/home-assistant/home-assistant/pull/24407.
scan_interval: 600
might be what you're looking for.
@vincenzosuraci would you mind to test if this is still an issue with 0.96.0b0 (beta)?
Since a lot has changed I'll close this. Should this not be fixed please let me know so we can reopen this issue @vincenzosuraci.
Home Assistant release with the issue: arch: armv7 channel: stable hassos: "2.10" homeassistant: 0.92.1 hostname: hassio logging: info machine: raspberrypi3 supervisor: "162" supported_arch:
Last working Home Assistant release: All of them had this issue
Operating environment: Hassio
Component/platform: thermostat/netatmo
Description of problem:
climate.netatmo_disimpegno_2
entity: that_2
makes me thoughtful, since I have only one Netatmo Thermostat...Problem-relevant
configuration.yaml
entries:Traceback: