I noticed with the default device mapping (/dev/ttyACM0:/dev/ttyUSB0), if I unplugged the device sometimes it wouldn't get re-connected on re-plug.
Also I think if I started the docker container before connecting the device.
I had a similar issue with serial devices in HomeAssistant, and their (eventual) suggestion was to use the /dev/serial/by-id/... node when possible. Somehow it gets mapped properly on hotplug???
Not sure if this helps anyone. Or if it even works -- sample size of "today".
I noticed with the default device mapping (`/dev/ttyACM0:/dev/ttyUSB0`), if I unplugged the device sometimes it wouldn't get re-connected on re-plug.
Also I think if I started the docker container before connecting the device.
I had a similar issue with serial devices in HomeAssistant, and their (eventual) suggestion was to use the `/dev/serial/by-id/...` node when possible. Somehow it gets mapped properly on hotplug???
So my `docker-compose.override.yaml` I have:
```
services:
remoteterm:
build:
context: .
dockerfile: Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH:-unknown}
devices:
- /dev/serial/by-id/usb-Espressif_Systems_heltec_wifi_<snip>:/dev/ttyUSB0
```
Not sure if this helps anyone. Or if it even works -- sample size of "today".
<!-- github-sync-id:4090003693 -->
Yeah the ID will always be stable and is wise to use for mapping as it's deterministic. I'm not sure how Docker treats hotplugged serial devices that are mapped right in the config but not connected at startup time, but glad to here that an ID-mapped approach worked well for you.
Yeah the ID will always be stable and is wise to use for mapping as it's deterministic. I'm not sure how Docker treats hotplugged serial devices that are mapped right in the config but not connected at startup time, but glad to here that an ID-mapped approach worked well for you.
<!-- github-comment-id:4076759041 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I noticed with the default device mapping (
/dev/ttyACM0:/dev/ttyUSB0), if I unplugged the device sometimes it wouldn't get re-connected on re-plug.Also I think if I started the docker container before connecting the device.
I had a similar issue with serial devices in HomeAssistant, and their (eventual) suggestion was to use the
/dev/serial/by-id/...node when possible. Somehow it gets mapped properly on hotplug???So my
docker-compose.override.yamlI have:Not sure if this helps anyone. Or if it even works -- sample size of "today".
Yeah the ID will always be stable and is wise to use for mapping as it's deterministic. I'm not sure how Docker treats hotplugged serial devices that are mapped right in the config but not connected at startup time, but glad to here that an ID-mapped approach worked well for you.