py-smart-gardena / hass-gardena-smart-system

Home Assistant custom component integration for Gardena Smart System
Apache License 2.0
213 stars 53 forks source link

After a certain period of time the Gardena sensor data is not refreshed and Gardena watering commands are not executed #143

Open RohlikX opened 2 years ago

RohlikX commented 2 years ago

After some time (if I do not restart the HA) the Gardena integration does not restore the data from the smart sensor and the commands to switch on/off irrigation (Gardena smart irrigation computer) are not executed. The solution is to restart the HA to probably refresh the integration, but this is not an ideal solution.

blissi commented 2 years ago

I have the same issue (latest version installed).

jlatvala commented 2 years ago

Similar problem here, but with mower (mower status not updated to HA after some days). Seems that the connection between HA and gardena/husqvarna API works now some days (earlier it worked about 1 day)

spapals commented 2 years ago

Same here with newest version with Gardena Life.

Gauthier-L commented 2 years ago

Same issue !

For dev. the traces logs :

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/gardena/smart_system.py", line 185, in start_ws ws_url = await self.get_ws_url(location) File "/usr/local/lib/python3.10/site-packages/backoff/_async.py", line 133, in retry ret = await target(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/gardena/smart_system.py", line 209, in get_ws_url r = await self.client.post( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1842, in post return await self.request( File "/usr/local/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 88, in request await self.ensure_active_token() File "/usr/local/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 105, in ensure_active_token token = await self.fetch_token(url, grant_type='client_credentials') File "/usr/local/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 118, in _fetch_token resp = await self.post( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1842, in post return await self.request( File "/usr/local/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 92, in request return await super(AsyncOAuth2Client, self).request( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1514, in request request = self.build_request( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 344, in build_request url = self._merge_url(url) File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 374, in _merge_url merge_url = URL(url) File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 102, in init raise TypeError( TypeError: Invalid type for url. Expected str or httpx.URL, got <class 'NoneType'>: None

Thanks !

JBO-Home22 commented 2 years ago

Same Issue here

qestoppey commented 2 years ago

Fixed for me with latest (beta) version 1.0.0-0b907

The dependency to py-smart-gardena is updated and seems to refresh the token with the server.

JBO-Home22 commented 2 years ago

Last week I updated also to latest (beta) version 1.0.0-0b907. Since updating it works fine. Thanks @qestoppey for the Information

grm commented 2 years ago

Hello ! I have been quite busy, but old version are not supported anymore. Gardena changed their API forcing everyone developing integrations to update their code.

So you should use the latest version :)

GLehnhoff commented 1 year ago

Same problem