Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedback on latest release of miio and homebridge-miio #18

Open
astrojetson8 opened this issue Apr 26, 2017 · 4 comments
Open

feedback on latest release of miio and homebridge-miio #18

astrojetson8 opened this issue Apr 26, 2017 · 4 comments

Comments

@astrojetson8
Copy link

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
@astrojetson8
Copy link
Author

@aholstenson @Bluebie

i've had series of homebridge crash since yesterday

here's the upgrade path i followed:

homebridge-aqara
0.1.9 to 0.1.11

homebridge-miio
0.2.0 to 0.2.1

miio
0.6.0 to 0.8.0

@eviewei
Copy link

eviewei commented Apr 27, 2017

[2017-4-27 14:10:09] [XiaomiMiio] Couldn't investigate device { id: 52248673,
address: '192.168.31.234',
port: 54321,
token: '00000000000000000000000000000000',
lastSeen: 1493273407376,
writeOnly: true } Error: Timeout
at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:223:23)
(node:38595) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'model' of undefined
(node:38595) 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.
It can work,
WHY?

@aholstenson
Copy link

@astrojetson8 Thanks. This helped me spot a bug in miio related to Yeelights where discovery of tokens does not work. There is a fix in 0.9.1 but that version has several API changes that are not compatible with 0.7.0 that homebridge-miio uses.

@Bluebie The two big things in 0.9.x are that power channels now have names (but most are still 0 and 1 and so on) and that I renamed miio.browser to miio.browse. 0.10 is coming soon as well, going to rename switch and add a few types and supported models.

@aholstenson
Copy link

@eviewei The error you are seeing is because the device is not revealing its token automatically. As the token is all zeroes I'm guessing it's a Yeelight. The library used by homebridge-miio had a bug related to that, see my previous comment in this thread for a bit more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants