Bluebie / homebridge-miio

Xiaomi Mi Home Plugin for Homebridge
112 stars 26 forks source link

miio 0.6.0 is ignoring wi-fi plugs which previously worked #12

Closed astrojetson8 closed 7 years ago

astrojetson8 commented 7 years ago

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
astrojetson8 commented 7 years ago

i just realised something strange is going on because i did have 0.1.3 version working fine previously. https://github.com/Bluebie/homebridge-miio/issues/2#issuecomment-290949298

the only difference is now i'm running this plugin by itself on my mac as i've ported other plugins on to pi. i tried few combinations but only homebridge-miio 0.1.0 and miio 0.4.0 works.

Bluebie commented 7 years ago

try updating to 0.2.0. the discovery system was totally changed, and the package more strictly enforces which version of the miio library to use.

astrojetson8 commented 7 years ago

it's now working with homebridge-miio 0.2.0 and miio 0.6.0 on my mac. thank you! i'll test this on pi later tonight.

also, i've included my log below as reference:

[XiaomiMiio] DidFinishLaunching
[4/13/2017, 4:05:19 PM] Homebridge is running on port 51826.
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 49672765
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.12:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 48627293
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.13:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 52051385
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.6:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 52079493
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.14:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 53882119
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.4:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 53852297
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.8:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 50259675
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.9:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 54989566
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.7:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 55137702
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.17:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 50240908
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.15:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 53882900
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.5:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 52080409
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.3:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] device discovered 52815573
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Investigating Miio Device at udp://192.168.1.11:54321
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Unsupported, ignoring
[4/13/2017, 4:05:20 PM] [XiaomiMiio] Unsupported, ignoring
[4/13/2017, 4:05:21 PM] [XiaomiMiio] Couldn't investigate device { id: 55137702,
  address: '192.168.1.17',
  port: 54321,
  token: '378992fe680c65c0b2aa96e93955ef83',
  lastSeen: 1492063520115,
  writeOnly: true } undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'model' of undefined
(node:18361) 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/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 49672765,
  address: '192.168.1.12',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520105,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 53882119,
  address: '192.168.1.4',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520112,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 54989566,
  address: '192.168.1.7',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520113,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'model' of undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'model' of undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'model' of undefined
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 52079493,
  address: '192.168.1.14',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520111,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 53882900,
  address: '192.168.1.5',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520116,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 52080409,
  address: '192.168.1.3',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520117,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
[4/13/2017, 4:05:24 PM] [XiaomiMiio] Couldn't investigate device { id: 53852297,
  address: '192.168.1.8',
  port: 54321,
  token: '00000000000000000000000000000000',
  lastSeen: 1492063520112,
  writeOnly: true } Error: Timeout
    at _ensureToken.then (/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/device.js:215:23)
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'model' of undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot read property 'model' of undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot read property 'model' of undefined
(node:18361) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): TypeError: Cannot read property 'model' of undefined
[4/13/2017, 4:05:39 PM] [XiaomiMiio] miIO Plug 52815573 fetch status
[4/13/2017, 4:05:39 PM] [XiaomiMiio] miIO Plug 50259675 fetch status
[4/13/2017, 4:05:39 PM] [XiaomiMiio] miIO Plug 55137702 fetch status
[4/13/2017, 4:05:39 PM] [XiaomiMiio] miIO Plug 50240908 fetch status