Closed malfroid closed 3 years ago
Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
This is not a ZHA problem. error says:
File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 265, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2214836-if00'
It can't open /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2214836-if00
If the serial device is not available (by that exact name) then it cannot open it.
ZHA has no ideas what device being passed to Docker and/or if it was changed. It always would use the same device it was originally configured with.
When I created the ZHA integration, I believe that I configured the device /dev/ttyACM0 . I never told ZHA to look for the device by ID ( /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2214836-if00 ) .
Then my only guess, in the original configuration you exposed both acm0 and serial by Id. When both are available, zha prefers (and store) the serial by Id port, as those are assumed to be persistent.
The problem
ZHA crashes.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
Original docker-compose.yml contained:
Changing the device mapping to by id fixed the problem:
Why does the mapping using /dev/ttyACM0 no longer works?