macnow / homebridge-platform-orvibo

Orvibo Smart Socket plugin for Homebridge
17 stars 14 forks source link

Cannot read property 'deviceId' of undefined #5

Open jaquesp opened 7 years ago

jaquesp commented 7 years ago

Good morning - after a few weeks of having removed the orvibo platform, I decided to try again (I have a device in my kitchen that i REALLY want to control!).

So far I've had none of the connectivity issues that I previously saw (ENETUNREACH) however this morning on homebridge startup I saw the following error (see below). I have homebridge setup as a systems process so a restart resolved the issue, however I wondered if there was an easy resolution to the problem?

Jan 18 09:49:19 raspberrypi homebridge[25010]: /usr/local/lib/node_modules/homebridge-platform-orvibo/index.js:121
Jan 18 09:49:19 raspberrypi homebridge[25010]: this.macAddress = accessory.context.deviceId;
Jan 18 09:49:19 raspberrypi homebridge[25010]: ^
Jan 18 09:49:19 raspberrypi homebridge[25010]: TypeError: Cannot read property 'deviceId' of undefined
Jan 18 09:49:19 raspberrypi homebridge[25010]: at new OrviboAccessory (/usr/local/lib/node_modules/homebridge-platform-orvibo/index.js:121:40)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at Orvibo.<anonymous> (/usr/local/lib/node_modules/homebridge-platform-orvibo/index.js:59:25)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at emitOne (events.js:96:13)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at Orvibo.emit (events.js:188:7)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at Orvibo.handleMessage (/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/node-orvibo/index.js:660:16)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at Orvibo.<anonymous> (/usr/local/lib/node_modules/homebridge-platform-orvibo/node_modules/node-orvibo/index.js:41:12)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at emitTwo (events.js:106:13)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at Socket.emit (events.js:191:7)
Jan 18 09:49:19 raspberrypi homebridge[25010]: at UDP.onMessage (dgram.js:550:8)
Jan 18 09:49:19 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Jan 18 09:49:19 raspberrypi systemd[1]: Unit homebridge.service entered failed state.

A successful restart produced the following:

Jan 18 09:50:27 raspberrypi homebridge[25142]: [1/18/2017, 9:50:27 AM] Homebridge is running on port 51826.
Jan 18 09:50:27 raspberrypi homebridge[25142]: [1/18/2017, 9:50:27 AM] New Orvibo found: Socket [accf23931746]
Jan 18 09:50:28 raspberrypi homebridge[25142]: [1/18/2017, 9:50:28 AM] Subscription to accf23931746 successful!
Jan 18 09:50:30 raspberrypi homebridge[25142]: [1/18/2017, 9:50:30 AM] A device has been queried. Name (if set): Socket
Jan 18 09:50:30 raspberrypi homebridge[25142]: [1/18/2017, 9:50:30 AM] Orvibo Online: Socket [accf23931746]
Jan 18 09:50:30 raspberrypi homebridge[25142]: [1/18/2017, 9:50:30 AM] Configuring: Socket

Any help/advice you could provide would be appreciated!