I'd be surprised if I were the only one with this problem, but I didn't find any existing thread or an entry in the FAQ.
I turn my printer on and off via PSU Control (through Home Assistant). This means that the printer isn't on most of the time, especially while the machine is booting up - which in turn means there's no /dev/ttyUSB0
that I could pass in to the docker container, which means it fails to start.
Has anybody found a workaround?
I'm thinking about something like a "dummy /dev/ttyUSB
device" that's always present even when the physical device isn't, and switches transparently when a physical device is connected. I haven't found anything to that effect, however.
I've also tried bind mounting /dev/
, but for some reason that also doesn't seem to work reliably; starting the container before the printer always resulted in communication timeouts.
Everything is fine, including automatic turning on/off, as long as the octoprint container starts while the printer is connected. The only issue is that it doesn't start unless the device exists, and this seems to be intended behavior.
(I used to run OctoPi, but have since migrated to a different platform than Raspberry Pi, which now also runs other things than Octoprint, hence why I migrated to Docker)