Home Assistant on Raspberry Pi with RaspBee II installation

Good day! I’m completely new to the Raspberry pi/home assistant world and have been trying to come up with ways of solving the problem below by myself. Unfortunately it hasn’t given the result I’ve been hoping for and wonder if you could help me. I’ll try to list my solutions as detailed as possible in hopes of being helped. Thanks in advance!

I’ve been trying to install home assistant (hass.io) on my Raspberry Pi 3B (headless – no monitor or keyboard) with the Raspbee module. I plan on using the Philips Hue bridge and app for the frequent used lights and the home assistant app and Raspbee/Deconz/Phoscon for Tradfri lights together with third party sensors such as the Xiaomi Aqara doorsensors which I shouldn’t have to operate frequently.


  • Raspberry Pi 3B+ Headless

  • RaspBee II

  • About 15 Hue lights

  • About 15 Tradfri lights

  • Hue bridge operational

  • Tradfri bridge (not operational)


  • As stated below

So far I’ve tried using the following strategies:

1. Docker/Portainer setup:

First, after some research, I thought I’d setup the Raspberry Pi through portainer so I could, if I wanted to in the future, add on more programs. I’ve installed Portainer on my freshly installed Raspberry Pi using the following instructions: (link: https://www.wundertech.net/how-to-setup-a-raspberry-pi-zero-without-a-monitor-keyboard-or-mouse/)

  • After that I’ve made the Raspberry Pi IP-adress static

  • Connect docker trough Portainer (‘ip-adres’:9000) (poort 9000) (in browser)

  • Connect to home-assistant via:’ ip-adress’:8123 (port 8123) (in browser)

  • Connect to deCONZ via ‘ip-adres’:80 (port 80)

So I’ve managed to setup home assistant and deCONZ through portainer/docker and everything seems to work. The following problems follow.


1A: No supervisor setup of home assistant possible when installing home assistant through portainer/docker setup. That way it’s not possible to install the DeCONZ add-on through the add-on library. There is the possibility to install an integration but that way it’s impossible to look for ZigBee components (lamps/sensors).

1B: Through this docker/portainer installation of DeCONZ it wasn’t possible make deCONZ recognize the Raspbee hardware.

2. Home assistant installation:

Because I figured out that I need a supervisor setup of Home Assistant I followed the following instructions (Link: Raspberry Pi - Home Assistant) and setup my home automation through onboarding. After that, all my hue lights can be discovered and operated. It’s also possible to install the deConz add-on. Tradfri lights however, cannot be discovered.

I’ve followed the following instructions:

  1. Flash new image to SD, insert and boot my RP4.

  2. Connect to RP4 using hassio.local:8123

  3. Add deCONZ add-on and followed configuration steps.

  4. Turn off Hue and IKEA hubs.

  5. Reset lights to factory settings (both Hue and IKEA)

  6. Click on ´Open Web UI´ in the deCONZ add-on to add lights.

(Link: Unable to detect lights using deCONZ)

And after that also with the (headless) raspbian buster (link: RaspBee SD-card images)

Problem –

2A This problem stated by ‘alex4p’ and solved by ‘Vasco’ doesn’t work and I think it’s because I need a non-headless setup. Bottom line is that the deconz add-on does not recognize any tradfri lamps.

3. SSH setup:

Here I’ve installed Raspbian on a clean SSD and enabled SSH. Through SSH I’ve tried to install Home assistant (Raspberry Pi - Home Assistant) and Deconz/Phoscon (RaspBee II Installation) simultaneous.

Problem –

3A: Simultaneous installation is not possible through SSH because it overwrites the other program. And if it doesn’t, I don’t have a way to let them both communicate.

I’ve broken my head multiple times over this problem and keep coming back to the fact that I might need to do an installation with raspbee monitor. Is there an instruction that I’m missing? If so, I would love to be pointed in the right direction!

Can somebody point me towards instructions as to the setup I’m trying to accomplish?

Thanks in advance!

That looks like its been updated to the recent changes. It’s definitely possible to do a docker/supervisor install. I just add portainer in between the docker and HA install bits.

Thank you for your response. This way of installing did work although it didn’t allow me to use the Raspbee.

As I should have mentioned in my original post, installing portainer/docker/homassistant (supervised/original) did not enable me to use the Raspbee because the Raspberry Pi bluetooth pins are still active. Apparently I should deactivate them as per (link: Zha can't connect to freshly installed RaspBee II on RPi 4B / RaspBee II seems not available) This is not possible because the before mentioned ways don’t allow me to acces the Raspberry Pi config.txt.

If this post becomes to entangled I’ll delete it and make a new one.

docker/supervisor still allows you to access raspi-config or /boot/config.txt. That’s kind of the point of that type of install, You still have access to the underlying OS.

You should be able to using putty/console

sudo nano /boot/config.txt

to add the changes you need.

Thank you for your fast responses. I’ve followed these steps and got the supervised home assistant running with deConz add-on and disabled the Bluetooth as per instructed. Still no luck.

So far, so good.

  • In the Deconz add-on:

  • In preferences selected /dev/ttyS0 as the RaspBee II location

  • After that through the deConz add-on à webGUI à Phoscon I try to add the lights following the instructions with no luck.

  • Check again if confix.txt has:

(With a blank line following)

  • Reboot
  • Configure user access rights of the serial interface. SSH into raspberry pi. Sudo raspi-config.
  • Interfacing Options → Serial
  • Would you like a login shell accessible over serial? → No
  • Would you like the serial port hardware to be enabled? → Yes
  • Reboot

Try to discover new lights: Still no luck.

Ok so I don’t actually have rasbee…
Just putting that out there.


Although as post one states in that other thread, that shouldn’t matter…

Then ttyAMA0 instead of ttyS0
And zha instead of deConz

It doesn’t look like they got deconz working.

The other thread will probably be more helpful.

There was a post around post 35 that had some other config to try also.

Good luck

Just wanted to add here as I’ve had similar issues trying to get me RaspBee II running smoothly on a Raspberry Pi 4 4GB, running HA in container. And this thread was always the one I got back to, so figured I’ll update here.
My zigbee test units that I wanted to add in HA is one EVA Meter Reader and one Apex Smart Plug.

At first I started up using the deConz container as a gateway between RaspBee II and HA container. In that scenario I was able to get it working be removing the BT as described above adding dtoverlay=disable-bt in /boot/config.txt.
However the deConz container didn’t detect my Eva meter, and only detected the Apex smart plug as a on/off switch.

So what I ended up with was to disable the deConz container and forwarding the RaspBee2 device to the HA container (Same way as for the deConz container: device=/dev/ttyAMA0).
Then enabling the ZHA integrations in HA it self. With the BT allready off, ZHA detected my RaspBee2 fine, and from there I added my two devices.
Eva Meter reader and Apex Smart Plug came up with all expected values and integrated fine in HA.

My setup for this testing:

  • Raspberry Pi 4 4GB (Raspbian 11 (bullseye) - 32bit version)
  • RaspBee II
  • Docker version 20.10.18
  • Container: Portainer.io (Docker Container WebUI)
  • Container: Home Assistant Container - v 2022.9.6

I am running on Raspberry Pi 4 8GB (Raspbian 11 (bullseye) - 64bit version) on docker 20.10.19 and installed HA 2022.12.6 with forwarded device=/dev/ttyAMA0 and updated dtoverlay=disable-bt in /boot/config.txt

ZHA offer me device=/dev/ttyAMA0, but affter select this device it ask me imidietly for manufacturer(if I upload directly to flash HA image without docker, it take longer time and is ZHA succesly added, on docker not)

In docker log are this error

homeassistant    | /usr/lib/python3.10/site-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from rpigpio: No module named 'RPi'
homeassistant    |   warnings.warn(
homeassistant    | /usr/lib/python3.10/site-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
homeassistant    |   warnings.warn(
homeassistant    | /usr/lib/python3.10/site-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from rpio: No module named 'RPIO'
homeassistant    |   warnings.warn(
homeassistant    | /usr/lib/python3.10/site-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from pigpio: failed to connect to localhost:8888
homeassistant    |   warnings.warn(
homeassistant    | /usr/lib/python3.10/site-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from native: unable to open /dev/gpiomem or /dev/mem; upgrade your kernel or run as root
homeassistant    |   warnings.warn(
homeassistant    | 2022-12-16 08:59:11.298 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
homeassistant    | Traceback (most recent call last):
homeassistant    |   File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
homeassistant    |     result = self.fn(*self.args, **self.kwargs)
homeassistant    |   File "/usr/lib/python3.10/site-packages/zigpy_zigate/common.py", line 84, in set_pizigate_running_mode
homeassistant    |     gpio0 = UnclosableOutputDevice(pin=GPIO_PIN0, initial_value=None)
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/devices.py", line 108, in __call__
homeassistant    |     self = super(GPIOMeta, cls).__call__(*args, **kwargs)
homeassistant    |   File "/usr/lib/python3.10/site-packages/zigpy_zigate/common.py", line 27, in __init__
homeassistant    |     super().__init__(
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/output_devices.py", line 83, in __init__
homeassistant    |     super(OutputDevice, self).__init__(pin, pin_factory=pin_factory)
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/mixins.py", line 85, in __init__
homeassistant    |     super(SourceMixin, self).__init__(*args, **kwargs)
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/devices.py", line 540, in __init__
homeassistant    |     super(GPIODevice, self).__init__(**kwargs)
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/devices.py", line 250, in __init__
homeassistant    |     Device.pin_factory = Device._default_pin_factory()
homeassistant    |   File "/usr/lib/python3.10/site-packages/gpiozero/devices.py", line 291, in _default_pin_factory
homeassistant    |     raise BadPinFactory('Unable to load any default pin factory!')
homeassistant    | gpiozero.exc.BadPinFactory: Unable to load any default pin factory!

any idea what it mean?