Broadlink IR/RF remotes integration (RM3 Mini, RM Pro, RM4 Mini/Pro)

Ah, cool, thanks for clarifying! I thought you might be referring to something else and wanted to be sure.

Thanks so much for your work on this.

I would like to used the sendStoredCode command from rule machine, but using the reps parameter also, as is possible via the virtual device buttons.

I have tried using repeats of a command in rule machine itself but the whole rule gets very laggy this way.

I have also tried using within rule machine the sendStoredCode command with a string parameter and a number parameter for number of reps but this doesn't seem to work.

Any help greatly appreciated.

After hours of messing around, within 10 minutes of posting I figured it out... Not to use sendStoredCode but instead to use sendSavedCode, with string and number as parameters for code name and reps respectively in rule machine. Maybe this will help someone else! :slight_smile:

I'm glad it is working for you now, but there should be no difference between those commands. I just tried both in RM with a numeric reps parameter, and both worked.

For what it's worth, I only recommend sendSavedCode for new rules or automations. But the old one still works for compatibility with any previous integrations that may utilize it.

Just wanted to chime in here to say a big thank you for building this and sharing all the documentation and tips. I have been a reluctant Harmony Hub user for years and it has always been laggy, inconsistent, and one of the remaining areas of friction in my home automatio with the family. Furthermore, their requirement that everything be an activity is super annoying and limiting. I replaced both my hubs with these devices and couldn't be happier. Thanks again!

2 Likes

The buttons on a hand-held remote may look like they increment the fan speed up/down by one 'unit'. However, if your fan works anything like most air conditioner remotes, the remote control may not increment the current value, but it actually sends the full sequence with the specific value (ie., "fan speed=3", not "fan speed+1"). So, if you're using a rule in Hubitat, you may need to construct some kind of lookup table:

pseudo-code:

if (changed(VirtualDimmer(fanspeed)))
if fanspeed==1, sendStoredCode(fanspeed1)
if fanspeed==2, sendStoredCode(fanspeed2)
if fanspeed==3, sendStoredCode(fanspeed3)

Thanks for this app. I learned a few codes, but I find it somewhat tedious to use. Did someone come up with a virtual device drive that would have typical commands (power, up, down, volume up, volume down), which can be configured to work with the broad link integration to send specific codes, without having to write our own set of virtual buttons and rules to do so ?

I'm not aware of anything like that where you could just drop your own custom codes into pre-made remote template. I've seen examples of dashboard TV/media-remote setups in the community, but they are all uniquely built by the user.

2 Likes

Maybe I’ll make one and open a PR to @tomw. Of course, it could not work for every remote with every feature, but I think the basic functionalities can be enough in many cases. There are many IR devices that have nothing important but power on/off, up/down (maybe up2/down2), and maybe room for one or two custom buttons. And maybe a second template with that plus numbers. I could see most use cases covered by these two templates.

1 Like

I do it like this in node-red. It's pretty straightforward to create and maintain:




I think the main difficulty you are alluding to is that the native Hubitat dashboards make it really difficult to execute custom commands using a button press.

But since I support the push() command on my virtual devices, and because Hubitat dashboard will let you enter a string for the "Button Number" parameter, you can do something similar to the above:

1 Like

Ok, thanks for the idea. I will play with it in the new year. I would be happy without a dashboard, with the device page and custom commands though. Easier to create a bunch of custom commands in code rather than with the dashboard UI.

I am thinking if at least the device would support switch capability, that could be a simple switch device in the dashboards.

Sorry if I'm being dense here, but I don't see how this changes much.

It's not a bunch of custom commands now -- just push() and the names you saved the codes as.

If you use a switch, you'll still have to create a device in the dashboards and map it to the switch you chose. So I guess the only step it saves is having to enter the saved code name from the Broadlink device?

I guess you are right for dashboard, it doesn't change much. For the device page however, it would make things simpler. One can just use the device page to press command buttons instead of using dashboards. I'm not going to control my TV or sound system when I'm remote, so I can just as well use the device page instead of a dashboard.

1 Like

Cool, makes sense.

The HVAC Manager app that works in conjunction with my driver does something like this. It creates virtual child thermostat devices and then has handlers at the app level that redirect the thermostat device commands to sending of specific codes using the Broadlink virtual device (which is selected using an input in the app but remains as a separate entity otherwise).

1 Like

Ok, first iteration here:

Structure is inspired from @nclark's Advanced Virtual Thermostat.

It has two types of "advanced broadlink remote". One is a simple interface for a broadlink remote and a power sensor (to use as feedback mechanism so that it detects if the device is on or off), the other is an interface for a TV which can combine two broadlink remotes, with two power sensors. The idea being that it is quite typical to have one IR device as a TV and one IR device as a sound system. Once the commands are defined, it will use the broadlink remote to send the proper commands (channel up, down, volume up, down, mute, input1, input2, on/off) to the two devices.

Both types of devices also support "push" to relay the commands in the same way as you can already do in a dashboard.

The first device supports Switch and PowerMeter capabilities, the second device supports Switch, PowerMeter and TV capabilities.

Based on the Power meter measured and a configurable threshold, the switch state is adjusted.



Now, I just wish there existed a Dashboard tile for "TV" capability like there is one for "Music Player", at is could be an all in one... Maybe I will implement "Music Player" capability so that the existing tile can be used (but I don't know what to map the sound volume to...)

1 Like

I am trying to get the hubitat app to detect the RF commands from a remote and not having any luck (I have other things working fine).

I have this new device working in the Broadlink app but it could not autodetect it and I had to give it the specific frequency (433.92). After that it picks up the buttons and works great. Similarly the Sweep RF is not seeing the button push but I dont see a way to tell it the specific frequency. Is there a way to do that or any other suggestions to get this added?

Thanks much

Got this all worked out and many thanks to @tomw who helped out a ton. Just in case anyone else happens to care the device I was trying to control is a WEN Air Filter for my Wood Shop:

I had a heck of a time getting these captured so I thought I would share

AirCleanerSpeed=B1C09E00B09E0600090A0A0B0B0A0C0A0B0A0B0A0B0A0C0A0A0B0B0A0B0A0B0B0A0A0C0A0B0B0B0A0A0B0A0B0A0C090B0A0D090D080C090D0800014E1E0C1F0B09220B1F0B1F0C1E200C1F0C1E0C0A200A211F0B200A200B1F0C090001631E0C1E0D0

AirCleanerOff=B1C09E00B09E0600090A0A0B0A0C0A0A0B0B0A0B0B0B090B0B0B0A0B0B0B090C0A0B0B0B0A0A0C0A0A0B0A0B0A0B0A0C090D080D090D070E0800014E1E0C200B09210A2109210A20200B1F0C1E0D0A200A201E0D0922092109221D00014D200B1F0D0920

2 Likes

I need to reset my broadlink device to move it to a different wifi network. Is there a way to backup all the codes so I don't have to go through the relearn process again?
Thanks

The codes are actually saved in the Hubitat virtual device and/or app, so resetting the Broadlink device shouldn't have any effect. You just need to update the IP address on the virtual device.

Also, you can back up the codes -- they're stored in the codes entry in State Variables (for virtual devices) or in the app data page (click the gear icon from the app to find this). Just save that in a text file and then re-import later as needed.

1 Like

Thank you that did the trick. One other thing I have noticed is that my broadlink unit loves to disconnect and reconnect to my wifi. I saw you have that Send keep-alive but I am running a rm4 so I dont think that works. Is this a common thing for these units when they are blocked from the internet?