ilcato / homebridge-Fibaro-HC2

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

homebridge-Fibaro-HC2 doesn't work with Homebridge 1.0.1 #187

Closed Stefan-83 closed 4 years ago

Stefan-83 commented 4 years ago

Describe The Bug: Since upgrading to Homebridge 1.0.1 (or 1.0.0) the homebridge-Fibaro-HC2-plugin doesn't work anymore:

To Reproduce: Rebooted several times - same behavior

Expected behavior: Normal startup

Log:

[4/27/2020, 9:55:19 PM] [FibaroHC2] Loading accessories
[4/27/2020, 9:55:20 PM] [FibaroHC2] Error getting data from Home Center:  TypeError: Cannot read property 'testCharacteristic' of undefined
    at /usr/local/lib/node_modules/homebridge/src/server.ts:465:33
    at Array.map (<anonymous>)
    at Server.handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:459:40)
    at HomebridgeAPI.emit (events.js:315:20)
    at HomebridgeAPI.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/api.ts:296:10)
    at ShadowAccessory.registerUpdateAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/src/shadows.ts:113:8)
    at FibaroHC2.addAccessory (/usr/local/lib/node_modules/homebridge-fibaro-hc2/src/index.ts:266:19)
    at /usr/local/lib/node_modules/homebridge-fibaro-hc2/src/index.ts:207:10
    at Array.map (<anonymous>)
    at FibaroHC2.LoadAccessories (/usr/local/lib/node_modules/homebridge-fibaro-hc2/src/index.ts:204:11)
(node:31875) UnhandledPromiseRejectionWarning: Error: Startup error: get scenes or devices
    at /usr/local/lib/node_modules/homebridge-fibaro-hc2/src/index.ts:170:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:31875) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:31875) [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.

Environment: Node.js Version: v14.0.0 NPM Version: v6.14.4 Homebridge Version: 1.0.1 Operating System: Raspbian GNU/Linux Stretch (9) Process Supervisor: Systemd

redeemer666 commented 4 years ago

I’m adding this, also deleting cached accessories and persist folder doesn’t work.

tobi18ww commented 4 years ago

same Issue

ilcato commented 4 years ago

Working on it

ilcato commented 4 years ago

@Stefan-83, please, install version 2.3.2. It should fix the issue.

Stefan-83 commented 4 years ago

perfect. the update resolved the issue. Thanks :)