Can I get a copy of the Cron syntax?
Here is the shell script:
#!/bin/bash
/bin/date
/bin/ping -c 3 IP_OF_BROADLINK_DEVICE_1
/bin/ping -c 3 IP_OF_BROADLINK_DEVICE_2
echo ''
And this is the crontab entry
*/5 * * * * /path/to/shell-script.sh >> /path/to/shell-script-output.txt
Thanks, I’ll post back in a week or so if this does not fix the issue for me.
Same here. Exactly.
The 5 minute ping has made things significantly better for me but I still have the issue occasionally. Probably a bug in the library HA uses to communicate with the devices. Brodlink, if they are the ones who make the library, probably won’t be fixing it… I suspect some assumption in the HA code could be changed to enable a ‘refresh’ of the device if it isn’t working since a reboot of HA fixes the issue consistently. Wish I had the time to contribute and try to fix the issue.
Strangely the Broadlink app on my iphone is sending commands no problem while the Hassio could not.
So it must be something in HA that is wrong.
Also the my RM Pro is working fine sending signals to my RF switches (never failed in months)
So looks like a problem with the Broadlink plugs only.
ps.
The up more I upgrade the Hassio the worst it gets. On v 0.75.3 never failed. I may go back.
edit:
Reverted to 0.75.3, works perfect for 4 days now. anything after 0.82x it loses connection after couple of minutes. Anyone investigating this?
I have found exactly the same with my SP mini 3 plugs. After restarting Hass all good for a couple of hours then randomly one or two of the plugs will no longer work, but everything is fine controlling them via e-control.
I have been rolling back versions to find when it was last stable. It seems the problem came in around version 0.80.0. (I have been all the way up to 0.88 and it still has the problem)
There is nothing in the logs, but if I look at history of a couple of plugs that are permanently on, it shows the Hass state goes on and off repeatedly, even though the plug was never turned off.
Something definitely not right with how later versions are reading and maintaining the states of these plugs.
For now I will be reverting to pre80.
Yeah, all those fancy features in latest versions, and a bug that force us to go back to older release fo things to work. Sad.
The same problem here.
I can’t turn on the plug from HA but I can from broadlink app.
Restarting HA fixes it temporarily.
Running hassio in Rpi 3b+
This has been the same situation as me since I first created this post.
I think there may be two issues here.
- Things stop working more frequently on rpi/ARM
- Communication can occasionally stop working on other platforms e.g. x86 but less frequently.
For the most part, I haven’t had issues with HA and Broadlink for a number of months now, but I do still occasionally have things not work. Restarting HA normally fixes things.
What I’d like to see is someone post on here how we can actually debug broadlink issues so we can look in the HA logs and try and figure out why communication stops working…
Hi mattie47,
I have been experiencing the same situation you describe with a Broadlink RM Pro+. I am using a rpi 3b+ with Home Assistant 0.90. and communication is very unstable. By the way the braodlink works without any kind of issues.
Best Francisco
@danielhiversen I see you listed as the reviewer for Broadlink components. This thread has been going on for a while with respect to people consistently having issues with connectivity to broadlink devices.
Have you got any suggestions for how people on this thread might be able to debug the problems listed here (which seem to happen more so with Raspberry Pis than other devices) or any other thoughts/comments?
Thanks,
Matt
I’ve officially given up on homeassistant and moved everything over to Node-Red on my RPi3. The Broadlink issue was the starter, then increasing instability and need to restart all the time. Finally the break to Google TTS broke me.
Personal experience, Node-Red is a hell of a lot simpler to work with and everything works!! Yep all the issues with Broadlink, TTS are gone and it has been running for almost a month now without a single restart! I suggest giving Node-red a look in if you’re frustrated trying to get Broadlink switches working smoothly in home assistant.
I guess you could link the broad link devices using nodered and then nodered to ha.
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.
Hello. I’ve had same issue with 2 SP3s. I’m using HA on RPI 3 B+ and after restart they work from 5 to 20 minutes then randomly unavailable or just do not respond. Digging into python code I’ve found that they create socket descriptor per device instead of per request. So I’ve implemented my version of “mjg59/python-broadlink” module which creates socket as soon as communication with plug needed and it fixed issue. I’ve tested it for few days and it works smooth so created PR https://github.com/mjg59/python-broadlink/pull/283 and hope it will help. Thank you
Wow fantastic work! Hope the pr gets included soon I have three of them sitting on a shelf.
Thanks KAjFASH
I’ve created branch of Broadlink to fix this issue. Please check readme and feel free to use modification which works for me - https://github.com/exKAjFASH/broadlink_rpi . I’m not sure they will accept PR as I’ve tested different usage of sockets but no implementation that could meet their requirements.
So issue is fixed since HA 0.110.0 (or earlier), this fix was applied with better modification on latest source code, I’ve switched my configurations to use original broadlink and it works for last few days without any issues.