Replies: 3 comments 13 replies
-
The error clearly says it cannot open the usb port. I am not using this docker deployment method but based on my experience you should pass the usb device from host to the container. Here is an example for my other use case (zigbee2mqtt):
so if your
Let me know if this works so I can update the wiki here. |
Beta Was this translation helpful? Give feedback.
-
@Buddeli ... Could you please provide the content of the file "/opt/hacomfoairmqtt/config.ini". The SOCAT=True message is triggered by start.sh:
It seems the second process is dying, because /dev/ttyUSB0 is not accessible as you described earlier. So the container also crashes and is spinning up again a little bit later. If you have the knowledge, you can try to manipulate the start.sh script and comment out the second process. So you should reach a persistent container start for further debugging. Afterwards you can execute the command manually
Maybe you get some more errors or events to dig deeper. As I have no local attached USB/serial device, I could not provide many support by testing. Could you provider more information with "ls -la /dev/ | grep ttyUSB0"? Perhaps there is really a permission problem. |
Beta Was this translation helpful? Give feedback.
-
After a good night's sleep, I reconsidered the whole thing. Maybe there is a simpler solution for my problem and you don't have to advise a beginner in Docker, VMs and USB configuration. :) Here is the initial situation: Do you have any simpler solutions such as:
Maybe that makes it easier? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone
I just tried to connect over a USB to serial adapter with the docker container option. Sadly I just reserved the following lines after crating the container:
hassioaddon-comfoair350 | don't create serial device over ehternet. enable it with SOCAT=True
hassioaddon-comfoair350 | *****************************
hassioaddon-comfoair350 | * CA350 MQTT Home Assistant *
hassioaddon-comfoair350 | *****************************
hassioaddon-comfoair350 |
hassioaddon-comfoair350 | 31-07-2024 21:13:46 WARNING: Opening serial port exception:
hassioaddon-comfoair350 | 31-07-2024 21:13:46 WARNING: (<class 'serial.serialutil.SerialException'>, SerialException(2, 'could not open port "/dev/ttyUSB0": [Errno 2] No such file or directory: '"/dev/ttyUSB0"''), <traceback object at 0x78b168257d00>)
Here the configuration in the docker-compose.yml
version: '2'
services:
hassioaddon-comfoair350:
image: k42sde/hassioaddon-comfoair350:latest
container_name: hassioaddon-comfoair350
environment:
- SOCAT=False
- COMFOAIR_IP=192.168.1.50
- COMFOAIR_PORT=502
- SERIAL_PORT="dev/ttyUSB0"
- RS485_PROTOCOL=False
- REFRESH_INTERVAL=10
- ENABLE_PC_MODE=False
- DEBUG=False
- MQTT_SERVER=192.168.178.43
- MQTT_PORT=1883
- MQTT_KEEPALIVE=45
- MQTT_USER=comfoair
- MQTT_PASSWORD=XYZ
- HA_ENABLE_AUTO_DISCOVERY_SENSORS=True
- HA_ENABLE_AUTO_DISCOVERY_CLIMATE=True
- HA_AUTO_DISCOVERY_DEVICE_ID=ca350
- HA_AUTO_DISCOVERY_DEVICE_NAME=CA350
- HA_AUTO_DISCOVERY_DEVICE_MANUFACTURER=Zehnder
- HA_AUTO_DISCOVERY_DEVICE_MODEL=Comfoair 350
restart: always
Do you have an idea why I got the error? Many thanks for answering.
Beta Was this translation helpful? Give feedback.
All reactions