Deconz Raspbee stick breaks bluetooth

Hi all,

Wondering if anyone can shed any light on this. Setting up a new Hass.io install on a Pi 3B+. I have a conbee stick on the latest firmware. The Pi gives the stick a serial address of * /dev/ttyAMA0 without modifying config.txt with the suggested lines:

enable_uart=1
dtoverlay=pi3-miniuart-bt

However, Phoscon won’t connect to the stick. Adding the above lines gets it working, but in the process breaks bluetooth on the Pi. I get the following error:


Error looking up Bluetooth device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 289, in _gethcisock
    sock = _bt.hci_open_dev (device_id)
_bluetooth.error: no available bluetoot devices

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 108, in update_bluetooth_once
    result = bluetooth.lookup_name(mac, timeout=5)
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 61, in lookup_name
    sock = _gethcisock ()
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
    raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device

Without those lines, bluetooth tracker is fine and I get no errors.

I have tried a fresh install of Hass.io and same error. Removing the 2 lines from config.txt restores bluetooth but breaks the Raspbee stick again.

Anyone have any ideas?

Typically, I spent hours trying to work it out then 10mins after posting, fixed it!

For anyone who may find the above error, the fix was:

Only add the following line to config.txt:

enable_uart=1

Then the stick will be on the following serial address to add to the addon config:

/dev/ttyS0

What seems to happen is that the Pi uses /dev/tty/AMA0 for bluetooth, but the suggested config hijacks this for the Raspbee stick and pushes bluetooth to the above address. Only adding the one line leave Bluetooth where the Pi expects to find it and puts the Raspbee on the new address.

5 Likes

Thanksa lotf, this fixed it for me :slight_smile:!

Hi promithius,
I have the same problem so I followed your instructions:
I modified the config.txt file by putting only enable_uart = 1, then I installed deconz and on the configuration I put: /dev/ttyS0 but he always goes to look for the other port /dev/ttyAMA0 and I don’t understand why …

Hi @leovj , did you find a solution to this one?

No sorry, now i use ZHA…