Broadlink Roller Blind Control with Button Hold

I got a generic 433 mhz roller blind motor to test with my Broadlink RM4 Pro. It was easy enough to integrate for the up, down, and stop commands. I have these all working fine in both the Broadlink app and Home Assistant itself.

Now, the trouble I am running into is it seems to get a continuous up or down movement, I need to hold one of the buttons for around 3 seconds… There is no button hold option for Broadlink in Home Assistant, so I can’t do that.

It appears to me the remote is actually sending a slightly different command when the button is held… so shouldn’t I have a way of extracting that command? Home Assistant seems to only be set up to learn a single command per button, so it won’t pick up the hold command…

Is there another RF utility I could use to verify if it’s sending a different command for a button hold, and extract that separate command to then use in Home Assistant? Has anyone tried doing something like this?

Ok, so I have made some progress… When learning via the Broadlink app, I just hold the button before I attempt to have it learn the code. I now have working “hold up” and “hold down” buttons in the Broadlink app that operate differently than the regular “up” and “down” buttons.

So now I just need to follow the HA docs to figure out how to extract the codes… I’m a little concerned if I’ll be able to or not, since the HA documentation seems old (it references the old e-Remote app instead of the newer Broadlink app), but I’m sure there’s a way to get the saved codes extracted now that I have them… worst case, I may be able to get the same learn functionality from the broadlink-cli tool.

I think because HA expects you to always hold buttons down to learn codes, it doesn’t differentiate between button presses vs button holds for learning… which is a problem… the current default HA code learning method simply doesn’t work right.

Edit: And now I got the right codes extracted using the broadlink cli! For anyone else that might stumble on this. Just follow exactly what is in the Broadlink documentation using the ‘rfscanlearn’ method, BUT, after it performs the initial scan to learn the RF frequency, make sure to hold the button down for a second or two before hitting enter to perform the actual scan for the RF code. The base64 code it spits out SHOULD be for the button ‘hold’ action rather than just the button ‘press’ action. Keep in mind that the timing really matters, so you’ll have to do some trial and error with scanning and testing the codes that the cli spits out. I found that if I got the timing early it would still get the single press, if I got the timing late it sometimes wouldn’t do anything, sometimes it would combine the single press and the hold actions so it would do both, but I eventually got the timing just right to extract JUST the hold action. Again, it takes a bit of trial and error.

After getting the base64 code, the documentation already explains how to use it in scripts.

1 Like