# Bluetooth BlueZ Adapter

This extension supports Bluetooth access via BlueZ on Linux (ARMv6hf).

# Setup

Please note that at least BlueZ 5.43 is required, while 5.48 or above are not (yet) supported either.

Some settings are required to ensure that openHAB has access to Bluez. To allow openHAB to access Bluez via dbus you need to add the following entry within your dbus configuration in /etc/dbus-1/system.d/bluetooth.conf

  <policy user="root">
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>

and add openHAB to the "bluetooth" group.

sudo adduser openhab bluetooth

Also, in case you don't want to manually enable your bluetooth adapters with bluetoothctl, ensure that it's automatically enabled by setting the option AutoEnable in your /etc/bluetooth/main.conf to true. Restart running services for changes to take effect.

systemctl restart dbus
systemctl restart bluetooth
systemctl restart openhab2

# Supported Things

It defines the following bridge type:

Bridge Type ID Description
bluez A Bluetooth adapter that is supported by BlueZ

# Discovery

If BlueZ is enabled and can be accessed, all available adapters are automatically discovered.

# Bridge Configuration

The bluez bridge requires the configuration parameter address, which corresponds to the Bluetooth address of the adapter (in format "XX:XX:XX:XX:XX:XX"). Additionally, the parameter discovery can be set to true/false.When set to true, any Bluetooth device of which broadcasts are received is added to the Inbox.

# Example

This is how an BlueZ adapter can be configured textually in a *.things file:

Bridge bluetooth:bluez:hci0 [ address="12:34:56:78:90:AB", discovery=false ]