Put the Broadlink into learning mode then blast from the SURE app.
Hi there,
Iāve now successfully converted the HEX code to a Pronto HEX code and followed your steps to try and generate a usable code (such as āJgBGAJKVETkRORA6ā¦AAA==ā).
Iām running Windows 10 and when I call the Python script I get this syntax error:
Line 52 of my broadlink.py file is: āprint base64.b64encode(packet)ā
Any ideas please?
Also tagging @rutberg who I believe had the same issue. Thanks
On the site repl.it you can run Python scripts online. Also you can pick previous Python versions to run against. From memory, I think v2.7 worked for me.
Thanks @Emphyrio. Iāve found how to run scripts using Python 2.7 in repl.it and tried the following (and tried a number of variations):
To the experienced eye, itās probably obvious what Iāve done wrong, but as Iām not a developer any guidance is welcome!
Iām not at my computer atm, so Iām unable to try for you. I would try different versions of Python on that site.
Thanks again @Emphyrio, but I tried running the command against every Python version/type on repl.it and they all complained about Line 1 of the script, e.g:
Python v2.7 error is: āFile āā, line 1ā
Python v3.7.4 error is: āImportError: No module named binascii on line 1ā
Just checked and Line 1 is: āimport binasciiā.
For completeness, this is the command Iām trying:
python main.py ā0000 006C 0000 0022 00AD 00AD 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 06FBā
I have a working script on my pc. Just canāt reach it right now. I can help you in a week. Or just look for a different script, I think it was called broadlink.py.
Or if someone else can jump in?
For the interested, I have developed a bridge and and add-on so you can just use the Pronto hex codes directly: https://github.com/lbschenkel/hass-addon-broadlink-bridge/tree/master/broadlink-bridge
For the more technically inclined, the bridge can be used with IrScrutinizer so you can play with the IR codes and send them directly to the Broadlink devices from the app itself.
oh that sounds good, will check it out thanks!
I donāt mean to hijack this thread, though, so feel free to continue on a dedicated topic I created for this purpose: HTTP/MQTT/LIRC bridge for Broadlink devices, supports Pronto hex codes. I just wanted to share this with others with similar struggles, because I was just sick of dealing with the damn Broadlink codes. I hope itāll be useful to you too.
Your code. Did run the script on a linux machine:
JgBGAJOTEjcSNxI3EhISEhISEhISEhI3EjcSNxISEhISEhISEhISNxISEhISEhISEjcSNxISEhISNxI3EjcSNxISEhISNxIABfgNBQ==
Thank @ReneR. It seems that I canāt get the Python script to run properly online or when using a Windows machine. Will try on a Linux machine at some point. Appreciate your help here, thanks
I donāt know if this thread is already closed, but if anyone needs it this is how I have solved the problem with the Pioneer receiver VSX-324 part of HTP-072 Home theatre system, which when learning on Broadlink rm mini had quite long codes that worked fine, but when I would convert the pronto discrete codes that I needed for just ON or just OFF (no toggle) I would get short codes that didnāt work. I think I have tried all the conversion variations i found online, but in the process of a few days of different variations no solution worked for me. I use a homebridge / hoobs but I assume the same code goes into the homeassitent as long as you use a broadlink device as an ir blaster. These are the steps that worked for me, so I hope someone might find it helpful:
First I found the pronto discrete codes I needed, there are several good resources on the internet to find, and these are some of them:
Remotecentral, Global Cache
Then I put those codes into the IrScrutiniser app.
In the application, click on Paste & Scrutinize and in the export settings set the Pronto Hex Oneshot format and be sure to put # repeats on 5, click on export and copy the resulting code.
The code you got with the export you need to clean from spaces. One way to clean the code is find and replace in some text editor or go to:
http://tomeko.net/online_tools/hex_to_base64.php?lang=en and convert to Cleaned input, we are not interested in base64 but we copy the cleaned code.
Put the copied cleaned code into this phyton script: https://www.jdoodle.com/embed/v0/eBD , the code you get after execution is the code you put in your bridge that you use.
Hope someone will find this helpful.
Hello, anyone know how to convert Base64 codes to RAW?
Es para convertir BroadLink to XIAOMI
Thanks !
This worked so great, thank you!
- Install the package
pip install git+https://github.com/elupus/irgen.git#egg=irgen
- Find the device on http://irdb.tk/find/
- Select āRawā
- Use in the terminal like
python3 -m irgen -i raw -d +9024 -4512 +564 -1692 +564 -1692 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -1692 +564 -1692 +564 -40884 -o broadlink_base64
- Get perfect output like this:
JgBIAAABKJQTOBM4EzgTExMTExMTExM4EzgTExM4ExMTExMTEzgTExMTEzgTOBM4EzgTExMTExMTOBMTExMTExMTEzgTOBM4EwAFPw==
- Simply use in Home Assistant
- platform: broadlink
mac: 24:DF:A7:7A:8E:51
switches:
projector:
friendly_name: Projector
command_on: JgBIAAABKJQTOBM4EzgTExMTExMTExM4EzgTExM4ExMTExMTEzgTExM4ExMTOBM4EzgTExMTExMTExM4ExMTExMTEzgTOBM4EwAFPw==
command_off: JgBIAAABKJQTOBM4EzgTExMTExMTExM4EzgTExM4ExMTExMTEzgTExMTEzgTOBM4EzgTExMTExMTOBMTExMTExMTEzgTOBM4EwAFPw==
I have a Panasonic UN75J6300. I am having an awful time trying to find a working device id for the Broadlink RM4 Pro to use in home assistant. Can anyone confirm a working device id?
Edit: ya, this was a dumb question. I thought from looking at dev tools/services that the device field was a code you typically need for universal remotes (device Device ID to send command to 32756745). After playing around I figured out it is a free form field. Hopefully this saves someone else from pulling their hair out
Also, I am using the app as well as able to learn and use codes through HAss. Most of the stuff on the web is very outdated since broadlink became an official integration!!!
hiā¦
can you send me this two codes (just ON and just OFF - no toggle) in base64?
[email protected]
thank you very muchā¦
2022 updateā¦
I found pronto format codes and wanted them in Broadlink base64 format. IRGen conversions here worked fine in Pytthon 3.8.
python -m irgen -i pronto -o broadlink_base64 -d 0000 006d
Hi there!
Iāve been using broadlind and home assistant for some time. I managed to discover the codes corresponding to my Panasonic TV during a period of time when I had an Android phone.
Today I tried capturing the corresponding codes to my Cambridge CXA61 amplifier and after trying multiple options, I managed to sniff the āmuteā command using the Node-Red option: Broadlink - Home Assistant
This is what the sniffed code looks like:
38,0,48,0,27,31,58,59,56,31,28,30,27,31,29,30,27,32,27,58,28,31,57,60,27,0,11,123,31,28,56,59,59,30,28,30,28,29,29,29,29,30,29,59,28,30,56,60,29,0,13,5,0,0,0,0,0,0,0,0
I tried converting it to broadlink_base64 using irgen but I did not succeed. Whichever input type that I tried, resulted in an error.
Also, at some point I read that an HA add-on was available but I did not manage to find it in the list of available add-ons after including the repo in my setup: Home Assistant repo added but add-on not found Ā· Issue #66 Ā· t0mer/broadlinkmanager-docker Ā· GitHub
Could somebody help me understand what sort of code format did I sniff, and how I could include it in my configuration.yaml?
Note that by using node-red I managed to sniff the code and I also managed to verify it works using the guidance in the documentation:
I thank you in advance