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

Cannot authenticate with API

Open asinla opened this issue 1 year ago • 12 comments

This afternoon I started getting the following issue. Tried restarting server and restarting the integration but nothing is working.

Logger: custom_components.emporia_vue Source: custom_components/emporia_vue/init.py:99 Integration: Emporia Vue (documentation, issues) First occurred: 5:01:23 PM (3 occurrences) Last logged: 5:13:19 PM

Could not authenticate with Emporia API

asinla avatar Oct 22 '23 00:10 asinla

Looks like I just got the same error earlier this evening. Hoping it's a temporary server issue in their part.

This error originated from a custom integration.

Logger: custom_components.emporia_vue
Source: custom_components/emporia_vue/__init__.py:99
Integration: Emporia Vue (documentation, issues)
First occurred: 21:18:02 (3 occurrences)
Last logged: 21:46:24

Could not authenticate with Emporia API

JAudi23 avatar Nov 19 '23 02:11 JAudi23

If it carries on like this I'm going to zap it and go local with ESPHome.

JonSilver avatar Nov 19 '23 08:11 JonSilver

@JonSilver are you seeing the same error or is that just a general statement? I realized after I posted that the op posted his error last month.

JAudi23 avatar Nov 19 '23 12:11 JAudi23

Emporia servers appear to be down at the moment but as usual no word or even an email from Emporia themselves ( not even on there support forum)

wildcard5 avatar Nov 19 '23 13:11 wildcard5

And now even the support centre is closed..... Strange. image

wildcard5 avatar Nov 19 '23 13:11 wildcard5

@wildcard5, if you open a sub-forum, like "Report a Bug", you can post there.

There is a related topic already: https://community.emporiaenergy.com/topic/second-and-minute-data-not-reporting/.

CrazyCoder avatar Nov 19 '23 15:11 CrazyCoder

This issue just started for me this morning as well. I tried deleting and readding, but that didn't fix it either. Fails on the latest version 0.9.2 and also tried rolling back to 0.8.x.

Anyone else having issues?

jrdnly avatar Feb 28 '24 19:02 jrdnly

I've had some issues recently after updates of HA where EmporiaVue isn't loaded up. When I try reloading the integration it still does not load. Restarting HA seems to normally fix it for me after the first failure (after an HA update).

JAudi23 avatar Feb 28 '24 19:02 JAudi23

Same thing here today. I updated to latest version and nothing is reporting. The integration loads fine and the device and entities are there they just report 0. Restarting has not helped. Anyone else?

asinla avatar Feb 28 '24 22:02 asinla

Still not working as of this morning. Here's the error I'm seeing in the logs.

Your 'access_token' token could not be verified (The token is not yet valid (iat)).

jrdnly avatar Feb 29 '24 17:02 jrdnly

And... as of now, it is back for me. Must have been an Emporia server thing...

jrdnly avatar Feb 29 '24 20:02 jrdnly

The authentication issues people are seeing with the latest versions are likely the same thing as seen in #260 where the newer libraries don't allow for as much clock drift. If your Home Assistant server's clock has drifted a bit behind reality then when it gets a new token (eg at startup, but also every hour after that) the time that the token states as "not valid before" hasn't happened yet locally.

I'm going to look into whether I can loosen or disable that check within the authentication library, but otherwise the fix is to make sure your server has synced time with an NTP server recently.

magico13 avatar Mar 03 '24 17:03 magico13