Problem with Xiaomi IR Remote token

Hi Guys,

I am trying to install the remote. So I got the token from the miio script and got this:

Device ID: 88207853
Model info: chuangmi.ir.v2
Address: 192.168.131.159
Token: c89548fcae7e3edbcea9255088c7c5b6 via auto-token
Support: At least generic

Then I entered the following to configuration.yaml:

remote:
  - platform: xiaomi_miio
    host: 192.168.131.159
    token: c89548fcae7e3edbcea9255088c7c5b6

But the platfrom is still failing to start with the following messages in the log:

2018-08-11 07:59:21 ERROR (MainThread) [miio.device] Unable to discover a device at address 192.168.131.159
2018-08-11 07:59:21 ERROR (MainThread) [homeassistant.components.remote.xiaomi_miio] Device unavailable or token incorrect: Unable to discover the device 192.168.131.159
2018-08-11 07:59:21 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Any suggestions? the token is exactly as I got from the discovery…

Thanks in advanced for the helpers.

Naor.

Some more info… I wiresharked the traffic and saw HA is addressing the device twice and thats it…

14:16:21.158247 IP (tos 0x0, ttl 64, id 61415, offset 0, flags [none], proto UDP (17), length 60)
192.168.129.2.57698 > 192.168.131.159.54321: UDP, length 32
14:16:21.158247 IP (tos 0x0, ttl 63, id 61415, offset 0, flags [none], proto UDP (17), length 60)
192.168.129.2.57698 > 192.168.131.159.54321: UDP, length 32

I also pinged the device from the HA server and it works fine. and tried to port scan the device to see if it listening to any port but nothing…

Maybe theres something wrong with the remote?

Got it working at last, just sharing the wealth… the HA found it only after I connected it to the same network as HA (I have a private network for all the smart home devices).

Few things I learned during this proccess:

  1. You must set the Mi Home app location to mainland china
  2. You must have the latest iphone “Mi Home” app, otherwise you cant add the device
  3. The remote and HA needs to be on the same network

I am going to test the last part again today and update if necessary.

Naor.

Hello, someone can Help me? I bought a Xiaomi Universal IR Remote, but cannot pair to my network. Seems there is a regional block code… Someone can watch the log and help me find out why the device does not pair with the wifi network?
Thanks in advance.
Here’s the log. https://pastebin.com/iQFAvbYt

If you have not yet got it going, forget the mi home app… Just use the Miio NPM module from your command line: miio - npm

And setup like so:

# 1. Connect to the IR remote's wifi access point (when it's in initial setup mode)
# 2. Get the token:
miio discover --sync

# 3. Connect the remote to your wifi network like so:
miio configure 192.168.4.1 --ssid xxxxxx --passwd xxxxxx

# 4. Configure your home assistant as per: https://www.home-assistant.io/components/remote.xiaomi_miio/
2 Likes

Thank you for your time. I’ll write as soon as I get results. :slight_smile: