New sonoff problem

This Worked!

Exactly what was needed. Thanks.

Be aware, updating to HA core 2022.7 will make this fix dead again!

People… Please you need to stop thanking me for this.
Give the thank you to @Hmmbob (assume this is the same as in the GitHub post) instead who posted it first.

3 Likes

That’s me.

You’ll probably run into 2 different issues:

Just to be aware, it seems that not all cloud devices will work after changing the two lines. There’s no reason found why this is the case, unfortunately.

4 Likes

worked for me too. Thanks!

I just did a restart of my host computer and the problem went away…

Confirming this. I have one Sonoff based outdoor plug (Pro-SW Modell PS-16) which shows as “unavailable” within HA now (but still works with the eWeLink app).

You probably need to check this suggestion from the component maintainer

1 Like

Yup, replaced both key pairs from the official app just now and everything is working again. Thank you Hmmbob :hugs:

1 Like

Update for the SonoffLAN project:

AlexxIT released an update and all is OK again.

Let’s go update… :wink:

2 Likes

Still Sonoff LED strip shows unavailable

I have three and they all work fine

Yes, I got the latest update from his GITHub and it solved the issue for me. Thanks AlexxIT!

All got back to normal.

I want to take this opportunity to appreciate our amazing community for all the support, responsiveness, and basically for all the sharing and caring…

Double that a million times for the wonderful Dev teams, official, and unofficial.

I’m so happy to be a part of this project.

Cheers

thanks for the fix, editing this worked: " /custom_components/sonoff/core/ewelink/cloud.py

SonoffLAN/custom_components/sonoff/core/ewelink/cloud.py

Line 107 in c317407

async def login(self, username: str, password: str, app=0) → bool:

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:

SonoffLAN/custom_components/sonoff/core/ewelink/cloud.py

Line 157 in c317407

async def login_token(self, token: str, app: int = 0) → bool:

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

and restart HA"

I had maybe all the bad luck with Sonoff since I first installed HA, always something either confusing or outright disabling happens with these devices every 5-6 months for me, I hope a little more stability can be achieved from now on, it is sad to see them work flawlessly for months and then just drop dead for various reasons. I think it is still wiser to stick to devices without cloud and less dependency on so many people if you have not aquired too many already like many of us here :smiley:

I had a similar problem but after clearing the filters to view ALL integrations I saw there was a 2nd sonoff integration, the one that already had my credentials saved. I went to configure the 2nd integration, clicked through the options (I used “local”) and finish. Then restarted HA and the first sonoff integration that showed up before is now gone and everything is good.

1 Like

Worked for be but still the Sonoff LED strip (L1) shows unavailable
I updated firmware on LED to 3.4.3 (latest) and I can control it from the app - but still unavailable in HA.

My ewelink also stops working with this message. I’ve updated both core and supervisor to latest version.image
I define sonoff in configuration.yaml, not addon
image

I just updated core, system and HACS sonoff integration. Working again.