DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

Home-Assistant runtime error {minor}

Open MDAR opened this issue 3 months ago • 1 comments

Creating a bug report/issue

  • [YES] I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=17 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng' G_LIVE_PATCH_STATUS[0]='not applicable'

  • Distro version | Bookworm

  • Kernel version | Linux Velbus-C4 6.12.46-current-meson64 #1 SMP PREEMPT Tue Sep 9 16:58:27 UTC 2025 aarch64 GNU/Linux

  • SBC model | Odroid C4

  • Power supply used | 15V 3Amp

  • SD card used | 16Gb eMMC

Additional Information (if applicable)

  • Software title | Home-Assistant
  • software title installed freshly
  • Can this issue be replicated on a fresh installation of DietPi? Seen this on three fresh machines

Steps to reproduce

Install Home-Assistant on a fresh / vanilla machine systemctl status home-assistant

Expected behaviour

No start up errors

  • ...

Actual behaviour

Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:   File "/home/homeassistant/.pyenv/versions/3.13.7/lib/python3.13/site-packages/turbojpeg.py", line 301, in __init__
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:     self.__find_turbojpeg() if lib_path is None else lib_path)
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:     ~~~~~~~~~~~~~~~~~~~~~^^
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:   File "/home/homeassistant/.pyenv/versions/3.13.7/lib/python3.13/site-packages/turbojpeg.py", line 974, in __find_turbojpeg
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:     raise RuntimeError(
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:     ...<2 lines>...
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]:         'e.g. jpeg = TurboJPEG(lib_path)')
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]: RuntimeError: Unable to locate turbojpeg library automatically. You may specify the turbojpeg library path manually.
Sep 28 11:16:31 Velbus-C4 Home Assistant[1601]: e.g. jpeg = TurboJPEG(lib_path)
Sep 28 11:16:44 Velbus-C4 Home Assistant[1601]: 2025-09-28 11:16:44.286 ERROR (SyncWorker_6) [aiodhcpwatcher] Cannot watch for dhcp packets without a functional packet filter: libpcap is not available. Cannot compile filter !

Extra details

To resolve

apt install libpcap0.8 libpcap08-dev

MDAR avatar Sep 28 '25 20:09 MDAR

The TurboJPEG "error" has been discussed here: https://dietpi.com/forum/t/home-assistant-causing-dietpi-to-hung/23703/18?u=michaing

Could make sense to install the missing library if you actually use a camera integration with snapshot functionality.

Regarding the aiodhcpwatcher (libpcap-dev): Do you actually want/need HA to watch for DHCP offers? This is usually something the host system (and only the host system) should take care of. But there might be as well specific integrations which make use of DHCP to connect through separate networks to specific smart home devices. I remember there was such a case.

So generally, we do not install each and every library HA is trying to load OOTB. It tries to load a lot of things which are only needed in a minority of cases for specific integrations, same with e.g. FFmpeg.

I guess it makes sense that we expand our docs in these regards, listing known errors, in which case it makes sense to install the additional packages, and which one. There is a tab with a similar purpose already: https://dietpi.com/docs/software/home_automation/#home-assistant-known-additional-dependencies-for-device-integration

libpcap0.8 alone was not sufficient to mute the aiodhcpwatcher error? If it really requires the development headers to compile something, then use libpcap-dev at best, which is assured to always pull in the correct version of the library, e.g. when you do a distro upgrade to Debian Trixie.

MichaIng avatar Oct 06 '25 22:10 MichaIng