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 #2

Closed elbogi closed 7 years ago

elbogi commented 7 years ago
[Verisure] Initializing platform accessory 'undefined (Kitchen)'...
/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128
    if (existing.UUID === service.UUID) {
                                 ^
TypeError: Cannot read property 'UUID' of null

In my overview, "kitchen" is the temperature sensor that's controlled by Verisure. So what I can gather, the plugin is unable to read the UUID of this component. It fails with this, so I don't know if it can read any of the smart plugs for instance.

ptz0n commented 7 years ago

Thanks for trying it out!

Looks like an early fail in registering the accessories. What kind of device is that?

elbogi commented 7 years ago

Hey. Look at this picture from the Verisure page. Hope it helps.

skjermbilde 2017-01-24 kl 08 53 58
ptz0n commented 7 years ago

Oh, the siren, nice!

Could you output of your installation overview using this module?

OBS! Without disclosing any location or serial number details.

ptz0n commented 7 years ago

Hopefully fixed in version 1.2.0 👍

npm install -g homebridge-verisure
elbogi commented 7 years ago

INSTALLATIONS:

[ { giid: '14123794580',
    firmwareVersion: 25230,
    routingGroup: 'NO',
    shard: 7,
    locale: 'no_NO',
    signalFilterId: 1,
    deleted: false,
    cid: '00215512',
    street: 'street',
    streetNo1: '',
    streetNo2: '',
    alias: 'xxxx' } ]

OVERVIEW:

 { armState: 
   { statusType: 'DISARMED',
     date: '2016-12-25T18:01:00.000Z',
     name: 'Name',
     changedVia: 'CODE' },
  armstateCompatible: true,
  controlPlugs: 
   [ { deviceId: '33998643',
       deviceLabel: 'xxxx',
       area: 'Spisestue',
       profile: 'LIGHT',
       currentState: 'OFF',
       pendingState: 'NONE' },
     { deviceId: '33998642',
       deviceLabel: 'xxxx',
       area: 'Lampe',
       profile: 'LIGHT',
       currentState: 'OFF',
       pendingState: 'NONE' } ],
  smartPlugs: 
   [ { icon: 'LIGHT',
       isHazardous: false,
       deviceLabel: 'xxxx',
       area: 'Spisestue',
       currentState: 'OFF',
       pendingState: 'NONE' },
     { icon: 'LIGHT',
       isHazardous: false,
       deviceLabel: 'xxxx',
       area: 'Lampe',
       currentState: 'OFF',
       pendingState: 'NONE' } ],
  doorLockStatusList: [],
  totalSmsCount: 49,
  climateValues: 
   [ { deviceLabel: 'xxxx',
       deviceArea: 'Kitchen',
       deviceType: 'SIREN1',
       temperature: 19.5,
       time: '2017-01-24T08:01:44.000Z' } ],
  installationErrorList: [],
  pendingChanges: 0,
  ethernetModeActive: true,
  ethernetConnectedNow: true,
  heatPumps: [],
  smartCameras: [],
  latestEthernetStatus: 
   { latestEthernetTestResult: true,
     testDate: '2017-01-23T14:30:15.000Z',
     protectedArea: 'TEKNISKT ROM',
     deviceLabel: 'xxxx' },
  customerImageCameras: [],
  batteryProcess: { active: false },
  eventCounts: [],
  doorWindow: 
   { reportState: true,
     doorWindowDevice: [ [Object], [Object], [Object] ] } }
ptz0n commented 7 years ago

There we go: SIREN1

elbogi commented 7 years ago

I still get the same error except this time the device is identified as 'SIREN1'.

ptz0n commented 7 years ago

Ok, then I need to debug some more tonight. Support for controlPlugs as an added bonus? 💃

ptz0n commented 7 years ago

Fixed in https://github.com/ptz0n/homebridge-verisure/commit/a92dee28138e9890c64a562425e337fe3184de26.