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.67k stars 414 forks source link

Sonoff switches unavailable #907

Closed RMLReis closed 2 years ago

RMLReis commented 2 years ago

I have 31 Sonoff switches configured on homeassistant. 13 of this switches became unavailable at 7:00 am on 6th July on homeassistant. All 31 Sonoff switches are working find on ewelink. The only common issue is that the 13 switches that became unavailable are connect on the same WiFi router the other switches are in a different WiFi router. But because al 31 sonoff switches work find with ewelink. I assume that the problem is with homeassistant and not the WiFi router.

whalik commented 2 years ago

Mine are erratically going unavailable and coming back online since July 7th updates. Running the latest versions of HA on Pi and HACS Sonoff LAN. My other non-Sonoff switches don't have any issues. 2022-07-10 (4)

thailanna commented 2 years ago

I have a similar problem. 35 switches, 30 local and 5 on a different site. All have been woking reliably on HA and eWeLink for several months up until early July (before the 2022.7.1 update). I have updated all software to the lastest version (as of 12/7/22) and nothing has changed wrt Sonoff devices. The Integration Panel shows "Action Required" Reconfigure (RED). It requests to enter eWeLink account credentials and when doing so states "This account is already configured" Local devices continue to work - appart from the constant reminder "Action Required" Now here is the interesting bit. I decided to create a second HA system (new account) with view to moving it later to the remote site. Currently both systems are on the same subnet under development. On the new system I installed Sonoff, referred it to the same eWeLink account and it discovered only the missing switches. (7 as I added 2 on Sunday). I am confused but at least I have HA App access to my remote switches! Follow -Up Discovered that in Sonoff Configuration Options all homes were switched off. Including them gave me the local devices and cut off the remote devices! I reverted back to back-up version and left the 'homes' untagged. Now I have the correct Devices (just the romote switches) but lots of Entities I can't remove. Going back to the original HA system, I removed Sonoff, rebooted and reinstalled and got just the local switches. Its eveident for some reason remote switches are no longer supported. Over night the remote switches lost contact with both HAs. Unless someone can help, I shall have to move to Tasmota.

shifuoogway commented 2 years ago

Same problem here with the latest 3.1.0. There are 15 sonoff switches in my system. The wifi network resets overnight and in the morning 2 or 3 random switches are sometimes unavailable. But they are available in ewelink and become available in HA again after toggling using ewelink.

sleal77 commented 2 years ago

Same problem here

whalik commented 2 years ago

Mine are erratically going unavailable and coming back online since July 7th updates. Running the latest versions of HA on Pi and HACS Sonoff LAN. My other non-Sonoff switches don't have any issues. 2022-07-10 (4)

This problem was resolved after increasing the DHCP server lease time from 1 minute to 30 minutes or higher. Don't know why this was problematic only for these switches.

sleal77 commented 2 years ago

Same problem here: I have 2 houses in HA. When sonoff is online in 1 home, it is offline in the other

thailanna commented 2 years ago

I have 4 houses in HA and eWeLink, the three local (same subnet) are always on, but the fourth (remote subnet) are off most but not all of the time.

shifuoogway commented 2 years ago

Mine are erratically going unavailable and coming back online since July 7th updates. Running the latest versions of HA on Pi and HACS Sonoff LAN. My other non-Sonoff switches don't have any issues. 2022-07-10 (4)

This problem was resolved after increasing the DHCP server lease time from 1 minute to 30 minutes or higher. Don't know why this was problematic only for these switches.

My unavailable problem is different from yours. DHCP lease time in my network and typically is 7 days. DHCP is initiated by a client rather than the router at client start up then refreshed at half the lease time so 1 minute is very short. Glad you found the solution for your situation.

RMLReis commented 2 years ago

I have the following warnings on my log. Not sure if it is related but it seems that started at the same time as the unavailability problem.

Logger: homeassistant.components.number Source: components/number/init.py:462 Integration: Number (documentation, issues) First occurred: 13:25:22 (15 occurrences) Last logged: 13:25:22

Entity sonoff.sonoff_100067fe11_pulseWidth (<class 'custom_components.sonoff.number.XPulseWidth'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom component author. Entity sonoff.sonoff_1000b681c3_pulseWidth (<class 'custom_components.sonoff.number.XPulseWidth'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom component author. Entity sonoff.sonoff_1000b6bb3a_pulseWidth (<class 'custom_components.sonoff.number.XPulseWidth'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom component author. Entity sonoff.sonoff_1000b5f9f1_pulseWidth (<class 'custom_components.sonoff.number.XPulseWidth'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom component author. Entity sonoff.sonoff_10008963e3_pulseWidth (<class 'custom_components.sonoff.number.XPulseWidth'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom component author.

Logger: homeassistant.components.number Source: components/number/init.py:220 Integration: Number (documentation, issues) First occurred: 13:25:18 (3 occurrences) Last logged: 13:25:18

custom_components.sonoff.number::XNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author. custom_components.sonoff.number::XPulseWidth is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

GuyKh commented 2 years ago

935

RMLReis commented 2 years ago

It is now all working again. Thank you GuyKh.

AlexxIT commented 2 years ago

Is problem still actual?

shifuoogway commented 2 years ago

The problem has not been observed for sometime now. Not sure what did it as the installation is kept up to date so there has been a few updates since. Thanks for your help.

On 3 September 2022 5:51:24 am AEST, Alex X @.***> wrote:

Is problem still actual?

-- Reply to this email directly or view it on GitHub: https://github.com/AlexxIT/SonoffLAN/issues/907#issuecomment-1235846677 You are receiving this because you commented.

Message ID: @.***> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

TawfikDaim commented 1 year ago

It is now all working again. Thank you GuyKh.

Hello, I have same problem of sonoff devices become unavailable in HA, I was not able to understand what was the solution, I followed the link GuyKh commented on Aug 4, 2022 https://github.com/AlexxIT/SonoffLAN/pull/935 but was not able to figure out, can you please explain what is the fix?

heidricha commented 1 year ago

It hasn't been a problem for me for quite a long period, but recently it is a serious issue again. Almost every day I have got alerts about the switches getting offline. I set up a "reload config" action earlier when the issue originally came up, but it was sleeping for a while. Now it is getting more and more annoying again. I use the switches for heating, so it is kind of important to have a stable connection, but currently, I cannot tell about the effect of the issue, since the heating is turned off

RMLReis commented 1 year ago

I am now controlling sonoff devices with sonoff integration on HA and it was working well up until upgrading HA core from 2023.6.3 to 2023.7.1 on 7th July. With HA 2023.7.1 I lost connection with 9 devices. I assume the problem is with HA 2023.7.1

TawfikDaim commented 1 year ago

From what I have seen not all versions of HA are compatible with the version of integration

So the easiest solution I found is to check compatibility and stick with these two versions and be careful when doing upgrades

Regards, Tawfikhttps://aka.ms/o0ukef


From: RMLReis @.> Sent: Tuesday, July 11, 2023 7:14:44 PM To: AlexxIT/SonoffLAN @.> Cc: TawfikDaim @.>; Comment @.> Subject: Re: [AlexxIT/SonoffLAN] Sonoff switches unavailable (Issue #907)

I am now controlling sonoff devices with sonoff integration on HA and it was working well up until upgrading HA core from 2023.6.3 to 2023.7.1 on 7th July. With HA 2023.7.1 I lost connection with 9 devices. I assume the problem is with HA 2023.7.1

— Reply to this email directly, view it on GitHubhttps://github.com/AlexxIT/SonoffLAN/issues/907#issuecomment-1631112268, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHYVEGEMCQZNJO7R42ZPPETXPV3XJANCNFSM53HOVAWQ. You are receiving this because you commented.Message ID: @.***>