After I posted this I actually tried installing tcpdump to my Android phone and using Terminal to run it like this: tcpdump -vv -s 0 -w /sdcard/filename.pcap
I then opened the broadlink app on the same phone and learned codes. After that I opened the pcap in Wireshark.
I found a payload that looked like the codes posted here in QUIC, beginning with 5a… but this didn’t work (tried sending it with Packet Sender and nothing happened).
Where did I do wrong?
And what package is my IR code, and how do I extract it?
Now I actually managed to get two codes through Wireshark:
I tried them in Packet Sender, and they worked. But when trying again they don’t work. If I wait for a while and try again, they work. They are not discrete code, it is the same for on and off.
Why is there a wait time before working again?
davorf, I’m sorry about the confused replies I sent before. I finally managed to find out the IR-codes with Wireshark. And I have now read up about the problem with sending the same IR-code multiple times. And that you had a solution for this with dummy codes.
I use a Homebridge plugin called homebridge-rm-mini3, which sends IR-codes to the Broadlink RM3 Mini. This works very well now, but I am not able to send the same code multiple times. The developer doesn’t seem to have a solution for the dummy code.
I have tried to get help from him without any success.
Can you point me in the right direction. I should be able to add a line of code to this:
Sorry for the late reply on your previous posts. So, you’re not using BlackBeanControl.py? I was wondering why would you sniff UDP packets, when you can learn commands directly from the script. Anyway, BlackBeanControl.py doesn’t use dummy command anymore, since I’ve moved to using python-broadlink package instead of simple UDP payload, and before that, I’ve found a part of the UDP payload that should be changed on every consecutive command sent. You can find changes on the github (you can go through commits to find older version of the script that was using dummy command, or version of the script with random parts of an UDP payload - it’s in the commit made on October 30). Basically, there are two parts of the hex code, both 2 bytes long, that should be changed every time you send a command. It was pretty easy to make that change in python, but, since I’m not very good in Java, I’m not sure about those changes in your code. Hope this helps. If you have any additional questions, feel free to ask.
This script is not OpenHAB specific. It’s just a script you can call from the command line. In the OpenHAB, it’s used via Exec binding, so, if Homebridge supports calling an external applications, you could use it that way.
I use Domoticz to control my house and I use an SQ Blaster for IR. They are not made anymore and looking to expand IR into more rooms and this looks like a great cheap alternative way of doing it. I send my IR commands to me SQ Blaster via .sh scripts and works great.
I am assuming once this is setup I only need my Raspberry Pi to send IR commands to the RM3 the same way I do now to my SQ Blaster however as .py scripts instead of .sh… Is that about right?
Hi, I have managed to extract some IR codes from my Broadlink RM3 Mini.
I am able to use them, they will turn on my light and my TV. But I’m having trouble with sending the same code after eachother.
These are the codes I have sniffed up:
I testing them with Packet Sender, and if I send the same code twice it wont work, and if I use them after eachother they will work.
I have tried to send a dummy-code:
This is the dummy-code:
Sorry for the late reply. Sending a same payload two or more times in a row is the problem I was talking about. That’s why I used random 4 bytes inside a payload every time I was generating payload. Before I found that part (two parts of payload, each two bytes long), I was using dummy command, but dummy command has to be a proper IR command, not just random numbers and letters. It has to begin with 5aa5 the same way real command does. The easiest way to do this is to sniff UDP packet of some IR command you are not going to use (i.e. command from an old IR remote), and use that payload as dummy command.
Thanks for all your hard work above… Using it I have managed to get this working with Domoticz (Create a .py script and call that from a dummy switch). Thats £10 for a pretty good IR blaster that covers most of the room. Happy Days!
Guys, some great stuff here, I already own a Harmony Hub but wanted something that would work the telly in the bedroom without spending $90 so I looked at the Black Bean. I have openHAB2 and looking at this thread I think I can install a Black Bean and get a similar set up working for a quarter of the cost. - I just ordered my RM 3.
UPDATE: Following this thread I was able to implement my RM 3 and can now tell Alexa to turn the upstairs Telly on and off. - It was very painless. - Thanks again for all your hard work.
[quote=“davorf, post:104, topic:11453”]This script is not OpenHAB specific.[/quote] @joq3 ^- what he said… I use BlackBeanControl.py with Home Assistant by invoking it as a shell command… IR is pretty much fire and pray anyway, I wouldn’t go over complicating things, if Homebridge can support shell commands just use that.
This is what it looks like in home assistant (you have to edit the config and run the training command once first):
Since I’m not author of the broadlink-python package, I can’t tell you how or if it is possible to use IR code to construct broadlink UDP payload. The other way to use discrete codes with RM3 is to learn them directly with BlackBeanControl. I’ve used ZappIR Android application which contains a lot of discrete codes (at least for my Samsung TV) and has a huge code database. If it has codes you need, you use android phone to send a discrete command, and learn it using BlackBeanControl the usual way.
I would do that but the official remote does not have and off on button, only a toggle. Unfortunately, I do not have an android phone with an IR blaster. I appreciate the thought though, that sounds like a great option.
Unfortunately you’re out of luck, currently there’s no known way to manually encode the codes for the Blackbean and since the codes are encrypted differently each time the BB is initialized, no one can capture the code for you in BB format and share it (otherwise I could do it with my old Logitech Revue box and paste it here).
HI, I am using RM Pro now, I currently use Broadlink-MQTT as it can easily record code and transmit code under MQTT command, file will storage by itself.
I found the the RM Pro should work in two mode when setup by two apps which decide which mode to work,
there is two app which all publish by broadlink in iOS appstore (I only found e-control in Google Play store)
one name as e-control and one name as broadlink, when app push wifi config to RM Pro, which works differently, MQTT will found out device which setup by broadlink but not e-control, I don’t know will RM 3 Mini support by broadlink, but if you use ios device, you may give a try,
I’m working on a broadlink binding. I got discovery and adding various devices (RMx, A1) as things working. It will probably take me a few weeks to get sending and receiving data working. After I hope to publish it to the community. Please let me know if any of you have any requests or ideas…