Closed arnoldpistorius closed 2 years ago
The issue started this morning again. Now having some logging. Seems that at some point the service returns 503 Service Unavailable and then the integration does not recover from that:
2022-03-18 10:16:55 INFO (MainThread) [custom_components.zonneplan_one.coordinator] _async_update_data: start
2022-03-18 10:16:55 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response header: <CIMultiDictProxy('Date': 'Fri, 18 Mar 2022 09:16:55 GMT', 'Server': 'Apache', 'Content-Length': '299', 'Connection': 'close', 'Content-Type': 'text/html; charset=iso-8859-1')>
2022-03-18 10:16:55 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response status: 503
2022-03-18 10:16:55 ERROR (MainThread) [custom_components.zonneplan_one.coordinator] Authentication failed while fetching zonneplan_one data: 503, message='Service Unavailable', url=URL('https://app-api.zonneplan.nl/user-accounts/me')
2022-03-18 10:16:55 DEBUG (MainThread) [custom_components.zonneplan_one.coordinator] Finished fetching zonneplan_one data in 0.346 seconds (success: False)
2022-03-18 10:16:55 INFO (MainThread) [custom_components.zonneplan_one.config_flow] __init__
2022-03-18 10:16:55 DEBUG (MainThread) [custom_components.zonneplan_one.config_flow] reauth {'auth_implementation': 'zonneplan_one', 'token': {'token_type': 'Bearer', 'expires_in': 28800, 'access_token': '**REDACTED**', 'refresh_token': '**REDACTED**', 'expires_at': 1647598975.465228}, 'email': '**REDACTED**'}
After this happens, the zonneplan_one component doesn't log anything anymore (it happened almost 4 hours ago).
Tagging you @fsaris :)
don't you get an notification to re-authenticate the app in this case? With version 0.0.10 this should be improved
Yes I get that, but it happens not in a consequent interval sometimes a few weeks, sometimes a few hours. The mobile app doesnt have to reauthenticate. So I guess something can be improved in refreshing the access token?
Can you test version 0.0.10 to see if it's still happens?
I’ve just installed it via HACS, let’s see how it goes! 👏
@fsaris looks like the issue is not happening anymore. Thanks for the update!!
Hi,
I have the issue that at some time (after few days) the states of the integration become "unavailable" and won't recover until I restart Home Assistant.
I don't see anything in HA logs, but I also don't have the debug log of this integration enabled. I have used same e-mail address as the Zonneplan app on my phone uses, could that be a problem?
I will enable the debug logging and let you know when it happens again