Xiaomi Mi Infrared Remote Control

Hello,
What type of thing from the binding did you create?
I get stuck at

  • The command is automaticaly executed, check the logs. Use Karaf

I understand that I change the value on Execute Command and then switch Execute Test Command (Experimental)

I see the log changing to:

20:47:38.533 [INFO ] [g.miio.handler.MiIoUnsupportedHandler] - Start Experimental Testing of commands for device 'Mi Remote v2 (chuangmi.ir.v2)'.
20:47:38.590 [INFO ] [g.miio.handler.MiIoUnsupportedHandler] - Test command 'miIO.info'. Response: '59'

What do I do next?
Point my actual remote control to the Xiaomi and press a button? Nothing happens
How do the Xiaomi learns?

Thanks

I too are up to this stage.
Yet I have not been able to find this in the Control section of PaperUI - Where did you find it? -

Edit: I have managed to get it up by creating and linking items to it.
I have put in the input put in
“miIO.ir_play {“freq”: 38400, “code”: “Z6VHADUCAACbBgAAuggAAIIRAABmIwAAQJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAEAAAAAAQEBAAEBAQEAAAAAAQAAAAEBAQEAAQEBBQJAA=”}”

As a test and the Ir Blaster led blinks like it is sending a signal. The question is how do I get the correct “code:” to input to turn on say the AC etc ??

Hello,

Please, tell me how you created the rule, I have tried it with this command but it does not perform the action…

Irda_Comando.sendCommand(miIO.ir_play {“freq”: 38400, “code”: “Z6U7AN4BAAAVAgAA1wUAALQLAABrJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDIRAQECEQEBAhIRAQEBAQECEQEBAhIRAhEBAQIQA=”})

Irda_Comando is the Item…

You need to make a character escape in the string:
(backslash “\” before all " in the string)

executecommand.sendCommand("miIO.ir_play {\"freq": \“38400\”, \“code\”: \“Z6VLADECAACRBgAAuQgAAHsRAABIIwAApJwAAMh3AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAQAAAAAAAQEAAQEBAQEAAAABAAAAAAEBAQABAQEBBQJGAkAA==\”} ")

This is my rule and works great!

Hi there,

My device doesn’t get discovered. Did you install it as a child of the gateway?

How did you install it?

Thanks,

Pim

Another problem: my device, a Cisco ISB6030: all IR-functions can be received and learned, except for the on/off functionality.

When I try to learn, I receive this code:
Z6WzAJgAAAD6AAAAIwEAAMMBAABwAgAAFAMAALxgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICBAQDBAECBQIAA=

I send out this code:

 mirobo --ip 192.168.1.9 --token f0eac52fea895e0b136ae5eb32e54c1a raw_command miIO.ir_play '{"freq": 38400, "code":"Z6WzAJgAAAD6AAAAIwEAAMMBAABwAgAAFAMAALxgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICAgQDBAICBQIGATIEAgQFAgICBAQDBAECBQIAA="}'

The IR sender blinks, so it emits, but there is no action, the state of the machine doesn’t change.

Searching for a while on the internet but still no answers so far…

Hi, I’m using Openhab2.4 snapshot, I just installed the Xiaomi Mi IO Binding and successfully discover my “Mi IR remote”, but I cannot input any command, my command field was disappear.1
than I use “ssh -p 8101 openhab@localhost” and “log:tail org.openhab.binding”, I saw respone when I switch on and off the “(experimental)Execute Test Commands”, but when I type " miIO.ir_learn[“key” : 1]" and point the remote to “Mi IR Remote” and press any button, there are nothing happen, nothing display.


any help?

You need to send the command to the command channel (marked as advance, so need use show more in paperui) or execute from rule with proper escaping. See a few posts ago

Hi @marcel_verpaalen
I think @supoeric is at the same point I was on the 21st March and I got no answer to my query at the time.
Once the binding is installed what do we do with our physical remotes and how does OH learns the remote codes.
Do you have a step by step, please?

Hi
In paper UI , I click “show more” and link the command channel, but no input field display, only display “Execute Command” label, may be I was install the latest 2.4 snapshot cause this problem. So I execute the command in openhab console, no respond.

Superic

Vincent Regaud bot@community.openhab.org 於 2018年10月6日 06:27 寫道:

I don’t have such a device, but reading the post of
@axelthomas it seems fairly logical… learn first, than read the learning and replay with the play command to send the code

I have taken the first steps and I have managed to read IR for ON and OFF of AC, but I do not know how to add it to an element.

key1

{“result”:{“key”:“1”,“code”:“Z6WzAF4BAAC7AQAA1AQAAF0GAAAtDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0ECAQECAQIBAQICAgECAQICAgEBAQECAgECAgEBAgEBAgEBAgIBAgICAgICAgICAgEBAQEBAQEBAgICAQECAgIBAQECAgEBAQICAQEBAQIBAQECAgICAQIAA=”},“id”:166}

key2
{“result”:{“key”:“2”,“code”:“Z6WzAHUBAACkAQAAvQQAAEYGAABEDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0ECAQECAQIBAQICAgECAQICAgEBAQECAgECAgEBAgEBAgEBAgIBAgICAgICAgICAgEBAQEBAQEBAgICAQECAgIBAQECAgEBAQICAQIBAQIBAQECAQICAQIAA=”},“id”:195}

Did you get the codes?

I haven’t yet got all to work but I believe this is what you have to do to get the HEX codes the IR Remote is sending. You need to monitor the UDP packets on your network. This can be done with Wireshark. You then need to copy these codes and use them in OpenHAB. I know this sounds scary but I followed this tutorial to help me get the codes.

Hope it helps.

The codes received are 2 post above, but I do not know how to use them in openhab. THANK YOU

First make a new String item (in Paper UI or in *.items file)
Link this with the ir thing Execute Command Action (in Paper UI or *.items)

Then go to Paper UI -> Control page and see a new control panel:
ir
Paste the ir code to the line and hit enter. If everything fine you can control the AC.

THANK YOU

So using mirobo raw-command miIO.ir_learn and miIO.ir_play from the command line I have managed to document and test all the codes that I want the IR Remote to control. Now I’m stuck at trying to execute them within Openhab. I installed the “Xiaomi Mi IO Binding” and have tried all variations of the commands from within the “Execute Command” tab.

[miIO.ir_play]{“code” : “Z6WVADkCAADAAgAAmAYAAB4HAADlCwAAxxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEVCAAIBAAIAAwAAAAMAAAADAAACAwACAgMAAAIDAAAAAQAAAAEAAAADAgIAAwICAgEAAAIBAgACAQAAAgECAAABAAIAAQICAgAAA=”}

Log Output

22:51:14.256 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Sending Ping 03EE3156 (172.20.1.130)
22:51:14.278 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Ping 03EE3156 (172.20.1.130) success
22:51:24.298 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Communication error for Mi IO device at 172.20.1.130: Receive timed out
22:51:24.305 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - No response from device 03EE3156 at 172.20.1.130 for command {"id":15,"method":"[miIO.ir_play]","params":{"code":"Z6WVADkCAADAAgAAmAYAAB4HAADlCwAAxxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEVCAAIBAAIAAwAAAAMAAAADAAACAwACAgMAAAIDAAAAAQAAAAEAAAADAgIAAwICAgEAAAIBAgACAQAAAgECAAABAAIAAQICAgAAA="}}.
22:51:24.317 [DEBUG] [ding.miio.handler.MiIoAbstractHandler] - Received response for 03EE3156 type: UNKNOWN, result: null, fullresponse: {"error":"No Response"}
22:51:24.324 [DEBUG] [ding.miio.handler.MiIoAbstractHandler] - Error received: "No Response"

[raw-command miIO.ir_play]{“code” : “Z6WVADkCAADAAgAAmAYAAB4HAADlCwAAxxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEVCAAIBAAIAAwAAAAMAAAADAAACAwACAgMAAAIDAAAAAQAAAAEAAAADAgIAAwICAgEAAAIBAgACAQAAAgECAAABAAIAAQICAgAAA=”}

Log Output

22:49:16.264 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Sending Ping 03EE3156 (172.20.1.130)
22:49:26.287 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Communication error for Mi IO device at 172.20.1.130: Receive timed out
22:49:26.296 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - No response from device 03EE3156 at 172.20.1.130 for command {"id":13,"method":"[raw-command miIO.ir_play]","params":{"code":"Z6WVADkCAADAAgAAmAYAAB4HAADlCwAAxxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEVCAAIBAAIAAwAAAAMAAAADAAACAwACAgMAAAIDAAAAAQAAAAEAAAADAgIAAwICAgEAAAIBAgACAQAAAgECAAABAAIAAQICAgAAA="}}.
22:49:26.304 [DEBUG] [ding.miio.handler.MiIoAbstractHandler] - Received response for 03EE3156 type: UNKNOWN, result: null, fullresponse: {"error":"No Response"}

I think I may have the commands wrong but when I manually execute the same command from the command line (mirobo) I have no issues and the IR Remote blinks and sends the command immediately.

Can someone please give me a hand with this.

Thanks,

I’m still doing tests, I have the same problem. a few posts above, it means replacing the blank spaces, try it and it does not work for me,
I do not have much time, but I’ll keep trying. I need it to start a heat pump.

Is the command I’m using right?

[raw-command miIO.ir_play] {code…}