Hubitat and Broadlink RM Pro + WIFI + IR + RF Remote Controller

Thanks for this! It works great!

Is it possible to add support for RF devices? I have some shades with RF remotes that I want to add to this.

Just curious, what would be the current blocks for getting an App to directly handle the communicating with Broadlink devices locally (without another server/android app)? We have LIFX local scanning, so is there are technical reason why someone couldn't code a HE app/driver to do that? @rob121 Why must you have another http server? Great work by the way.

I started on a simple driver to handle my RM Mini with basically on/off IR for my old TV but the main problem as I recall it was that Crypto API isn't exposed inside drivers code which makes it impossible!

Any others that are having problems to learn RF codes on broadlink pro+? Normal ir controlls no problems.

Yes I am as well. IR works great but RF not at all. It stays on 'Waiting for remote presses....' (red LED turns on on Broadlink) until I get the message 'Error: error while calling learn: learning timeout'
I have held the remote button continuously (I believe it continually tansmits during this time as it has a transmit indicator and has long press functionality), pulsed it and pressed it before the button on the web interface.

I tried with another 433MHz remote as well.

In both cases, I had no issues learning RF commands using the Broadlink app IHC.

My device model is RM pro+. 'Broadlink Manager' another program I tried to use also won't capture RF and my device is identified as 'RM2 Pro Plus3' in that software.

me too, won't accept the hex codes for RF remotes. The IR remote for TV works fine, but not RF remotes

Hi @rob121,
Is this something that you can look at in the program.?
Have Broadlink changed what they do on the newer devices?
Thank you for the great program by the way. I have it running on my windows 10 home theater pc controlling my IR devices with Hubitat. It would be great to be able to control my 433MHz blinds as well.

I feel I'm so close to getting this running; I have started the server and can control a Broadlink pro through the BroadLink Control App.... But I cannot get a Hubitat device running the "http GET switch" driver to control it..... I'm really not sure the format of the URI to use.
I am trying this:
http://192.168.1.145:80/send?deviceMac=34:ea:34:42:fa:a9&Codeid=01
But it is giving me this in the log:

2019-11-13 12:23:27.582 am warnCall to on failed: Connect to 192.168.1.145:80 [/192.168.1.145] failed: Connection refused (Connection refused)

--- Live Log Started, waiting for events ---

I took a guess at the CodeID - how can I find out what this should be?

If anyone could help it would be gratefully received

I used the BroadlinkGo broadlinkgo/README.md at master ยท rob121/broadlinkgo ยท GitHub to first record the command which saves it into a file. In the example below called 'tv_on_off'
Then using the HTTP get switch I use the command 'http://192.168.0.6:8000/cmd/tv_on_off'

Excellent thank you...
I will have a go when I get back from work.

Shame - That didn't work.. Still getting this error in the LOG:

Call to on failed: Connect to 192.168.1.146:8000 [/192.168.1.146] failed: Connection refused (Connection refused)

They are both on the same router.... do I have to set something else?

Should be this format:
http://192.168.86.47:9876/send?deviceMac=34ea34e7aaaa&codeId=31

so remove the : in the MAC address and check that port number. RM Plugin usually defaults to 9876 unless you specifically set it to 80.

That's in the RM Plugin app if you scroll down. (Are you using the two apps: E Control and RM Plugin?). I will post instructions with screenshots from start to end in next Post hopefully it is helpful.

Here's the way I'm doing Broadlink RM Pro/Mini with Hubitat using two Apps on an old always on Android and Hubitat Post commands.

Step 1
Install the Apps "e-Control" and "Broadlink RM Plugin" from Android playstore as shown below. Install onto an old Android device that you can always leave on in your network. (I used one of my dashboard cheap Amazon tablets since it can run in the background). Also make sure that old Android has a fixed or reserved IP address on your local network (if you need help knowing how to do that, that's a whole different topic since each person has different routers with different configs).

Step 2
Open up e-Control app and sign into your Broadlink account. You should then set up all your devices through Broadlink's instructions for each of your RM Pros/Minis. Once you are done setting up, click on backup on the left side menu (click on hamburger icon on top left to see it). Backup to cloud. You can look at cloud list to see it's there. (See below screenshots)

Step 3
On main page of e-Control app, click on the "+" sign on top left. Then click on "Device List". Record/write/copy down the MAC addresses for each of your Broadlink devices:

Step 4
Now open up RM Plugin App and check mark the HTTP Bridge on main menu. And click on it to go to HTTP Bridge menu. Check mark the "Enable HTTP Bridge" and the "Autostart on Boot" (autostart on boot is optional but if you like the bridge to start when your android resets, it's nice). Notice the port number set under "Enable HTTP Bridge". You will need to use that port number later when you do POST commands from Hubitat or anything else.

Step 5
Still in RM Plugin App go back to main menu, you can now download all the commands you created from Broadlink e-Control app if you go to General Settings.

Step 6
Back to main menu in RM Plugin App, you can scroll down and see "Code List". Click on that and you will see all your device commands with a Code ID # under it. Mark down the IDs of the ones you want to control with Hubitat POST commands.
For example below, The Code ID to toggle Samsung TV on or off is 39

Step 7
Now your setup should be ready to go.

The format is as follows to issue the command:

http://:/send?deviceMac=<MAC address of Broadlink device from step 3 with no colons>=codeId=<ID of command you want to execute from step 6>

Here is an example HTTP command:
http://192.168.0.50:9876/send?deviceMac=34ea34e6aaef&codeId=39&repeat=2

Note: you don't need to add "&repeat=2". That's optional to send the IR or RF command twice.

You can test the command from any browser to see if it works. Now you can add to Hubitat through Rule Machine and you can tie it to virtual switches/buttons or however you want to customize it for yourself. In Rule Machine actions select "Send HTTP Request", then select "Send HTTP Post" and copy in your http command into the URL and that's it.
HTTP_RequestRM

Step 8
If you modify or add devices with your Broadlink in the future, you must use e-control app again, backup, go to RM Plugin and it may automatically update but if it doesn't, force download codes again as described in earlier steps. Then you can find it in the Code List and use it. Good news is existing code IDs do not change so it will not ruin any commands and rules you created in Hubitat.
Also if you want to share codes between two android devices there is that option on the bottom of the main page on RM Plugin. This is good in the case of not wanting to move your RM Bridge android device.

Hope it works for you all! Been using this way for couple of years and no issues at all for me.

8 Likes

Fabulous instructions! I'm bookmarking this for the day I'm brave enough to go through it. Damn, that's a lot of work to do to get it working! Have to convince myself it's worth the effort.

So I understand what you're suggesting, the Android device has to be on but can be asleep and this will still work? I too have a dashboard Android tablet that sits in the kitchen but obviously, the screen isn't active 100% of the time but it's powered.

Correct. Does not need to have screen on or even be on the front of the display. It will run in the background silently. Just need to keep the android from shutting down completely (leave it powered).

1 Like

Hi @callegari.dreaming,
does this method you have outlined learn the RF remotes and playback the signals? The solution I use seems to have an issue with RF. I don't have an android device but would consider purchasing one if this can do RF as well.

As bigriz said - excellent write up - thanks.
will have a crack at it at the weekend

Yes. I have both RF and IR working with this.

Broadlink RM Pro handles both IR and RF for me pretty well. My minis I have not tried RF, just IR.

Thanks, nice. Looks like Iโ€™m off to get an Android tablet

If you get a new one, make sure you have another use for it. You shouldn't waste money just for this. This just runs in background so you should use tablet for other purposes too to get your money's worth.

or even an old android phone will do if you got one laying around not being used.