homebridge-plugins / homebridge-govee

Homebridge plugin to integrate Govee devices into HomeKit.
MIT License
481 stars 49 forks source link

Bluetooth Device not found #403

Closed dmunky168 closed 8 months ago

dmunky168 commented 1 year ago

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

Fresh install of Govee plugin. I followed the Bluetooth Control document to scan to find out the bluetooth address of the H6181 but nothing is found. I also check with my phone and laptop and the H6181 is not discoverable; only through the Govee app. Not sure if I am doing something wrong. Thanks!

Details of your setup.

Please paste any relevant logs below.

[27/12/2022, 20:47:15] [Govee] [HTTP] client enabled and found 2 device(s).
[27/12/2022, 20:47:16] [Govee] [AWS] client enabled.
[27/12/2022, 20:47:16] [Govee] [AWS] connect event.
[27/12/2022, 20:47:17] [Govee] [API] client enabled and found 0 device(s).
[27/12/2022, 20:47:17] [Govee] [BLE] client enabled.
[27/12/2022, 20:47:17] [Govee] [H6181_F06E] initialising with options {"adaptiveLightingShift":0,"aws":"unsupported","ble":"enabled","brightnessStep":1,"colourSafeMode":false,"lan":"unsupported"}.
[27/12/2022, 20:47:17] [Govee] [H6181_F06E] initialised with id [6B:AF:A4:C1:38:6F:F0:6E] [H6181].
[27/12/2022, 20:47:17] [Govee] [Smart Thermometer] initialising with options {"lowBattThreshold":20}.
[27/12/2022, 20:47:17] [Govee] [Smart Thermometer] initialised with id [92:B0:A4:C1:38:98:41:A8] [H5102].
[27/12/2022, 20:47:18] [Govee] [BLE] stateChange: poweredOn.
[27/12/2022, 20:47:18] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:47:18] [Govee] [Smart Thermometer] has been reported [offline].
[27/12/2022, 20:47:18] [Govee] [Smart Thermometer] current battery [63%].
[27/12/2022, 20:47:18] [Govee] [Smart Thermometer] current temperature [20.1°C / 68.2°F].
[27/12/2022, 20:47:18] [Govee] [Smart Thermometer] current humidity [27.7%].
[27/12/2022, 20:47:19] [Govee] ✓ Setup complete. Have a feature request? Visit https://bit.ly/hb-govee-issues to ask!
[27/12/2022, 20:47:48] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:48:18] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:48:48] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:49:18] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:49:27] [Govee] [H6181_F06E] starting update with params [{"cmd":4,"data":255}].
[27/12/2022, 20:49:27] [Govee] [H6181_F06E] starting timer.
[27/12/2022, 20:49:27] [Govee] [H6181_F06E] starting scan.
[27/12/2022, 20:49:27] [Govee] [BLE] scanning started.
scanStart
[27/12/2022, 20:49:27] [Govee] [H6181_F06E] scanning started.
[27/12/2022, 20:49:27] [Govee] [H6181_F06E] starting loop.
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] could not find device [a4:c1:38:6f:f0:6e].
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] not using BLE connection as BLE took too long.
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] starting update with params [{"cmd":1,"data":1}].
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] starting timer.
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] starting scan.
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] could not be updated as no connection method available at file:///usr/local/lib/node_modules/homebridge-govee/lib/platform.js:1872:13.
[27/12/2022, 20:49:35] [Govee] [BLE] scanning started.
scanStart
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] scanning started.
[27/12/2022, 20:49:35] [Govee] [H6181_F06E] starting loop.
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] could not find device [a4:c1:38:6f:f0:6e].
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] not using BLE connection as BLE took too long.
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] starting update with params [{"cmd":1,"data":1}].
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] starting timer.
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] starting scan.
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] could not be updated as no connection method available at file:///usr/local/lib/node_modules/homebridge-govee/lib/platform.js:1872:13.
[27/12/2022, 20:49:42] [Govee] [BLE] scanning started.
scanStart
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] scanning started.
[27/12/2022, 20:49:42] [Govee] [H6181_F06E] starting loop.
[27/12/2022, 20:49:48] [Govee] [Smart Thermometer] [HTTP] receiving update {"source":"HTTP","battery":63,"temperature":2010,"humidity":2770,"online":false}.
[27/12/2022, 20:49:49] [Govee] [H6181_F06E] could not find device [a4:c1:38:6f:f0:6e].
[27/12/2022, 20:49:49] [Govee] [H6181_F06E] not using BLE connection as BLE took too long.
[27/12/2022, 20:49:49] [Govee] [H6181_F06E] could not be updated as no connection method available at file:///usr/local/lib/node_modules/homebridge-govee/lib/platform.js:1872:13.
dmunky168 commented 1 year ago

Updated to the latest version v7.9.0, node 18.13.0 and npm 9.3.1 and I am getting a new error:

[21/01/2023, 22:53:27] [Govee] [HTTP] retrieved access token from cache.
[21/01/2023, 22:53:28] [Govee] [HTTP] client enabled and found 2 device(s).
[21/01/2023, 22:53:30] [Govee] [AWS] client enabled.
[21/01/2023, 22:53:31] [Govee] [AWS] connect event.
[21/01/2023, 22:53:32] [Govee] [API] client enabled and found 0 device(s).
[21/01/2023, 22:53:32] [Govee] [BLE] disabling client as Cannot find module '../build/Release/bluetooth_hci_socket.node'
Require stack:
- /usr/local/lib/node_modules/homebridge-govee/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js
- /usr/local/lib/node_modules/homebridge-govee/node_modules/@abandonware/bluetooth-hci-socket/index.jsRequire stack:.
[21/01/2023, 22:53:32] [Govee] [H6181_F06E] will be visible but uncontrollable as BLE not available.

In terminal, using bluetoothctl and scan on, I can detect other bluetooth device in the area so no issue with bluetooth.

k-angama commented 9 months ago

I encountered the same issue. I need to update @abandonware/bluetooth-hci-socket directly within the homebridge-govee module.

cd /usr/local/lib/node_modules/homebridge-govee/
npm install @abandonware/bluetooth-hci-socket

It worked for me!