ha-emporia-vue icon indicating copy to clipboard operation
ha-emporia-vue copied to clipboard

Disconnects

Open realitytech opened this issue 3 years ago • 6 comments

I get frequent loss of data accompanied by:

2022-10-07 21:26:04.009 ERROR (MainThread) [custom_components.emporia_vue] Could not authenticate with Emporia API

in the logs. Sometimes a restart gets it, other times, like today, It just won't come back.

realitytech avatar Oct 07 '22 13:10 realitytech

I get frequent loss of data accompanied by:

2022-10-07 21:26:04.009 ERROR (MainThread) [custom_components.emporia_vue] Could not authenticate with Emporia API

in the logs. Sometimes a restart gets it, other times, like today, It just won't come back.

Happening to me too.

ADavis321 avatar Oct 07 '22 17:10 ADavis321

Its been intermittent till this morning, now nothing. No errors in log bar the one above. the Vue app works just fine.

realitytech avatar Oct 07 '22 17:10 realitytech

Unfortunately this is a pretty common issue with their API and there's not much I can do about it. I've already got retry logic but sometimes they just give back 500 responses. Generally just waiting is your best bet, it'll come back up at some point since the integration is still making a request each minute for the latest data. If you reload/restart while their API is on the fritz then you might get errors during the initial requests that the integration makes, which would prevent it from creating all of the devices and entities correctly, and those will not come back automatically. Because of that I'd recommend not restarting the integration when you're seeing "Error communicating with the Emporia API" in the logs.

magico13 avatar Oct 07 '22 17:10 magico13

I'd also recommend the pre-release version which has better handling for reauthentication. I'm hoping to release that as a main release this weekend.

magico13 avatar Oct 07 '22 17:10 magico13

Ive done some digging over the last few hours and I've found a possible answer.

This morning the integration is working just fine. I had also checked yesterday when it wasn't working, and seen that the Vue had no DHCP lease. the give away is that we were doing major network changes yesterday.

So this morning I powered off the AP in the cellar, rebooted the VUE and made sure it had no lease. Sure enough the error started again after about 5 mins.

So, it would seem that there must be a device connected and working for authentication to work. Restoring DHCP got the integration back a few mins later.

A lot of these are going to be in fuse boards as that's where Emporia suggest you put them, and thus, partially screened if you don't use the external antenna properly) and liable to WiFi issues. It explains the random nature of the drop outs and why you are struggling to nail it down.

If anyone else can verify this. I'd guess turning off the Vue would do the same.

Almost makes me want an integration to talk to either PRTG or PF and get device status and/or DHCP lease status.

realitytech avatar Oct 08 '22 08:10 realitytech

Still getting the data disappearance. It would be good if it could sync any missing data back from the cloud. Not sure if this is possible?

iotinkognito avatar Feb 28 '23 05:02 iotinkognito