Hi, first thanks for this project.
I have a Xiaomi IR Remote, and I have got …the token as instructed:
```json
{
"code": 0,
"message": "ok",
"result": {
"list": [
{
"did": "106967454",
"token": "<redacted>",
"longitude": "<redacted>",
"latitude": "<redacted>",
"name": "Remote control",
"pid": "0",
"localip": "<redacted>",
"mac": "<redacted>",
"ssid": "<redacted>",
"bssid": "<redacted>",
"parent_id": "",
"parent_model": "",
"show_mode": 1,
"model": "chuangmi.remote.v2",
"adminFlag": 1,
"shareFlag": 0,
"permitLevel": 16,
"isOnline": true,
"desc": "Device online ",
"extra": {
"isSetPincode": 0,
"fw_version": "2.0.6_0006",
"needVerifyCode": 0,
"isPasswordEncrypt": 0
},
"uid": 6444606189,
"pd_id": 65567,
"password": "",
"p2p_id": "",
"rssi": -30,
"family_id": 0,
"reset_flag": 0
},
{
"did": "ir.1384676911791915008",
"token": "",
"longitude": "<redacted>",
"latitude": "<redacted>",
"name": "TV Remote Control",
"pid": "15",
"localip": "",
"mac": "",
"ssid": "<redacted>",
"bssid": "<redacted>",
"parent_id": "106967454",
"parent_model": "chuangmi.remote.v2",
"show_mode": 1,
"model": "miir.tv.ir01",
"adminFlag": 1,
"shareFlag": 0,
"permitLevel": 16,
"isOnline": true,
"desc": "Device online ",
"extra": { "isSetPincode": 0 },
"uid": 6444606189,
"pd_id": 65725,
"password": "",
"p2p_id": "",
"rssi": 0,
"family_id": 0,
"reset_flag": 0
}
],
"virtualModels": [
{ "model": "zhimi.airpurifier.m1", "state": 0, "url": "" },
{ "model": "yunmi.waterpurifier.v2", "state": 0, "url": "" },
{ "model": "zimi.powerstrip.v2", "state": 0, "url": "" }
]
}
}
```
In the Mi Home application, I've easily set up a kind of "sub device" for this universal IR, which is a "TV Remote Control" as can be seen. I have no idea whether I'm able to control this child device as it doesn't have a token itself, only the parent remote has it. It would be great if possible to get the button hex/raw codes or something.
I've tried to "learn" commands with `miiocli chuangmiir --ip <remote ip> --token <remote token> learn 1` but miiocli instantly returns "Learning command into storage key 1 ['ok']", and a read shows the slot now has a raw code but it actually doesn't learn anything, no idea where these codes are coming from. I don't understand why it doesn't wait for me to click my TV control to read the IR code, as it happens from Mi Home app, and since it can't learn any code, I'm out of ideas how to send them.
At this moment I'm trying to find any hex code that works for my remote to trying sending it raw without the learning step, so far, no luck with it either.