Skip to content

Commit f5e4434

Browse files
committed
fix(lva-peripheral): pass GPIO/SPI GIDs to the peripheral container
docker compose's ``group_add`` resolves names against the container's /etc/group, but the python:slim base used by the respeaker peripheral doesn't define ``gpio`` or ``spi``. Container start failed with ``Unable to find group gpio: no matching entries in group file``, which then cascaded into HA reporting ``Unable to connect to the ESPHome device`` because LVA's ESPHome API never came up. Pass numeric GIDs with sensible defaults for a stock Raspberry Pi OS install (gpio=986, spi=989); users on other distros can override via .env. Caught during the first hardware smoke test on a Pi 3 + ReSpeaker 2-Mic HAT v2. Same fix has already landed upstream on the LVA branch (genericJE/linux-voice-assistant feat/peripheral-led-light-entity) in commit f200720, so this only patches PiCompose's own deployment copy of docker-compose.yml.
1 parent 3de4cb7 commit f5e4434

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

03-stage-lva-2mic-peripheral/01-lva-peripheral/files/lva-peripheral/docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,13 @@ services:
8989
devices:
9090
- /dev/spidev0.0:/dev/spidev0.0
9191
- /dev/gpiochip0:/dev/gpiochip0
92+
# group_add resolves names against the container's /etc/group, but the
93+
# python:slim base doesn't define gpio or spi. Pass numeric GIDs so they
94+
# match the host's groups instead. Defaults match a stock Raspberry Pi OS
95+
# install (check yours with ``getent group gpio spi`` on the host).
9296
group_add:
93-
- gpio
94-
- spi
97+
- "${GPIO_GID:-986}"
98+
- "${SPI_GID:-989}"
9599
environment:
96100
- PYTHONUNBUFFERED=1
97101
command:

0 commit comments

Comments
 (0)