2020-12-17 16:58:56,961 WARNING HTTP: POST /device/192.168.178.21 HTTP/1.1 code 400, message Bad payload
But codes from the same remote but other buttons works well. How can it be and why?
The code above working code, i used it with official broadlink intergration till stopped working…
This looks like it could be a hex representation of a Broadlink packet (which is normally in Base64). Try using Hex to Base64 | Base64 Encode | Base64 Converter | Base64 to convert those codes to Base64 and see if they work using the bridge.
Yes, indeed, you were right. Thanks!
Problem is that they do not work inside Home Assistant.
Now I learned some buttonsagain using the Broadlink Manager and I get different codes which, surprisingly, work in Home Assistant.
Do you have any idea why I would get two different codes for the same button? (one code learned with RM bridge and another with Broadlink Manager)
No, I don’t. My knowledge of IR is limited, but I know that decoding can be tricky and due to timing and jitter you don’t get the same results all the time. You probably got a bad learn in your first attempt.
There are some programs like IrScrutinizer that do “reverse engineering” of the IR signal and can analyse it to find out the IR protocol and the parameters. You can then generate new, clean signals via the program.
However, it doesn’t support the Broadlink format (only Pronto hex) so it won’t work for this use case.
I lost an air conditioner remote, so I can no longer use the official HAS Broadlink integration’s learn function. It’s a Haier AC. Where can I source codes to use with this if they aren’t on irdb.tk? Am I screwed or is there a way to brute force codes?
Try Control Tower IR Database (you’ll need an account). I did a quick check and they have the codes for Haier ACs. You’ll get an e-mail with all codes in Pronto hex, which you can use directly with this bridge.
Otherwise let me know the exact model and I’ll get them for you.
Thank you for your reply. Will using this integration prohibit me from using call-service remote.send_command with codes sourced from the broadlink integration’s learn feature?
As a side, I found a blog that stated Pronto codes can be converted using these two tools ([1] , [2]), but I cannot figure out what strings to put into what fields here, could you shed some light on this?
The point of writing my bridge was exactly so I could use Pronto hex codes directly (the de facto format for describing IR codes) instead of the hassle of dealing with the proprietary Broadlink format. You can think of the bridge as being a fancy wrapper over the code you found in [2] (which is in fact incorporated into the bridge with the permission from the original author).
If you choose to use this bridge, you can just copy & paste the codes you got as “hex code”. If you want to use the built-in HASS Broadlink integration, you’ll need to convert them to Broadlink format by running the script you found in [2] and passing the Pronto hex code (in quotes) as a command line argument to the script. It should output a string which is the same code, but converted to the proprietary Broadlink representation.
I installed the integration and am trying to send via an entity button by mac address of the Broadlink, but I’m not sure where my yaml is going wrong; https://paste.ubuntu.com/p/k2N3gVjWnk/. In the documentation /device/ is written twice, but I don’t understand why or how to properly construct this (or if I’m even doing it right by using the mqtt entity button method).
I’m assuming the you only have one Broadlink device, hence I’m using default and relying on auto-detection, but you can also try using the MAC address.
If this doesn’t seem to work, check if the LED of the Broadlink device is flashing when you trigger the command:
if it is, then the bridge is working and it sent the IR sequence: most likely the IR sequence is not the right one for your device
if not, then there’s something wrong with the set up: check the HASS logs and/or the bridge logs
If this works, then what went wrong in the first time is probably the MQTT setup. Double check the bridge config: hostname, username, password. Check with mosquitto_sub -t 'broadlink/#' while you trigger the command to see if the expected message is being sent to the broker.
This should work (although I’m not sure about that b64 prefix. I don’t think it should be there). If this is not working, it won’t work in the bridge as well (since the bridge is doing the same thing). Do the same troubleshooting steps: check if the LED in the device is flashing. If it’s flashing, then the command was sent but it’s probably not for your device. If not, check the HASS logs for any clues.
I had to specify my Broadlink /DEVICE/ as local IP or with a backwards mac address. Didn’t work with default for whatever reason (“Device not found” in bridge logs), but that’s fine as I’m going to use the mac address method.
I discovered the mac address bug by sending a successful IR code using my Broadlink’s IP address as /DEVICE/ and then checking the output in the bridge logs. There I saw the mac address was displayed backwards (as compared to my router’s DHCP table);
2021-06-08 13:34:03,563 INFO Device: [email protected] has alias 192.168.1.53
It was a bug in the bridge. I released a new version of the bridge/add-on with the fix and seized the opportunity to upgrade to the latest version of python-broadlink, which should have better support for newer devices.
I’m trying to insert the codes for the Canal+ TV box.
The IR code obtained on my RU950 for power on/off is : 900A 006D 0000 0001 CFBB 21DE
When i put this in broadlink-bridge.ini the add-on hang and stop.
If i try to convert, the python refuse with : it does not start with 0000
If i add the 0000 … another error …
I’ve just found how to do : i’ve used the Broadlink Manager app and learn the code.
Only the base64 version works fine … with a very huge difference with the RU950 code