Closed HammerAce42 closed 4 years ago
@HammerAce42 I wonder if there is a lifespan on the auth tokens that I'm not accounting for yet. I restart my homebridge instance every couple days due to updates for other plugins, so I haven't run into this issue yet. Do you have a rough estimate on how long it takes for it to happen?
It was certainly less than 48 hours since I last restarted homebridge to the point this issue occurred. However, I did have to reboot my router/disrupt internet connectivity a few times in between which may have caused the Rest+ to get a new auth token. Perhaps a new auth token should be requested as an automatic step anytime an error like the one I posted above occurs?
The issue repeated when I intentionally took down my internet to test this, so it's almost certainly caused by a disruption in connectivity.
@HammerAce42 thanks for all of the info! I think I have enough to go off of for working on a fix, but no promises on when I will be able to get it released
@dgreif, I am having this issue regularly despite my internet/wifi being consistently online (as far as I can tell). My theory around it being due to connectivity resets is probably incorrect. Just wanted to let you know in case that affects the fix that you come up with.
Thanks!
Were there any changes in v2 that might have helped with this? I haven't seen the issue arise since I got 2.0.1 working yesterday, and am hoping that's not a coincidence :)
I did update all dependencies in v2, which includes the library used to maintain that connection. It's possible that they fixed something in that library. Keep me posted!
Unfortunately the issue is still present. I am seeing the same error as included in the earlier logs.
Friendly nudge on this! :)
@HammerAce42 sorry for the neglect, I've been spending all my time on homebridge-ring
and haven't had a chance to look into it. Are you still having issues? (Assuming the answer is yes lol). I haven't seen this at all, but I think my homebridge resets at lease once every 24 hours because of another plugin that I'm using that has uncaught errors.
No worries - thanks for your efforts on the ring plugin - I benefit from that as well :)
This issue still occurs regularly for me - I haven't figured out exactly what the expiration time period is. I end up having to manually restart Homebridge whenever I see it.
Sounds good, thanks for the info. I think I can detect when it errors, just gonna take some refactoring to get it to reconnect. Will get to it once Ring stabilizes 😄
@HammerAce42 Just released v2.0.3
which adds logic to open a new MQTT client with aws if the login credentials expire. Give it a try for a few days and let me know how it goes!
@dgreif Thanks - have updated and will post here if I see the issue again in the next few days.
This issue hasn't reoccurred since I updated to the release with the fix. Closing it out.
Thanks again for getting this sorted!
I have found that I am often getting into a state where the Rest+ stops responding to any commands from homekit (on/off, brightness, color change).
Looking at the logs, I see the following error when this occurs:
It appears that the only way to clear the issue when it occurs is to restart homebridge.