Broadlink Manager - Nicer way to Learn and Send IR/RF commands

can docker version be installed like add-ons?

how can I send rf signals (433 MHz) that are learned with another software? I have them as binary 65 bit code. https://github.com/akirjavainen/A-OK/blob/3c5ec0d6f38775aaa8aa69ff0819711a25360db5/A-OK.ino has the full description of the protocol

thank you for any help

@Tomer_Klein You absolute legend, your timing is impeccable. My RM4 Pro was delivered June 24. I learned the IR codes I wanted first with the HA method, but got stuck when trying the RF codes a week or so later. This is going to make my life so much easier.

At first I tried specifying port 7020 instead of using network host like @GorkyV, the web interface loaded but couldnā€™t detect my device. Recreated the image with host networking instead, it very quickly found the device and learned an RF code successfully in the web UI. Didnā€™t seem to have any of the issues described above after I actually RTFM.

While trying this, I had to clear the cache before the device would load; simply refreshing the page after adding host networking didnā€™t work. Watch out for caching issues if youā€™re having the same problem :slight_smile:

Is there any possibility of adding more ports to get this working without host networking? I donā€™t understand Docker well enough to know why, but I thought it was preferable to avoid host networking where possible.

Thanks again for your amazing work Tomer, canā€™t wait to have the time to build up my RF integrations properly!

Thanks for the reply. Yea I used my deviceā€™s actual IP and MAC ID where the placeholders were, like this

./broadlink_cli --rfscanlearn --device ā€œ0x6026 192.168.1.98 24dfa7abc123ā€

I even tried replacing 0x6026 with 0x61a2 since init.py listed that as an RM4 Pro device too, but that didnā€™t work either.

Also tried updating/reinstalling python-broadlink with

pip install --upgrade https://github.com/mjg59/python-broadlink/archive/master.zip

Still got the same result.

Any ideas? Thanks again!

Not 100% sure what it might be when I look at the broadlink.egg-inf/PKG-INFO the version I appear to be running is

Name: broadlink
Version: 0.13.2
Summary: Python API for controlling Broadlink IR controllers
Home-page: http://github.com/mjg59/python-broadlink
Author: Matthew Garrett
Author-email: [email protected]

Just a thought ā€¦ to be clear I am not running the ./broadlink_cli --rfscanlearn --device from within python. it is directly from the command line

Thanks again for taking the time to reply.

If itā€™s not too much trouble, could you walk me through that last part of where exactly to enter ./broadlink_cli --rfscanlearn --device, after Iā€™ve done the following steps?

OK, so my broadlink.egg-inf/PKG-INFO shows the following, so Iā€™m guessing this part is fine.

Metadata-Version: 1.1
Name: broadlink
Version: 0.14.0
Summary: Python API for controlling Broadlink IR controllers
Home-page: http://github.com/mjg59/python-broadlink
Author: Matthew Garrett
Author-email: [email protected]

Then I open Windows PowerShell as administrator, type python to enter Python 3.8.3, then the following commands just to make sure my RM4 Pro is on the network:

>>> import broadlink
>>> devices = broadlink.discover(timeout=5)
>>> devices[0].auth()
True
>>> devices[0].host[0]
192.168.1.98

Where should I go from here? Iā€™ve attempted exiting Python and simply entering the ./broadlink_cli --rfscanlearn --device command while still in PowerShell, but I get the following error instead:

PS C:\> ./broadlink_cli --rfscanlearn --device "0x6026 192.168.1.98 [MAC]"
./broadlink_cli : The term './broadlink_cli' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ ./broadlink_cli --rfscanlearn --device "0x6026 192.168.1.98 [MAC] ...
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./broadlink_cli:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I tried Windows Command Prompt instead and got similar:

'broadlink_cli' is not recognized as an internal or external command,
operable program or batch file.

So Iā€™m at a loss as to where exactly should the command be enteredā€¦ Would greatly appreciate any help here, thanks!

Another point I didnā€™t make ā€¦ I am running it within the Raspbian command shell. Iā€™ll try installing on my windows 10 box but I think it is likely the utility isnā€™t windows based. What device are you running HA on?
I did try running all the python stuff on windows 10 but ended up moving over to the Raspberry pi (that I have running HA (docker)). I was finding most examples and people were running using a Linux base and I was having all sorts of issues. Possibly a bit like what you are experiencing. In truth I donā€™t have a 100% grasp on all of this :slight_smile:, work in progress.

I did try this now on my Windows 10 box and it appears to be positive

Steps that I used on the pi are bellow
Config SSH on PI
Connect via SSH (I use putty)
Install Braodlink

git clone https://github.com/mjg59/python-broadlink.git
cd python-broadlink
sudo python setup.py install

then to run broadlink_cli

$ cd \python-broadlink\cli
$ ./broadlink_cli --rfscanlearn --device "0x6026 192.168.1.13 24dfa7b9c05a"
1 Like

Perfect work!
Thanks a lot!

Thank you so much! The detailed steps you provided finally got it working for me.

Was able to capture RF codes from my remote control fine using the Windows method.

Unfortunately it looks like my remote uses rolling RF codes that are incompatible with the RM4, but thanks very for taking the time to help! Much appreciated. :slight_smile:

So is there a solution for ā€œWriting compatible device not detected!ā€ with RM mini 3 ?

Never mind, despite the Broadlink Manager not working the HA is ! I can have it to learn commands via remote.learn_command and send it via remote.send_commandā€¦ I wonder how to make switches from it now :smiley:

Hav you tried the Docker Version?

No did not try that, I might do integration into unraid so its available in ā€œappsā€ there.

Iā€™m interested in adding this with docker using Portainer but I couldnā€™t figure out how! Iā€™ve tried with creating a Stack using the yaml posted in this thread with no luck.
Anyone can point me in the right direction? Thanks!

Thereā€™s a fair bit of yaml in this thread :slight_smile: It might help to post the yaml youā€™re using specifically

Iā€™m docker-compose rather than portainer, but this yaml for my broadlinkmanager container is working great:

  homeassistant:
    image: homeassistant/home-assistant:stable
    container_name: home-assistant
    environment:
      - PUID=1000
      - PGID=999
      - TZ=Australia/Melbourne
    volumes:
      - /home/user/.docker/homeassistant:/config
    restart: "no"
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
    network_mode: host
  broadlinkmanager:
    image: techblog/broadlinkmanager
    container_name: broadlinkmanager
    volumes:
      - /home/user/.docker/broadlinkmanager:/opt/broadlinkmanager/data
    restart: "no"
    network_mode: host
3 Likes

Small OT, but is there any way of scanning the codes when i dont have the original remote which i could use for learning?

No there is no such way.
But you could theoretically random input to HA switch and see if it works but it will probably take years to get the most basic function working.

You could also try and search for the codes. Some paste the binary and/or raw codes of remotes online.
Maybe you are lucky?

Broadlink Manager has been absolutely great for capturing the RF codes for the existing devices and switches (Iā€™m mostly using TC2 switches). I have 2 rm pro+ hence i used one as the ā€œsenderā€ and the other as the Broadlink Manager scanner to capture the codes.

Recently I just procured a upgraded version of the switch known as Bestcon TC2S. The new switch works exactly the same (or so they say), added to the broadlink app, and the command is triggered from the RM Pro+ and running on RF.

However, it seemed that either the RM Pro+ is unable to detect the new Bestcon TC2S switch, or Bestcon switch is using a different code/ or even rolling code.

Any expert advice how to establish this? I dont mind doing more tests.

Cheers!

Uploading: 31UjhDP4IvL.jpgā€¦

Thank you, Tomer!

I installed your Broadlink Manager container and it detected both my RM Mini 3 (dreadful 0x5f36) in the first try. However something went wrong when I tried to learn a code.

Upon pressing the Learn IR Code and pushing the Remote control button Iā€™d see on screen the message saying:

Status: IR Data Recived

However the Waiting For Signalā€¦ would still keep scrolling as if waiting for something else and I would not get my Hex code at all. I tried different browser and deleting my cache and cookies and it did not budge.

Any ideas of what I could be doing wrong?

Hi there!

Iā€™ve used this application in the past on my RM3 Mini and it worked great. But it will not discover my RM4 Pro. Is there support for that, or will it come? Because I didnā€™t succeed in learning RF codes with other methodsā€¦

1 Like

Hi. Iā€™m having this problem too. I am waiting for the solution.