nordicopen / easee_hass

Custom component for Easee EV charger integration with Home Assistant
211 stars 34 forks source link

Integration suddenly not wokring #315

Closed t112013 closed 1 year ago

t112013 commented 1 year ago

The problem

Connected my car and then i got status unkown7 isted of connected

Skjermbilde 2023-04-28 kl  22 41 41

So i reloaded the integration and now nothing seems to make sence. The easee app works just fine

Skjermbilde 2023-04-28 kl  22 41 26

I have two chargers, both of them show the same disconnected values. Also tried rebooting the home assistant host system just in case.

Seems to be an authorization issue ? I have deleted and re-added the integration but no luck.

Version of Easee integration having the issue?

0.9.50

Version of Home Assistant Core having the issue?

2023.4.6

Anything in the logs that might be useful for us?

2023-04-28 22:54:58.593 DEBUG (MainThread) [pyeasee.easee] Unautorized (401: https://api.easee.com/firmware/EHYUJEXW/latest) 2023-04-28 22:54:58.593 DEBUG (MainThread) [pyeasee.easee] Re authorizing due to 401 2023-04-28 22:54:58.593 DEBUG (MainThread) [pyeasee.easee] getting token for user: xxxx@xxxxx.xxx 2023-04-28 22:54:58.663 DEBUG (MainThread) [pyeasee.easee] TOKEN: {'accessToken': 'xxxxxxxxxxxxxx', 'expiresIn': 86400, 'accessClaims': ['User'], 'tokenType': 'Bearer', 'refreshToken': 'xxxxxxxxxxxxx'} 2023-04-28 22:54:58.663 DEBUG (MainThread) [pyeasee.easee] Unautorized (401: https://api.easee.com/firmware/EH66B2Q4/latest)

Additional information

No response

LauWs commented 1 year ago

I have the exact same issue. Tried removing it and then install again, no luck.

Furthermore, if i click "Visit" i get to this page with error: image image image

So maybe easee changed some url thing and not the integration?

pvprodk commented 1 year ago

Same problem

t112013 commented 1 year ago

BTW in case it may help i read in the newspapers last week that easee had stopped paying their providers (they are going throw lots of economic issues), i imagine some azure or aws just stoopped some api services ? just an idea hehe

olalid commented 1 year ago

I am seeing this too (but only after a restart). I am investigating...

olalid commented 1 year ago

A quick and dirty workaround in https://github.com/fondberg/easee_hass/pull/316 should solve this, at least temporarily until we understand what is going on.

olalid commented 1 year ago

Please try latest version (0.9.51) that was just released.

pvprodk commented 1 year ago

Please try latest version (0.9.51) that was just released.

Solved the problem here 👌🏼☺️

PeteHassio commented 1 year ago

Thanks for the quick fix! The status "unknown_7" is still there when the car is connected.

astrandb commented 1 year ago

Status 7 is a new (or previously not used) status code. We will try fo find what it means. Perhaps you can see what the app displays?

PeteHassio commented 1 year ago

The app shows "Waiting for approval". After the initial approval, the status in home assistant is displayed correctly again. Thanks for the help!

astrandb commented 1 year ago

OK, we will try to get the formal explanation from Easee. We will fix a proper message in next release. At least we know whatUnknown 7 is.

t112013 commented 1 year ago

It must be something else going on here becasue i have two chargers, one of them gives me unknown 7 and the other one gives me Awaiting start, while the app was showing waiting for approval. ( i have to approve the chargers every time i connect them, using the start command) My automations have wowrked flawlessly until yesterday so how come one charges changes to unknown 7 and the other keeps the "old" awaiting start status ? The only thing i can see is that they dont have the same software version even i bough them together so i guess they are exacly the same hardware. The charger giving me unknow 7 is on version of software v310 while the one that gives awaiting_start is on version v307 Both are showing up to date, does anyone see the same problem ? and does anyone know how to upgrade /force upgrade the software ?

astrandb commented 1 year ago

There are a number of different issues that have surfaced the last few days due to changes in the Easee public API.

We try fix the issues as soon as we understand the underlying causes.

Please create new issues for each problem. When a new issue is added to this thread it is difficult for users (and developers) to see if a problem is already reported and if a fix is underway.

t112013 commented 1 year ago

Oh thanks for the great feedback. When are you planning on releasing the new version. Or is ir on the beta channel? Cheers

Epenance commented 1 year ago

To add to this, went using their own API and sending start commands it will try to start then go back to the Awaiting Auth, Easee confirmed they released a new firmware update on my charger roughly a week ago when the errors started showing up, so I'm certain something have changed on their part.

Weird thing is I can still start the charger through a thirdparty app called Monta here in Denmark, but not directly through their own API so not sure if they are doing some extra hoops to make it.

olalid commented 1 year ago

@Epenance have you read this article about the difference between start/stop/pause/resume? https://developer.easee.cloud/docs/settings I.e start is not a command used to start charging, it is to initiate authorisation. You might what to try using resume instead.

Epenance commented 1 year ago

@olalid Thanks for the hint, I will try to do a test today when I get home using Resume, but I still assume that I would need to use start initially since I have authentication required on my charger.

Epenance commented 1 year ago

Using Resume made no difference, however I'll leave a support ticket at Easee to get more information rather than hijacking this issue :)

olalid commented 1 year ago

Ok, I assume it has to be something that has changed on Easees side then.

t112013 commented 1 year ago

i can confirm that the firmware version v310 makes the difference, until yesterday or so this charger was not displaying unkown 7 but my other charger did (they didnt have version v310, now they both do)

olalid commented 1 year ago

Ok, thanks for letting us know.

olalid commented 1 year ago

Please test the latest release, hopefully it solves the status code issue.

iboboc commented 1 year ago

My integration is partially working after last firmware update. Easee home, firmware v310, integration 0.9.52.

It shows only partial data, the most important ones are unavailable.

image

image

Any idea or sugesstion? Thanks.

olalid commented 1 year ago

Are you sure the entities are enabled? Any error in the log file?

iboboc commented 1 year ago

Damn' it, sorry about that.

I never disabled it, so being disabled, my assumption was that they are not working/receiving data. Even after removing the integration and reinstall it, still those entities were not available.

I re-enabled each one manually and it is working. Sorry for wasting your time and help for feedback.

olalid commented 1 year ago

Strange that they were disabled though, this is not under the integrations control really, but it should not randomly change. In any case, no problem.

toredash commented 1 year ago

I think this is related to when the charger (api/chargers/{id}) is returning [{"levelOfAccess": 2}], which is when the access mode is set to "Key only (Public)". I've done via the App, but I'm unable to find this API call in their docs.

In their docs they state that code 7 is: AwaitingAuthentication = 7, but there is also a 8: Deauthenticating = 8

Source: https://developer.easee.cloud/docs/enumerations (under OpMode).

AFAIK, this isn't supported in the python lib by @fondberg

Does this provide any help @olalid ?

olalid commented 1 year ago

A "translation" of status code 7 was added in the most recent release v0.9.52, so as far as I am concerned, the original problems that was reported here was solved a few weeks ago. We have just kept this issue open waiting for feedback from the original reporter. For some reason people seem to think that this thread is a good place to report other unrelated problems, so I am closing it now to remove that temptation for everyone :)

I am not sure what you mean about "isn't supported in the python lib". What are you missing exactly?

Thanks for the pointer to where to find official documentation for what 7 (and 8) means.