Guide: How to learn broadlink RF codes

Edit: The original post is quite old please refer to these more recent guides that were suggested by others, I haven’t verified these guides myself.



The Post below is probably out of date as written in 2018

Hi

I had a lot of trouble trying to learn broadlink RF codes, I eventually figured it out. Here are the steps I used. Note: instructions refer to e-control app, but this has now been replaced by the “IHC” app, the steps still work however as per the comments below if you read them all. I think the e-control app is better, so if you have an older android phone available use that with the e-control app instead.

First step is to learn an RF code in the app and test it works

  1. Create a button in the app
  2. Then hold down on the button
  3. Then click “learn single”
  4. Then click “sweap frequency”
  5. Now hold down the button on your RF remote until it learns the RF frequency.
  6. Next step is click ‘ok’ then briefly tap the button on your RF remote to learn the RF code.

Once you have created a button, test it works. If it works you can move onto the next step.

  1. Load home assistant webpage on your desktop browser
  2. Goto services tab (Hint: under developer n settings)
  3. Find broad link learn service.
    Enter the service data host: xxx.xxx.xxx.xxx
    Where XXX is your broadlink IP address on the local network.
    (don’t click call service yet).
  4. Now on your cellphone do the following
  5. Hold down on any existing button in the broadlink app
  6. Click “learn single” in the app
  7. Click “sweap frequency” in the app
  8. Hold down RF button on your remote until it detects the frequency
  9. Click ‘ok’ to proceed, it will now want you to press the RF button again, but don’t do it just yet…
  10. First on your desktop pc click ‘call service’
  11. Now you can briefly tap the RF button on your device.

Note: The instructions above are for the e-control app, the IHC app is slightly different, but essentially it’s the same process. You need to call the service after you learn the RF frequency, but before you learn the RF code.

You should now have a notification in home assistant in the desktop browser on the main home assistant overview homepage with the RF code. If you can’t copy paste from your desktop browser trying a different browser or copy + paste it from your cellphone browser (that is what I have to do).

20 Likes

I only do the second part of this. I bought the RM Pro specifically for HomeAssistant so I used the app to set up the RM Pro and then never opened it again (except for firmware updates).

I went to services and used the ‘learn command’ service, copied the code, put it in my yaml, tested it out and used that ever since.

I figured why bother setting everything up twice! :slight_smile:

I also was thinking over the weekend how I could get this working with MQTT…
My wife mainly uses the controller that came with the outlets, which obviously doesn’t update HA which is a pain for my automations.
so I thought, if I can change the codes the sockets use, set up a RF reciever on the PI and then call the ‘light on’ service whenever the PI detects my wife is using the controller then HA will know the state of the outlets at any given time and can factor that into automations.
But I’ve not had time to actually do anything with it yet :frowning:

The first half is just to diagnose whether the rf code is a valid frequency and the broadlink isn’t faulty etc.

1 Like

I’m not sure if home assistant supports listening for rf codes and then responding to rf events.

I’m guessing that the broadlink app might be able to do something through iftt and then send an http post back to h.a.

I’ve struggled with the same thing as @Coedy for a year now trying to figure out a way to fully integrate my ceiling fans into HA.

As he said, the remotes don’t feed back the state so if my wife uses the remote outside of HA then everything gets out of sync.

I’ve tried everything I could think of including trying to set up a RF receiver/transmitter on a RPi, arduino, etc but I couldn’t get anything to work. the hunter fan remotes use some special proprietary coding in the remotes that nothing I’ve found in the open source world can read. But the broadlink can learn them tho.

And no the broadlink can’t be setup to listen for RF codes outside of it’s “learning” window which is hard coded into the device and is only on for less than a few minutes when triggered.

What finally saved me was the introduction of the Sonoff iFan02 Ceiling fan controller. It has an RF remote and uses MQTT as the comm protocol.

I decided to buy a few since they are so cheap ($15 US including shipping from china) but I’m not going to install them into the fans since I’ve heard there are speed issues due to differences in standards between US and China.

What I’m doing is simply using the sonoff remote to control the controller to send MQTT messages to HA to then use the broadlink to control the fan. The controller is simply a relay box with nothing connected to it. Then I can hide the original remote from my wife and use the status of the Sonoff to display the status of the fan or light in HA. I guess it could still get out of sync if someone uses the pull chain to switch things but that’s not very likely and if it does it’s still better than what I have now.

So after that long explanation I finally get to the point of saying you could do the same thing to control your outlets. :grinning:

Have a look to that forum entry it worked great for me … IR/RF training was never so easy … and you don’t need the mobile app

https://community.home-assistant.io/t/broadlink-manager-nicer-way-to-learn-and-send-ir-rf-commands/58770

1 Like

thank you! I’ve tried every possible solution I’ve found, but this was the only one that actually works!

1 Like

Thanks kiwijunglist

I was struggling for ages with the RF learning on the HASS and was going nuts reading how others seem to have no problems with it. The point to re-learn the key press on the app itself is what I was missing. Doing the initial scan on the app first before “learning” it on HASS.
I wish the component instructions were more detailed to include this instruction. Great job figured it out!

1 Like

works, thanks

1 Like

It works… Cant thank you enough. i almost gave up on my broadlink when i saw your post and couldnt believe when it worked.

for others help, my device is showing as RM Pro Plus 3 and none of the other methods worked for me. but with this i was able to register RF Codes for a dimmer wall switch and my curtains/blinds motor.

thanks once again.

1 Like

Yup. I felt the instructions weren’t clear.

I can’t find this in the Services :confused:

i;ve got this issue as well, no luck in getting it to show

Remove all your existing rf / ir codes and switche from the config yaml.

Just have host Mac and type in the config.

Check you can ping the broadlink from the hass.io

Restart h.a

- platform: broadlink
  host: 192.168.X.XX    
  mac: '20-0G-87-51-C1-38' 

This is all i have on the Switch.yaml, i was able to ping the broadlink from the hassio.
restarted HA, but still no luck. its almost as if the platform doesnt exist anymore.

Try

mac: ‘20:0G:87:51:C1:38’

thanks for helping out, not sure, what was the issue, but its now working :slight_smile: cheers

1 Like

My HA or Broadlink struggles with sending multiple RF signals at once, and I don’t want to add a delay as I want all the blinds to roll up/down at the same time.

The remotes that come with the blind motors are single channel so i cannot combine all codes under one channel then have broadlink learn that one channel.

I have these cheap motors which come with only a 1 channel remote

I have already tried to combine them with a different multi channel RF remote that I have for my shutters but the remote just doesn’t want to pair

Is there any way anyone can think of where I can combine different commands in the one code?

Thanks so much for this - it has really helped me out with my aircon and fans!
But… I recently purchased another RM Pro, and this method of learning RF codes no longer seems to work. It may be due a recent app update, but the iPhone app no longer gives you the option to “sweep frequency”, it just goes straight to the button learning.
I’ve tried everything I can think of for the last couple of hours, but all home assistant comes back with is “Broadlink Switch did not received any signal”
Does anyone know what might have changed?

Solved… I had been using the broadlink “ihc” app, which appears to have been updated (no longer works with this learning method)
I have instead downloaded Broadlink’s e-Control app which works fine!