AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.7k stars 414 forks source link

appid is unauthorized! #887

Closed danielbrunt57 closed 2 years ago

danielbrunt57 commented 2 years ago

This just popped up after a restart of HA...

image

What's the low down and how do I rectify??

jkcdarunday commented 2 years ago

Same experience here. Looks like the appid that it's using is no longer valid.

w1tw0lf commented 2 years ago

Getting the same issue here as well.

Seems like it is connecting to eu-apia.coolkit.cc and when opening the site, get 503 Service Temporarily Unavailable

danielbrunt57 commented 2 years ago

Seems to be related to https://dev.ewelink.cc/#/settings developer account. I am re-applying...

jdog666 commented 2 years ago

Same issue here.

JaCoLJcL commented 2 years ago

Same here. LAN devices works ok, cloud not

danielbrunt57 commented 2 years ago

It said 1-3 days to process application...

danielbrunt57 commented 2 years ago

Might be a good time to retrofit by coffeemaker with 8266 & Tasmota!

51av0sh commented 2 years ago

I'm on the same boat. Started about an hour ago. All devices can still be controlled (through LAN I guess) but I get the "Failed to set up: appid is unauthorized!" in the integrations page. The ewelink app works fine though (both LAN and WAN)

danielbrunt57 commented 2 years ago

I only have one device... inching relay, cloud controlled. "Brew coffee". Guess I'll have to press the start button myself tomorrow!!

danielbrunt57 commented 2 years ago

I wonder if my friend's coffeemaker is in the same boat? Not HA, just Alexa controlled. Might be okay...

michaelsage commented 2 years ago

I only have one device... inching relay, cloud controlled. "Brew coffee". Guess I'll have to press the start button myself tomorrow!!

Glad it's not just me!

haydndup commented 2 years ago

Same here.. Can confirm that my locally-controlled devices work, and the cloud ones are now broken.

danielbrunt57 commented 2 years ago

I added the ewelink skill to Alexa, renamed my HA entity Brew Coffee HA and created a routine when I say Make Coffee to turn on the ewelink skill device rather then HA trying to turn on the HA device when I say Good Morning. At least I have that for now!

maiflaii commented 2 years ago

Exactamente igual por aqui

bwp91 commented 2 years ago

Iā€™m the dev of the homebridge ewelink plugin, and getting this error there too.

* waits for an influx of issues *

JaCoLJcL commented 2 years ago

@danielbrunt57 this is a issue topic, not Your coffee brew topic xD

marioedani commented 2 years ago

Same problem. Region: Italy

hmmbob commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

edit:

and do the same change from 0 to 1 in line 157 of the same file:

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L157

    async def login_token(self, token: str, app: int = 1) -> bool:

and restart HA

JaCoLJcL commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Hah, no error, but all clouds devices are offline in HA :D

herveaurel commented 2 years ago

same problem

image
hmmbob commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Hah, no error, but all clouds devices are offline in HA :D

Strange, works just fine for my single cloud device.

TiboFA commented 2 years ago

same problem here... tip in cloup.py worked fine with me, after HA restart, thanks šŸ‘ but, just to know... what's does it do ?

w1tw0lf commented 2 years ago

Changing the cloud.py worked for me as well.

Bradooken commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

This worked, epic thank you.

herveaurel commented 2 years ago

Essayez de remplacer le 0 par 1 Ć  la ligne 107 de/custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Yes !!! šŸ˜

Hers16 commented 2 years ago

I confirm, changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py is working ! Thank you !

hmmbob commented 2 years ago

FYI; what this change does is using the 2nd AppID hardcoded in the code. Apparently this is still valid.

Bisket25 commented 2 years ago

I confirm, changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py is working ! Thank you !

Confirmed as well. Thank you!

JaCoLJcL commented 2 years ago

Changing the cloud.py worked for me as well.

My covers devices is offline, all others works ok now

SirDester commented 2 years ago

Do you think we need to change this line 157 of /custom_components/sonoff/core/ewelink/cloud.py too?

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L157

    async def login_token(self, token: str, app: int = 1) -> bool:
enigmaspb commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Good hack ;) All device then support lan mode - work And device then support only cloud mode not work

pepe59 commented 2 years ago

A change on line 107 helped that the error doesn't show up, but the cloud devices don't work. Motor for curtains, diffuser.

megacoelho commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Worked !!!! THKS

paulorafael68 commented 2 years ago

I change and work. but I have 3 equipemant dont work: ZJSB9-80 J by WDYK G1 by New Smart AGW-WI30 AGW

keyaertc commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

It works well for my Sonoff mini, Thank you very much

keyaertc commented 2 years ago

of the homebridge ewelink plugin, and getting this error there too.

Same issue, I'm receiving the following message non stop: [7/6/2022, 11:34:05 AM] [eWeLink] Unable to reach eWeLink, retrying in 30 seconds [getHost() - ECONNABORTED].

hmmbob commented 2 years ago

Do you think we need to change this line 157 of /custom_components/sonoff/core/ewelink/cloud.py too?

Yes, and this might also fix the cloud devices issue some people see. So, updated guidance:

Change the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

and do the same change from 0 to 1 in line 157 of the same file:

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L157

    async def login_token(self, token: str, app: int = 1) -> bool:

and reboot HA.


@JaCoLJcL, @paulorafael68 @pepe59 can you check if the 2nd change solves your issues?

armandusbasson commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

This worked for me as well. Thank you so much!

thorrrr commented 2 years ago

Mine is totally screwed up it shows a mixture of phone and email in entitles box with errors. But in Reconfiguration area when i add my details it says already set up but does not go away?

https://i.imgur.com/t59oKmH.png https://i.imgur.com/nX25vC2.png https://imgur.com/PNJjOo0.png

No idea when this has occurred not touched anything today

evillexus commented 2 years ago

The same problem (both with appid recongiguration of integration)

Downgrade doesnt help Logging out from ewelink app doesnt help changing mode (auto/local/cloud) in config doesnt help

BUT! in another instance of HA (the same version HA and Sonoff integration) it s still ok

UPD: relays (basic mini) and ZZBridge are working fine, but sensors [SONOFF SNZB-03 - ZigBee Motion Sensor] joined to ZZBridge are unavailable/

pepe59 commented 2 years ago

hmmbob changing line 157 didn't change anything. Cloud devices do not work.

Verguldebarman commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

edit:

and do the same change from 0 to 1 in line 157 of the same file:

https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L157

    async def login_token(self, token: str, app: int = 1) -> bool:

and restart HA

Good hack!!!! Changing line 107 and 167 works for me for most devices.
Except two devices not working, both are SONOFF TH16R2

Running in debug mode to check for error's

thorrrr commented 2 years ago

Worked for me cheers guys

Jones1982 commented 2 years ago

It worked for me too, but the automations associated with the Sonoff Wireless Switch SNZB-01 (Zigbee) no longer work!

mdima commented 2 years ago

Worked for me, just for one sensor it did not work. For that sensor I receive a "sonoff skip setup for encrypted device" error in the debug page.

diego-cr commented 2 years ago

Worked for me, thanks!

DaleJP commented 2 years ago

Worked for me but many of my devices are unavailable. The important ones are, though (lights) so I'll hold out for a fix.

sirronb commented 2 years ago

Try changing the 0 to 1 in line 107 of /custom_components/sonoff/core/ewelink/cloud.py https://github.com/AlexxIT/SonoffLAN/blob/c317407a09e5c5e9aaf2a95e044e5afb5a367dec/custom_components/sonoff/core/ewelink/cloud.py#L107

    async def login(self, username: str, password: str, app=1) -> bool:

Thank you; This worked for me too.

mihaiturturica commented 2 years ago

I confirm, changing the 0 to 1 in lines 107 and 157 of /custom_components/sonoff/core/ewelink/cloud.py is working !

Glacjozo commented 2 years ago

Works fine for me too.