bwp91 / homebridge-govee

Homebridge plugin to integrate Govee devices into HomeKit.
MIT License
466 stars 48 forks source link

Could not find control characteristic - child bridge restarts #286

Closed andyrooo82 closed 2 years ago

andyrooo82 commented 2 years ago

What issue do you have? Please be as thorough and explicit as possible.

Hi, I have a TV LED strip H6104 (in the logs called TV Lights) and a set of H6110 (in the logs called Bed Lights). The issue I'm having is with the TV Lights, the Bed Lights are working fine).

The TV Lights used to work absolutely fine but now when controlling through HomeKit (Home App or HomePod via Siri) the logs report that "Error: [TV Lights] could not find control characteristic" and the child bridge proceeds to restart. When controlling the TV Lights via the Govee app (controlling via bluetooth or wi-fi), the status in Homekit seems to update ok

What has also started happening is the logs state that "[TV Lights] skipping sync as device status not retrievable.". I note in the HomeBrige UI for the plugin under My Devices I don't see an entry for the Cloud Status like I do for the bed lights.

This just started happening out of blue, no update to the plugin or anything. I have tried setting up bluetooth using the guide and updated the config so that both lights have an entry for allowing Enable BLE Control to no avail. I have power cycled the lights and they do connect to the wi-fi ok. I have uninstalled the plugin, removed the bridge from HomeKit deleted the cached accessories from Homebrigde and reinstalled the plugin, this didn’t;t work either.

I have provided logs with Debug Logging enabled. The logs cover from when the child bridge starts, then the error, and a few more lines after that in case that helps.

Here is my config if that helps

{ "name": "Govee", "username": "*", "password": "**", "apiKey": "*****", "apiWhitelist": false, "debug": true, "lightDevices": [ { "label": "Bed Lights", "deviceId": "*****", "enableBT": true, "customAddress": "****" }, { "label": "TV Lights", "deviceId": "****", "enableBT": true, "customAddress": "**" } ],

Details of your setup.

Homebridge

Please paste any relevant logs below.


[29/07/2022, 18:41:37] [Govee] ✓ Setup complete. Thanks for using this plugin, I hope you find it helpful!
[29/07/2022, 18:41:56] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:41:56] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:42:16] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:42:16] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[7/29/2022, 6:42:21 PM] [EufySecurity-2.1.0-beta.10] INFO:  Looking for old cached accessories that seem to be outdated...
[7/29/2022, 6:42:21 PM] [EufySecurity-2.1.0-beta.10] INFO:  No outdated cached accessories found.
[29/07/2022, 18:42:36] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:42:36] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:42:56] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:42:56] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:43:14] [Homebridge UI] [homebridge-govee] Terminating child process...
[29/07/2022, 18:43:14] [Homebridge UI] [homebridge-govee] Child process ended
[29/07/2022, 18:43:16] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:43:16] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:43:28] [Govee] [TV Lights] [AWS] message event [{"msg":{"transaction":"y_1659116608841772","type":0,"cmdVersion":0,"cmd":"status"}}].
[29/07/2022, 18:43:29] [Govee] [Bed Lights] [AWS] message event [{"msg":{"transaction":"y_1659116608843452","type":0,"cmdVersion":0,"cmd":"status"}}].
[29/07/2022, 18:43:29] [Govee] [TV Lights] [AWS] message event [{"msg":{"transaction":"y_1659116608844116","type":0,"cmdVersion":0,"cmd":"status"}}].
[29/07/2022, 18:43:36] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:43:36] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:43:44] [Govee] [TV Lights] [AWS] message event [{"msg":{"transaction":"v_1659116624195797","data":{"val":1},"type":1,"cmdVersion":0,"cmd":"turn"}}].
[29/07/2022, 18:43:44] [Govee] [TV Lights] [AWS] receiving update [{"transaction":"v_1659116624195797","data":{"val":1},"type":1,"cmdVersion":0,"cmd":"turn","source":"AWS"}].
[29/07/2022, 18:43:44] [Govee] [TV Lights] current state [on].
[29/07/2022, 18:43:54] [Govee] [TV Lights] [AWS] message event [{"msg":{"transaction":"v_1659116634396221","data":{"val":0},"type":1,"cmdVersion":0,"cmd":"turn"}}].
[29/07/2022, 18:43:54] [Govee] [TV Lights] [AWS] receiving update [{"transaction":"v_1659116634396221","data":{"val":0},"type":1,"cmdVersion":0,"cmd":"turn","source":"AWS"}].
[29/07/2022, 18:43:54] [Govee] [TV Lights] current state [off].
[29/07/2022, 18:43:56] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:43:56] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:44:16] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:44:16] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:44:21] [Govee] [TV Lights] has been reported [offline] via API, so update may or may not be successful.
[29/07/2022, 18:44:21] [Govee] [TV Lights] [AWS] sending update {"msg":{"cmd":"turn","cmdVersion":0,"data":{"val":1},"transaction":"v_1659116661695000","type":1}}.
[29/07/2022, 18:44:21] [Govee] [TV Lights] [AWS] message event [{"msg":{"cmd":"turn","cmdVersion":0,"data":{"val":1},"transaction":"v_1659116661695000","type":1}}].
[29/07/2022, 18:44:21] [Govee] [TV Lights] [AWS] receiving update [{"cmd":"turn","cmdVersion":0,"data":{"val":1},"transaction":"v_1659116661695000","type":1,"source":"AWS"}].
[29/07/2022, 18:44:21] [Govee] [TV Lights] current state [on].
[29/07/2022, 18:44:22] [Govee] [TV Lights] starting update with params [{"cmd":1,"data":1}].
[29/07/2022, 18:44:22] [Govee] [TV Lights] starting timer.
[29/07/2022, 18:44:22] [Govee] [TV Lights] starting scan.
[29/07/2022, 18:44:22] [Govee] [noble] scanning started.
[29/07/2022, 18:44:22] [Govee] [TV Lights] scanning started.
[29/07/2022, 18:44:22] [Govee] [TV Lights] starting loop.
[29/07/2022, 18:44:22] [Govee] [noble] found device [25:65:2f:76:b2:20] [undefined].
[29/07/2022, 18:44:22] [Govee] [noble] found device [4a:74:95:20:b9:15] [undefined].
[29/07/2022, 18:44:22] [Govee] [noble] found device [a4:c1:38:98:d5:27] [ihoment_H6110_D527].
[29/07/2022, 18:44:22] [Govee] [noble] found device [78:9c:e7:0a:5c:cc] [ihoment_H6104_5CCC].
[29/07/2022, 18:44:22] [Govee] [TV Lights] has been reported [discoverable] via BLE.
[29/07/2022, 18:44:22] [Govee] [TV Lights] attempting to connect.
[29/07/2022, 18:44:22] [Govee] [noble] scanning stopped.
[29/07/2022, 18:44:22] [Govee] [noble] scanning started.
[29/07/2022, 18:44:22] [Govee] [TV Lights] has been reported [connected] via BLE.
[29/07/2022, 18:44:22] [Govee] [TV Lights] finding device characteristics.
[29/07/2022, 18:44:23] [Govee] [TV Lights] found some device characteristics.
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [2a00].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [2a01].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [2a04].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [2a50].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [000102030405060708090a0b0c0d2b12].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [ffab].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [ffe1].
[29/07/2022, 18:44:23] [Govee] [TV Lights] found different characteristic [ffe2].

/usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/service.js:56
      callback(null, characteristics);
      ^
Error: [TV Lights] could not find control characteristic
    at file:///usr/lib/node_modules/homebridge-govee/lib/connection/ble.js:139:19
    at /usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/peripheral.js:137:13
    at Service.<anonymous> (/usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/service.js:56:7)
    at Object.onceWrapper (node:events:642:26)
    at Service.emit (node:events:527:28)
    at Noble.onCharacteristicsDiscover (/usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/noble.js:423:13)
    at NobleBindings.emit (node:events:527:28)
    at NobleBindings.onCharacteristicsDiscovered (/usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:388:8)
    at Gatt.emit (node:events:527:28)
    at Object.callback (/usr/lib/node_modules/homebridge-govee/node_modules/@abandonware/noble/lib/hci-socket/gatt.js:515:12)
[29/07/2022, 18:44:23] [Govee] Child bridge process ended
[29/07/2022, 18:44:23] [Govee] Process Ended. Code: 1, Signal: null
[29/07/2022, 18:44:30] [Govee] Restarting Process...
[29/07/2022, 18:44:32] [Govee] Launched child bridge with PID 355
[29/07/2022, 18:44:32] Registering platform 'homebridge-govee.Govee'
[29/07/2022, 18:44:32] [Govee] Loaded homebridge-govee v5.2.0 child bridge successfully
[29/07/2022, 18:44:32] Loaded 2 cached accessories from cachedAccessories.0EB97C66767C.
[29/07/2022, 18:44:32] [Govee] Initialising plugin v5.2.0 | System linux | Node v16.16.0 | HB v1.5.0 | HAPNodeJS v0.10.2...
[29/07/2022, 18:44:32] [Govee] Plugin initialised. Setting up accessories....
[29/07/2022, 18:44:32] Homebridge v1.5.0 (HAP v0.10.2) (Govee) is running on port 45250.
[29/07/2022, 18:44:33] [Govee] Login successful.
[29/07/2022, 18:44:33] [Govee] HTTP/AWS clients enabled as Govee username and password provided.
[29/07/2022, 18:44:34] [Govee] API client enabled as Govee API key provided.
[29/07/2022, 18:44:34] [Govee] BLE client enabled as packages successfully found.
[29/07/2022, 18:44:34] [Govee] [TV Lights] if you notice any flickering when changing the brightness/colour, let me know on Discord/Github with model number [H6104].
[29/07/2022, 18:44:34] [Govee] [TV Lights] initialising with options {"adaptiveLightingShift":0,"aws":"enabled","bluetooth":"enabled","brightnessStep":1,"logging":"debug"}.
[29/07/2022, 18:44:34] [Govee] [TV Lights] initialised with id [9A:BB:78:9C:E7:0A:5C:CC] [H6104].
[29/07/2022, 18:44:34] [Govee] [Bed Lights] if you notice any flickering when changing the brightness/colour, let me know on Discord/Github with model number [H6110].
[29/07/2022, 18:44:34] [Govee] [Bed Lights] initialising with options {"adaptiveLightingShift":0,"aws":"enabled","bluetooth":"enabled","brightnessStep":1,"logging":"debug"}.
[29/07/2022, 18:44:34] [Govee] [Bed Lights] initialised with id [91:E2:A4:C1:38:98:D5:27] [H6110].
[29/07/2022, 18:44:34] [Govee] Increasing API polling to 20s due to amount of API devices.
[29/07/2022, 18:44:34] [Govee] [noble] stateChange: poweredOn.
[29/07/2022, 18:44:35] [Govee] [TV Lights] [AWS] connected event.
[29/07/2022, 18:44:35] [Govee] [Bed Lights] [AWS] connected event.
[29/07/2022, 18:44:35] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:44:35] [Govee] [Bed Lights] has been reported [online].
[29/07/2022, 18:44:35] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:44:36] [Govee] ✓ Setup complete. This plugin currently has a 5☆ rating on HOOBS! http://bit.ly/hb-govee-review
[29/07/2022, 18:44:55] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:44:55] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:45:15] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:45:15] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:45:35] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:45:35] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:45:55] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:45:55] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:46:15] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:46:15] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
[29/07/2022, 18:46:35] [Govee] [TV Lights] skipping sync as device status not retrievable.
[29/07/2022, 18:46:35] [Govee] [Bed Lights] [API] receiving update [{"source":"API","online":true,"powerState":"off","brightness":10,"color":{"r":255,"b":4,"g":74}}].
bwp91 commented 2 years ago

Hi @andyrooo82

Thanks for this report. Can you update to the beta version of the plugin? Whilst this error might occur again, it should no longer cause a restart of the bridge.

Thanks!

andyrooo82 commented 2 years ago

Yeah this seems to have done the trick. Thanks for your help and thanks for an awesome plug-in!!