bwp91 / homebridge-govee

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

Light strips stopped working reliably after recent update #194

Closed dibsies closed 1 year ago

dibsies commented 2 years ago

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

A recent update seems to have messed up the reliability of bluetooth enabled light strips. Not sure if related, but everything seemed to work flawlessly before the update that called for an update of Node from 14.x to 16.x. I first reported some of these issues around the time that update was published (https://github.com/bwp91/homebridge-govee/issues/167#issue-1088038195 ).

An update was pushed that resolved the errors being displayed in the log, and functionality seemed to be restored. However, none of my light strips have worked reliably since. They seem to work for a bit after a fresh reboot of homebridge, but eventually they stop responding to commands from homekit and I see the following error in the log:

[18/01/2022, 19:20:29] [Govee] [Living Room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:165:15).
[18/01/2022, 19:20:29] [Govee] [Living Room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:165:15).
[18/01/2022, 19:20:29] [Govee] [Living Room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:165:15).

All devices continue to work through the Govee app.

Details of your setup.

Homebridge UI

Latest version

Raspberry Pi - Node.js Version | v16.13.2


homebridge-govee v4.27.0. The last time the plugin worked reliably (for me) was in the version before the update came out that required me to update node.

H6179 H6138 H613D

Please paste any relevant logs below.

[18/01/2022, 19:43:05] [Govee] [Living Room] not sending AWS update as not available or enabled.
[18/01/2022, 19:43:05] [Govee] [noble] scanning started.
[18/01/2022, 19:43:06] [Govee] [noble] found device [7c:a6:b0:5c:1f:fc] [GBK_H613D_1FFC].
[18/01/2022, 19:43:06] [Govee] [noble] found device [a4:c1:38:b4:bb:4f] [ihoment_H6138_BB4F].
[18/01/2022, 19:43:06] [Govee] [noble] scanning stopped.
[18/01/2022, 19:43:06] [Govee] [Living Room] has been reported [discoverable] via BLE.
[18/01/2022, 19:43:08] [Govee] [noble] scanning started.
[18/01/2022, 19:43:08] [Govee] [noble] found device [40:cb:c0:da:6f:ae] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] found device [15:83:a8:ca:67:aa] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] found device [a4:c1:38:a4:e5:88] [ihoment_H6179_E588].
[18/01/2022, 19:43:08] [Govee] [noble] found device [5a:41:13:bb:b1:52] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] found device [7b:79:52:26:76:24] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] found device [d0:03:4b:3a:33:10] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] found device [01:03:aa:00:09:18] [APM-0918].
[18/01/2022, 19:43:08] [Govee] [noble] found device [a4:c1:38:b4:bb:4f] [ihoment_H6138_BB4F].
[18/01/2022, 19:43:08] [Govee] [noble] found device [17:6e:5a:69:89:9f] [undefined].
[18/01/2022, 19:43:08] [Govee] [noble] scanning stopped.
[18/01/2022, 19:43:08] [Govee] [Living Room] has been reported [discoverable] via BLE.
[18/01/2022, 19:43:11] [Govee] [noble] scanning started.
[18/01/2022, 19:43:11] [Govee] [noble] found device [a4:c1:38:a4:e5:88] [ihoment_H6179_E588].
[18/01/2022, 19:43:11] [Govee] [noble] found device [7c:a6:b0:5c:1f:fc] [GBK_H613D_1FFC].
[18/01/2022, 19:43:11] [Govee] [noble] found device [d0:03:4b:3a:33:10] [undefined].
[18/01/2022, 19:43:11] [Govee] [noble] found device [a4:c1:38:b4:bb:4f] [ihoment_H6138_BB4F].
[18/01/2022, 19:43:11] [Govee] [noble] scanning stopped.
[18/01/2022, 19:43:11] [Govee] [Living Room] has been reported [discoverable] via BLE.
[18/01/2022, 19:43:13] [Govee] [Living Room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:165:15).
dibsies commented 2 years ago

Relevant startup logs: [18/01/2022, 19:47:06] Loaded plugin: homebridge-config-ui-x@4.41.5 [18/01/2022, 19:47:06] Registering platform 'homebridge-config-ui-x.config' [18/01/2022, 19:47:06] Loaded plugin: homebridge-govee@4.27.0 [18/01/2022, 19:47:06] Registering platform 'homebridge-govee.Govee' [18/01/2022, 19:47:08] [Govee] Initializing Govee platform... [18/01/2022, 19:47:08] [Govee] Initialising plugin v4.27.0 | Node v16.13.2 | HB v1.3.9 | HAPNodeJS v0.9.8... [18/01/2022, 19:47:09] [Govee] Login successful. [18/01/2022, 19:47:12] [Govee] Bluetooth hardware and packages found successfully. [18/01/2022, 19:47:12] [Govee] [GymLights] initialising with options {"adaptiveLightingShift":0,"bluetooth":"enabled","brightnessStep":1,"logging":"debug"}. [18/01/2022, 19:47:12] [Govee] [GymLights] initialised with id [F4:92:7C:A6:B0:5C:1F:FC] [H613D]. [18/01/2022, 19:47:12] [Govee] [Master Bedroom] initialising with options {"adaptiveLightingShift":0,"bluetooth":"enabled","brightnessStep":1,"logging":"debug"}. [18/01/2022, 19:47:12] [Govee] [Master Bedroom] initialised with id [D1:E1:A4:C1:38:A4:E5:88] [H6179]. [18/01/2022, 19:47:12] [Govee] [Gym] initialising with options {"adaptiveLightingShift":0,"bluetooth":"enabled","brightnessStep":1,"logging":"debug"}. [18/01/2022, 19:47:12] [Govee] [Gym] initialised with id [28:3B:A4:C1:38:91:08:16] [H6179]. [18/01/2022, 19:47:12] [Govee] [Living Room] initialising with options {"adaptiveLightingShift":0,"bluetooth":"enabled","brightnessStep":1,"logging":"debug"}. [18/01/2022, 19:47:12] [Govee] [Living Room] initialised with id [71:BE:A4:C1:38:B4:BB:4F] [H6138]. [18/01/2022, 19:47:12] [Govee] [noble] stateChange: poweredOn.

stale[bot] commented 2 years ago

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

miguelmanalo commented 2 years ago

I'm having the same issue. I also get the "BLE took too long" error on my TV LED H6181.

Just setup Homebridge and your plugin recently. Thanks for making it!

jnpatrick99 commented 2 years ago

I have the same issue. None of my Govee lights work anymore. Started with the recent update.

bwp91 commented 2 years ago

Can anyone install the beta version of the plugin to see if this has improved anything?

Thanks!

dibsies commented 2 years ago

@bwp91 - I will install tonight and report back after a few days of testing. 👍

dibsies commented 2 years ago

Unfortunately after testing the latest beta for ~24 hours, it appears that BLE devices still stop responding after a while. Not sure if important, but the logs show the same error, but the numbers at the end are now different:

[Govee] [Living Room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:171:15)

dibsies commented 2 years ago

I’ve been using v4.29.1-beta.1 for about two days now and it seems this may be fixed. I’ll follow up in a few days to confirm 👍

dibsies commented 2 years ago

It was still working last night, but today it required a restart to get it working again. Made it about 72 hours though before giving me trouble!

1PlusN commented 2 years ago

having the same BluetoothLED.deviceUpdate took too long issue on V4.30.0

[26/03/2022, 15:26:27] [Govee] [Play room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:171:15). [26/03/2022, 15:26:27] [Govee] [Play room] could not be updated as BLE took too long at BluetoothLED.updateDevice (/usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:171:15).

Write commented 2 years ago

Can this be related to these logs in my syslog ? (Only this plugin triggers this error message when I enable it) I got it a few hundreds of time when I enable BLE Support for my devices, and most of the time Bluetooth won't work. CleanShot 2022-03-27 at 09 00 31

bwp91 commented 2 years ago

For anyone who is still having bluetooth issues, can you make sure that the raspberry pi is fully up to date? from the homebridge terminal:

sudo apt update
sudo apt full-upgrade

and enter y when prompted. Restart the pi, then see if the bluetooth works

Write commented 2 years ago

Yes, this is fixed in the new kernel, forgot to update my post sorry and thanks a lot.

Skyminer999 commented 2 years ago

I'm having the same issue. I also get the "BLE took too long" error on my TV LED H6181.

Just setup Homebridge and your plugin recently. Thanks for making it!

me 2

dibsies commented 2 years ago

Not fixed for me. I've kinda just gotten used to restarting homebridge every other day.

brylee123 commented 2 years ago

Not fixed for me. I've kinda just gotten used to restarting homebridge every other day.

have you automated this process or do you manually restart? I am on the same boat

bwp91 commented 2 years ago

Not fixed for me. I've kinda just gotten used to restarting homebridge every other day.

have you automated this process or do you manually restart? I am on the same boat

Have you updated all your pi firmware?

brylee123 commented 2 years ago

Not fixed for me. I've kinda just gotten used to restarting homebridge every other day.

have you automated this process or do you manually restart? I am on the same boat

Have you updated all your pi firmware?

Yes I did: sudo apt update, then sudo apt full-upgrade then reboot. But now I see that there is currently an update (sorry, I must've missed it). I'll report back after the update if it happens in the next hour.

brylee123 commented 2 years ago
[06/06/2022, 16:07:41] [Govee] [Patio String Light] starting update with params [{"cmd":1,"data":0}].
[06/06/2022, 16:07:41] [Govee] [Patio String Light] starting timer.
[06/06/2022, 16:07:41] [Govee] [Patio String Light] starting scan.
[06/06/2022, 16:07:41] [Govee] [Patio String Light] scanning started.
[06/06/2022, 16:07:41] [Govee] [Patio String Light] starting loop.
[06/06/2022, 16:07:41] [Govee] [noble] found device [56:00:8b:84:24:8a] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [e4:7d:bd:d8:28:5d] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [f4:da:dc:5f:aa:55] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [5b:a3:64:f5:52:f1] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [6d:6d:ed:ea:87:cc] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [5e:f7:c2:eb:3b:a9] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [13:73:ab:65:aa:57] [undefined].
[06/06/2022, 16:07:41] [Govee] [noble] found device [a4:c1:38:6d:bc:63] [ihoment_H7002_BC63].
[06/06/2022, 16:07:41] [Govee] [Patio String Light] has been reported [discoverable] via BLE.
[06/06/2022, 16:07:41] [Govee] [Patio String Light] attempting to connect.
[06/06/2022, 16:07:42] [Govee] [Patio String Light] has been reported [connected] via BLE.
[06/06/2022, 16:07:42] [Govee] [Patio String Light] finding device characteristics.
[06/06/2022, 16:07:42] [Govee] [Patio String Light] has been reported [disconnected] via BLE [undefined].
[06/06/2022, 16:07:49] [Govee] [Patio String Light] could not be updated as BLE took too long at default.updateDevice (file:///usr/local/lib/node_modules/homebridge-govee/lib/connection/ble.js:192:15).
dibsies commented 2 years ago

Not fixed for me. I've kinda just gotten used to restarting homebridge every other day.

have you automated this process or do you manually restart? I am on the same boat

Have you updated all your pi firmware?

Fully updated here as well, and no, I did not automate the process of restarting hb. I actually ended up disabling the plugin as less tech-savvy members of my household were getting frustrated. I set up scenes in common areas to switch on light strips placed as tv backlighting, but the plugin would almost always stop working for bluetooth commands by the time we went to turn the lights off. Those in my house who don't have the Govee app were getting irritated with having to use the physical power buttons behind the televisions to turn things off at night. First-world problems for sure...lol. I would love to use this plugin again one day if this bug ever gets squished!

texanman commented 2 years ago

Been having this same issue too. Been following this and other reports to try to fix this same sort of problem. Tried this both through a VM then eventually on a Rock64 with the same dongle. The rock64 is working much better as it did eventually got a little further after a few hours. The first section was what I usually happened but then tried it a few minutes later and was when it got further today.

[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] not sending AWS update as not available or enabled.
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] starting update with params [{"cmd":4,"data":255}].
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] starting timer.
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] starting scan.
[8/29/2022, 4:03:06 AM] [Govee] [noble] scanning started.
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] scanning started.
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] starting loop.
[8/29/2022, 4:03:06 AM] [Govee] [noble] found device [7c:a6:b0:64:11:56] [GBK_H6143_1156].
[8/29/2022, 4:03:06 AM] [Govee] [noble] found device [c5:32:32:36:32:8f] [Govee_H6102_328F].
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] has been reported [discoverable] via BLE.
[8/29/2022, 4:03:06 AM] [Govee] [Under Desk] attempting to connect.
[8/29/2022, 4:03:06 AM] [Govee] [noble] found device [ed:ed:d3:da:a7:09] [98E782CF42BE3394E9].
[8/29/2022, 4:03:06 AM] [Govee] [noble] scanning stopped.
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] could not find device [c5:32:32:36:32:8f].
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] not sending AWS update as not available or enabled.
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] starting update with params [{"cmd":1,"data":1}].
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] starting timer.
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] starting scan.
[8/29/2022, 4:03:13 AM] [Govee] [Under Desk] could not be updated as BLE took too long at default.updateDevice (file:///var/lib/homebridge/node_modules/homebridge-govee/lib/connection/ble.js:216:15).

[8/29/2022, 4:05:47 AM] [Govee] [noble] found device [c5:32:32:36:32:8f] [Govee_H6102_328F].
[8/29/2022, 4:05:47 AM] [Govee] [Under Desk] has been reported [discoverable] via BLE.
[8/29/2022, 4:05:47 AM] [Govee] [Under Desk] attempting to connect.
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] not sending AWS update as not available or enabled.
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] starting update with params [{"cmd":1,"data":1}].
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] starting timer.
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] starting scan.
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] could not be updated as  at file:///var/lib/homebridge/node_modules/homebridge-govee/node_modules/p-queue/dist/index.js:16:22.
[8/29/2022, 4:06:28 AM] [Govee] [Kitchen accent 1] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [Bedroom Tower Fan] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [Office lamp] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [Kitchen Accent 2] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [TV bars] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [Office wallpanel 1] [AWS] reconnect event
[8/29/2022, 4:06:28 AM] [Govee] [Under Desk] could not find device [c5:32:32:36:32:8f].
bwp91 commented 1 year ago

Closing this as a bit overwhelmed with issues. Please update to the beta version of the plugin, and if you are still having issues, do reopen this ticket! Thanks and apologies if closing prematurely.