simbaja / ha_gehome

GE Home Appliances (SmartHQ) for Home Assistant
MIT License
327 stars 77 forks source link

Error refreshing authentication: Could not refresh OAuth token - Happening about Hourly #210

Open Snuffy2 opened 9 months ago

Snuffy2 commented 9 months ago

Splitting from #196 as requested.

I'm seeing this error about every hour. The Washer & Dryer will also become unavailable for a short period of time and then become available again.

An hours worth of debug logs is here: home-assistant_2023-12-07T03-39-15.224Z.log

The OAuth Warning is line 6418.

I'm also seeing another Warning (Line 97 & 156): Could not find appliance D828C9D6322D in known device list. Could not find appliance D828C9A9A9E7 in known device list.

simbaja commented 9 months ago

Not sure why the refresh fails, but I added some fallback logic to try the full flow. Let me know if dev5 works for you.

Snuffy2 commented 9 months ago

Updated to dev6. Can get debug logs, but I'm now getting these 2 warnings about every hour:

2023-12-10 19:49:22.838 WARNING (MainThread) [gehomesdk.clients.base_client] Error occurred when retrying token refresh using full flow, ignoring.
2023-12-10 19:49:22.839 WARNING (MainThread) [gehomesdk.clients.base_client] Error refreshing authentication: Could not refresh OAuth token
simbaja commented 9 months ago

That's related to the retry/fallback code I added, guessing that you're still seeing it disconnect each hour based on those messages. Yes, if you could get some debug logs, perhaps there's something that'll illuminate the situation. I don't know why that wouldn't have worked though.

brylee123 commented 4 months ago

Hi I have the GE Café Specialty Drip Coffee Maker, it is still asking to reauth every hour or so. I was wondering if this is a new issue or related to this issue.

image

simbaja commented 4 months ago

seems there might be something else going on in your case, I'd suggest completely removing the integration, making sure the ge_home directory in custom_components is gone, then reinstalling. It shouldn't generate duplicate entities, so we need to resolve that first.