ptz0n / homebridge-verisure

 Platform plugin for Homebridge allowing to manage and control Verisure devices.
https://www.npmjs.com/package/homebridge-verisure
MIT License
66 stars 15 forks source link

TypeError: Cannot read property 'UUID' of null #19

Closed bjarneb closed 6 years ago

bjarneb commented 7 years ago

Today, I made a fresh install of homebridge. When adding verisure I got the following issue:

There is a TypeError when initializing SMARTCAMERA1, while according to the readme, it is supported. Now my homebridge won't start without deleting the SMARTCAMERA (temporary) from my verisure system

[9/14/2017, 7:43:33 PM] ---
[9/14/2017, 7:43:34 PM] Loaded plugin: homebridge-verisure
[9/14/2017, 7:43:34 PM] Registering platform 'homebridge-verisure.verisure'
[9/14/2017, 7:43:34 PM] ---
[9/14/2017, 7:43:34 PM] Loaded config.json with 3 accessories and 1 platforms.
[9/14/2017, 7:43:34 PM] ---
[9/14/2017, 7:43:34 PM] Loading 1 platforms...
[9/14/2017, 7:43:34 PM] [Alarm] Initializing verisure platform...
[9/14/2017, 7:43:34 PM] Loading 3 accessories...
[9/14/2017, 7:43:34 PM] [Woonkamer Speakers] Initializing Sonos accessory...
[9/14/2017, 7:43:34 PM] [Keuken Speakers] Initializing Sonos accessory...
[9/14/2017, 7:43:34 PM] [verwarming] Initializing NefitEasy accessory...
Load homebridge-verisure.verisure
[9/14/2017, 7:43:34 PM] [Woonkamer Speakers] Found a playable coordinator device at 192.168.178.18 in zone 'Woonkamer' for accessory 'Woonkamer Speakers' in accessory room 'Woonkamer'
[9/14/2017, 7:43:34 PM] [Keuken Speakers] Found a playable coordinator device at 192.168.178.29 in zone 'Keuken' for accessory 'Keuken Speakers' in accessory room 'Keuken'
[9/14/2017, 7:43:36 PM] [Alarm] Initializing platform accessory 'Rökdetektor (zolder)'...
[9/14/2017, 7:43:36 PM] [Alarm] Initializing platform accessory 'Rökdetektor (hal)'...
[9/14/2017, 7:43:36 PM] [Alarm] Initializing platform accessory 'SMARTCAMERA1 (Woonkamer)'...
[9/14/2017, 7:43:36 PM] [Alarm] Device SMARTCAMERA1 is not yet supported
/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:138
    if (existing.UUID === service.UUID) {
                                 ^

TypeError: Cannot read property 'UUID' of null
    at Accessory.addService (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:138:34)
    at /usr/lib/node_modules/homebridge/lib/server.js:418:19
    at Array.forEach (native)
    at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:402:14)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:364:32)
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
    at /usr/lib/node_modules/homebridge-verisure/index.js:126:9
    at /usr/lib/node_modules/homebridge-verisure/node_modules/verisure/index.js:79:7
    at Request._callback (/usr/lib/node_modules/homebridge-verisure/node_modules/verisure/index.js:27:17)
    at Request.self.callback (/usr/lib/node_modules/homebridge-verisure/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-verisure/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-verisure/node_modules/request/request.js:1091:12)
chrissearle commented 7 years ago

Similar error to https://github.com/ptz0n/homebridge-verisure/issues/10 which I never got around to testing (my home was offline for quite a while).

That issue has a comment that unknown devices are ignored - but - even if I run with the master version rather than 1.6.0 I get the same error (can't see an obvious commit where unknown devices are ignored either - but I'm not sure what I'm looking for).

chrissearle commented 7 years ago

Hmm - you're using SMARTCAMERA1 - that seems to have been added 3 days after 1.6.0 was released - @bjarneb yours might work with latest dev version of the plugin rather than 1.6.0?

bjarneb commented 7 years ago

@chrissearle Thanks for looking at this. Apparently I was using the dev version (no Idea why), but I just "downgraded" to 1.6.0, but I still get that SmartCamera1 is not yet supported/TypeError.

Dreams666 commented 7 years ago

Hi, I just installed homebridge with knx and verisure plugin. I have the same issue "UUID" as shown below, but with a water detector from Verisure. How can I solve this to bypass these detectors not yet supported?

[2017-11-20 10:00:53] [Verisure] Initializing platform accessory 'WATER1 (BASEMENT 1)'... [2017-11-20 10:00:53] [Verisure] Device WATER1 is not yet supported /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:139 if (existing.UUID === service.UUID) { ^

TypeError: Cannot read property 'UUID' of null at Accessory.addService (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:139:35) at /usr/lib/node_modules/homebridge/lib/server.js:432:19 at Array.forEach () at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:412:14) at Server. (/usr/lib/node_modules/homebridge/lib/server.js:374:32) at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19 at /usr/lib/node_modules/homebridge-verisure/index.js:126:9 at /usr/lib/node_modules/homebridge-verisure/node_modules/verisure/index.js:79:7 at Request._callback (/usr/lib/node_modules/homebridge-verisure/node_modules/verisure/index.js:27:17) at Request.self.callback (/usr/lib/node_modules/homebridge-verisure/node_modules/request/request.js:186:22)e

bjornand1 commented 6 years ago

Hi, I have the same issue, both for water detector as well as mouse detector. I am new to homebridge, but would be very grateful for any advice on how this might be fixed.

bjornand1 commented 6 years ago

Anyway to choose which Verisure components are loaded by the plugin, to avoid this error when some of us have "untraditional" components?

ptz0n commented 6 years ago

The initial issue should now be resolved as part of the dev release, see: #27

@bjornand1 I went for a different approach and we should no longer end up with this kind of errors. I'm hoping to merge the dev branch soon.