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

Reconnect API if connection is lost - Update __init__.py #209

Closed BasThoP closed 2 months ago

BasThoP commented 5 months ago

Added auto-connect to api if the internet connection or api is lost.

Succesfully tested. 2024-06-04 12_55_13-Einstellungen – Home Assistant und 3 weitere Seiten - Geschäftlich – Microsoft​

JayChickenK commented 4 months ago

Still drops connection (maybe something to do with AWS, there is a 2h connection limit?) but with your fix you dont need to restart the gardena integration. Reestablishes the connection after a few seconds. Can live with a few seconds of downtime per day. Nice work :+1: github

BasThoP commented 4 months ago

Yes that’s true. I couldn’t fix it. There is a limit for max request on the api. The Integration triggers continuously the api. A pulling of 60 Seconds would be nice and maybe prevent the closed connection.

Thanks.

Von: JayChickenK @.> Gesendet: Montag, 8. Juli 2024 19:10 An: py-smart-gardena/hass-gardena-smart-system @.> Cc: Basting Thomas @.>; Author @.> Betreff: Re: [py-smart-gardena/hass-gardena-smart-system] Reconnect API if connection is lost - Update init.py (PR #209)

Still drops connection (maybe something to do with AWS, there is a 2h connection limit?) but with your fix you dont need to restart the gardena integration. Reestablishes the connection after a few seconds. Can live with a few seconds of downtime per day. Nice work 👍 github.PNG (view on web) https://github.com/py-smart-gardena/hass-gardena-smart-system/assets/19538983/741e7d84-a9d1-49fe-8754-ddba150610e8

— Reply to this email directly, view it on GitHub https://github.com/py-smart-gardena/hass-gardena-smart-system/pull/209#issuecomment-2214736296 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWP7RBL5533LJYTGA3NDYRDZLLBVXAVCNFSM6AAAAABIYINH56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUG4ZTMMRZGY . You are receiving this because you authored the thread.Message ID: @. @.> >

marsounjan commented 4 months ago

Please merge this :) I was about creating almost a same PR when I realised this already exists

grm commented 2 months ago

Thanks for the PR, that is nice ;)