awahlig / homebridge-casambi

Homebridge Casambi Plugin
Apache License 2.0
17 stars 3 forks source link

Casambi CBU-TED & Vadsbo LD220WCM #5

Closed m-a-r-c-u-s closed 3 years ago

m-a-r-c-u-s commented 3 years ago

I finally came around to setup Homebridge on a RPi2 in hope of getting control of my Casambi devices through Homekit. All my dimmers (CBU-TEDs and Vadsbo LD220WCM) show up under Accessories but they do not respond when turning them on and off via Homebridge. I'm pasting my setup and install log below in hope of getting som help.

My Casambi network (Evolution/32.10):

This is the log from a fresh install of Homebridge + the Casambi plugin:

[18/01/2021, 19:53:40] [HB Supervisor] Starting Homebridge with extra flags: -I [18/01/2021, 19:53:40] [HB Supervisor] Started Homebridge v1.1.7 with PID: 1203 [18/01/2021, 19:53:43] Loaded config.json with 0 accessories and 2 platforms. [18/01/2021, 19:53:43] --- [18/01/2021, 19:53:46] Loaded plugin: homebridge-casambi@0.3.0 [18/01/2021, 19:53:46] Registering platform 'homebridge-casambi.Casambi' [18/01/2021, 19:53:46] --- [18/01/2021, 19:53:46] Loaded plugin: homebridge-config-ui-x@4.36.0 [18/01/2021, 19:53:46] Registering platform 'homebridge-config-ui-x.config' [18/01/2021, 19:53:46] --- [18/01/2021, 19:53:46] Loading 2 platforms... [18/01/2021, 19:53:46] [Config] Initializing config platform... [18/01/2021, 19:53:46] [Config] Running in Service Mode [18/01/2021, 19:53:46] [Casambi] Initializing Casambi platform... [18/01/2021, 19:53:46] [Casambi] Logging in to Casambi network Setup Payload: X-HM://XXXXXXXXXX Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ XXX-XX-XX │     
└────────────┘     

[18/01/2021, 19:53:46] Homebridge is running on port 51020. [18/01/2021, 19:53:47] [Casambi] Successfully logged in to Casambi network Huset [18/01/2021, 19:53:47] [Casambi] Found 58 unit(s) in the network Huset [18/01/2021, 19:53:47] [Casambi] Unit Vardagsrum Pendellampor is a Luminaire with fixtureId 526 [18/01/2021, 19:53:47] [Casambi] Registering accessory Vardagsrum Pendellampor [18/01/2021, 19:53:47] [Casambi] Unsupported control type overheat for unit Vardagsrum Pendellampor [18/01/2021, 19:53:47] [Casambi] Unit Hall Entré is a Luminaire with fixtureId 10307 [18/01/2021, 19:53:47] [Casambi] Registering accessory Hall Entré [18/01/2021, 19:53:47] [Casambi] Unsupported control type overheat for unit Hall Entré [18/01/2021, 19:53:47] [Casambi] Unit Vardagsrum Pendellampor is a PushButton with fixtureId 1031 [18/01/2021, 19:53:47] [Casambi] Skipping unit Vardagsrum Pendellampor - unsupported type PushButton [18/01/2021, 19:53:47] [Casambi] Unit Vardagsrum Soffbord is a Luminaire with fixtureId 526 [18/01/2021, 19:53:47] [Casambi] Registering accessory Vardagsrum Soffbord [18/01/2021, 19:53:47] [Casambi] Unsupported control type overheat for unit Vardagsrum Soffbord [18/01/2021, 19:53:47] [Casambi] Unit Vardagsrum Soffbord is a PushButton with fixtureId 1031 [18/01/2021, 19:53:47] [Casambi] Skipping unit Vardagsrum Soffbord - unsupported type PushButton [18/01/2021, 19:53:47] [Casambi] Unit Hall Kök is a Luminaire with fixtureId 10307 [18/01/2021, 19:53:47] [Casambi] Registering accessory Hall Kök [18/01/2021, 19:53:48] [Casambi] Unsupported control type overheat for unit Hall Kök [18/01/2021, 19:53:48] [Casambi] Unit Vardagsrum Matbord is a Luminaire with fixtureId 526 [18/01/2021, 19:53:48] [Casambi] Registering accessory Vardagsrum Matbord [18/01/2021, 19:53:48] [Casambi] Unsupported control type overheat for unit Vardagsrum Matbord [18/01/2021, 19:53:48] [Casambi] Unit Vardagsrum Matbord is a PushButton with fixtureId 1031 [18/01/2021, 19:53:48] [Casambi] Skipping unit Vardagsrum Matbord - unsupported type PushButton [18/01/2021, 19:53:48] [Casambi] Unit Vardagsrum Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:48] [Casambi] Registering accessory Vardagsrum Fönster [18/01/2021, 19:53:48] [Casambi] Unsupported control type overheat for unit Vardagsrum Fönster [18/01/2021, 19:53:48] [Casambi] Unit Vardagsrum Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:48] [Casambi] Skipping unit Vardagsrum Fönster - unsupported type PushButton [18/01/2021, 19:53:48] [Casambi] Unit Kök Pendellampor is a Luminaire with fixtureId 526 [18/01/2021, 19:53:48] [Casambi] Registering accessory Kök Pendellampor [18/01/2021, 19:53:48] [Casambi] Unsupported control type overheat for unit Kök Pendellampor [18/01/2021, 19:53:48] [Casambi] Unit Kök Pendellampor is a PushButton with fixtureId 1031 [18/01/2021, 19:53:48] [Casambi] Skipping unit Kök Pendellampor - unsupported type PushButton [18/01/2021, 19:53:48] [Casambi] Unit Kök Spots is a Luminaire with fixtureId 526 [18/01/2021, 19:53:48] [Casambi] Registering accessory Kök Spots [18/01/2021, 19:53:49] [Casambi] Unsupported control type overheat for unit Kök Spots [18/01/2021, 19:53:49] [Casambi] Unit Kök Spots is a PushButton with fixtureId 1031 [18/01/2021, 19:53:49] [Casambi] Skipping unit Kök Spots - unsupported type PushButton [18/01/2021, 19:53:49] [Casambi] Unit Kök Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:49] [Casambi] Registering accessory Kök Fönster [18/01/2021, 19:53:49] [Casambi] Unsupported control type overheat for unit Kök Fönster [18/01/2021, 19:53:49] [Casambi] Unit Kök Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:49] [Casambi] Skipping unit Kök Fönster - unsupported type PushButton [18/01/2021, 19:53:49] [Casambi] Unit Kök Spots Överskåp is a Luminaire with fixtureId 526 [18/01/2021, 19:53:49] [Casambi] Registering accessory Kök Spots Överskåp [18/01/2021, 19:53:49] [Casambi] Unsupported control type overheat for unit Kök Spots Överskåp [18/01/2021, 19:53:49] [Casambi] Unit Kök Spots Överskåp is a PushButton with fixtureId 1031 [18/01/2021, 19:53:49] [Casambi] Skipping unit Kök Spots Överskåp - unsupported type PushButton [18/01/2021, 19:53:49] [Casambi] Unit Sovrum 1 Tak is a Luminaire with fixtureId 526 [18/01/2021, 19:53:49] [Casambi] Registering accessory Sovrum 1 Tak [18/01/2021, 19:53:49] [Casambi] Unsupported control type overheat for unit Sovrum 1 Tak [18/01/2021, 19:53:49] [Casambi] Unit Sovrum 1 Tak is a PushButton with fixtureId 1031 [18/01/2021, 19:53:49] [Casambi] Skipping unit Sovrum 1 Tak - unsupported type PushButton [18/01/2021, 19:53:49] [Casambi] Unit Sovrum 1 Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:49] [Casambi] Skipping unit Sovrum 1 Fönster - unsupported type PushButton [18/01/2021, 19:53:49] [Casambi] Unit Sovrum 1 Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:49] [Casambi] Registering accessory Sovrum 1 Fönster (node:1203) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unitChanged listeners added to [CasambiNetworkSession]. Use emitter.setMaxListeners() to increase limit (Use node --trace-warnings ... to show where the warning was created) [18/01/2021, 19:53:50] [Casambi] Unsupported control type overheat for unit Sovrum 1 Fönster [18/01/2021, 19:53:50] [Casambi] Unit Sovrum 1 Garderob is a Luminaire with fixtureId 526 [18/01/2021, 19:53:50] [Casambi] Registering accessory Sovrum 1 Garderob [18/01/2021, 19:53:50] [Casambi] Unsupported control type overheat for unit Sovrum 1 Garderob [18/01/2021, 19:53:50] [Casambi] Unit Badrum Spots is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit Badrum Spots - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit Badrum is a Luminaire with fixtureId 526 [18/01/2021, 19:53:50] [Casambi] Registering accessory Badrum [18/01/2021, 19:53:50] [Casambi] Unsupported control type overheat for unit Badrum [18/01/2021, 19:53:50] [Casambi] Unit WC is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit WC - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit WC is a Luminaire with fixtureId 526 [18/01/2021, 19:53:50] [Casambi] Registering accessory WC [18/01/2021, 19:53:50] [Casambi] Unsupported control type overheat for unit WC [18/01/2021, 19:53:50] [Casambi] Unit Sovrum 2 Tak is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit Sovrum 2 Tak - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit Sovrum 2 Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit Sovrum 2 Fönster - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit Sovrum 3 Tak is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit Sovrum 3 Tak - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit Sovrum 3 Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:50] [Casambi] Skipping unit Sovrum 3 Fönster - unsupported type PushButton [18/01/2021, 19:53:50] [Casambi] Unit Garage is a Luminaire with fixtureId 10307 [18/01/2021, 19:53:50] [Casambi] Registering accessory Garage [18/01/2021, 19:53:51] [Casambi] Unsupported control type overheat for unit Garage [18/01/2021, 19:53:51] [Casambi] Unit Mediarum is a Luminaire with fixtureId 10307 [18/01/2021, 19:53:51] [Casambi] Registering accessory Mediarum [18/01/2021, 19:53:51] [Casambi] Unsupported control type overheat for unit Mediarum [18/01/2021, 19:53:51] [Casambi] Unit Sovrum 2 Tak is a Luminaire with fixtureId 526 [18/01/2021, 19:53:51] [Casambi] Registering accessory Sovrum 2 Tak [18/01/2021, 19:53:51] [Casambi] Unsupported control type overheat for unit Sovrum 2 Tak [18/01/2021, 19:53:51] [Casambi] Unit Sovrum 2 Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:51] [Casambi] Registering accessory Sovrum 2 Fönster [18/01/2021, 19:53:51] [Casambi] Unsupported control type overheat for unit Sovrum 2 Fönster [18/01/2021, 19:53:51] [Casambi] Unit Sovrum 3 Tak is a Luminaire with fixtureId 526 [18/01/2021, 19:53:51] [Casambi] Registering accessory Sovrum 3 Tak [18/01/2021, 19:53:52] [Casambi] Unsupported control type overheat for unit Sovrum 3 Tak [18/01/2021, 19:53:52] [Casambi] Unit Sovrum 3 Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:52] [Casambi] Registering accessory Sovrum 3 Fönster [18/01/2021, 19:53:52] [Casambi] Unsupported control type overheat for unit Sovrum 3 Fönster [18/01/2021, 19:53:52] [Casambi] Unit Kontor Tak is a Luminaire with fixtureId 526 [18/01/2021, 19:53:52] [Casambi] Registering accessory Kontor Tak [18/01/2021, 19:53:52] [Casambi] Unsupported control type overheat for unit Kontor Tak [18/01/2021, 19:53:52] [Casambi] Unit WC - LIGA.AIR.SP.BAT is a BatterySensor with fixtureId 8995 [18/01/2021, 19:53:52] [Casambi] Skipping unit WC - LIGA.AIR.SP.BAT - unsupported type BatterySensor [18/01/2021, 19:53:52] [Casambi] Unit Kontor Tak is a PushButton with fixtureId 1031 [18/01/2021, 19:53:52] [Casambi] Skipping unit Kontor Tak - unsupported type PushButton [18/01/2021, 19:53:52] [Casambi] Unit Kontor Fönster is a Luminaire with fixtureId 526 [18/01/2021, 19:53:52] [Casambi] Registering accessory Kontor Fönster [18/01/2021, 19:53:52] [Casambi] Unsupported control type overheat for unit Kontor Fönster [18/01/2021, 19:53:52] [Casambi] Unit Kontor Fönster is a PushButton with fixtureId 1031 [18/01/2021, 19:53:52] [Casambi] Skipping unit Kontor Fönster - unsupported type PushButton [18/01/2021, 19:53:52] [Casambi] Unit Atrium Markbelysning is a Luminaire with fixtureId 526 [18/01/2021, 19:53:52] [Casambi] Registering accessory Atrium Markbelysning [18/01/2021, 19:53:53] [Casambi] Unsupported control type overheat for unit Atrium Markbelysning [18/01/2021, 19:53:53] [Casambi] Unit Atrium Markbelysning is a PushButton with fixtureId 1031 [18/01/2021, 19:53:53] [Casambi] Skipping unit Atrium Markbelysning - unsupported type PushButton [18/01/2021, 19:53:53] [Casambi] Unit Atrium Väggbelysning is a PushButton with fixtureId 1031 [18/01/2021, 19:53:53] [Casambi] Skipping unit Atrium Väggbelysning - unsupported type PushButton [18/01/2021, 19:53:53] [Casambi] Unit Atrium Väggbelysning is a Luminaire with fixtureId 526 [18/01/2021, 19:53:53] [Casambi] Registering accessory Atrium Väggbelysning [18/01/2021, 19:53:53] [Casambi] Unsupported control type overheat for unit Atrium Väggbelysning [18/01/2021, 19:53:53] [Casambi] Unit Tvättstuga Tak is a PushButton with fixtureId 1031 [18/01/2021, 19:53:53] [Casambi] Skipping unit Tvättstuga Tak - unsupported type PushButton [18/01/2021, 19:53:53] [Casambi] Unit Tvättstuga is a Luminaire with fixtureId 526 [18/01/2021, 19:53:53] [Casambi] Registering accessory Tvättstuga [18/01/2021, 19:53:53] [Casambi] Unsupported control type overheat for unit Tvättstuga [18/01/2021, 19:53:53] [Casambi] Unit Framsida Markbelysning is a PushButton with fixtureId 1031 [18/01/2021, 19:53:53] [Casambi] Skipping unit Framsida Markbelysning - unsupported type PushButton [18/01/2021, 19:53:53] [Casambi] Unit Framsida Markbelysning is a Luminaire with fixtureId 526 [18/01/2021, 19:53:53] [Casambi] Registering accessory Framsida Markbelysning [18/01/2021, 19:53:53] [Casambi] Unsupported control type overheat for unit Framsida Markbelysning [18/01/2021, 19:53:54] [Casambi] Unit Badrum - LIGA.AIR.SP.BAT is a BatterySensor with fixtureId 8995 [18/01/2021, 19:53:54] [Casambi] Skipping unit Badrum - LIGA.AIR.SP.BAT - unsupported type BatterySensor [18/01/2021, 19:53:54] [Casambi] Unit Garage - LIGA.AIR.SP.BATT is a BatterySensor with fixtureId 8995 [18/01/2021, 19:53:54] [Casambi] Skipping unit Garage - LIGA.AIR.SP.BATT - unsupported type BatterySensor [18/01/2021, 19:53:54] [Casambi] Unit Hue ambiance lamp 1 is a Luminaire with fixtureId 100002 [18/01/2021, 19:53:54] [Casambi] Registering accessory Hue ambiance lamp 1 (node:1203) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404 at createError (/usr/local/lib/node_modules/homebridge-casambi/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/local/lib/node_modules/homebridge-casambi/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-casambi/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) (node:1203) 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: 2) (node:1203) [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.

awahlig commented 3 years ago

Thanks for the extensive info.

The error at the end of your log is caused by the Casambi API not returning the fixture information for unit "Hue ambiance lamp 1". I was able to reproduce that by passing fixtureId 100002 to it. Looks to me like a missing entry in their fixtures database.

Because the exception is unhandled, it aborts the startup of the plugin and ends up causing the behaviour you are seeing (accessories not working). For now, I've fixed it by making it skip the affected unit and proceeding to the next one.

I've published version 0.3.1 with the fix. Can you update and try again?

m-a-r-c-u-s commented 3 years ago

Thanks you for looking into it! Just updated the Casambi plugin and it crashed Homebridge and put ut this error:

[19/01/2021, 06:53:04] Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: da39a3ee-5e6b-44b0-9325-5bfef9560189 at Bridge.Accessory._this.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:416:15) at /usr/local/lib/node_modules/homebridge/src/server.ts:310:19 at Array.filter () at Server.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:270:69) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:158:10) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) [19/01/2021, 06:53:04] Got SIGTERM, shutting down Homebridge...

awahlig commented 3 years ago

It's possible that due to the previous error, the accessories cache has been left in a bad state. Can you try deleting it? It's normally in ~/.homebridge/accessories. Delete the directory and run Homebridge again.

m-a-r-c-u-s commented 3 years ago

Uninstalling the plugin + its config files and then reinstalling the plugin resolved the initial bootloop crashing Homebridge. After that Luminaires get added and I can control them. But if Homebridge is restarted it get stuck in a bootloop.

It seems the the two "Osram Smart+ Plug Outdoor (fixtureId 1)" I have connected to my Philips Hue Hub and added to my Casambi network might create some issues.

EDIT: I'm able to control the added luminaires. Restarting Homebridge results in a crash and endless bootloop.

New install log:

[19/01/2021, 09:12:51] Homebridge is running on port 51020. [19/01/2021, 09:12:51] [Casambi] Successfully logged in to Casambi network Huset [19/01/2021, 09:12:51] [Casambi] Found 58 unit(s) in the network Huset [19/01/2021, 09:12:51] [Casambi] Unit Vardagsrum Pendellampor is a Luminaire with fixtureId 526 [19/01/2021, 09:12:51] [Casambi] Registering accessory Vardagsrum Pendellampor [19/01/2021, 09:12:52] [Casambi] Unsupported control type overheat for unit Vardagsrum Pendellampor [19/01/2021, 09:12:52] [Casambi] Unit Hall Entré is a Luminaire with fixtureId 10307 [19/01/2021, 09:12:52] [Casambi] Registering accessory Hall Entré [19/01/2021, 09:12:52] [Casambi] Unsupported control type overheat for unit Hall Entré [19/01/2021, 09:12:52] [Casambi] Unit Vardagsrum Pendellampor is a PushButton with fixtureId 1031 [19/01/2021, 09:12:52] [Casambi] Skipping unit Vardagsrum Pendellampor - unsupported type PushButton [19/01/2021, 09:12:52] [Casambi] Unit Vardagsrum Soffbord is a Luminaire with fixtureId 526 [19/01/2021, 09:12:52] [Casambi] Registering accessory Vardagsrum Soffbord [19/01/2021, 09:12:52] [Casambi] Unsupported control type overheat for unit Vardagsrum Soffbord [19/01/2021, 09:12:52] [Casambi] Unit Vardagsrum Soffbord is a PushButton with fixtureId 1031 [19/01/2021, 09:12:52] [Casambi] Skipping unit Vardagsrum Soffbord - unsupported type PushButton [19/01/2021, 09:12:52] [Casambi] Unit Hall Kök is a Luminaire with fixtureId 10307 [19/01/2021, 09:12:52] [Casambi] Registering accessory Hall Kök [19/01/2021, 09:12:52] [Casambi] Unsupported control type overheat for unit Hall Kök [19/01/2021, 09:12:52] [Casambi] Unit Vardagsrum Matbord is a Luminaire with fixtureId 526 [19/01/2021, 09:12:52] [Casambi] Registering accessory Vardagsrum Matbord [19/01/2021, 09:12:53] [Casambi] Unsupported control type overheat for unit Vardagsrum Matbord [19/01/2021, 09:12:53] [Casambi] Unit Vardagsrum Matbord is a PushButton with fixtureId 1031 [19/01/2021, 09:12:53] [Casambi] Skipping unit Vardagsrum Matbord - unsupported type PushButton [19/01/2021, 09:12:53] [Casambi] Unit Vardagsrum Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:53] [Casambi] Registering accessory Vardagsrum Fönster [19/01/2021, 09:12:53] [Casambi] Unsupported control type overheat for unit Vardagsrum Fönster [19/01/2021, 09:12:53] [Casambi] Unit Vardagsrum Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:53] [Casambi] Skipping unit Vardagsrum Fönster - unsupported type PushButton [19/01/2021, 09:12:53] [Casambi] Unit Kök Pendellampor is a Luminaire with fixtureId 526 [19/01/2021, 09:12:53] [Casambi] Registering accessory Kök Pendellampor [19/01/2021, 09:12:53] [Casambi] Unsupported control type overheat for unit Kök Pendellampor [19/01/2021, 09:12:53] [Casambi] Unit Kök Pendellampor is a PushButton with fixtureId 1031 [19/01/2021, 09:12:53] [Casambi] Skipping unit Kök Pendellampor - unsupported type PushButton [19/01/2021, 09:12:53] [Casambi] Unit Kök Spots is a Luminaire with fixtureId 526 [19/01/2021, 09:12:53] [Casambi] Registering accessory Kök Spots [19/01/2021, 09:12:53] [Casambi] Unsupported control type overheat for unit Kök Spots [19/01/2021, 09:12:53] [Casambi] Unit Kök Spots is a PushButton with fixtureId 1031 [19/01/2021, 09:12:53] [Casambi] Skipping unit Kök Spots - unsupported type PushButton [19/01/2021, 09:12:53] [Casambi] Unit Kök Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:53] [Casambi] Registering accessory Kök Fönster [19/01/2021, 09:12:53] [Casambi] Unsupported control type overheat for unit Kök Fönster [19/01/2021, 09:12:53] [Casambi] Unit Kök Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:53] [Casambi] Skipping unit Kök Fönster - unsupported type PushButton [19/01/2021, 09:12:53] [Casambi] Unit Kök Spots Överskåp is a Luminaire with fixtureId 526 [19/01/2021, 09:12:53] [Casambi] Registering accessory Kök Spots Överskåp [19/01/2021, 09:12:54] [Casambi] Unsupported control type overheat for unit Kök Spots Överskåp [19/01/2021, 09:12:54] [Casambi] Unit Kök Spots Överskåp is a PushButton with fixtureId 1031 [19/01/2021, 09:12:54] [Casambi] Skipping unit Kök Spots Överskåp - unsupported type PushButton [19/01/2021, 09:12:54] [Casambi] Unit Sovrum 1 Tak is a Luminaire with fixtureId 526 [19/01/2021, 09:12:54] [Casambi] Registering accessory Sovrum 1 Tak [19/01/2021, 09:12:54] [Casambi] Unsupported control type overheat for unit Sovrum 1 Tak [19/01/2021, 09:12:54] [Casambi] Unit Sovrum 1 Tak is a PushButton with fixtureId 1031 [19/01/2021, 09:12:54] [Casambi] Skipping unit Sovrum 1 Tak - unsupported type PushButton [19/01/2021, 09:12:54] [Casambi] Unit Sovrum 1 Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:54] [Casambi] Skipping unit Sovrum 1 Fönster - unsupported type PushButton [19/01/2021, 09:12:54] [Casambi] Unit Sovrum 1 Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:54] [Casambi] Registering accessory Sovrum 1 Fönster [19/01/2021, 09:12:54] [Casambi] Unsupported control type overheat for unit Sovrum 1 Fönster [19/01/2021, 09:12:54] [Casambi] Unit Sovrum 1 Garderob is a Luminaire with fixtureId 526 [19/01/2021, 09:12:54] [Casambi] Registering accessory Sovrum 1 Garderob [19/01/2021, 09:12:54] [Casambi] Unsupported control type overheat for unit Sovrum 1 Garderob [19/01/2021, 09:12:55] [Casambi] Unit Badrum Spots is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit Badrum Spots - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit Badrum is a Luminaire with fixtureId 526 [19/01/2021, 09:12:55] [Casambi] Registering accessory Badrum [19/01/2021, 09:12:55] [Casambi] Unsupported control type overheat for unit Badrum [19/01/2021, 09:12:55] [Casambi] Unit WC is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit WC - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit WC is a Luminaire with fixtureId 526 [19/01/2021, 09:12:55] [Casambi] Registering accessory WC [19/01/2021, 09:12:55] [Casambi] Unsupported control type overheat for unit WC [19/01/2021, 09:12:55] [Casambi] Unit Sovrum 2 Tak is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit Sovrum 2 Tak - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit Sovrum 2 Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit Sovrum 2 Fönster - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit Sovrum 3 Tak is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit Sovrum 3 Tak - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit Sovrum 3 Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:55] [Casambi] Skipping unit Sovrum 3 Fönster - unsupported type PushButton [19/01/2021, 09:12:55] [Casambi] Unit Garage is a Luminaire with fixtureId 10307 [19/01/2021, 09:12:55] [Casambi] Registering accessory Garage [19/01/2021, 09:12:55] [Casambi] Unsupported control type overheat for unit Garage [19/01/2021, 09:12:55] [Casambi] Unit Mediarum is a Luminaire with fixtureId 10307 [19/01/2021, 09:12:55] [Casambi] Registering accessory Mediarum [19/01/2021, 09:12:55] [Casambi] Unsupported control type overheat for unit Mediarum [19/01/2021, 09:12:56] [Casambi] Unit Sovrum 2 Tak is a Luminaire with fixtureId 526 [19/01/2021, 09:12:56] [Casambi] Registering accessory Sovrum 2 Tak [19/01/2021, 09:12:56] [Casambi] Unsupported control type overheat for unit Sovrum 2 Tak [19/01/2021, 09:12:56] [Casambi] Unit Sovrum 2 Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:56] [Casambi] Registering accessory Sovrum 2 Fönster [19/01/2021, 09:12:56] [Casambi] Unsupported control type overheat for unit Sovrum 2 Fönster [19/01/2021, 09:12:56] [Casambi] Unit Sovrum 3 Tak is a Luminaire with fixtureId 526 [19/01/2021, 09:12:56] [Casambi] Registering accessory Sovrum 3 Tak [19/01/2021, 09:12:57] [Casambi] Unsupported control type overheat for unit Sovrum 3 Tak [19/01/2021, 09:12:57] [Casambi] Unit Sovrum 3 Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:57] [Casambi] Registering accessory Sovrum 3 Fönster [19/01/2021, 09:12:57] [Casambi] Unsupported control type overheat for unit Sovrum 3 Fönster [19/01/2021, 09:12:57] [Casambi] Unit Kontor Tak is a Luminaire with fixtureId 526 [19/01/2021, 09:12:57] [Casambi] Registering accessory Kontor Tak [19/01/2021, 09:12:57] [Casambi] Unsupported control type overheat for unit Kontor Tak [19/01/2021, 09:12:57] [Casambi] Unit WC - LIGA.AIR.SP.BAT is a BatterySensor with fixtureId 8995 [19/01/2021, 09:12:57] [Casambi] Skipping unit WC - LIGA.AIR.SP.BAT - unsupported type BatterySensor [19/01/2021, 09:12:57] [Casambi] Unit Kontor Tak is a PushButton with fixtureId 1031 [19/01/2021, 09:12:57] [Casambi] Skipping unit Kontor Tak - unsupported type PushButton [19/01/2021, 09:12:57] [Casambi] Unit Kontor Fönster is a Luminaire with fixtureId 526 [19/01/2021, 09:12:57] [Casambi] Registering accessory Kontor Fönster [19/01/2021, 09:12:57] [Casambi] Unsupported control type overheat for unit Kontor Fönster [19/01/2021, 09:12:58] [Casambi] Unit Kontor Fönster is a PushButton with fixtureId 1031 [19/01/2021, 09:12:58] [Casambi] Skipping unit Kontor Fönster - unsupported type PushButton [19/01/2021, 09:12:58] [Casambi] Unit Atrium Markbelysning is a Luminaire with fixtureId 526 [19/01/2021, 09:12:58] [Casambi] Registering accessory Atrium Markbelysning [19/01/2021, 09:12:58] [Casambi] Unsupported control type overheat for unit Atrium Markbelysning [19/01/2021, 09:12:58] [Casambi] Unit Atrium Markbelysning is a PushButton with fixtureId 1031 [19/01/2021, 09:12:58] [Casambi] Skipping unit Atrium Markbelysning - unsupported type PushButton [19/01/2021, 09:12:58] [Casambi] Unit Atrium Väggbelysning is a PushButton with fixtureId 1031 [19/01/2021, 09:12:58] [Casambi] Skipping unit Atrium Väggbelysning - unsupported type PushButton [19/01/2021, 09:12:58] [Casambi] Unit Atrium Väggbelysning is a Luminaire with fixtureId 526 [19/01/2021, 09:12:58] [Casambi] Registering accessory Atrium Väggbelysning [19/01/2021, 09:12:58] [Casambi] Unsupported control type overheat for unit Atrium Väggbelysning [19/01/2021, 09:12:58] [Casambi] Unit Tvättstuga Tak is a PushButton with fixtureId 1031 [19/01/2021, 09:12:58] [Casambi] Skipping unit Tvättstuga Tak - unsupported type PushButton [19/01/2021, 09:12:58] [Casambi] Unit Tvättstuga is a Luminaire with fixtureId 526 [19/01/2021, 09:12:58] [Casambi] Registering accessory Tvättstuga [19/01/2021, 09:12:58] [Casambi] Unsupported control type overheat for unit Tvättstuga [19/01/2021, 09:12:58] [Casambi] Unit Framsida Markbelysning is a PushButton with fixtureId 1031 [19/01/2021, 09:12:58] [Casambi] Skipping unit Framsida Markbelysning - unsupported type PushButton [19/01/2021, 09:12:58] [Casambi] Unit Framsida Markbelysning is a Luminaire with fixtureId 526 [19/01/2021, 09:12:58] [Casambi] Registering accessory Framsida Markbelysning [19/01/2021, 09:12:59] [Casambi] Unsupported control type overheat for unit Framsida Markbelysning [19/01/2021, 09:12:59] [Casambi] Unit Badrum - LIGA.AIR.SP.BAT is a BatterySensor with fixtureId 8995 [19/01/2021, 09:12:59] [Casambi] Skipping unit Badrum - LIGA.AIR.SP.BAT - unsupported type BatterySensor [19/01/2021, 09:12:59] [Casambi] Unit Garage - LIGA.AIR.SP.BATT is a BatterySensor with fixtureId 8995 [19/01/2021, 09:12:59] [Casambi] Skipping unit Garage - LIGA.AIR.SP.BATT - unsupported type BatterySensor [19/01/2021, 09:12:59] [Casambi] Unit Hue ambiance lamp 1 is a Luminaire with fixtureId 100002 [19/01/2021, 09:12:59] [Casambi] Registering accessory Hue ambiance lamp 1 [19/01/2021, 09:12:59] [Casambi] Error obtaining fixture information, skipping unit [19/01/2021, 09:12:59] [Casambi] Unit Hue ambiance lamp 2 is a Luminaire with fixtureId 100002 [19/01/2021, 09:12:59] [Casambi] Registering accessory Hue ambiance lamp 2 [19/01/2021, 09:12:59] [Casambi] Error obtaining fixture information, skipping unit [19/01/2021, 09:12:59] [Casambi] Unit Hue ambiance lamp 3 is a Luminaire with fixtureId 100002 [19/01/2021, 09:12:59] [Casambi] Registering accessory Hue ambiance lamp 3 [19/01/2021, 09:12:59] [Casambi] Error obtaining fixture information, skipping unit [19/01/2021, 09:12:59] [Casambi] Unit Osram On/Off Atrium 1 is a Luminaire with fixtureId 1 [19/01/2021, 09:12:59] [Casambi] Registering accessory Osram On/Off Atrium 1 [19/01/2021, 09:12:59] [Casambi] Unit IKEA golvlampa is a Luminaire with fixtureId 100001 [19/01/2021, 09:12:59] [Casambi] Registering accessory IKEA golvlampa [19/01/2021, 09:13:00] [Casambi] Error obtaining fixture information, skipping unit [19/01/2021, 09:13:00] [Casambi] Unit Atrium Plank is a Luminaire with fixtureId 1 [19/01/2021, 09:13:00] [Casambi] Registering accessory Atrium Plank (node:15379) UnhandledPromiseRejectionWarning: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: da39a3ee-5e6b-44b0-9325-5bfef9560189 at Bridge.Accessory._this.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:416:15) at Bridge.Accessory._this.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:450:12) at Server.handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:528:17) at HomebridgeAPI.emit (events.js:315:20) at HomebridgeAPI.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/api.ts:316:10) at CasambiPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-casambi/src/platform.ts:203:20) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:15379) 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: 5) (node:15379) [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.

m-a-r-c-u-s commented 3 years ago

Even though the plugin v0.3.1 seems to run after a fresh install a reboot of Homebridge triggers the endless bootloop once again probably because of the UUID conflict of the Osram Plugs. All luminaires connected to the Casambi network through the Philips Hue Hub should be ignored if possible.

[19/01/2021, 09:51:37] Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: da39a3ee-5e6b-44b0-9325-5bfef9560189 at Bridge.Accessory._this.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:416:15) at /usr/local/lib/node_modules/homebridge/src/server.ts:310:19 at Array.filter () at Server.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:270:69) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:158:10) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) [19/01/2021, 09:51:37] Got SIGTERM, shutting down Homebridge...

awahlig commented 3 years ago

Could you run Homebridge in debug mode? The plugin logs more info in that mode, including the data used to generate the UUIDs. It should explain why there is a conflict. I might have to change how those IDs are generated to fix this.

m-a-r-c-u-s commented 3 years ago

[19/01/2021, 13:10:09] [Casambi] Unit Osram On/Off Atrium 1 is a Luminaire with fixtureId 1 [19/01/2021, 13:10:09] [Casambi] Unit info for Osram On/Off Atrium 1 { id: 1006, address: '', name: 'Osram On/Off Atrium 1', position: 3, fixtureId: 1, groupId: 11, type: 'Luminaire' } [19/01/2021, 13:10:09] [Casambi] Registering accessory Osram On/Off Atrium 1 [19/01/2021, 13:10:09] [Casambi] Fixture info for unit Osram On/Off Atrium 1 { id: 1, type: 'Luminaire', vendor: 'Casambi', model: 'Board', isLuminaire: true, isSwitch: false, isLightSensor: false, isPresenceSensor: false, translations: {}, controls: [ { type: 'dimmer', id: 0, readonly: false } ] } [19/01/2021, 13:10:09] [Casambi] Unit IKEA golvlampa is a Luminaire with fixtureId 100001 [19/01/2021, 13:10:09] [Casambi] Unit info for IKEA golvlampa { id: 1007, address: '', name: 'IKEA golvlampa', position: 3, fixtureId: 100001, groupId: 4, type: 'Luminaire' } [19/01/2021, 13:10:09] [Casambi] Registering accessory IKEA golvlampa [19/01/2021, 13:10:10] [Casambi] Error obtaining fixture information, skipping unit [19/01/2021, 13:10:10] [Casambi] Unit Atrium Plank is a Luminaire with fixtureId 1 [19/01/2021, 13:10:10] [Casambi] Unit info for Atrium Plank { id: 1008, address: '', name: 'Atrium Plank', image: 'TeroKJzfOwBri0ZmVKWVq3Up8Yczr9sp', position: 4, fixtureId: 1, groupId: 11, type: 'Luminaire' } [19/01/2021, 13:10:10] [Casambi] Registering accessory Atrium Plank [19/01/2021, 13:10:10] [Casambi] Fixture info for unit Atrium Plank { id: 1, type: 'Luminaire', vendor: 'Casambi', model: 'Board', isLuminaire: true, isSwitch: false, isLightSensor: false, isPresenceSensor: false, translations: {}, controls: [ { type: 'dimmer', id: 0, readonly: false } ] } (node:1868) UnhandledPromiseRejectionWarning: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: da39a3ee-5e6b-44b0-9325-5bfef9560189 at Bridge.Accessory._this.addBridgedAccessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:416:15) at Bridge.Accessory._this.addBridgedAccessories (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:450:12) at Server.handleRegisterPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:528:17) at HomebridgeAPI.emit (events.js:315:20) at HomebridgeAPI.registerPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/api.ts:316:10) at CasambiPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-casambi/src/platform.ts:203:20) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:1868) 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: 5) (node:1868) [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. [19/01/2021, 13:10:19] [Casambi] Set characteristic On of unit Vardagsrum Fönster to true [19/01/2021, 13:10:19] [Casambi] Send controlUnit for Vardagsrum Fönster { Dimmer: { value: 1 } } [19/01/2021, 13:10:19] [Casambi] Set characteristic Brightness of unit Vardagsrum Fönster to 100 [19/01/2021, 13:10:19] [Casambi] Send controlUnit for Vardagsrum Fönster { Dimmer: { value: 1 } } [19/01/2021, 13:10:20] [Casambi] Connection successful

awahlig commented 3 years ago

Thanks, the empty "address" field is causing the issue. I'll let you know once I publish a fix.

awahlig commented 3 years ago

Version 0.3.2 is up. Can you give it a go?

m-a-r-c-u-s commented 3 years ago

Perfect. No more bootloop after a reboot and I can now control all of the casambi luminaires.

Tank you!

awahlig commented 3 years ago

Great, I'll close the issue then.

It looks like the Philips Hue bulbs were causing the original error. The fact that they're connected through a hub kinda explains why requesting the fixture information for them resulted in a NotFound error - they're not real Casambi devices.

The fixture information is needed to detect what kind of controls a given device has. It's possible that this information could be inferred some other way and those bulbs could work as well. Feel free to open a separate issue for this, if you want.