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

Alright @ShadowFist @Stiltjack I got it figured out. Here is what’s in the file:

{
  "version": 1,
  "minor_version": 1,
  "key": "broadlink_remote_ec0bae84d784_codes",
  "data": {
    "projectorScreen": {
      "pause": "dsCiAZDKBAAnDQ0nJwwoDQ0nDScmDg0nDScNJw0nJw0nDQ0nJg8NJicODScmDgwoDCgnDA4mDgABhA0mKAwOJicOJg4NJw0nJw0NJw0oDCYOJyYOJg4NJycODScmDgwoJg0NJw4mJw4NJw0AAYMOJicODScnDSYODiYNJycMDicNJw0nDScmDicNDiYnDgwoJg0NJyYODScNJycNDiYNAAGEDiYnDQ4mJw0nDA4mDiYnDg0nDScNJw4mJw0nDQ0nJw0NJycNDScnDQ4mDScnDgwmDgABhA4mJw4MJycNJw0OJg4mJw0OJw0nDCgMJycNJw0OJicNDicmDg0nJg4MJw0nKAwOJg4AAYMOJicNDiYnDiYNDicNJyYODScNJg4mDiYnDScNECUmDg0nJw0NJigMDiYOJyYODScNAAGEDScmDg4mJw0nDQ0nDScnDQ0nDiYNJw4mJw0nDQ0oJg0NJygMDiYnDQ4mDiYnDgwoDAABhQ0nJw0MKCcMKAwOJg4mJw4NJw0nDScMKCcNJwwOJicODScmDg0nJw0MKA0nJw0NJg4ABdw="
    },
    "candles": {
      "On": "JgBQAAABI48TERMRFBETERMRExEUERMREzUTNRQ1EzUTNRM1FDUTNRMRExEUERMRExETERMRFBETNRM1EzUUNRM1FDQUNBU0FAAE6wABIUgTAA0F",
      "Off": "JgBQAAABI44UERMRExETERMRFBETERMREzUTNRQ1EzUTNRM1EzUTNRQREzUTERMRExETERQRExETNRMREzUUNBQ1EzUTNRM1EwAE7AABIkcTAA0F",
      "2hour": "JgBIAAABJY8TERQRExEUERQQFBAVEBQRFDUTNRM1FDUTNRQ1EzUTNRQRExEUNRMRExEUERMRExEUNRM1FBETNRM1EzYTNRM1FAANBQ==",
      "4hour": "JgBQAAABJo8TERQRExEUERMRExEUERMRFDUTNRM1FDUTNRM1FDUTNRMRFDUTNRMRFBETERQRExEUNBUQFBAUNRQ1EzUUNRM1EwAE7AABI0gTAA0F",
      "6hour": "JgBQAAABJpAUEBMSEhITEhISExISEhQREjYTNhQ0EzUTNhM1EzYTNhISExETEhI2ExISEhMSEhITNRM2EzUTEhI2EzYSNhM2EwAE7AABJUgTAA0F",
      "8hour": "JgBIAAABJ44UEBUQFBAUERQQFBAVEBUPFTQVMxUzFjMVNBU0FDQUNBQRFDQVEBQ0FBAVEBQQFRAUNBQQFTQUEBQ0FTQUNBQ0FQANBQ==",
      "dim": "JgBQAAABI48TERMRFBETERMRExEUERMREzUUNRM1EzUUNRM1EzUUNRMRExETERQREjYTERMSEhITNhM1FDUTNRQREzUTNRQ1FAAE9AABJUgTAA0F",
      "brighten": "JgBIAAABJo8TERQRExEUERMRExEUERMRFDUSNhQ1EzUTNRQ1EzUUNRMRFDUTERQRFDUTERQRExEUNRMRFDUTNRMREzYTNRQ1EgANBQ==",
      "on": "JgBQAAABJo8TEhISExISEhMSExEUERMSEjYTNhI2EzUTNhM1EzYSNhMSEhITEhISExISEhMRExITNRM2EzUTNhI2EzYSNhQ1EgAE7AABJEkSAA0F",
      "off": "JgBQAAABJo4UERMRExEUERMRExEUERMREzUUNBQ1EzUTNRQ1EzUTNRQREjYTERMRExIUEBQQFRAUNBQREzUUNRM1FDQUNRM1FAAE6wABJEgTAA0F",
      "candleMode": "JgBIAAABJpASEhMSEhITEhISExETEhISEzYSNhM1EzYSNhM1FTQSNhMRExISNhI2FBESEhISExISNhI2ExETEhM1FDUUNRI2FAANBQ==",
      "lightMode": "JgBQAAABJo4UEBUQFBAUERQQFRAUEBQQEzYUNBU0FDQVNBQ0FTMVNBUQFTMVMxYzFQ8WDxUPFg8VMxUQFRAUEBU0FDQVNBQ0FAAE6wABJkYUAA0F",
      "dimmer": "JgBQAAABJJAUEBQQFBAVEBQQFBAUEBUQFDQUNBQ0FTQUNBQ0FTQUNBQQFRAVDxUPFjMVEBQQFRAUNBQ0FDQVNBQQFDQVNBQ0FAAE6gABJUcUAA0F",
      "brighter": "JgBQAAABJ48TEhISExETEhISExETEhISEzUTNhI2EzYTNRQ1EzYTNRMSEjYVEBQQEzUVEBQQFBEUNBQQFTQUNBQRFDQUNBU0FAAE8AABJUgTAA0F"
    },
    "screen": {
      "down": "dsAKApDKBAAnDA8lKA0nDQ4mDScnDgwnDScNJw4mJw0nDg0nJg4NJycNDScnDQ0nDScnDQ4mDgABgw4nJwwPJicNJw0NJw0mKA0NJw4mDiYOJicNJw4MKCYODSYoDQ0nJg4NJw0nJw0NJw0AAYQOJycNDiYnDScMDicNJycNDiYOJw0nDScnDScODCcoDA4mJw4NJycNDiYOJicODCgMAAGFDiYnDQ0nKAwoDA4mDiYnDg0nDiYOJg4mJw4nDA4mJw4NJycNDiYnDg0nDCgnDQ0mDgABhQ0nJw0NJigMKAwOJw0nJw0OJg4mDSgMJygMKAwOJicODScnDQ4mJw4MKAwnKAwOJg4AAYUMJygMDiYnDScODScNJycNDiYNJw0nDScoDCcNDiYnDg4mJw0NJycODCcNJycNDiYOAAGEDiYoDA4mJw0nDg0nDiYnDQ0oDCcNJw4mJw0nDQ4mJw4NJycNDScnDQ0nDScmDg0nDgABhA4mJw0OJicNJw4NJwwoJw0NJg4mDiYOJycNJw0OJicODCgnDA4mJw4NJw0nJg4OJg4AAYQOJicNDiYnDScODCgNJigMDiYOJw0nDiYnDScNDScnDgwnKAwOJyYODScNJycNDiYNAAGFDiYnDQ4mJw4nDQ0mDiYoDA4nDScOJg4mJw0nDQ0nJw0OJicODScmDg0nDiYnDQ0nDQAF3A==",
      "screen_off": "dsA6AZDKBAAnDQ0mKAwnDg0nDiYnDQ4nDCgMJw4mKAwnDg0nJg4NJycODCcnDiYNDScOJg4mDgABhA0nJw0OJicNJw4NJw0nJwwOJg4nDScOJicNJw0OJyYODScnDQ0nJw0nDg0mDiYOJwwAAYUOJicNDicnDScNDSYOJicODScOJg4mDiYnDiYNDScoDQ0nJg4NJycNJw0NKAwnDScNAAGFDScnDA4nJw0nDQ4mDiYnDg0nDCgNJg4mKAwnDg0nJw0OJyYODCgmDSgMDiYOJg4mDgABhA0nJw0OJicNJw4NJwwoJg0OJg4mDiYOJyYOJw0NJycODCYoDQ0nJw0nDQ4mDiYOJwwAAYUOJicNDSgmDSgMDiYOJicODScOJg4mDScnDCgNDScnDQ4mJw0OJyYOJw0NJw0mDiYOAAXc"
    }
  }
}

It seems to me that I had named it screen in the past and had those commands Ig? I still don’t think either of them work because I’ve never had the screen working. The command I trained I named screenDown not “pause” so I don’t know what that’s about other than it not liking my camel caps, but I’m going to test that as well and see if it does anything.

Okay so I ran it with the pause instead of screen down and it ran
image

BUT the screen still definitively didn’t move, so the code must be wrong?

All the codes under screen are also not functioning.

Ok, I’m flying blind here because you don’t describe how you’re sending the commands.

However, if you’re doing this using the call_service from dev tools, try sending the base64 version. I copied and modified this directly from the docs, so you might need to mess around with it, but I’m using your code for down:

service: remote.send_command
data:
  target:
    entity_id: remote.blaster
  data:
    command: >-
      b64:dsAKApDKBAAnDA8lKA0nDQ4mDScnDgwnDScNJw4mJw0nDg0nJg4NJycNDScnDQ0nDScnDQ4mDgABgw4nJwwPJicNJw0NJw0mKA0NJw4mDiYOJicNJw4MKCYODSYoDQ0nJg4NJw0nJw0NJw0AAYQOJycNDiYnDScMDicNJycNDiYOJw0nDScnDScODCcoDA4mJw4NJycNDiYOJicODCgMAAGFDiYnDQ0nKAwoDA4mDiYnDg0nDiYOJg4mJw4nDA4mJw4NJycNDiYnDg0nDCgnDQ0mDgABhQ0nJw0NJigMKAwOJw0nJw0OJg4mDSgMJygMKAwOJicODScnDQ4mJw4MKAwnKAwOJg4AAYUMJygMDiYnDScODScNJycNDiYNJw0nDScoDCcNDiYnDg4mJw0NJycODCcNJycNDiYOAAGEDiYoDA4mJw0nDg0nDiYnDQ0oDCcNJw4mJw0nDQ4mJw4NJycNDScnDQ0nDScmDg0nDgABhA4mJw0OJicNJw4NJwwoJw0NJg4mDiYOJycNJw0OJicODCgnDA4mJw4NJw0nJg4OJg4AAYQOJicNDiYnDScODCgNJigMDiYOJw0nDiYnDScNDScnDgwnKAwOJyYODScNJycNDiYNAAGFDiYnDQ4mJw4nDQ0mDiYoDA4nDScOJg4mJw0nDQ0nJw0OJicODScmDg0nDiYnDQ0nDQAF3A==

I sent the commands like this:

service: remote.send_command
data:
  command: screen_off
  device: screen
target:
  entity_id: remote.blaster

I’m editing your code rn

@ShadowFist I’m getting this error code:

image

I ran exactly your code because I didn’t have to edit it.

service: remote.send_command
data:
  target:
    entity_id: remote.blaster
  data:
    command: >-
      b64:dsAKApDKBAAnDA8lKA0nDQ4mDScnDgwnDScNJw4mJw0nDg0nJg4NJycNDScnDQ0nDScnDQ4mDgABgw4nJwwPJicNJw0NJw0mKA0NJw4mDiYOJicNJw4MKCYODSYoDQ0nJg4NJw0nJw0NJw0AAYQOJycNDiYnDScMDicNJycNDiYOJw0nDScnDScODCcoDA4mJw4NJycNDiYOJicODCgMAAGFDiYnDQ0nKAwoDA4mDiYnDg0nDiYOJg4mJw4nDA4mJw4NJycNDiYnDg0nDCgnDQ0mDgABhQ0nJw0NJigMKAwOJw0nJw0OJg4mDSgMJygMKAwOJicODScnDQ4mJw4MKAwnKAwOJg4AAYUMJygMDiYnDScODScNJycNDiYNJw0nDScoDCcNDiYnDg4mJw0NJycODCcNJycNDiYOAAGEDiYoDA4mJw0nDg0nDiYnDQ0oDCcNJw4mJw0nDQ4mJw4NJycNDScnDQ0nDScmDg0nDgABhA4mJw0OJicNJw4NJwwoJw0NJg4mDiYOJycNJw0OJicODCgnDA4mJw4NJw0nJg4OJg4AAYQOJicNDiYnDScODCgNJigMDiYOJw0nDiYnDScNDScnDgwnKAwOJyYODScNJycNDiYNAAGFDiYnDQ4mJw4nDQ0mDiYoDA4nDScOJg4mJw0nDQ0nJw0OJicODScmDg0nDiYnDQ0nDQAF3A==

I don’t think I did anything differently?

Ok, next attempt. I might have added an extra data part by mistake:

service: remote.send_command
target:
    entity_id: remote.blaster
data:
    command: b64:dsAKApDKBAAnDA8lKA0nDQ4mDScnDgwnDScNJw4mJw0nDg0nJg4NJycNDScnDQ0nDScnDQ4mDgABgw4nJwwPJicNJw0NJw0mKA0NJw4mDiYOJicNJw4MKCYODSYoDQ0nJg4NJw0nJw0NJw0AAYQOJycNDiYnDScMDicNJycNDiYOJw0nDScnDScODCcoDA4mJw4NJycNDiYOJicODCgMAAGFDiYnDQ0nKAwoDA4mDiYnDg0nDiYOJg4mJw4nDA4mJw4NJycNDiYnDg0nDCgnDQ0mDgABhQ0nJw0NJigMKAwOJw0nJw0OJg4mDSgMJygMKAwOJicODScnDQ4mJw4MKAwnKAwOJg4AAYUMJygMDiYnDScODScNJycNDiYNJw0nDScoDCcNDiYnDg4mJw0NJycODCcNJycNDiYOAAGEDiYoDA4mJw0nDg0nDiYnDQ0oDCcNJw4mJw0nDQ4mJw4NJycNDScnDQ0nDScmDg0nDgABhA4mJw0OJicNJw4NJwwoJw0NJg4mDiYOJycNJw0OJicODCgnDA4mJw4NJw0nJg4OJg4AAYQOJicNDiYnDScODCgNJigMDiYOJw0nDiYnDScNDScnDgwnKAwOJyYODScNJycNDiYNAAGFDiYnDQ4mJw4nDQ0mDiYoDA4nDScOJg4mJw0nDQ0nJw0OJicODScmDg0nDiYnDQ0nDQAF3A==

EDIT: In case I’m not here to reply, save your commands in a script and try sending those instead. You’ve got plenty of examples in the Broadlink Docs.

I just tried this:

service: remote.send_command
data:
  command: >-
    b64:dsAKApDKBAAnDA8lKA0nDQ4mDScnDgwnDScNJw4mJw0nDg0nJg4NJycNDScnDQ0nDScnDQ4mDgABgw4nJwwPJicNJw0NJw0mKA0NJw4mDiYOJicNJw4MKCYODSYoDQ0nJg4NJw0nJw0NJw0AAYQOJycNDiYnDScMDicNJycNDiYOJw0nDScnDScODCcoDA4mJw4NJycNDiYOJicODCgMAAGFDiYnDQ0nKAwoDA4mDiYnDg0nDiYOJg4mJw4nDA4mJw4NJycNDiYnDg0nDCgnDQ0mDgABhQ0nJw0NJigMKAwOJw0nJw0OJg4mDSgMJygMKAwOJicODScnDQ4mJw4MKAwnKAwOJg4AAYUMJygMDiYnDScODScNJycNDiYNJw0nDScoDCcNDiYnDg4mJw0NJycODCcNJycNDiYOAAGEDiYoDA4mJw0nDg0nDiYnDQ0oDCcNJw4mJw0nDQ4mJw4NJycNDScnDQ0nDScmDg0nDgABhA4mJw0OJicNJw4NJwwoJw0NJg4mDiYOJycNJw0OJicODCgnDA4mJw4NJw0nJg4OJg4AAYQOJicNDiYnDScODCgNJigMDiYOJw0nDiYnDScNDScnDgwnKAwOJyYODScNJycNDiYNAAGFDiYnDQ4mJw4nDQ0mDiYoDA4nDScOJg4mJw0nDQ0nJw0OJicODScmDg0nDiYnDQ0nDQAF3A==
target:
  entity_id: remote.blaster

I’m running yours now… there was no difference I think. It ran, nothing moved. I’m going to fuss around with a few of these different codes and get back you all if nothing works. Thank you again.

1 Like

Okay I tried that and it didn’t work, I did also add a space between the code and “‘b64:’” I also tried it with my candles on command which worked flawlessly. I tried to get some more codes to run this way because I didn’t trust pause or any of the screen device commands, but I haven’t been able to have any of these new learned commands show up in this file with the codes. I did the steps exactly as I have in the past, and I restarted File Editor addon and restarted home assistant when that didn’t work. I also tried doing it under a new device name when learning the command and that also did not work. So, I’m stuck again. I will happily blindly follow instructions from you all when you have the time to give them to me. Thank you!!
sadbanana

Last suggestion I can give, because I’m all out of ideas.

Record your down command 10 different times, maybe calling it down1, down2 etc.
When you’re done, open the file and check if those 10 commands are exactly the same. If they’re not, then your remote sends rolling codes and there’s no easy way to send commands I’m afraid.

2 Likes

I’ll give it a go. Thank you again @ShadowFist for the help!

If it were a “rolling code” wouldn’t the Broadlink app also find issue with it? Because again, it works perfectly fine on their app.

Is your projector remote using 315 or 433mhz?
I think I might try to use rm pro on mine and see if it works

1 Like

I’m like 99% sure it was 433mhz, but I would have to double check when I get home in like 30 minutes.

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.