Open kaskoo opened 2 days ago
You didn't include the actual error message, just the stack trace. I assume it's something like "TypeError: Cannot read properties of null (reading 'startsWith')"?
Can you please run ph -DD eventlog
and list the event notification that triggers the error?
Assuming it's indeed the error I suspect, v0.14.4 should solve this. I would still very much want to see the notification.
Thank you for your quick response :) After a second look on config file, the hostname had disappeared from the config file. And the hostname of the hue bridge has changed with some 'fff' added in the middle of the hostname certificate.
Now with v0.14.4 has solved the problem with the hostname corrected. It is working.
Here is the result of ph -DD eventlog
homebridge@homebridge:/var/lib/homebridge $ ph -DD eventlog
ph: localhost: request 1: GET /config
ph: localhost: request 1: GET http://localhost/api/config
ph: localhost: request 1: GET /config
ph: warning: localhost: request 1: connect ECONNREFUSED 127.0.0.1:80
ph: fatal: localhost: not a Hue bridge
after I renewed the ApiKey and added the hostname in the command. I had all the bellow information :
ph: 192.168.0.26: request 1: GET /config
ph: 192.168.0.26: request 1: GET http://192.168.0.26/api/config
ph: 192.168.0.26: request 1: response: {"name":"Hue Bridge","datastoreversion":"172","swversion":"1967054020","apiversion":"1.67.0","mac":"00:17:88:24:10:00","bridgeid":"001788FFFE241000","factorynew":false,"replacesbridgeid":null,"modelid":"BSB002","starterkitid":""}
ph: 192.168.0.26: request 1: 200 OK
[Mon Nov 11 2024 14:19:04] request 1: GET /button
[Mon Nov 11 2024 14:19:04] request 1: GET https://192.168.0.26/clip/v2/resource/button
[Mon Nov 11 2024 14:19:04] request 1: response: {"errors":[],"data":[{"id":"1104ee2e-cbd0-4383-bd05-xx","id_v1":"/sensors/3","owner":{"rid":"449cc464-67ea-4608-bd5f-245f75feb61e","rtype":"device"},"metadata":{"control_id":4},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-10T23:36:31.875Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"15d23454-5453-4ef2-af80-28af88979d97","id_v1":"/sensors/3","owner":{"rid":"449cc464-67ea-4608-bd5f-245f75feb61e","rtype":"device"},"metadata":{"control_id":2},"button":{"last_event":"long_release","button_report":{"updated":"2024-11-10T22:02:47.531Z","event":"long_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"405defee-1d33-49e2-b114-ec94a46ae3dd","id_v1":"/sensors/41","owner":{"rid":"1089b45f-d2c2-4fca-a382-18e7d70d0b90","rtype":"device"},"metadata":{"control_id":4},"button":{"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"84eac82a-cf9b-4b98-ba50-c0795807d3f7","id_v1":"/sensors/41","owner":{"rid":"1089b45f-d2c2-4fca-a382-18e7d70d0b90","rtype":"device"},"metadata":{"control_id":2},"button":{"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"84fcd5b0-008f-47e8-86d3-66061dce891d","id_v1":"/sensors/36","owner":{"rid":"11c587b7-d920-427d-b5a3-a6b535c3ac7e","rtype":"device"},"metadata":{"control_id":4},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-09T15:37:18.997Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"8a191177-a0ee-4797-81e5-df660bf06820","id_v1":"/sensors/36","owner":{"rid":"11c587b7-d920-427d-b5a3-a6b535c3ac7e","rtype":"device"},"metadata":{"control_id":3},"button":{"last_event":"long_release","button_report":{"updated":"2024-11-10T21:08:44.233Z","event":"long_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"c70aaa33-c03f-43ca-b4c3-c088838fb103","id_v1":"/sensors/41","owner":{"rid":"1089b45f-d2c2-4fca-a382-18e7d70d0b90","rtype":"device"},"metadata":{"control_id":1},"button":{"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"e4fcc325-ef12-4eac-a381-04a3db8790ff","id_v1":"/sensors/41","owner":{"rid":"1089b45f-d2c2-4fca-a382-18e7d70d0b90","rtype":"device"},"metadata":{"control_id":3},"button":{"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"e868fad4-c5fd-4b6c-8ef6-be2df3862ae4","id_v1":"/sensors/36","owner":{"rid":"11c587b7-d920-427d-b5a3-a6b535c3ac7e","rtype":"device"},"metadata":{"control_id":1},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-11T07:51:01.389Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"eb763ce0-2916-4502-b227-a4dab85566d0","id_v1":"/sensors/3","owner":{"rid":"449cc464-67ea-4608-bd5f-245f75feb61e","rtype":"device"},"metadata":{"control_id":1},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-10T23:36:30.390Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"efc1d589-1cd1-4a5b-8853-ec0002ffa94b","id_v1":"/sensors/3","owner":{"rid":"449cc464-67ea-4608-bd5f-245f75feb61e","rtype":"device"},"metadata":{"control_id":3},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-10T23:30:10.277Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"},{"id":"fe19dc88-7a64-4efe-bc38-df063ed1c629","id_v1":"/sensors/36","owner":{"rid":"11c587b7-d920-427d-b5a3-a6b535c3ac7e","rtype":"device"},"metadata":{"control_id":2},"button":{"last_event":"short_release","button_report":{"updated":"2024-11-09T22:44:25.711Z","event":"short_release"},"repeat_interval":800,"event_values":["initial_press","repeat","short_release","long_release","long_press"]},"type":"button"}]}
[Mon Nov 11 2024 14:19:04] request 1: 200 OK
[Mon Nov 11 2024 14:19:04] request 2: GET /eventstream/clip/v2
[Mon Nov 11 2024 14:19:04] request 2: GET https://192.168.0.26/eventstream/clip/v2
[Mon Nov 11 2024 14:19:04] request 2: 200 OK
[Mon Nov 11 2024 14:19:04] listening on https://192.168.0.26/eventstream/clip/v2
[Mon Nov 11 2024 14:19:04] data: : hi
I only have a warning about a deprecated node function, but I think you are already aware of it :
(node:3212567) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Just for information, I always have the drifting warning every seconds (running home bridge on debian hosted in a ESXi, which is not overloaded). Appart of overloading the logs, it is a minor problem to me:
[11/11/2024 13:01:59] [Hue] heartbeat 399, drift 3584
[11/11/2024 13:01:59] [Hue] heartbeat 400, drift 2586
[11/11/2024 13:01:59] [Hue] heartbeat 401, drift 1587
[11/11/2024 13:01:59] [Hue] heartbeat 402, drift 588
[11/11/2024 13:02:35] [Hue] heartbeat 435, drift 3584
[11/11/2024 13:02:35] [Hue] heartbeat 436, drift 2586
[11/11/2024 13:02:35] [Hue] heartbeat 437, drift 1587
[11/11/2024 13:02:35] [Hue] heartbeat 438, drift 589
[11/11/2024 13:03:11] [Hue] heartbeat 471, drift 3585
[11/11/2024 13:03:11] [Hue] heartbeat 472, drift 2587
[11/11/2024 13:03:11] [Hue] heartbeat 473, drift 1588
[11/11/2024 13:03:11] [Hue] heartbeat 474, drift 589
heartbeat 399, drift 3584
This is a debug message that indicates that the heartbeat event didn't occur at the scheduled time, but 3.584 seconds late. Typically this happens when NodeJS is doing some blocking processing (like synchronous I/O) for another plugin, or, indeed, when the system is overloaded. Are you running Homebridge Hue in a separate child bridge?
Issue
I have the following exception every 5min since I updated to the v0.14.3 release.
Log Messages
Debug Files
{ "name": "Hue", "anyOn": true, "effects": true, "groups": true, "heartrate": 15, "lights": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "resource": true, "rules": false, "schedules": false, "sensors": false, "users": { "aa": "xx" }, "_bridge": { "username": "00", "port": 48270 }, "platform": "Hue" }