Hi there,
I have a problem with a snap running within an LXD container, the home-assistant-snap to be precise. The host system is Ubuntu 20.04, as is the container (`lxc launch ubuntu:20.04).
I am trying to pass through a SkyConnect USB dongle to the container. The dongle is actually a USB-UART device, and on the host machine appears as /dev/ttyUSB0
. Accordingly, I pass through the device using
$ lxc config device add homeassistant ttyUSB0 unix-char source=/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_9ccaf1470741ed11acce7ea7ccf2b06c-if00-port0 path=/dev/ttyUSB0 mode=666 gid=20
On the host machine, if I install the home-assistant-snap
and follow the instructions to enable hotplug, I can see the serial device pop up as a slot
$ snap interface serial-port
name: serial-port
summary: allows accessing a specific serial port
plugs:
- home-assistant-snap
slots:
- snapd:skyconnectv10 (allows accessing a specific serial port)
However, within the LXD container although the /dev/ttyUSB0
device is present, there are no slots shown
# snap interface serial-port
name: serial-port
summary: allows accessing a specific serial port
plugs:
- home-assistant-snap
thus any attempt to connect the Home Assistant to a serial-port slot fails. The result is that I cannot get Home Assistant to talk to the SkyConnect dongle.
Is this is restriction of the LXD container, or might I be missing a permissions thing?
Many thanks!