miio
miio copied to clipboard
New device MI IR REMOTE
Hello, I have a xiaomi wifi device, the MI IR REMOTE https://www.youtube.com/watch?v=sEO9WA1cFQY
Device ID: 55301292 Model info: Unknown Address: 192.168.1.73 Token: "HEX VALUE" via auto-token Support: Unknown
i dont have knowledge of wireshark but i can learn! :-)
Thank you for this feature request! I'm interested in supporting this device, I have access to a device but not enough time right now to investigate the API it uses. If you can provide a Wireshark-dump or information about the calls I think we could work together to add support for the basics quite easily.
The documentation should help to get you started with creating a dump and testing the commands.
Hello. In september i tried to obtain a wireshark dump but i can´t (im new with this). Can you tell me the basic steps
i did this:
- install "nox" in my windows pc and mihome in the android emulator
- install wireshark
- start capturing packets in wireshark
- push en mihome app in emulator a order to IR (in this case, power ON a lamp by IR)
- stop capturing packets
and i not find any UDP trafic
i not an expert and my english is so poor but, you understand me? any idea. its a pleasure to me help you in with this device, but i need some help :-(
Sounds like you've done exactly the right thing, but it might be that device doesn't use the local API and instead sends things via the Xiaomis Cloud API.
The weird thing is that there should be some UDP traffic, the Mi Home app sends UDP traffic to look for devices on the network. Maybe the emulator you use can't reach your network somehow. I've used Bluestacks before on my Mac laptop when I did the initial work on the library. Is that available for you to use?
hello again this morning i installed bluestacks and the same. Nothing in UDP :-(
hello again. My english is so poor and i dont understand so much of miio diferences. i found this: https://github.com/rytilahti/python-miio#id27 thant have a library that allow the IR. this is usable with you project?
and i find info of home assitant that maybe help: https://community.home-assistant.io/t/xiaomi-chuangmi-ir-universal-ir-remote-controller/25821/56
Let me share my working example: let ircontrol = await miio.device({address:"your.ip.address",token:"youtoken"}) let learnresult = await ircontrol.call('miIO.ir_learn',{'key':'1'}) await delay(10000)//wait for 10 seconds let coderesult = await ircontrol.call('miIO.ir_read',{'key':'1'}) let playresult = await ircontrol.call('miIO.ir_play',{'freq':38400,'code':coderesult.code})