ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

SecuritySystem #152

Closed odenisenko-zz closed 5 years ago

odenisenko-zz commented 5 years ago

is subj is enabled then

[2019-5-17 22:33:36] [FibaroHC2] Error getting data from Home Center:  TypeError: Cannot read property 'zwaveCompany' of undefined
    at ShadowAccessory.initAccessory (/usr/lib/node_modules/homebridge-fibaro-hc2/dist/shadows.js:44:52)
    at FibaroHC2.addAccessory (/usr/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:195:25)
    at FibaroHC2.LoadAccessories (/usr/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:153:15)
    at fibaroClient.getScenes.then.then (/usr/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:103:18)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:808) UnhandledPromiseRejectionWarning: Error: Startup error: get scenes or devices
    at fibaroClient.getScenes.then.then.catch (/usr/lib/node_modules/homebridge-fibaro-hc2/dist/index.js:108:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:808) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:808) [DEP0018] 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.

as workaround, I have to add

let device = { name: "FibaroSecuritySystem", roomID: 0, id: 0, properties: {zwaveCompany: ""} };..
ilcato commented 5 years ago

please make a Pull Request

ilcato commented 5 years ago

It should be ok now.