fjs21 / homebridge-kumo

Control your Kumo cloud devices using Homebridge.
https://www.npmjs.com/package/homebridge-kumo
Apache License 2.0
33 stars 8 forks source link

Force a zone refresh when direct access fails #95

Closed Jason-Morcos closed 8 months ago

Jason-Morcos commented 9 months ago
Screenshot 2023-10-14 at 12 49 30

I love this plugin and rely on it heavily. However, randomly directly access stops working and I need to restart the plugin to resume functioning. I think this is because the zone info becomes stale (old token) and then it's unable to auth.

This change adds a retry in which the device zone info is updated from the cloud, and the query retried, if the access fails.

Not really sure how to test this, but I'm pretty sure this would fix the bug - is there an easy was that I can test this myself @fjs21?

Jason-Morcos commented 8 months ago

@fjs21 Hey! Wanted to check in on this - are you interested in accepting PRs to this repo at this time? If not, I am happy to fork and go my own way but was hoping to contribute instead - truly appreciate this project, it's incredibly useful in my home automation.

fjs21 commented 8 months ago

Sorry about that. Thanks for the PR. I merged and published the new version on NPM. Let me know if you see any issues.

Jason-Morcos commented 8 months ago

Thank you! I appreciate it!

hansw1204 commented 8 months ago

THANK YOU! I also appreciate it.