Xiaomi Chuangmi_ir (Universal IR Remote Controller)


#41

If you are not afraid of reverse engineering, you could start by taking a command you know both input and output and start solving the puzzle piece by piece :slight_smile: The more commands (inputs & outputs) you know, you will probably start noticing patterns in them which will help you further.


#42

Hi,
Is there a way to get host and token without rooting the phone?
Thanks
Marcin


#43

See https://github.com/rytilahti/python-miio#finding-the-token for instructions :slight_smile: edit: actually https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token_mirobot_new.md for direct instructions.


#44

IR Sensor works great, thank you.

One thing:
I have a Robot, which I control with the IR Remote.
Setup works fine and the commands work, but the switches are internally called switch.chuang_mi_ir_switch, switch.chuang_mi_ir_switch_2, switch.chuang_mi_ir_switch_3 and so on.
And each time I restart HA, each switch is bound to a different command/switch than before.

e.g.: switch_1 => clean; switch_2 => home
Restart RPI
switch_1 => home; switch_2 => clean

Code:

  - platform: chuangmi_ir
    name: "IR Remote"
    host: IP
    token: token
    switches:
      robot_clean:
        command_on: 'XXX'
        command_off: 'XXX'
      robot_home:
        command_on: 'YYY'
        command_off: 'YYY'

Any suggestions?
Thanks in advance.


#45

This is a bug. We could/should use the keys (robot_clean, robot_home) of the list as suffix of the different switches.


#46

Hi, I have an air conditioner MIDEA and I can’t capture the commands neither from the android application nor from this component. In the android application I can use a predefined MIDEA remote control but from HASS I do not know how to make it work. I think it has compound commands.Any idea?


#47

Hi Everyone,
I am slighlty confused … I am using this IR for air purifier (daikin) and managed to capture 4 hex codes for commands I want to use, i.e. ON, OFF, AUTO mode, Night mode.
I thought it will be just a matter of configuring it as such:

 - platform: chuangmi_ir
   name: "hallremote"
   host: <hidden>
   token: <hidden>
   switches:
     airfilter:
       name: 'airfilter'
       command_on: 'Z6UHAbgBAAD4BAAAsAYAALsNAAC0dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjEAAAABAAAAAAEAAQEAAQEBAQEAAQAAAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEBAQAEAjEAAAABAAAAAAEAAQEAAQEBAQEAAQAAAQAAAAAAAAAAAQEBAQAAAAEBAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAA='
       command_off: 'Z6UHAbgBAAD4BAAAsAYAALsNAAC0dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjEAAAABAAAAAAEAAQEAAQEBAQEAAQAAAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEBAQAEAjEAAAABAAAAAAEAAQEAAQEBAQEAAQAAAQAAAAAAAAAAAQEBAQAAAAEBAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAA='
       command_autofan: 'Z6UHAYgBAADcAQAA7wQAAKwGAADCDQAAo3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBASEBAQEBIQEhIQEhISEhIQEhAQEhAQEBASEhISEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBIQEBISEhAVE0IQEBASEBAQEBIQEhIQEhISEhIQEhAQEhAQEBAQEBAQEhISEhAQEBIQEhAQEBAQEBAQEBAQEBAQEhIQEBIQEBAQE='
       command_sleep: 'Z6UHAYYBAADdAQAA7AQAAKsGAAC/DQAAoXQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBASEBAQEBIQEhIQEhISEhIQEhAQEhAQEBASEhISEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBIQEBISEhAVE0IQEBASEBAQEBIQEhIQEhISEhIQEhAQEhAQEBAQEBAQEhISEhAQEBISEhIQEhAQEBAQEBAQEBAQEBAQEhASEBAQE='

But above setup does not result in possibility to set this air purifier into different switch states (only on and off work correctly, for the other two, I get the error in the log that the command is unknown). What am I missing here? I have a feeling there is a fixed list of commands that are acceptable and I cannot just create a new one, but on the other hand, why not? If I know the hash for the command that should not be a problem, but I guess it might not work that way

Thanks for help!
Marcin


#48

I tried to address the switches by switch.robot_home and switch.robot_clean.
But this doesn’t work, the only way seams to be switch.chuang_mi_ir_switch.


#49

I guess because the device is treated like a switch, you can only have two actions/states. Switch it on (command_on) or switch it off (command off).
But I could be wrong.

Also in my opinion a kind of button-like behavior would make more sense.
But I don’t think thats supported by HA.


#50

you cant assign more than on and off buttons
a way to create more buttins is to create scripts for the buttons you need

example:
denon_vol_up:
sequence:
- service: chuangmi.send_packet_192_168_1_133
data:
packet: ‘Z6UrAaQBAADmBAAAiQYAACcNAACgIgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAAAQABAAEAAAEAAAEBAAAAAAAAAQABAAEAAAAAAAEAAAAAAAAAAQABAAAAAQABAAQCMAABAAEAAQAAAQAAAQEAAAAAAAABAAEAAQAAAAAAAQAAAAAAAAABAAEAAAABAAEABAIwAAEAAQABAAABAAABAQAAAAAAAAEAAQABAAAAAAABAAAAAAAAAAEAAQAAAAEAAQAAA’

the create a group for the commands:


#51

Finally, I managed to set all up. Thank you @endallas and @teprrr for direct help and everyone else for indirect J


#52

Thanks to everyone. I finally managed to set all up. @syssi @endallas


#53

Hi guys,
Can someone point me from which repository can I get the python-miio>=0.3.0 ? I got lost in so many forks of the same stuff.


#54

python-miio>=0.3.0 is unreleased and will be available here soon: https://github.com/rytilahti/python-miio

Just check my last commit a few seconds ago: https://github.com/syssi/chuangmi_ir


#55

Yes, I already removed the requirement locally and used the script from rytilahti. Managed just now to see each other but got some issue with config ( i believe token is wrong)


#56

So I got it working, but I must say it was some pain in the …
Btw, in my case autodiscovery found the right token for the IR, so no need to play with backups.


#57

wow! PITA but i got the token. is it possible to run this in hassio?


#58

AWESOME!!! got my device today… token was pita as my phone is decrypted but found a way… if needed i will share… but anyway… works well :slight_smile: THANKS!!!


#59

@thundergreen considering you got it decrypted (with miio-extract-tokens or some other way?), could you help a fellow user in Xiaomi Mi Vacuum Token from iOS? ?


#60

@teprrr It was a kind of PITA… u will have to install java addn zu be able to decrypt the file… i my case my phone was encrypted with a password. I could then decrypt it after addind java addons… just tell me where u r stuck mate :slight_smile: