First up, thanks for DietPi and the great integrations.
I’ve been experimenting with Home Assistant and recently got a ZBT-2 adapter and some IKEA matter bits and it’s all working really nicely (HA core installed via DietPi and otbr-posix manually compiled and configured, matter-js python matter server docker image).
When upgrading HA I hit a couple of issues, unsure if these are things which are specific to my setup or which it would be helpful to have covered by the DietPi scripts, or indeed if all my approaches were correct. But sharing here in case they’re useful to others, or indeed to me next time I hit them!
(1) New version of pip
Running /opt/homeassistant/homeassistant-update.sh resulted in a message saying a new version of pip was available. So as covered in the docs I did a reinstall with
dietpi-software reinstall 157
(2) Installing ‘aioesphomeapi’
Errors were showing up in Home Assistant UI and in journalctl. Looking at the logs in /opt/homeassistant/.homeassistant/home-assistant.log helped find and troubleshoot them more clearly:
ModuleNotFoundError: No module named 'aioesphomeapi'
This was fixed by installing the Python Client for ESPHome native API which is used by Home Assistant into the home assistant environment with
sudo -u homeassistant uv pip install --directory /opt/homeassistant aioesphomeapi
(3) Installing turbojpeg library
RuntimeError: Unable to locate turbojpeg library automatically. You may specify the turbojpeg library path manually.
I tried a similar install first but that didn’t help, not sure if he first step was needed, but the error went after the second
sudo -u homeassistant uv pip install --directory /opt/homeassistant PyTurboJPEG
sudo apt install libturbojpeg0-dev
(3) Install libpcap
The next error was:
Cannot watch for dhcp packets without a functional packet filter: libpcap is not available. Cannot compile filter !
Another two step approach, again not sure if the first step was needed?
sudo -u homeassistant uv pip install --directory /opt/homeassistant libpcap
sudo apt install libpcap-dev
(4) Correct bluetooth capabilities
The final error in the logs was
Missing required permissions for Bluetooth management: Missing NET_ADMIN/NET_RAW capabilities for Bluetooth management. Automatic adapter recovery is unavailable. Add NET_ADMIN and NET_RAW capabilities to the container to enable it
Which was fixed as follows, some steps were just to find the correct path to the python binary
sudo apt-get install bluez libbluetooth-dev
cd /opt/homeassistant/
source .venv/bin/activate
readlink -f "$(which python3)"
/opt/homeassistant/.local/share/uv/python/cpython-3.14.5-linux-aarch64-gnu/bin/python3.14
sudo setcap 'cap_net_admin,cap_net_raw+eip' /opt/homeassistant/.local/share/uv/python/cpython-3.14.5-linux-aarch64-gnu/bin/python3.14