Broadlink switch stop working after day or two

Thanks radinsky but looks like your working with RM2 or RM3 given the IR string in the config. I am talking about an SP mini.

Also searched google for too many files open problem. I am familiar with ulimit which is one way to overcome it the problem as a short term fix but having occur in the first place means there is an issue. I couldn’t see any other solutions - can you share a link ?

Yes, you’re right, this is RM2 with RF code (IR looks pretty the same). Idon’t have the sp2 so i’m not familiar.
Regarding the open files, I digged a lot about it, I think this one is worked for me:
http://www-01.ibm.com/support/docview.wss?uid=swg21403391

Guys

Still trying to debug the timeout issue. Have set timeout on all broadlink devices (SPMini and RM3) to 50 seconds but still getting timeouts in log file. Is there a line of code we can insert to …broadlink/init.py to show which device is failing to respond. I may have an issue with a specific device. Also wondering if we can check the timeout is working - the time stamps on the errors are odd. Can’t seem to align them to 50 seconds.

17-02-09 00:53:50 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 01:40:41 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_0) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:01:04 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_4) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:07:10 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:12:48 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:21:28 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_7) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:34:13 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:46:55 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_5) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:49:27 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:52:31 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_9) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:53:32 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 02:54:32 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_8) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:04:46 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_9) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:11:53 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_4) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:15:59 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_2) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:21:04 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_4) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:28:14 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_2) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:36:20 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_2) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:44:30 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:46:01 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_7) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:47:33 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_7) [homeassistant.components.switch.broadlink] timed out
17-02-09 03:57:14 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:02:18 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:16:36 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:28:53 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_8) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:29:53 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:35:01 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:37:02 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:41:08 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_5) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:44:12 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_5) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:44:44 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_4) [homeassistant.components.switch.broadlink] timed out
17-02-09 04:50:22 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 05:11:45 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_7) [homeassistant.components.switch.broadlink] timed out
17-02-09 05:15:49 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 05:25:30 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_6) [homeassistant.components.switch.broadlink] timed out
17-02-09 05:53:33 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 05:57:07 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_3) [homeassistant.components.switch.broadlink] timed out
17-02-09 06:07:17 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_4) [homeassistant.components.switch.broadlink] timed out
17-02-09 06:29:44 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_2) [homeassistant.components.switch.broadlink] timed out
17-02-09 06:37:20 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_2) [homeassistant.components.switch.broadlink] timed out
17-02-09 06:39:54 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_1) [homeassistant.components.switch.broadlink] timed out
17-02-09 07:16:09 ERROR (<concurrent.futures.thread.ThreadPoolExecutor object at 0x103fc0f28>_7) [homeassistant.components.switch.broadlink] timed out

Here is the line you should change https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/broadlink.py#L122

Thanks

So if I modify it to be _LOGGER.error(mac_addr) then that will log the mac address ?

Try;

_LOGGER.error("%s: %s, self._name, error)

17-02-19 14:20:37 ERROR (Thread-6) [homeassistant.components.switch.broadlink] timed out
17-02-19 14:30:56 ERROR (Thread-6) [homeassistant.components.switch.broadlink] timed out
17-02-19 14:47:28 ERROR (Thread-11) [homeassistant.components.switch.broadlink] timed out

Same problem here

It’s an issue with the library we are using https://github.com/mjg59/python-broadlink/issues/45#issuecomment-272631782

So you can try the suggested code. That would give less time outs

1 Like

Many Thanks Danielhiversen. after try suggested code it work stable for 2 day

Hmm, so running the latest version of HA I am still having these timeout issues. Not sure what is going on, the device still responds just fine to commands from the e-control app. So I don’t think it is an issue with wifi connectivity.

I am still having this problem. Once in a while it stops working… and a restart revives again…
Running 0.72 hass version…
Is there something to change or develop yet?

never happened to me. running 0.72 hassio

Stumbled upon this post after getting an RM mini, I experience the same thing, it will work after a fresh boot of the device, but the next day or two, it will not work. I also noticed that the ihc app on my phone sometimes cannot successfully control a device. I was thinking it was a networking issue, not related to HA… Does anyone else notice that ihc app doesn’t work also when HA cannot control it? It’s almost like the actual Broadlink device is dropping its network connection… I have a static IP set to it. I keep my HA up to date, currently on 0.78.2.

Hi clueo8, I am having the same issue. Did you solve it?

Best

Have the same issue with one of my RM Mini. After 2-3 days it stops working and blue led on it flashes one time per second. Seems that broadlink cab’t keep stable network connection. I’m going to switch to Xiaomi IR Remote.

I can see my RM-Pro not keeping wifi connection :
image

Even if it reconnects often, it works. Maybe your WiFi does kill it if it disconnects/reconnects too much ?

Try checking your wifi, try scanning your network around to find the less busy channel.

In my case it was because the Broadlink would get a different IP address via DHCP after a few days. I had to bind it to a fixed IP in the network switch config.