Install Raspberry Pi OS Lite 64bit with the Raspberry Pi Imager.
Enable ssh with key authentication, change the host name, set the user password, the WiFi password. etc.
-
Boot the Pi.
-
Disable MAC randomization
In order for the router to be able to assign Pi a static IP.
In /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf:
[connection]
wifi.cloned-mac-address=preserve
[device]
wifi.scan-rand-mac-address=no
- Enable uart
This is RaspBee specific.
In /boot/firmware/config.txt:
enable_uart=1
dtparam=i2c_arm=on
dtparam=i2c_vc=on
#dtoverlay=miniuart-bt
dtoverlay=i2c-rtc,pcf85063
#force_turbo=1
#core_freq=250
#core_min_freq=250
Alternatively:
sudo raspi-config
Interface Options -> Serial Port:
- Would you like a login shell accessible over serial? → No
- Would you like the serial port hardware to be enabled? → Yes
It might be needed to disable the hciuart service:
sudo systemctl disable hciuart.service
- Update motd.
sudo vi /etc/motd
_ _ _
/\/\ __ _ | |(_) _ __ | | __ __ _
/ \ / _` || || || '_ \ | |/ / / _` |
/ /\/\ \| (_| || || || | | || < | (_| |
\/ \/ \__,_||_||_||_| |_||_|\_\ \__,_|
- Reboot.
- Install Home Assistant dependencies.
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install apparmor cifs-utils jq wget curl udisks2 libglib2.0-bin network-manager dbus systemd-journal-remote lsb-release nfs-common systemd-resolved -y
sudo apt --fix-broken install
sudo reboot
- Install docker.
See https://docs.docker.com/engine/install/debian/#install-using-the-repository
See https://docs.docker.com/engine/install/linux-postinstall/
Configure the journald logging driver in /etc/docker/daemon.json.
- Install Home Assistant OS agent.
https://github.com/home-assistant/os-agent/releases/latest
wget https://github.com/home-assistant/os-agent/releases/download/1.7.2/os-agent_1.7.2_linux_aarch64.deb
sudo dpkg -i os-agent_1.7.2_linux_aarch64.deb
rm os-agent_1.7.2_linux_aarch64.deb
https://github.com/home-assistant/supervised-installer
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo dpkg -i --ignore-depends=systemd-resolved homeassistant-supervised.deb
rm homeassistant-supervised.deb
Choose raspberrypi4-64 as a machine type, unless running a 32bit version of Raspberry Pi OS (in which case, select raspberrypi4).
- Enable apparmor in case it wasn't enabled.
sudo systemctl enable --now apparmor.service
Add the following parameters to the kernel boot parameters in /boot/firmware/cmdline.txt:
apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=0
- Reboot.
deCONZ can be installed as a Home Assistant addon via the UI. The addon needs to be configured to use /dev/ttyS0 (/dev/ttyAMA0 if miniuart-bt dtoverlay is enabled).
Any existing configuration needs to be put to /var/lib/homeassistant/addons/data/core_deconz/ (previously /usr/share/hassio/addons/data/core_deconz/.local/share/dresden-elektronik/deCONZ).