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

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