Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication rejected #144

Closed
glyn12 opened this issue Apr 22, 2022 · 4 comments
Closed

Authentication rejected #144

glyn12 opened this issue Apr 22, 2022 · 4 comments

Comments

@glyn12
Copy link

glyn12 commented Apr 22, 2022

I have just installed via HACS, however, using the following combinations, I can't get past the authentication screen.

I have seen on the myenergi forum similar threads. But I 100% have my correct hub id (copy and pasted it from the myenergi website, as well as typing it in directly), and I have tried several generations of API key, but every time I get "Hub serial or API key is wrong."

Happy to try to help debug!

@G6EJD
Copy link

G6EJD commented May 9, 2022

Its your data not the integration, its almost always a typographical error, try copy and paste the API key to reduce errors.

@glyn12
Copy link
Author

glyn12 commented May 9, 2022

I solved it, it wasn't a typo, I was already copying and pasting data.

The problem is in https://github.com/CJNE/pymyenergi/blob/main/pymyenergi/connection.py - or maybe it's actually on MyEnergi's side. It was always trying to authenticate me on the s9 server (which I believe is down to their return from the director). However, whilst the s9 server rejected my credentials, the s18 server accepted them (I guess I've been moved to their "cloud" server, which I understand the s18 is). Making hacky adjustments in connnection.py to force it to use s18 enabled it to work.

Unfortunately, the attempt to move to the next server in connection.py doesn't appear to work, as it's reset each time one tries to authenticate from HA.

@G6EJD
Copy link

G6EJD commented May 9, 2022

It astounds me that they don’t use some form of logical name instead of a their current addressing scheme, a simple ‘authserver…’ and then change the definition of the logical name as required would make it all so simple and remove to the need to track their changes.

@glyn12
Copy link
Author

glyn12 commented May 9, 2022

Closing the issue as it's really an underlying myenergi issue / enhancement, although, I believe it will cause an issue for newer myenergi customers who start on the s18 server.

@glyn12 glyn12 closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants