kirichkov / home_assistant-ble

Companion application for home-assistant, sending bluetooth low energy detection
21 stars 4 forks source link

Provide instructions to run without being root #1

Open kamaradclimber opened 7 years ago

kamaradclimber commented 7 years ago

Common instructions (http://unix.stackexchange.com/questions/96106/bluetooth-le-scan-as-non-root) do not seem to work correctly.

We should have a way to run as non-root.

kirichkov commented 6 years ago

On Raspbian Jessie the common instructions used to work out of the box. In Stretch, one should install consolekit

$ sudo apt-get install consolekit

If you are still having issues on Raspbian try the following:

  1. Add the user (e.g. pi) that will be running the scanner to the bluetooth group:
sudo adduser pi bluetooth
  1. Edit /etc/dbus-1/system.d/bluetooth.conf 2.1. Find the line <policy group="bluetooth"> 2.2. Add below it <allow send_interface="org.freedesktop.DBus.Introspectable"/>