-
-
Notifications
You must be signed in to change notification settings - Fork 53
Bluetooth Control
Ben edited this page Dec 16, 2021
·
31 revisions
-
Your system running Homebridge/HOOBS must have an available bluetooth module
-
Prerequisites for
noble
bluetooth package:If the bluetooth does not initially work then you may need to run these commands in the Homebridge terminal:
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev pi-bluetooth sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
The second command may need to be run in a direct SSH terminal to the Pi rather than the terminal in the Homebridge UI. Don't be too concerned if it doesn't work.
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
Unfortunately the bluetooth control does not work on the latest versions of macOS (even if
noble
is correctly installed). It seems that no discovered devices are reported to the plugin, see noble issue #225.See the noble documentation for instructions specific to your system.
- You need to enter your Govee username and password into the configuration
- You need to add an entry for your device in the 'Light Devices' configuration section with at least the device id and the 'Enable BLE Control' ticked
- The following steps assume that the unresponsive lights were setup following the guide on GitHub and show up in the Homebridge interface and the Home app.
- To find the correct bluetooth address you have to enable the debug log option in the plugin settings
- After enabling the setting and restarting Homebridge try to change the state of the connected light (for example: try turning on the unresponsive LED light strip).
- The log will show all bluetooth devices in range, log entries are marked with
[noble]
followed by the bluetooth address and an identifying name. - The tricky part is finding the right entry. The light strip should show up as
[ihoment_HXXXX_XXXX]
or[govee_HXXXX_XXXX]
. - Copy the bluetooth address and paste it in the light setup dialog in the plugin settings.
- After that restart Homebridge and everything should word flawlessly.
- Since bluetooth modules on a raspberry pi can only connect to a small number of devices at the same time, the plugin has been designed to make as 'little' use of the module as possible. Each time a device is updated in HomeKit, the plugin will attempt to connect via bluetooth to the device, apply the update, and disconnect again. The plugin does not maintain a long term bluetooth connection with a device.
- Bluetooth control can be temperamental - sometimes the connection can be ended before any update is applied.
- For models that also support cloud control, the plugin will try once to control via bluetooth, and if the attempt fails, the command will be sent via the cloud.
- For models that don’t support cloud control, the plugin will try three times to control via bluetooth, and unfortunately if all attempts fail, then a 'No Response' message will be shown in HomeKit.
- Bluetooth control seems more likely to fail when multiple commands are sent in a short space of time.
- For example, setting a HomeKit scene involving 2 devices means sending 6 commands in a short space of time (state/brightness/colour for both devices)
- The plugin cannot determine the current state of your device via the bluetooth connection
- If your model also allows for cloud control then the state of the device will be refreshed this way
- If your model only allows for bluetooth control then any changes to the state made outside of HomeKit will not be reflected in HomeKit
- The plugin will be unable to control your device via bluetooth whilst you have the device connected to a phone via bluetooth (i.e. using the Govee app)