Docker having to manually add "pip install bluepy"

Can this be added to the image? Or is there a correct way to load this so that it survives an upgrade?

When I enabled Bluetooth tracking, it automatically downloaded the necessary files into my config directory. I never had to install anything in Docker, as that’s kind of the point

1 Like

thanks for the answer, don’t use bluetooth tracking but will enable to get bluepy that I use with a switchbot to turn on water heater

If I do that I get

May 04 2018 22:40:52 GMT+0100 (BST)

Error setting up platform bluetooth_tracker
Traceback (most recent call last):
File “/usr/src/app/homeassistant/components/device_tracker/init.py”, line 184, in async_setup_platform
disc_info)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/device_tracker/bluetooth_tracker.py”, line 35, in setup_scanner
import bluetooth
ModuleNotFoundError: No module named ‘bluetooth’

What’s your host OS? I had to install bluez and run bluetoothctl to get the Bluetooth to turn on on the host

Synology nas

out of interest the miflora Xiaomi Bluetooth flower addon works.

I saw another mention in another thread about bluepy being an issue with docker for some reason.

You might have to create your own docker image, from your own dockerfile.

Hi @ladaowner

Did you manage to get switchbot work with HA? I assume you are running HA in docker environment? I have the same setup…but struggling with getting switchbot to work with HA in docker

  1. get Mac from app
  2. enter mac into switch bot code
  3. get shell prompt into docker image (I use Synology and run commmand sh to get to shell)
    then run

pip install bluepy

1 Like