ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

Lights not recognized from Philips Hue Bridge #1076

Closed lxheckel closed 2 years ago

lxheckel commented 2 years ago

Issue

I had been using HOOBS with the Hue plugin happily with my Apple Home Kit for over a year. In Dec. 2021 I started having connection issues and lost the connection to Apple Homekit entirely around 5.1.22. The log showed an error with the homebridge version which was supposed to be 1.3.9 but was 1.3.4. I found out that despite the fact that the HOOBS Dashboard showed that I had supposedly the latest version installed (it showed 4.0.98 at the time) it was apparently not the latest version. I boldly reinstalled HOOBS (now 4.1.21) and the Hue Plugin and reconnected the plugin to my (unchanged) Hue Bridge as well as my Apple Homekit but since then I cannot access my lights any more no matter which boxes in the config of the plugin I check/uncheck (such as "expose lights" for example) - except for one smart plug. I have tried the usual (reboot, reinstall plugin, reinstall one of the lights etc.) but do not find a solution. I am running out of options.

Version

HOOBS 4.1.21, node version 16.13.1, homebridge 1.3.9, plugin version 0.13.34

Log Messages

8.1.2022, 23:12:14LX Hue BridgeLoaded plugin 'homebridge-hue'
8.1.2022, 23:12:14LX Hue BridgeLoading 1 platforms...
8.1.2022, 23:12:14LX Hue BridgeHuehomebridge-hue v0.13.34, node v16.13.1, homebridge v1.3.9
8.1.2022, 23:12:14LX Hue BridgeHuesearching bridges and gateways
8.1.2022, 23:12:19LX Hue BridgeHuePhilips hue: Signify Netherlands B.V. BSB002 bridge v1949107040, api v1.48.0
8.1.2022, 23:12:21LX Hue BridgeHuePhilips hue: 14 accessories
8.1.2022, 23:12:21LX Hue BridgeHuemasked debug info dumped to /var/lib/hoobs/lxhuebridge/homebridge-hue.json.gz
8.1.2022, 23:12:21LX Hue BridgeHuePhilips hue: 2 services
8.1.2022, 23:12:21LX Hue BridgeBridge is running on port 51826.
8.1.2022, 23:12:21LX Hue BridgeHuePhilips hue: event stream connected to https://192.168.178.20/eventstream/clip/v2
8.1.2022, 23:12:34LX Hue BridgeHueSchlafzimmerdecke: homekit on changed from false to true
8.1.2022, 23:12:37LX Hue BridgeHueSchlafzimmerdecke: homekit on changed from true to false
8.1.2022, 23:12:43LX Hue BridgeHueGroup 0: homekit on changed from false to true
8.1.2022, 23:13:20LX Hue BridgeHueGroup 0: homekit on changed from true to false
8.1.2022, 23:20:03LX Hue BridgeHueWarnungPhilips hue: event stream error: TypeError: Cannot read properties of undefined (reading 'startsWith')
    at EventStreamClient.parseUpdate (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:230:26)
    at EventStreamClient.parseContainer (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:198:16)
    at IncomingMessage.<anonymous> (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:162:26)
    at IncomingMessage.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at IncomingMessage.Readable.push (node:internal/streams/readable:228:10)
    at HTTPParser.parserOnBody (node:_http_common:141:24)
    at TLSSocket.socketOnData (node:_http_client:487:22)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)
9.1.2022, 06:28:44LX Hue BridgeHueSchlafzimmerdecke: homekit on changed from false to true
9.1.2022, 06:28:50LX Hue BridgeHueSchlafzimmerdecke: homekit on changed from true to false
9.1.2022, 06:28:56LX Hue BridgeHueStehlampe Wohnzimmer: homekit on changed from false to true
9.1.2022, 06:29:05LX Hue BridgeHueStehlampe Wohnzimmer: homekit on changed from true to false
10.1.2022, 06:44:14LX Hue BridgeHueColor Hue: homekit on changed from true to false
10.1.2022, 06:44:15LX Hue BridgeHueColor Hue: homekit on changed from false to true
10.1.2022, 20:19:23LX Hue BridgeConfiguration change
10.1.2022, 20:19:24lxhuebridge stopping
10.1.2022, 20:19:26LX Hue BridgeHuegoodbye
10.1.2022, 20:19:29LX Hue Bridge starting
10.1.2022, 20:19:44LX Hue BridgeLoaded plugin 'homebridge-hue'
10.1.2022, 20:19:44LX Hue BridgeLoading 1 platforms..
10.1.2022, 20:19:44LX Hue BridgeHuehomebridge-hue v0.13.34, node v16.13.1, homebridge v1.3.9
10.1.2022, 20:19:44LX Hue BridgeHuesearching bridges and gateways
10.1.2022, 20:19:49LX Hue BridgeHuePhilips hue: Signify Netherlands B.V. BSB002 bridge v1949107040, api v1.48.0
10.1.2022, 20:19:50LX Hue BridgeHuePhilips hue: 2 accessories
10.1.2022, 20:19:50LX Hue BridgeHuemasked debug info dumped to /var/lib/hoobs/lxhuebridge/homebridge-hue.json.gz
10.1.2022, 20:19:50LX Hue BridgeHuePhilips hue: 2 services
10.1.2022, 20:19:50LX Hue BridgeBridge is running on port 51826.
10.1.2022, 20:19:50LX Hue BridgeHuePhilips hue: event stream connected to https://192.168.178.20/eventstream/clip/v2

Debug Files

homebridge-hue.json.gz ***sorry not sure how to get the log file when I am using the HOOBS plugin

ebaauw commented 2 years ago

You need to set nativeHomeKitLights to false to expose lights already exposed by the Hue bridge, see the WIki.

Note that Sunricher actually fool the Hue bridge into thinking they're Hue lights, so you're only seeing the OSRAM plug.

ebaauw commented 2 years ago
8.1.2022, 23:20:03LX Hue BridgeHueWarnungPhilips hue: event stream error: TypeError: Cannot read properties of undefined (reading 'startsWith')
    at EventStreamClient.parseUpdate (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:230:26)
    at EventStreamClient.parseContainer (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:198:16)
    at IncomingMessage.<anonymous> (/var/lib/hoobs/lxhuebridge/node_modules/homebridge-hue/lib/EventStreamClient.js:162:26)
    at IncomingMessage.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at IncomingMessage.Readable.push (node:internal/streams/readable:228:10)
    at HTTPParser.parserOnBody (node:_http_common:141:24)
    at TLSSocket.socketOnData (node:_http_client:487:22)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)

Not too happy about this one. Homebridge Hue chokes on an event without an id_v1 attribute. Do you see this often?

lxheckel commented 2 years ago

Thanks for the quick help which solved the problem. Confusing though that not checking the "Hide HomeKit Lights" check box has a different result than explicitly saying "nativeHomeKitLights": false.

Regarding the error msg: I have seen this about twice in one week now.

ebaauw commented 2 years ago

Confusing though that not checking the "Hide HomeKit Lights" check box has a different result than explicitly saying "nativeHomeKitLights": false.

That’s Hoobs. I strongly recommend using a standard Homebridge installation.