Last few days I’m browsing through community and try to setup my IR Remote controller. I have already set it up with my Xiaomi Mi Home app and it is working as wanted.
Now I’m preparing to use the same commands with my OpenHAB setup.
-I managed to bind the controller with Mi IO binding.
-Got the thing and it is online
-created items
Now the main part. How to send IR commands? I figure it should be (somehow) possible to capture the IR string which is already set in the Mi Home App?
I tried with wireshark and monitored either the IP from which the app is running and also the IP of the destination - IR Remote. But I don’t seem to be capturing the right packet.
What Am I missing? I know there are some topics regarding this but I was not (for now) successful and I’m apologizing for extra topic.
Is it possible to find the command with the android-backup-tookit?
I figueree it out. The problem was as I was copying commands from community threads and applying them in PaperUI, some characters were not formatted correctly and nothing happened…
Hey Mario, did i get that right?
you took the command channel in Paper UI and just put some commands in there and executed them?
Where could I get the commands from for my Samsung TV for example?
And can I link these commands to buttons and switches in the sitemap?
Do you know that?
If i remember correctly first I had to enable learning mode (step 1), next step is to make the ir read next command - executing step 2 and sending IR command from for example TV remote power button to IR remote controler. The “code” can be found in OH logs.
And with step 3 (play) you execute the “copied” command with the “code” being what you saw in logs.
Yea this helped! Maybe a little more step by step How to would be…
Acticate the Command Channel in “Show More” of the thing in OH Configuration
In OH Control > Command Channel of the Remote Controller execute miIO.ir_learn {“key”: “2”} #keynumber is the id of the command. for example 1 is used for power on/off, 2 for volume up etc…
Press a key on your remote pointing to the xiaomi device
Execute miIO.ir_read {“key”: “2”} and the events.log will give you miio_generic_06F9867A_actions_commands changed from miIO.ir_read {“key”: “2”} to {“id”:26,“result”:{“key”:“2”,“code”:“xyz”}}
Take the code and put it into…miIO.ir_play {“freq”: 38400, “code”: “xyz”} and execute it in the command channel…there you go!