Work in progress: configuration for running a Home Assistant in containers with systemd and podman on Fedora IoT

No, I don’t see much related to it in the logs, but I consistently see the change in attributes after the zWaveJS2MQTT daemon tries to open then /dev/zwave which is mapped on invocation. This is the way I’m starting the container:

podman run --name=zwavejs --cgroups=no-conmon --rm --sdnotify=conmon --replace --group-add keep-groups --userns=keep-id -it -p 192.168.1.2:8091:8091 -p 192.168.1.2:3000:3000 --device=/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave:rw -e TZ=“Europe/Stockholm” -v /var/run/dbus:/var/run/dbus:ro -v /etc/timezone:/etc/timezone:ro -v /etc/zwavejs:/usr/src/app/store --label io.containers.autoupdate=registry docker.io/zwavejs/zwave-js-ui:latest

and the user podman is a member of dialout group and I have /dev/ttyACM0 (which is the one the id points to) with the following attributes:

crw-rw---- 1 root dialout 166, 0 Apr 11 15:20 /dev/ttyACM0

I’m baffled by this… I have 8 other containers working flawlessly in rootless mode, but I can’t make ZWaveJS or HomeAssistant work, since they need access to USB

thanks anyway!

I found a workaround after asking on reddit. Here comes the answer:

Hmmm, maybe there is a newer podman thing here?

Hey there, I’m hoping you’re still helping folks get this working with Fedora and Podman. The following was working for me on Fedora 39:

podman run -dt --pod homeassistant --device=/dev/ttyACM0:/dev/zwave -v zwavejs2mqtt:/usr/scr/app/store --name zwavejs zwavejs/zwavejs2mqtt:latest

since updating to Fedora 41, I get a failure to open the serial port error from zwavejs.

I have run

setsebool -P container_use_devices=true

I’m not getting any selinux errors.

In order to try and get this to work, I’ve been modifying based on what you have above and:

podman run -dt --pod homeassistant --cgroups=no-conmon --sdnotify=conmon --group-add keep-groups --device=/dev/ttyACM0:/dev/zwave:rw -v zwavejs2mqtt:/usr/scr/app/store --name zwavejs zwavejs/zwavejs2mqtt:latest

I’m running as root and:

groups

root dialout

Thoughts and ideas on making this work?