Broadlink SP3 stops working after a few days

Running the latest version of Hass.io on a Rpi3, with about 10 Broadlink SP3 switches. Everything works fine for a few days, and then one or two of the SP3’s will become unresponsive in HA. It seems to be different ones each time. I am able to ping the switch and am able to control it with the Broadlink e-Control app whilst it is unresponsive in HA, so fairly certain it is not a hardware or network issue. A restart of HA resolves the issue.

Switch configs in my YAML files looks as follows:-

- platform: broadlink
  host: 192.168.0.177
  mac: '34:ea:xx:xx:xx:xx'
  type: spminiplus
  friendly_name: 'Loungeroom Lamp'

I have tried changing the switch type from sp3 to spminiplus but the behaviour is still exactly the same.

I have also been able to replicate the problem on a virtual Ubuntu Linux VM running Home Assistant in a VirtualEnv.

Any assistance to help resolve would be appreciated.

I’m also unable to control my SP3 with hass.io but am able to control from the app. I’ve got the same basic config as you.

Weird but suddenly I notice same thing.

Same 2 switches.
5 day ago they suddenly disconnected from wifi
Today they unable to control with HA.
Verified wifi connection. Control from app OK.
After ON/OFF in app, couldn’t connect to HA.
Restart HA docker container and all back OK

Saw this post and thought maybe related.
HA version 62.1 and no changes to config in a month

I place switches in vlan with no outgoing access to anywhere so update firmware is not likely issue

Well, nice to know I am not alone. Not sure whether this is a problem with the Broadlink python library, or a problem with HA itself.

I haven’t tried controlling the switches through the Broadlink python library directly, as my Linux skills are not terrific and I haven’t set it up. I suspect if a reboot of HA fixes the issue, then it is more likely HA than the python library itself?

@Danielhiversen, any ideas?

Bump. Anyway, have scheduled in a nightly restart of HA … see how far that gets me. Not ideal, as it is not really solving the problem, but I need these damn switches to just work. at 4am when the restart is scheduled, not much is going on in my HA set up anyway.

Nightly restart of hass.io seems to be working around the issue. Not ideal, but at least my devices are not going off to NeverNeverLand :slight_smile:

FYI I’m no longer having difficulty, an update in recent days may have fixed it.

Interesting … I am still getting the odd issue every now and then, even with the nightly reboots. Running the latest version of hass.io, but I haven’t upgraded my ResinOS from 1.1 to 1.3 yet … I read somewhere that there were some issues, so have been holding out. @claud9999, what versions of hass.io, ResinOS and supervisor are you running?

Still happening.
Now after an hour at most.
Pi 3
Hass.io supervisor 141
HassOS 1.13
Hassio 0.84.6

Same. Still happening. Latest version of hassio, supervisor, etc. I rebuilt completely from scratch using hassos on a new rpi3 model b+. Also able to recreate the problem running on a docket container on Ubuntu. Frustrating!

@aheath Andrew - any update - My 2 Broadlinks went offline at the weekend and I could not get them working again until a restart.

As far as I know, the problem still exists, although I must admit I haven’t tried recently - I have put in a 3am HA restart and that seems to work around the problem the vast majority of the time.

0.93.1 and I can see that, on SC1 devices (that must behave the same).
EDIT : but MP1 does not the same. Neither a Broadlink-based thermostat.

If the device gets disconnected from WiFi, then HA won’t see its status anymore. Turning on or off may work though ! Restarting HA is needed to make it work again.
I guess that when HA looses once the connection to the device, it won’t be able to access it anymore.

Can reproduce anytime when I reboot my WiFi access points.

Now that is interesting!

My wireless network is fairly stable with strong connection, so not sure why the switch would disconnect, and it does not explain the fact that with a restart of HA every night, this problem has occurred maybe 3 times over the course of 1+ year. I suppose it is plausible that this could be the cause, and if, as you say, you can recreate it at will then it may be time to create a bug report. Have you already done this, or should I do it - I don’t want to create a duplicate.

No I didn’t, I’m not sure it’s actually a bug, is there something that can be done ? There are several components that won’t connect a device if they don’t see it, for instance at startup.

3 time a year, it’s fine ! I don’t restart my HA often (well, sometimes several times in a row when I mess things adding new automations ! :sweat_smile:) and I see that every other week. Most of the time on the same devices. My Wifi is a bit complex, with two access points (one in the basement, one upstairs) so some devices roam and then it can loose the connection for a few seconds. It’s the only way I can explain SC1 disconnecting, I never reboot them, for years

Others are having similar issues. Broadlink A1 stops updating

According to that thread, HA tries to connect 3 times and if it cannot connect, then it just stops all subsequent communications - which could explain it.

https://github.com/home-assistant/home-assistant/issues/15275 describes the exact same issue, and states that it was resolved in HA 0.72.1.

I might do some further testing over the next few days I think, and if it is still not working, then I will create another bug report.

1 Like

I’ve also found that every so often HA loses connection with my Broadlink RM mini3. I can’t see anything that stands out in the HA logs. Restarting HA fixes the issue each time, although that’s not a solution.

My HA is configured to automatically restart each and every morning. Usually it reconnects to the Broadlink just fine, but once every few weeks, it fails to do so. BTW, I use the SmartIR component to send IR commands from the Broadlink to my HVAC.

@pkozul - I have a 3 x RM Mini3’s and 1 x RM Pro and have never noticed any of them being unresponsive. I also using the SmartIR component. It may be related, but it may not be.

You should be able to test by unplugging one of them, leaving it unplugged for an hour or so, and then plug back in and see if responds.

That is what I am going to do with some of my Broadlink devices, probably over the weekend. The more people that can test and respond, the better, I think.

@aheath - I actually tried powering cycling the Broadlink, but it made no difference. The only solution was to restart HA. In my case, it’s definitely something not working right on the HA side. BTW, everything else works just great in my setup. I run Hass.io on a Dell laptop.

@pkozul Yes, once the switch becomes unresponsive in HA, the only way to get it back is to restart HA.

I think it would be far batter if HA were to retry connection at regualr intervals rather than just assuming that switch will never come back onto the network.

I was more thinking if you could test to see if you could re-create the unresponsiveness in the first place by powering the switch off, and allowing HA to try connecting 3 times, and then plug it back in and see if it is unresponsive. Or perhaps by moving to an area of your house that barely gets network signal.