Giter Site home page Giter Site logo

homebridge-miio's People

Contributors

bluebie avatar nickdos avatar ruslanchek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-miio's Issues

Manual input

Hi,

Thanks for your efforts. It works good for me.

But I want to input 'mac address', 'name' pair manually in the config.json file.

no WiFi plugs discovered

i can find my wifi plugs,but my Motion sensor and door sensor work well,i can switch plugs through mihome app(plug have same wifi as gateway).

can you give me some help?

i find some words from mi home app (but i not find any information that you config this "secret key")

"user use this protocol to controll lvmi plugs and wall switch ( must use secret key)"

------- npm versions -------
homebridge: 0.4.20
homebridge-miio: 0.2.1
homebridge-aqara: 0.1.12

------- firmware versions -------
gateway: v3.5.0 v3.16.0
wifi plug: 1.2.4_17

------- gateway information -------

网关ID: 56301635
Zigbee通道: 15
网关信息:
{ap={bssid="B8:F8:83:DE:FF:D3";rssi="-35";ssid="Tenda_1111";};"cfg_time"=0;"fw_ver"="1.4.1_146";"hw_ver"=MW300;life=9840;mac="34:CE:00:81:3A:E4";"mcu_fw_ver"=0141;mmfree=175384;model="lumi.gateway.v3";netif={gw="192.168.0.1";"gw_mac"="B8:F8:83:DE:FF:D3";localIp="192.168.0.101";mask="255.255.255.0";};ot=otu;"ott_stat"=(0,0,0,0);"otu_stat"=(30,28,304,0,302,39);token=3fdc7970454db8199e683bc64bddf254;uid=105343376;"wifi_fw_ver"="SD878x-14.76.36.p84-702.1.0-WM";}
子设备信息:
{ Model: lumi.sensor_magnet.v2,did: lumi.158d000159c083,name: 门窗传感器2 }{ Model: lumi.sensor_motion.v2,did: lumi.158d000171bb5a,name: 人体传感器 }{ Model: lumi.sensor_smoke.v1,did: lumi.158d0001576a06,name: 烟雾报警器 }

--------config.json------------

{
    "bridge": {
        "name": "Homebridge1",
        "username": "34:CE:00:81:3A:E4",
        "port": 51827,
        "pin": "123-45-678"
    },
    "platforms": [
        {
            "platform": "AqaraPlatform",
            "sid": [
                "34ce00813ae4"
            ],
            "password": [
                "b1a538777db54da1"
            ]
        },
        {
            "platform": "XiaomiMiio",
            "name": "XiaomiMiio",
            "pollChanges": true,
            "pollInterval": 15,
	   "searchInterval":1800
        }
    ]
}

------------- homebridge log -------------

[5/19/2017, 1:52:53 PM] [XiaomiMiio] DidFinishLaunching
  miio.packet -> <Buffer 21 31 00 20 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff> +0ms
  EventedHTTPServer Server listening on port 51827 +0ms
[5/19/2017, 1:52:53 PM] Homebridge is running on port 51827.
  EventedHTTPServer [::ffff:192.168.0.106] New connection from client +1s
  EventedHTTPServer [::ffff:192.168.0.106] HTTP server listening on port 43753 +12ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /pair-verify +91ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: POST /pair-verify +4ms
  HAPServer [34:CE:00:81:3A:E4] Pair verify step 1/2 +42ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +150ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /pair-verify +56ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: POST /pair-verify +1ms
  HAPServer [34:CE:00:81:3A:E4] Pair verify step 2/2 +10ms
  HAPServer [34:CE:00:81:3A:E4] Client 77B4FA12-42BC-4570-9B7E-C70874625DA5 verification complete +24ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +9ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /accessories +22ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: GET /accessories +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +33ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /characteristics +149ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: PUT /characteristics +2ms
  Accessory [Homebridge1] Processing characteristic set: [{"aid":2,"iid":11,"ev":true},{"aid":2,"iid":14,"ev":true},{"aid":3,"iid":11,"ev":true},{"aid":3,"iid":14,"ev":true}] +22ms
  Accessory [Homebridge1] Registering Characteristic "Reachable" for events +12ms
  Accessory [Homebridge1] Registering Characteristic "Category" for events +3ms
  Accessory [Homebridge1] Registering Characteristic "Reachable" for events +1ms
  Accessory [Homebridge1] Registering Characteristic "Category" for events +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +3ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /characteristics +80ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: PUT /characteristics +1ms
  Accessory [Homebridge1] Processing characteristic set: [{"aid":3,"iid":9,"ev":true}] +4ms
  Accessory [Homebridge1] Registering Characteristic "Motion Detected" for events +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +3ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /characteristics +15ms
  HAPServer [34:CE:00:81:3A:E4] HAP Request: PUT /characteristics +1ms
  Accessory [Homebridge1] Processing characteristic set: [{"aid":2,"iid":9,"ev":true}] +9ms
  Accessory [Homebridge1] Registering Characteristic "Contact Sensor State" for events +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +3ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /characteristics?id=2.9,3.9 +26s
  HAPServer [34:CE:00:81:3A:E4] HAP Request: GET /characteristics?id=2.9,3.9 +18ms
  Accessory [Homebridge1] Getting value for Characteristic "Contact Sensor State" +21ms
  Accessory [Homebridge1] Got Characteristic "Contact Sensor State" value: 1 +4ms
  Accessory [Homebridge1] Getting value for Characteristic "Motion Detected" +1ms
  Accessory [Homebridge1] Got Characteristic "Motion Detected" value: false +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +9ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP request: /characteristics?id=2.9,3.9 +8s
  HAPServer [34:CE:00:81:3A:E4] HAP Request: GET /characteristics?id=2.9,3.9 +1ms
  Accessory [Homebridge1] Getting value for Characteristic "Contact Sensor State" +6ms
  Accessory [Homebridge1] Got Characteristic "Contact Sensor State" value: 1 +1ms
  Accessory [Homebridge1] Getting value for Characteristic "Motion Detected" +0ms
  Accessory [Homebridge1] Got Characteristic "Motion Detected" value: false +1ms
  EventedHTTPServer [::ffff:192.168.0.106] HTTP Response is finished +3ms

not able to fetch the up status of chuangmi.plug.v1 (power-plug) , the one with USB port

not sure if the issue from miio ,or here.From homekit , I can turn on or turn off the plugin , but once I turn on it ,after a while it will show off status even it's on now. Looks like it somehow failed fetch the up status.

from the miio lib ,it says at least basic, not sure if this is the case. I am rasie the issue in here now.
since this is the issue that I met when I use this module
Device ID: 937021
Model info: chuangmi.plug.v1 (power-plug)
Address: 192.168.88.18 (chuangmi-plug-v1_miio937021)
Token: a6ab080d5223bdbc73fbf572ef8388dc via auto-token
Support: At least basic

here is the log

May 31 13:54:07 stevenhomesmart homebridge[20969]: [5/31/2017, 1:54:07 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 13:54:44 stevenhomesmart homebridge[20969]: [5/31/2017, 1:54:44 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 13:58:07 stevenhomesmart homebridge[20969]: [5/31/2017, 1:58:07 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:00:58 stevenhomesmart homebridge[20969]: [5/31/2017, 2:00:58 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:04:05 stevenhomesmart homebridge[20969]: [5/31/2017, 2:04:05 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:08:48 stevenhomesmart homebridge[20969]: [5/31/2017, 2:08:48 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:11:36 stevenhomesmart homebridge[20969]: [5/31/2017, 2:11:36 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:11:40 stevenhomesmart homebridge[20969]: [5/31/2017, 2:11:40 PM] [XiaomiMiio] miIO Plug 937021 power to 1
May 31 14:13:03 stevenhomesmart homebridge[20969]: [5/31/2017, 2:13:03 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 31 14:13:04 stevenhomesmart homebridge[20969]: [5/31/2017, 2:13:04 PM] [XiaomiMiio] miIO Plug 937021 power to 1

enabled the debug log yesterday, from the debug log ,it seems able to fetch the status correct

May 30 23:53:10 stevenhomesmart homebridge[5975]: [5/30/2017, 11:53:10 PM] [XiaomiMiio] miIO Plug 937021 fetch status
May 30 23:53:10 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:10 GMT miio.device.937021 -> (3) {"id":3543,"method":"get_prop","params":["power"]}
May 30 23:53:10 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:10 GMT miio.device.937021 <- Message: {"result":["on"],"id":3543}
May 30 23:53:16 stevenhomesmart homebridge[5975]: [5/30/2017, 11:53:16 PM] [XiaomiMiio] miIO Plug 937021 power to 1
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 -> (3) {"id":3544,"method":"set_on","params":[]}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 <- Message: {"result":0,"id":3544}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 -> (3) {"id":3545,"method":"get_prop","params":["power"]}
May 30 23:53:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3545}
May 30 23:53:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:31 GMT miio.device.937021 -> (3) {"id":3546,"method":"get_prop","params":["power"]}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 <- Message: {"result":["on"],"id":3546}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 -> (3) {"id":3547,"method":"get_prop","params":["on","usb_on"]}
May 30 23:53:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3547}
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 <- Handshake reply: <Buffer a6 ab 08 0d 52 23 bd bc 73 fb f5 72 ef 83 88 dc>
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 -> (3) {"id":3548,"method":"get_prop","params":["power"]}
May 30 23:53:46 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:53:46 GMT miio.device.937021 <- Message: {"result":["on"],"id":3548}
May 30 23:54:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:01 GMT miio.device.937021 -> (3) {"id":3549,"method":"get_prop","params":["power"]}
May 30 23:54:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:01 GMT miio.device.937021 <- Message: {"result":["on"],"id":3549}
May 30 23:54:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:02 GMT miio.device.937021 -> (3) {"id":3550,"method":"get_prop","params":["on","usb_on"]}
May 30 23:54:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:02 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3550}
May 30 23:54:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:16 GMT miio.device.937021 -> (3) {"id":3551,"method":"get_prop","params":["power"]}
May 30 23:54:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3551}
May 30 23:54:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:31 GMT miio.device.937021 -> (3) {"id":3552,"method":"get_prop","params":["power"]}
May 30 23:54:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:31 GMT miio.device.937021 <- Message: {"result":["on"],"id":3552}
May 30 23:54:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:32 GMT miio.device.937021 -> (3) {"id":3553,"method":"get_prop","params":["on","usb_on"]}
May 30 23:54:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3553}
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 <- Handshake reply: <Buffer a6 ab 08 0d 52 23 bd bc 73 fb f5 72 ef 83 88 dc>
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 -> (3) {"id":3554,"method":"get_prop","params":["power"]}
May 30 23:54:47 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:54:47 GMT miio.device.937021 <- Message: {"result":["on"],"id":3554}
May 30 23:55:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:01 GMT miio.device.937021 -> (3) {"id":3555,"method":"get_prop","params":["power"]}
May 30 23:55:01 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:01 GMT miio.device.937021 <- Message: {"result":["on"],"id":3555}
May 30 23:55:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:02 GMT miio.device.937021 -> (3) {"id":3556,"method":"get_prop","params":["on","usb_on"]}
May 30 23:55:02 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:02 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3556}
May 30 23:55:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:16 GMT miio.device.937021 -> (3) {"id":3557,"method":"get_prop","params":["power"]}
May 30 23:55:16 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:16 GMT miio.device.937021 <- Message: {"result":["on"],"id":3557}
May 30 23:55:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:31 GMT miio.device.937021 -> (3) {"id":3558,"method":"get_prop","params":["power"]}
May 30 23:55:31 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:31 GMT miio.device.937021 <- Message: {"result":["on"],"id":3558}
May 30 23:55:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:32 GMT miio.device.937021 -> (3) {"id":3559,"method":"get_prop","params":["on","usb_on"]}
May 30 23:55:32 stevenhomesmart homebridge[5975]: Tue, 30 May 2017 23:55:32 GMT miio.device.937021 <- Message: {"result":[true,true],"id":3559}

maybe some bug here ,will check it tomorrow, if I have time, if not ,hope someone can take a look ,as I pretty much provide everything you need for debug

out of control issue

Hello,

Yesterday after install the miio,i kept my mi-plug on and start the homebridge but it can not fetch the real status and keeps off.
I tried to switch on the plug by the app, the icon active then 2s later switch off, during that nothing change on the real plug.
i repeat it 3 times,no any response from the plug.

When i tried the fourth time,it works.but 10s later the icon switched off and plug keeps on.

any suggestion on it?

below is the record log,

homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[5/3/2017, 2:07:41 PM] Loaded plugin: homebridge-edomoticz
[5/3/2017, 2:07:41 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[5/3/2017, 2:07:41 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[5/3/2017, 2:07:41 PM] ---
[5/3/2017, 2:07:42 PM] Loaded plugin: homebridge-miio
[5/3/2017, 2:07:42 PM] Registering platform 'homebridge-miio.XiaomiMiio'
[5/3/2017, 2:07:42 PM] ---
[5/3/2017, 2:07:42 PM] Loaded config.json with 0 accessories and 2 platforms.
[5/3/2017, 2:07:42 PM] ---
[5/3/2017, 2:07:42 PM] Loading 2 platforms...
[5/3/2017, 2:07:42 PM] [eDomoticz] Initializing eDomoticz platform...
[5/3/2017, 2:07:42 PM] [XiaomiMiio] Initializing XiaomiMiio platform...
[5/3/2017, 2:07:42 PM] [XiaomiMiio] Setting up Miio platform
[5/3/2017, 2:07:42 PM] Loading 0 accessories...
[5/3/2017, 2:07:42 PM] [XiaomiMiio] miIO Plug 351685 Configure Accessory
[5/3/2017, 2:07:43 PM] [XiaomiMiio] DidFinishLaunching
[5/3/2017, 2:07:44 PM] [XiaomiMiio] device discovered 13615136
[5/3/2017, 2:07:44 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.151:54321
[5/3/2017, 2:07:44 PM] [XiaomiMiio] device discovered 351685
[5/3/2017, 2:07:44 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.103:54321
[5/3/2017, 2:07:44 PM] [XiaomiMiio] Unsupported, ignoring
[5/3/2017, 2:07:45 PM] [eDomoticz] Initializing platform accessory 'iptv'...

Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
[5/3/2017, 2:07:47 PM] Homebridge is running on port 51826.
[5/3/2017, 2:07:54 PM] [XiaomiMiio] miIO Plug 351685 fetch status
[5/3/2017, 2:09:47 PM] [XiaomiMiio] miIO Plug 351685 fetch status
[5/3/2017, 2:10:11 PM] [XiaomiMiio] miIO Plug 351685 fetch status
[5/3/2017, 2:10:42 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:10:48 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:11:02 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:16:43 PM] [XiaomiMiio] miIO Plug 351685 fetch status
[5/3/2017, 2:16:43 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:16:44 PM] [XiaomiMiio] miIO Plug 351685 power to 0
[5/3/2017, 2:16:46 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:16:46 PM] [XiaomiMiio] miIO Plug 351685 power to 0
[5/3/2017, 2:16:47 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:16:48 PM] [XiaomiMiio] miIO Plug 351685 power to 0
[5/3/2017, 2:16:49 PM] [XiaomiMiio] miIO Plug 351685 power to 1
[5/3/2017, 2:16:53 PM] [XiaomiMiio] miIO Plug 351685 power to 0
[5/3/2017, 2:16:55 PM] [XiaomiMiio] miIO Plug 351685 power to 1

Triggers crashing bug in Debian Jessie on Raspberry Pi in some IPv6 environments

Hi,

I'm new to your miio project. Just installed it through npm and it crashes every time. Log is here:

events.js:160
throw er; // Unhandled 'error' event
^

Error: getaddrinfo -3008
at errnoException (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:199:11)
at getaddrinfo_complete (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:112:10)
at GetAddrInfoReqWrap.oncomplete (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9)

BR
Ryan

Any idea why cannot be loaded?

This is my error log:
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] Loaded plugin: homebridge-info
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] Registering platform 'homebridge-info.Info'
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] ---
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] ====================
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] ERROR LOADING PLUGIN homebridge-miio:
Mar 31 17:45:13 raspberrypi homebridge[29022]: [Fri Mar 31 2017 17:45:13 GMT+0000 (UTC)] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Mar 31 17:45:13 raspberrypi homebridge[29022]: at exports.runInThisContext (vm.js:53:16)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Module._compile (module.js:414:25)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Object.Module._extensions..js (module.js:442:10)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Module.load (module.js:356:32)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Function.Module._load (module.js:311:12)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Module.require (module.js:366:17)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at require (module.js:385:17)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:65:22)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:132:14)
Mar 31 17:45:13 raspberrypi homebridge[29022]: at Array.forEach (native)

Thank you very much!

TODO: Add yeelight support?

It would be super neat if this library supported Yeelight, so people didn't need multiple homebridge plugins

Can not find device

I used homebridge-miio after running as follows, could not find a runable device. Also found a problem, my gateway device will disappear. Remove homebridge-miio later will not disappear.
[5/22/2017, 11:27:56 PM] Loaded plugin: homebridge-miio
[5/22/2017, 11:27:57 PM] Registering platform 'homebridge-miio.XiaomiMiio'
[5/22/2017, 11:27:57 PM] ---
[5/22/2017, 11:27:57 PM] Loaded config.json with 0 accessories and 1 platforms.
[5/22/2017, 11:27:57 PM] ---
[5/22/2017, 11:27:57 PM] Loading 1 platforms...
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Initializing XiaomiMiio platform...
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Setting up Miio platform
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐
│ 000-00-002 │
└────────────┘

[5/22/2017, 11:27:57 PM] [XiaomiMiio] DidFinishLaunching
[5/22/2017, 11:27:57 PM] Homebridge is running on port 51826.
[5/22/2017, 11:27:57 PM] [XiaomiMiio] device discovered 48282918
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.31.6:54321
[5/22/2017, 11:27:57 PM] [XiaomiMiio] device discovered 54965957
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.31.171:54321
[5/22/2017, 11:27:57 PM] [XiaomiMiio] device discovered 1097069
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.31.182:54321
[5/22/2017, 11:27:57 PM] [XiaomiMiio] device discovered 48562027
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.31.161:54321
[5/22/2017, 11:27:57 PM] [XiaomiMiio] device discovered 49371632
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.31.74:54321
[5/22/2017, 11:27:57 PM] [XiaomiMiio] Unsupported, ignoring
[5/22/2017, 11:27:59 PM] [XiaomiMiio] Unsupported, ignoring
[5/22/2017, 11:28:01 PM] [XiaomiMiio] Couldn't investigate device { id: 1097069,
address: '192.168.31.182',
port: 54321,
token: '00000000000000000000000000000000',
lastSeen: 1495466877459,
writeOnly: true } Error: Timeout
at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:2482) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'model' of undefined
(node:2482) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[5/22/2017, 11:28:01 PM] [XiaomiMiio] Couldn't investigate device { id: 48562027,
address: '192.168.31.161',
port: 54321,
token: '00000000000000000000000000000000',
lastSeen: 1495466877459,
writeOnly: true } Error: Timeout
at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[5/22/2017, 11:28:01 PM] [XiaomiMiio] Couldn't investigate device { id: 49371632,
address: '192.168.31.74',
port: 54321,
token: '00000000000000000000000000000000',
lastSeen: 1495466877460,
writeOnly: true } Error: Timeout
at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:2482) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'model' of undefined

feedback on latest release of miio and homebridge-miio

This is more of FYI post:

I've updated to latest release of miio and homebridge-miio, and I can now see and manage my Wi-Fi power strip on Homebridge. And everything else seem to work fine.

I seem to be getting following few times in the log. This is Yeelight LED strip. I have 2 of these but only 1 seems be causing below:

[homebridge-miio.XiaomiMiio] poll update failed on 50240908 Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)

homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[4/25/2017, 11:59:43 PM] Loaded plugin: homebridge-aqara
[4/25/2017, 11:59:43 PM] Registering platform 'homebridge-aqara.AqaraPlatform'
[4/25/2017, 11:59:43 PM] ---
[4/25/2017, 11:59:44 PM] Loaded plugin: homebridge-broadlink-rm
[4/25/2017, 11:59:44 PM] Registering platform 'homebridge-broadlink-rm.BroadlinkRM'
[4/25/2017, 11:59:44 PM] ---
[4/25/2017, 11:59:44 PM] Loaded plugin: homebridge-miio
[4/25/2017, 11:59:44 PM] Registering platform 'homebridge-miio.XiaomiMiio'
[4/25/2017, 11:59:44 PM] ---
[4/25/2017, 11:59:44 PM] Loaded plugin: homebridge-yeelight
[4/25/2017, 11:59:44 PM] Registering platform 'homebridge-yeelight.yeelight'
[4/25/2017, 11:59:44 PM] ---
[4/25/2017, 11:59:44 PM] Loaded config.json with 0 accessories and 3 platforms.
[4/25/2017, 11:59:44 PM] ---
[4/25/2017, 11:59:44 PM] Loading 3 platforms...
[4/25/2017, 11:59:44 PM] [yeelight] Initializing yeelight platform...
[4/25/2017, 11:59:44 PM] [yeelight] YeePlatform Init
[4/25/2017, 11:59:44 PM] Initializing AqaraPlatform platform...
[4/25/2017, 11:59:44 PM] [Broadlink RM] Initializing BroadlinkRM platform...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Learn Code'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Air Conditioner'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Apple TV'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'TV'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Marantz'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Bose Wave'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Bose CD'...
[4/25/2017, 11:59:45 PM] [Broadlink RM] Initializing platform accessory 'Bose Bluetooth'...
[4/25/2017, 11:59:45 PM] Loading 0 accessories...
Load homebridge-miio.XiaomiMiio
[4/25/2017, 11:59:45 PM] [homebridge-miio.XiaomiMiio] Setting up Miio platform
[4/25/2017, 11:59:45 PM] [homebridge-miio.XiaomiMiio] miIO Plug 48627293 Configure Accessory
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ XXX-XX-XXX │     
    └────────────┘     
                       
[4/25/2017, 11:59:45 PM] [yeelight] DidFinishLaunching
[4/25/2017, 11:59:45 PM] [homebridge-miio.XiaomiMiio] DidFinishLaunching
[4/25/2017, 11:59:46 PM] Homebridge is running on port 51826.
add to multicast group
listen on 0.0.0.0
no did or loc found!
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x00000000034712fe
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x000000000335b889
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x0000000003362d07
already in device list!
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x00000000031aab85
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x0000000003363014
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x0000000002f5f23d
[4/25/2017, 11:59:46 PM] [yeelight] cached accessory: 0x00000000031aaf19
already in device list!
already in device list!
already in device list!
already in device list!
already in device list!
already in device list!
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 50259675
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.25:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 54989566
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.7:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 52051385
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.6:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 48627293
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.13:54321
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x00000000034712fe true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x000000000335b889 true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x0000000003362d07 true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x00000000031aab85 true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x0000000003363014 true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x0000000002f5f23d true
connect ok!
[4/25/2017, 11:59:46 PM] [yeelight] accesseory reachable
[4/25/2017, 11:59:46 PM] [yeelight] dev connected 0x00000000031aaf19 true
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 52815573
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.23:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 52080409
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.3:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 52079493
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.14:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 53882900
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.5:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 49672765
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.26:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 50240908
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.15:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 53882119
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.4:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 55137702
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.24:54321
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] device discovered 53852297
[4/25/2017, 11:59:46 PM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.8:54321
Discovered Broadlink RM device at 192.168.1.28 (34:ea:34:e3:a5:b7)
[4/25/2017, 11:59:47 PM] [Broadlink RM] Air Conditioner setCurrentHeatingCoolingState: 0
[4/25/2017, 11:59:47 PM] [Broadlink RM] Air Conditioner setTargetHeatingCoolingState: 0
[4/25/2017, 11:59:49 PM] [homebridge-miio.XiaomiMiio] Unsupported, ignoring
[4/25/2017, 11:59:49 PM] [homebridge-miio.XiaomiMiio] Miio Accessory is a switch plug. Adding to HomeKit
[4/25/2017, 11:59:49 PM] [homebridge-miio.XiaomiMiio] miIO Plug 55137702 Configure Accessory
[4/25/2017, 11:59:50 PM] [homebridge-miio.XiaomiMiio] Miio Accessory is a switch plug. Adding to HomeKit
[4/25/2017, 11:59:50 PM] [homebridge-miio.XiaomiMiio] miIO Plug 52815573 Configure Accessory
[4/25/2017, 11:59:50 PM] [homebridge-miio.XiaomiMiio] Miio Accessory is a switch plug. Adding to HomeKit
[4/25/2017, 11:59:50 PM] [homebridge-miio.XiaomiMiio] miIO Plug 50240908 Configure Accessory
[4/25/2017, 11:59:50 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 54989566,
  address: '192.168.1.7',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786568,
  hostname: '192-168-1-7.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'model' of undefined
(node:5153) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Miio Accessory is a switch plug. Adding to HomeKit
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] miIO Plug 50259675 Configure Accessory
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 52079493,
  address: '192.168.1.14',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786572,
  hostname: '192-168-1-14.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 52080409,
  address: '192.168.1.3',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786572,
  hostname: '192-168-1-3.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 53882900,
  address: '192.168.1.5',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786571,
  hostname: '192-168-1-5.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 53852297,
  address: '192.168.1.8',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786586,
  hostname: '192-168-1-8.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 49672765,
  address: '192.168.1.26',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786573,
  hostname: '192-168-1-26.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[4/25/2017, 11:59:51 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 53882119,
  address: '192.168.1.4',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1493164786585,
  hostname: '192-168-1-4.tpgi.com.au',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'model' of undefined
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'model' of undefined
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'model' of undefined
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'model' of undefined
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot read property 'model' of undefined
(node:5153) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot read property 'model' of undefined
[4/26/2017, 12:00:50 AM] [homebridge-miio.XiaomiMiio] poll update failed on 50240908 undefined
[4/26/2017, 12:01:17 AM] [homebridge-miio.XiaomiMiio] miIO Plug 48627293 fetch status
[4/26/2017, 12:01:17 AM] [homebridge-miio.XiaomiMiio] miIO Plug 55137702 fetch status
[4/26/2017, 12:01:17 AM] [homebridge-miio.XiaomiMiio] miIO Plug 52815573 fetch status
[4/26/2017, 12:01:17 AM] [homebridge-miio.XiaomiMiio] miIO Plug 50240908 fetch status
[4/26/2017, 12:01:17 AM] [homebridge-miio.XiaomiMiio] miIO Plug 50259675 fetch status
[4/26/2017, 12:01:19 AM] [homebridge-miio.XiaomiMiio] miIO Plug 48627293 fetch status
[4/26/2017, 12:01:20 AM] [Broadlink RM] Bose Bluetooth getSwitchState: 0
[4/26/2017, 12:01:20 AM] [Broadlink RM] Bose CD getSwitchState: 0
[4/26/2017, 12:01:22 AM] [homebridge-miio.XiaomiMiio] miIO Plug 48627293 fetch status
[4/26/2017, 12:01:24 AM] [Broadlink RM] Air Conditioner getCurrentTemperature (using 21 from config)
[4/26/2017, 12:01:24 AM] [Broadlink RM] Air Conditioner getTargetHeatingCoolingState: 0
[4/26/2017, 12:01:24 AM] [Broadlink RM] Air Conditioner getTargetTemperature: 16
[4/26/2017, 12:01:24 AM] [Broadlink RM] Bose Wave getSwitchState: 0
[4/26/2017, 12:01:24 AM] [Broadlink RM] Air Conditioner getCurrentHeatingCoolingState: 0
[4/26/2017, 12:01:27 AM] [Broadlink RM] TV getSwitchState: 0
[4/26/2017, 12:01:27 AM] [Broadlink RM] Marantz getSwitchState: 0
[4/26/2017, 12:01:27 AM] [Broadlink RM] Apple TV getSwitchState: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x00000000031aaf19 property change: power value: 1
[4/26/2017, 12:01:40 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x00000000031aaf19 property change: power value: 0
[4/26/2017, 12:01:42 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x0000000003362d07 property change: power value: 1
[4/26/2017, 12:01:44 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x0000000003363014 property change: power value: 1
[4/26/2017, 12:01:45 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x0000000003362d07 property change: power value: 0
[4/26/2017, 12:01:47 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x0000000003363014 property change: power value: 0
[4/26/2017, 12:01:48 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x00000000034712fe property change: power value: 1
[4/26/2017, 12:01:53 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x00000000034712fe property change: power value: 0
[4/26/2017, 12:01:55 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x00000000031aab85 property change: power value: 1
[4/26/2017, 12:02:01 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x000000000335b889 property change: power value: 1
[4/26/2017, 12:02:04 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x000000000335b889 property change: power value: 0
[4/26/2017, 12:02:06 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x0000000002f5f23d property change: power value: 1
[4/26/2017, 12:02:06 AM] [yeelight] update accessory prop: powervalue: 1
[4/26/2017, 12:02:08 AM] [homebridge-miio.XiaomiMiio] poll update failed on 50259675 undefined
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x0000000002f5f23d property change: power value: 0
[4/26/2017, 12:02:09 AM] [yeelight] update accessory prop: powervalue: 0
{"id":1,"method":"set_power","params":["on","smooth",500]}
0x0000000002f5f23d property change: power value: 1
[4/26/2017, 12:02:24 AM] [yeelight] update accessory prop: powervalue: 1
{"id":1,"method":"set_power","params":["off","smooth",500]}
0x0000000002f5f23d property change: power value: 0
[4/26/2017, 12:02:26 AM] [yeelight] update accessory prop: powervalue: 0

Use capabilities of devices to determine functionality

I've been moving miio to a capability based system where each device has a set of capabilities that indicate what it can do. API stability will be tied to these capabilities in the future, meaning that the capabilities of a device can change but the API of capability will remain stable.

There are two main capabilities I think are interesting in this library right now:

  • switch uses the capability power-channels to support some of the Mi Home devices that can toggle the power for several sockets.
  • The power capability is for devices that can be turned on or off such as air purifiers, humidifiers and so on.

There are a few other capabilities for sensor data right now which could also be implemented. These need the built-in property polling to be in place though.

I'm not familiar with Homebridge enough to be certain, but I think a good architecture would to split mapping of capabilities into their own files and then mix them together when homebridge-miio sees the device.

Error because new token

Hello,
after a reset and re-configuration I get this error:

Sep 5 13:18:36 hbridge2 homebridge[12834]: (node:12834) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Not able to initialize robot vacuum. Sep 5 13:18:36 hbridge2 homebridge[12834]: (node:12834) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The token has been updated.
he is now much longer:
2800xxxxxxxxxxf08e984f150xxxxxxxxxxx14594b42a276a510f631c2acb0143db63ee66b0cdff9f69917680151e
a cut to 32 bits does not go
Thanks for your help

miio 0.6.0 is ignoring wi-fi plugs which previously worked

earlier, i updated my homebridge-miio from 0.1.0 to 0.1.3 and miio from 0.4.0 to 0.6.0, and all of my wi-fi plugs were being ignored and didn't get listed on Home app.

i reverted miio back to 0.4.0 but i got an error from homebridge-miio. after reverting back for homebridge-miio, it all works.

[4/12/2017, 11:23:51 PM] [XiaomiMiio] Investigating Miio Device at udp://chuangmi-plug-m1_miio52815573.local.:54321
[4/12/2017, 11:23:51 PM] [XiaomiMiio] Unsupported, ignoring

this plugin maybe conflict with others

my install.sh below:

cnpm install -g homebridge-aqara
cnpm install -g homebridge-yeelight
cnpm install -g homebridge-mi-air-purifier miio
cnpm install -g homebridge-miio

Got the error message:

[XiaomiMiio]�[39m Couldn't investigate device { id: 55235756,
  address: '192.168.1.136',
  port: 54321,
  token: '77eb5e5fa0904bf3************',
  lastSeen: 1495888130481,
  hostname: 'chuangmi-plug-m1_miio55235756',
  type: 'switch',
  model: 'chuangmi.plug.m1',
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/[email protected]@miio/lib/device.js:223:23)
(node:274) UnhandledPromiseRejectionWarning: Unhandled promise rejection

0.2.1 causes EADDRINUSE conflict with homebridge-aqara

after update to 0.2.1, homebridge-miio stop working. log is as followed:
[4/21/2017, 9:18:20 AM] Loaded plugin: homebridge-aqara
[4/21/2017, 9:18:20 AM] Registering platform 'homebridge-aqara.AqaraPlatform'
[4/21/2017, 9:18:20 AM] ---
[4/21/2017, 9:18:21 AM] Loaded plugin: homebridge-miio
[4/21/2017, 9:18:21 AM] Registering platform 'homebridge-miio.XiaomiMiio'
[4/21/2017, 9:18:21 AM] ---
[4/21/2017, 9:18:21 AM] Loaded plugin: homebridge-yeelight
[4/21/2017, 9:18:21 AM] Registering platform 'homebridge-yeelight.yeelight'
[4/21/2017, 9:18:21 AM] ---
[4/21/2017, 9:18:21 AM] Loaded config.json with 0 accessories and 1 platforms.
[4/21/2017, 9:18:21 AM] ---
[4/21/2017, 9:18:21 AM] Loading 1 platforms...
[4/21/2017, 9:18:21 AM] Initializing AqaraPlatform platform...
Load homebridge-miio.XiaomiMiio
[4/21/2017, 9:18:21 AM] [homebridge-miio.XiaomiMiio] Setting up Miio platform
Load homebridge-yeelight.yeelight
[4/21/2017, 9:18:21 AM] [homebridge-yeelight.yeelight] YeePlatform Init
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 111-11-111 │     
└────────────┘     

[4/21/2017, 9:18:21 AM] [homebridge-miio.XiaomiMiio] DidFinishLaunching
[4/21/2017, 9:18:21 AM] [homebridge-yeelight.yeelight] DidFinishLaunching
[4/21/2017, 9:18:22 AM] Aqara server is listening on port 9898.
[4/21/2017, 9:18:22 AM] Homebridge is running on port 51825.
add to multicast group
listen on 0.0.0.0
no did or loc found!
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 56290892
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.11:54321
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 48618067
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.44:54321
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 52232795
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.52:54321
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 50671375
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.46:54321
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 55162641
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.54:54321
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] device discovered 55164383
[4/21/2017, 9:18:22 AM] [homebridge-miio.XiaomiMiio] Investigating Miio Device at udp://192.168.1.48:54321
[4/21/2017, 9:18:23 AM] [homebridge-miio.XiaomiMiio] Unsupported, ignoring
[4/21/2017, 9:18:23 AM] [homebridge-miio.XiaomiMiio] Unsupported, ignoring
[4/21/2017, 9:18:25 AM] [homebridge-miio.XiaomiMiio] Miio Accessory is a switch plug. Adding to HomeKit
[4/21/2017, 9:18:25 AM] [homebridge-miio.XiaomiMiio] miIO Plug 48618067 Configure Accessory
[4/21/2017, 9:18:25 AM] [homebridge-miio.XiaomiMiio] Unsupported, ignoring
events.js:160
throw er; // Unhandled 'error' event
^

Error: bind EADDRINUSE 0.0.0.0:9898
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at _handle.lookup (dgram.js:219:18)
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

plugin conflict

@Bluebie @aholstenson
After updating this plugin homebridge-mi-aqara plugin has few issues.
Following are not responding:

I did try with v 0.6.0 with 0.3.1, still same issue. I suspect it's miio library issue. I added @aholstenson and I will update author @YinHangCode of homebridge-mi-aqara plugin.

fyi, incase anyone else is searching forum to do revert back.
sudo npm -g install [email protected]
sudo npm -g install [email protected]

Device token is hidden, cannot add accessory

Running into an issue where the device token is hidden and the plug cannot be added.

[2019-1-11 08:43:35] [XiaomiMiio] device discovered 103458048
[2019-1-11 08:43:35] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.11:54321
[2019-1-11 08:43:35] [XiaomiMiio] Device token is hidden, cannot add accessory

Reliability problem when running on linux with avahi providing mdns

Those are the errors that appears in logs:
Apr 02 08:03:07 raspberrypi avahi-daemon[3652]: server.c: Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)
Apr 02 08:03:08 raspberrypi avahi-daemon[3652]: server.c: Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)
Apr 02 08:03:10 raspberrypi avahi-daemon[3652]: server.c: Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)
Apr 02 08:03:12 raspberrypi homebridge[8570]: events.js:163
Apr 02 08:03:12 raspberrypi homebridge[8570]: throw er; // Unhandled 'error' event
Apr 02 08:03:12 raspberrypi homebridge[8570]: ^
Apr 02 08:03:12 raspberrypi homebridge[8570]: Error: dns service error: unknown
Apr 02 08:03:12 raspberrypi homebridge[8570]: at MDNSService.on_resolver_done (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:19:30)
Apr 02 08:03:12 raspberrypi homebridge[8570]: at SocketWatcher.MDNSService.self.watcher.callback (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/mdns_service.js:18:40)
Apr 02 08:03:12 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE

I've also checked with tcpdump that avahi-daemon error messages match with the following packets:
08:03:07.767267 IP 192.168.1.8.5353 > 224.0.0.251.5353: 0*- [0q] 5/0/0 (Cache flush) A 192.168.1.8, (Cache flush) SRV chuangmi-plug-m1_miio52735560.local.:54321 0 0, PTR chuangmi-plug-m1_miio52735560._miio._udp.local., (Cache flush) TXT "poch=0:mac=286c07a02fc0^@^E_miio^D_udp^Elocal^@^@^L^@^A^@^@^@M-^?^@0^]chuangmi-plug-m1_miio52735560^E_miio^D_udp^Elocal^@[|domain]
08:03:08.936266 IP 192.168.1.8.5353 > 224.0.0.251.5353: 0*- [0q] 5/0/0 (Cache flush) A 192.168.1.8, (Cache flush) SRV chuangmi-plug-m1_miio52735560.local.:54321 0 0, PTR chuangmi-plug-m1_miio52735560._miio._udp.local., (Cache flush) TXT "poch=0:mac=286c07a02fc0^@^E_miio^D_udp^Elocal^@^@^L^@^A^@^@^@M-^?^@0^]chuangmi-plug-m1_miio52735560^E_miio^D_udp^Elocal^@[|domain]
08:03:10.847970 IP 192.168.1.8.5353 > 224.0.0.251.5353: 0*- [0q] 5/0/0 (Cache flush) A 192.168.1.8, (Cache flush) SRV chuangmi-plug-m1_miio52735560.local.:54321 0 0, PTR chuangmi-plug-m1_miio52735560._miio._udp.local., (Cache flush) TXT "poch=0:mac=286c07a02fc0^@^E_miio^D_udp^Elocal^@^@^L^@^A^@^@^@M-^?^@0^]chuangmi-plug-m1_miio52735560^E_miio^D_udp^Elocal^@[|domain]

UnhandledPromiseRejectionWarning

some bug there?


[5/22/2017, 8:35:42 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 56301635,
  address: '192.168.0.101',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1495456538258,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'model' of undefined
[5/22/2017, 8:35:42 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 48607372,
  address: '192.168.0.107',
  port: 54321,
  token: '6eccb9043ba1af9de7359c6ff7733eec',
  lastSeen: 1495456538260,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
[5/22/2017, 8:35:42 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 52811490,
  address: '192.168.0.108',
  port: 54321,
  token: '19533b578d009fc04ae67293ea3ad662',
  lastSeen: 1495456538261,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'model' of undefined
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'model' of undefined
[5/22/2017, 8:35:42 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 54171853,
  address: '192.168.0.102',
  port: 54321,
  token: '99695a066dec30ba352f37167e5993d5',
  lastSeen: 1495456538261,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'model' of undefined
[5/22/2017, 8:35:42 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 52813292,
  address: '192.168.0.104',
  port: 54321,
  token: 'ad48f6c715ff3b778c4c5c13601d1d77',
  lastSeen: 1495456538262,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'model' of undefined
[5/22/2017, 8:35:43 PM] [homebridge-miio.XiaomiMiio] Couldn't investigate device { id: 52773248,
  address: '192.168.0.110',
  port: 54321,
  token: '7c1cd402f2298ca4a58da2723c099f19',
  lastSeen: 1495456538261,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot read property 'model' of undefined
(node:1970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Call to device timed out



After plugging off the socket and setting it back, have to restart homebridge server

Your plugin is awesome and saved my day, so thanks!
But what I found, is that, if you take out the socket or it is not plugged in from beginning (homebridge launch), it will still be available in Home app and after plugging it back, it won't work at all for at least a minute (although from Mi Home App it's working right away) and then, it will just burst all those times that you've pressed in Home app that toggle switch.
Is it possible to fix that?

If it is not plugged in from the beginning it will log this error:

poll update failed on 66070639 { Error: send EHOSTDOWN 192.168.8.199:54321
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at SendWrap.afterSend [as oncomplete] (dgram.js:498:11)
  code: 'EHOSTDOWN',
  errno: 'EHOSTDOWN',
  syscall: 'send',
  address: '192.168.8.199',
  port: 54321 }

And other times it send:

poll update failed on 66070639 { Error: Call to device timed out
    at retry (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:225:18)
    at _ensureToken.catch.err (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:238:8)
    at <anonymous> code: 'timeout' }

And also, what about adding config setting to set a name for specific ID so it would be a lot more convenient to see which device is triggered or is timing out..
Thanks

TODO: Rewrite to skip unsupported devices

  • Rewrite addAccessory to create miio device and check device.type == 'switch' before adding to homekit
  • Write something to clear out existing unsupported devices, for existing users
  • Change architecture to add accessory to hoembridge only after it has been fully investigated and confirmed compatible

plugin conflict with yeelight and homebridge-aqara?

please ignore my previous thread.

I suspect your plugin is clashing with yeelight plugin and gateway. just earlier, i couldn't even control few bulbs via yeelight app (weird) and i hate to reset them. I have also tested the scenario whereby I had all bulbs on and zigbee switch on, and as well as v2 plug on, and it still didn't work

The gateway is on China server, and Lights are using Singapore server.

My error log file:
[3/28/2017, 11:17:30 AM] Loaded plugin: homebridge-aqara
[3/28/2017, 11:17:30 AM] Registering platform 'homebridge-aqara.AqaraPlatform'
[3/28/2017, 11:17:30 AM] ---
[3/28/2017, 11:17:30 AM] Loaded plugin: homebridge-miio
homebridge API version: 2.1
[3/28/2017, 11:17:30 AM] Registering platform 'homebridge-miio.XiaomiMiio'
[3/28/2017, 11:17:30 AM] ---
[3/28/2017, 11:17:30 AM] Loaded plugin: homebridge-yeelight
[3/28/2017, 11:17:30 AM] Registering platform 'homebridge-yeelight.yeelight'
[3/28/2017, 11:17:30 AM] ---
[3/28/2017, 11:17:30 AM] Loaded config.json with 0 accessories and 3 platforms.
[3/28/2017, 11:17:30 AM] ---
[3/28/2017, 11:17:30 AM] Loading 3 platforms...
[3/28/2017, 11:17:30 AM] [yeelight] Initializing yeelight platform...
[3/28/2017, 11:17:30 AM] [yeelight] YeePlatform Init
[3/28/2017, 11:17:30 AM] Initializing AqaraPlatform platform...
[3/28/2017, 11:17:30 AM] [XiaomiMiio] Initializing XiaomiMiio platform...
[3/28/2017, 11:17:30 AM] [XiaomiMiio] Setting up Miio platform
[3/28/2017, 11:17:30 AM] Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ redacted│     
└────────────┘     

[3/28/2017, 11:17:30 AM] [yeelight] DidFinishLaunching
[3/28/2017, 11:17:30 AM] [XiaomiMiio] DidFinishLaunching
[3/28/2017, 11:17:30 AM] Homebridge is running on port 51826.
add to multicast group
listen on 0.0.0.0
no did or loc found!
[3/28/2017, 11:17:30 AM] [XiaomiMiio] Investigating Miio device at udp://lumi-gateway-v3_miio52051385.local.:54321
[3/28/2017, 11:17:30 AM] [XiaomiMiio] Miio Accessory detected: 52051385
events.js:160
throw er; // Unhandled 'error' event
^

ReferenceError: accessory is not defined
at XiaomiMiio.addAccessory (/usr/local/lib/node_modules/homebridge-miio/index.js:237:3)
at Browser.browser.on (/usr/local/lib/node_modules/homebridge-miio/index.js:45:16)
at emitTwo (events.js:106:13)
at Browser.emit (events.js:191:7)
at on_resolver_done (/usr/local/lib/node_modules/mdns/lib/browser.js:31:14)
at next (/usr/local/lib/node_modules/mdns/lib/browser.js:104:7)
at Array.makeAddressesUnique (/usr/local/lib/node_modules/mdns/lib/resolver_sequence_tasks.js:177:5)
at next (/usr/local/lib/node_modules/mdns/lib/browser.js:107:21)
at MDNSService.on_get_addr_info_done (/usr/local/lib/node_modules/mdns/lib/resolver_sequence_tasks.js:83:15)
at SocketWatcher.MDNSService.self.watcher.callback (/usr/local/lib/node_modules/mdns/lib/mdns_service.js:18:40)

My config file (I've redacted credentials, and other data)
{
"bridge": {
"name": "HomeBridge",
"username": "redacted",
"port": 51826,
"pin": "redacted"
},

"accessories": [],

"platforms": [
    {
        "platform" : "yeelight",
        "name" : "yeelight"
    },
    {
        "platform" : "AqaraPlatform",
        "sid" : ["redacted"],
        "fakeLightBulbForLightSwitch": true,
        "password": ["redacted"]
     },
     {
        "platform" : "XiaomiMiio",
        "name" : "XiaomiMiio",
        "pollChanges": true,
        "pollInterval": 15
     }
]

}

0.2.1 version

on 0.2.1

I got this error message and couldn't discover my plugs. 10.0.1.28 is xiaomi gateway.

Apr 21 09:31:40 raspberrypi homebridge[25830]: [4/21/2017, 9:31:40 AM] [XiaomiMiio] device discovered 50146694
Apr 21 09:31:40 raspberrypi homebridge[25830]: [4/21/2017, 9:31:40 AM] [XiaomiMiio] Investigating Miio Device at udp://10.0.1.8:54321
Apr 21 09:31:40 raspberrypi homebridge[25830]: [4/21/2017, 9:31:40 AM] [XiaomiMiio] poll update failed on 50130438 undefined
Apr 21 09:31:41 raspberrypi homebridge[25830]: [4/21/2017, 9:31:41 AM] [XiaomiMiio] Couldn't investigate device { id: 1137364,
Apr 21 09:31:41 raspberrypi homebridge[25830]: address: '10.0.1.28',
Apr 21 09:31:41 raspberrypi homebridge[25830]: port: 54321,
Apr 21 09:31:41 raspberrypi homebridge[25830]: token: '233e5d799d1652d33d50d9f0d55843f5',
Apr 21 09:31:41 raspberrypi homebridge[25830]: lastSeen: 1492734699611,
Apr 21 09:31:41 raspberrypi homebridge[25830]: writeOnly: true } Error: Not running
Apr 21 09:31:41 raspberrypi homebridge[25830]: at Socket._healthCheck (dgram.js:525:11)
Apr 21 09:31:41 raspberrypi homebridge[25830]: at Socket.close (dgram.js:419:8)
Apr 21 09:31:41 raspberrypi homebridge[25830]: at Device.destroy (/usr/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.j
Apr 21 09:31:41 raspberrypi homebridge[25830]: at temp.call.then.then.catch.err (/usr/lib/node_modules/homebridge-miio/node_modules/mi
Apr 21 09:31:41 raspberrypi homebridge[25830]: (node:25830) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection i
Apr 21 09:31:41 raspberrypi homebridge[25830]: (node:25830) DeprecationWarning: Unhandled promise rejections are deprecated.

USB toggles when switching power on v1 plug

Hi,

I have recently reinstalled my Pi and runs a lower node js version 6.11 with Pi 1 on armv6. Everything seems working fine except that the power switching on V1 plug seems affecting its USB at the same time. When I turn the plug on, the USB in the plug turns on as well, and when turning off, USB would be turned off too. It was working fine on Pi 3 that I set up couple months ago. Not sure if it's because of node js being 6.11, or because changes in miio plugin. Does anyone have a clue?

BR
AnChin

TimeoutOverflowWarning with Node 9.10.0

After Upgrading to 9.10.0 I had to remove Homebridge-miio since it wrote this message ever millisecond to the log
(node:8662) TimeoutOverflowWarning: Infinity does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.