howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware
MIT License
81 stars 46 forks source link

"error":401,"info":"user is null in local" #31

Closed rob0101 closed 5 years ago

rob0101 commented 5 years ago

I can't get past this error.

[eWeLink] Server did not response with an authentication token. Response was [{"error":401,"info":"user is null in local"}]

Running on a raspberry pi.

Anyone able to help ?

Trying to get a couple of wifi smart sockets working. Both controllable in the iPhone app. Tried logging out of the app. Tried changing the app version number to match the phone (3.6.1).

thanks

howanghk commented 5 years ago

Hi @rob0101, most probably your config is incorrect.

rob0101 commented 5 years ago

here's my config

{ "platform" : "eWeLink", "name" : "eWeLink", "email" : "my@email.address", "password" : "mypassword", "imei" : "ED532BB2-7C1B-4C17-BCAA-1B149C2ECD91" },

all other bridges are working inside homebridge.

[14/06/2019, 12:51:39 pm] [eWeLink] Intialising eWeLink [14/06/2019, 12:51:39 pm] [eWeLink] A total of [0] accessories were loaded from the local cache [14/06/2019, 12:51:39 pm] [eWeLink] Sending login request with user credentials: {"email":"xxxxx","password":"xxx","version":"6","ts":"1560482499","nonce":"156048249972500","appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","imei":"ED532BB2-7C1B-4C17-BCAA-1B149C2ECD91","os":"iOS","model":"iPhone10,6","romVersion":"11.1.2","appVersion":"3.6.1"} [14/06/2019, 12:51:39 pm] [eWeLink] Login signature: AEb/QCQ6ehZKJBZTy0b03ZBbBMIDRHWOYhnGm/Qi9Iw= [14/06/2019, 12:51:39 pm] Homebridge is running on port 51826. [14/06/2019, 12:51:42 pm] [eWeLink] Server did not response with an authentication token. Response was [{"error":401,"info":"user is null in local"}] [14/06/2019, 12:51:42 pm] [eWeLink] Requesting a list of devices from eWeLink HTTPS API at [https://us-api.coolkit.cc:8080] [14/06/2019, 12:51:43 pm] [eWeLink] An error was encountered while requesting a list of devices. Response was [{"error":401}]

sschnoor commented 5 years ago

FWIW exact same issue for me. Same config as rob0101.

{ "platform" : "eWeLink", "name" : "eWeLink", "email" : "my@email.address", "password" : "mypassword", "imei" : "ED532BB2-7C1B-4C17-BCAA-1B149C2ECD91" },

Any thoughts?

howanghk commented 5 years ago

Hi @rob0101 and @sschnoor, where are you guys from? Try adding

"apiHost": "eu-api.coolkit.cc:8080",

to the config and see if it make any different?

rob0101 commented 5 years ago

@howanghk I'm in Australia. Just tried eu, au, as, cn and all produce the same error.

Thanks for your assistance.

rob0101 commented 5 years ago

Apologies. I found my error. It was a typo in the password.

Working here now. Thanks.

sschnoor commented 5 years ago

I’m US. So us-api.... ?

howanghk commented 5 years ago

Thanks for confirming "user is null in local" means authentication error. I am closing this issue now.