Create docker container without ttyusb0
I am trying to create a docker container from twcmanager but intend to use it with socket rs485 communication. In the docker-compose file I tried using /dev/null:/dev/null but after downloading container I get error again:
Any solution how to create container without having a /dev/ttyUSB0 device?
home-twcmanager-1 | Traceback (most recent call last):
home-twcmanager-1 | File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
home-twcmanager-1 | "main", mod_spec)
home-twcmanager-1 | File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
home-twcmanager-1 | exec(code, run_globals)
home-twcmanager-1 | File "/usr/src/TWCManager/TWCManager.py", line 34, in
You'll need to tell the serial module not to load, and instead activate a different interface module. That's further down in the config file, IIRC. If you're not able to find it, I can look more closely at which thing needs to be disabled/enabled.
You can configure tcp as a port as well, see https://github.com/ngardiner/TWCManager/blob/main/etc/twcmanager/config.json#L225
Right, you'd want to set RS485 to "enabled": false and TCP to "enabled": true
No matter what I specified in docker-compose.yml I was not able to start container. Found some info how to edit files inside a stopped container. Used this command:
docker run --volumes-from 76c425085e38 -it busybox
Then edited /etc/twcmanager/config.json using vi Replaced /dev/ttyUSB0 with this: "port": "socket://192.168.10.97:8000"
Exited busybox and edited the docker-compose.yml to have /dev/null:/dev/null as device.
Now I was able to start container successfully!