peterchs / homebridge-dyson360eye

Homebridge plugin for the Dyson 360 Eye Robot Vacuum
MIT License
10 stars 3 forks source link

Crash Issue? #2

Open mczac opened 7 years ago

mczac commented 7 years ago

Hi Peter,

I just added my own plug-in to home bridge, which is working fine. However I was getting this console output few times this morning. Let me know if it is an issue and I have to debug it further? I have another plug-in "homebridge-dyson-link" that support Dyson Fan, interestingly exception occurred after the other [DysonPlatform] plug-in asked for a state update at homebridge start.

Peter

[8/17/2017, 2:02:24 PM] [DysonPlatform] Request for current state update /usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219 callback(null, this.state.state === 'FULL_CLEAN_ABORTED');
^

TypeError: Cannot read property 'state' of null at Object.getGoToDock (/usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219:28) at emitThree (events.js:116:13) at emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:129:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:627:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:591:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7) at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:926:10) at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39) at emitNone (events.js:86:13) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

peterchs commented 7 years ago

Just checked my logs and I dont get that exception myself, although I only have the robot no other dyson devices.

Does it crash the homebridge when that occurs or does its still continue to work ok?

Peter

On 17 August 2017 at 14:12, mczac notifications@github.com wrote:

Hi Peter,

I just added my own plug-in to home bridge, which is working fine. However I was getting this console output few time this morning. Let me know if it is an issue and I have to debug it further? I have another plug-in "homebridge-dyson-link" that support Dyson Fan, interestingly exception occurred after the other [DysonPlatform] plug-in asked for a state update at homebridge start.

Peter

[8/17/2017, 2:02:24 PM] [DysonPlatform] Request for current state update /usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219 callback(null, this.state.state === 'FULL_CLEAN_ABORTED'); ^

TypeError: Cannot read property 'state' of null at Object.getGoToDock (/usr/local/lib/node_modules/ homebridge-dyson360eye/index.js:219:28) at emitThree (events.js:116:13) at emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/ homebridge/node_modules/hap-nodejs/lib/Characteristic.js:129:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap- nodejs/lib/Accessory.js:627:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap- nodejs/lib/Accessory.js:591:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7) at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/ homebridge/node_modules/hap-nodejs/lib/HAPServer.js:926:10) at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap- nodejs/lib/HAPServer.js:209:39) at emitNone (events.js:86:13) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/peteakalad/homebridge-dyson360eye/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AEipHZCpbfrgEMwL0Njucr09G2LiWt9Jks5sZDxHgaJpZM4O6PjU .

mczac commented 7 years ago

Peter, I think that the crash might be the conflict between between 2 Dyson plug-ins. My cleaning robot was off now, and when I launched home.app, I get this: DysonPlatform in the first line is a log for plug-in that I use to control the Fan.

[8/23/2017, 2:20:20 AM] [DysonPlatform] Update sensor data /usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219 callback(null, this.state.state === 'FULL_CLEAN_ABORTED');
^

TypeError: Cannot read property 'state' of null at Object.getGoToDock (/usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219:28) at emitThree (events.js:116:13) at emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:129:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:627:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:591:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7) at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:926:10) at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39) at emitNone (events.js:86:13) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

thoukydides commented 6 years ago

I initially received similar errors, similarly when launching the Home app, but eventually tracked it down to a bad configuration. I had copied the configuration for one of my Dyson purifiers (using @simonrice's homebridge-dyson-nu) and had forgotten to rename the "ip" field to "host", and add the "port" field.

The clue was earlier in the log file:

[9/25/2017, 4:51:04 PM] [Dyson 360 Eye] Initializing Dyson360EyeRobotVacuum accessory...
[9/25/2017, 4:51:04 PM] [Dyson 360 Eye] initConnection
[9/25/2017, 4:51:04 PM] [Dyson 360 Eye] mqtt://undefined:undefined
mczac commented 6 years ago

Thanks, I verified my config is correct. Just had another crash recently /usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219 callback(null, this.state.state === 'FULL_CLEAN_ABORTED');
^

TypeError: Cannot read property 'state' of null at Object.getGoToDock (/usr/local/lib/node_modules/homebridge-dyson360eye/index.js:219:28) at emitThree (events.js:116:13) at emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:142:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:706:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:670:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7) at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:926:10) at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39) at emitNone (events.js:86:13) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)