Skip to content

Bluetooth Issues

Donavan Becker edited this page Apr 18, 2023 · 5 revisions

List of Helpful BLE Issues

  • #425: Docker/Noble Issue
  • #511: Bluetooth HCI socket failing to download

For Docker:

For most systems, the Dbus socket is in /run/dbus. The socket must be available in the container for a Homebridge plugin to be able to connect to Dbus and access the Bluetooth adapter. When starting with docker run, this can be accomplished by adding -v /run/dbus:/run/dbus:ro to the command. If the Dbus socket is in /var/run/dbus on the host system, use -v /var/run/dbus:/run/dbus:ro instead.

If you are using Docker Compose, add something like the following (adjust as necessary) to your volumes section:

volumes:
  - /run/dbus:/run/dbus:ro

Steps that may help resolve BLE Issues From Issue #691

  1. SSH into the server
  2. cd /var/lib/homebridge/node_modules/@switchbot
  3. use ls -a to see all folders
  4. due to the failed update you will most likely have 2 folders there, one has a dot at the beginning which makes it invisible (that's why you need to use ls -a). Rename both folders with mv foldername foldername-backup
  5. open the Homebridge shell with sudo hb-shell
  6. install the bluetooth-hci-socket manually via npm i @abandonware/bluetooth-hci-socket. This will remove some SwitchBot Plugin files and folders, but don't worry.
  7. After finishing the installation, exit the hb-shell via exit
  8. The folder with the dot at the beginning needs to be renamed to homebridge-switchbot with mv .foldername-backup homebridge-switchbot
  9. Reboot time -> sudo reboot
  10. Use the Homebridge UI to update the Switchbot plugin and afterwards use ssh to restart the server again.
  11. Done

Helpful comments to resolve BLE Issues From Issue #713

First

Second

  • SSH into my Synology NAS and then;
sudo hb-shell
cd /volume1/homebridge/
npm i @abandonware/bluetooth-hci-socket
npm i @abandonware/noble

Exit the shell, return to Homebridge UI and update Switchbot. Successfully completes update to 2.5.3.

Third

  • In case anyone else is running into this issue and the fixes above didn't work for them, reinstalling Entware and the native BLE build dependencies did the trick for me.

  • It seems that sometime between my initial installation of the plugin and the most recent updates, something broke in my Entware environment that made the bluetooth-hci + noble builds fail.

Clone this wiki locally