-
Notifications
You must be signed in to change notification settings - Fork 25
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
Login fail for version >=0.2.4 with Response code 401 (Unauthorized) #37
Comments
I was thinking it might be due to using the login in 2 different integrations. Do you have another integration running? (official HA eufy integration or ioBroker). The reasoning was that with the changes, there are some more delays and now more often it will call the Eufy API (e.g. hourly for battery percentage). The other script might block this script, as I saw sometimes you are logged out of other sessions when you log in for example at a new phone... But seeing these logs, I don't think that is the case. It still is a good idea to only use an account for one integration. But what I see here is that your installation sends Due to this, you see it very quickly after each other is refreshing the devices twice. I build a solution that the answer to this request is cached, so it is not requested too often. But as shown here, in this situation it is called twice in the same second, so the first request is not finished before the second one starts. This probably means both requests are doing the full request, with both doing a login and then a request. This makes one of them fail. I think it can be fixed by re-arranging the code a bit... maybe first refreshing the devices and only when that is finished subscribing to MQTT... |
Should be a uniqe account, but having two addons, iobroker and mobile phones i might have messed up a little bit... Talking about twice, using more debug on
|
Yes, here you see the same thing happening (2 x refreshing devices), but with different error. Above the error is This error is I think I can make a new version tonight which should not request the device list twice, hopefully fixing the issue... |
Version 0.2.6 changes the startup order, hopefully fixing the issue... |
Quick try with your docker image 0.2.6 worked, locally checkout out not, but had add on phone logged on that account. More later 👍 |
Okay, had some tests, Eufy is still confused about my accounts. Smartphone app still showed 401, one second later it worked fine... Thanks for release 0.2.6 (or 0.2.7 now), works fine for me. Add-on updated as well ✌️ |
Starting with version 0.2.4 login is no longer possible for me. I can clearly test it by jumping from
0.2.3
to0.2.4
forth and back.Log output:
Also tried running directly from sources via
npm
, same result.Even more confusion after looking at the diff between the to releases: 0.2.3...0.2.4
The text was updated successfully, but these errors were encountered: