Y'all I really need help with learning RF codes on my Broadlink RM4 Pro

Yeah, you have a point there. I’m all out of ideas then, sorry.

Last resort, just remembered I was involved in another post with a similar issue. Try decoding the code like the other guy did.

1 Like

lol, I’ll dig into this thread! <3

Currently I’m trying this method:

I’ve also had difficulty in getting my Broadlink to record RF commands via Home Assistant. Much of the problem stems from how the remote learn command requires you to hold a button down for the frequency scan then press again to record the actual command.

The good news is the underlying broadlink python package was updated last week to support a specified frequency mode. See https://github.com/mjg59/python-broadlink. Version 19.0 lets you specify the frequency as a parameter and have the Broadlink listen for and record just the command. I’ve used this to capture all my remote codes and it works great. You can then add these recorded commands to Home Assistant.

The main documentation hasn’t caught up yet but you can figure it out from the patch if needed https://github.com/mjg59/python-broadlink/pull/613

I mostly used a Raspberry Pi for my recordings but it should also work from Windows.

pip3 install broadlink

Download broadlink_cli.py & broadlink_discovery.py https://github.com/mjg59/python-broadlink/tree/master/cli

Use broadlink_discovery.py to find your Broadlink device details and save them in RM4PRO.device.

Mine looks like this (somewhat redacted):

0x5213 192.168.x.xx ec0bae------

Scan a command:

./broadlink_cli --device @RM4PRO.device --frequency 433.92 --rflearn --learnfile scan.txt

Have the Broadlink send the command to see if the projector reacts properly:

./broadlink_cli --device @RM4PRO.device --send @scan.txt

If the recorded code works ok, encode it from hex to base64 via https://base64.guru/converter/encode/hex

Paste the base64 into your broadlink_remote_xxxxxxxxxxx_codes file and test it from Home Assistant.

Good luck!

2 Likes

would this work if I dont have a physical remote? my case is that i’m using the broadlink app to control 3 RF blinds at home. I’m not able to get the RF code as broadlink rmpro is the one firing off the commands while i’m using the app to trigger it.

I don’t think this will work unfortunately. The program tells you the commands your Broadlink device is receiving. I doubt it will listen for a code it also sends. For this, I think you would need a second RM4 Pro or a different RF sensor/blaster.

I’m just a novice though.

I found the solution in reddit forum.
https://www.reddit.com/r/homeassistant/comments/19feltb/comment/kjrx31z/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Below is bit modified version of above thread.

Solution:

I finally get it work after many trials. It worked with RM Pro.

  1. First I deleted all the learned but not working codes in broadline_code file under ‘.storage’. using samba share, go to config folder and look for .storage folder which is hidden folder
  2. Then I start with learning one button first. Keep checking the same file and if i works, there should be a new code starting with “sxxxxxxxxxxxxxx” (see the attached photo) and if it doesn’t work or can’t be captured, the file will not even update or getting a code starting with “sxxxxxxxx” which I would know to do it again.
  3. Then follow the usual procedure to developer tools> learn command.
  4. When you press “call services” then in the left notification you should receive a message saying “sweeping frequency - Press and hold the button you want to learn”(1st notification). At this point you can open the notification before you press the remote button. From you have to react quickly thereafter, once you press and hold button (first press), do NOT look at the broadlink device, just look at the HA screen when you do it. How long do you need to do the first press depends on when will the 1st notification disappear.
  5. Once the 1st notification disappear you have to quickly release the remote button.
  6. Then after 2-3s later, there will be a 2nd notification in the left column (if you have no notifications before, it means you will see a yellow circle with “1”). Then immediately, do not waste time to open that notification and just quickly press the remote button again (“2nd press”). If you do it right, there will be a green check at the bottom right, and also the 2nd notification will disappear too.
  7. There you go. you can check the broadline_code file to see if the RF code is successfully captured.
  8. The key difference from what I read from other posts is - you don’t need to read what the LED is showing or blinking while learning. You just need to look at the HA screen.
  9. If you can learn the first button, it means you can do the rest easily.

I hope the above helps as I couldn’t find it in other posts easily the detailed procedures.