Closed r748 closed 1 year ago
The error cannot access '/dev/aeotec-z-wave-stick': No such file or directory
tells me that your config is not correct at some point.
Are you absolutely sure you mounted your device with the --device
option when creating your container?
Just setting the env "USBDEVICES" is not enough!
If you did so, why don't you use /dev/serial/by-id/...
path to mount your devices?
Please correct your config and you will be fine running the new image versions...
If you need any help, join the ioBroker forum or one of the othe ioBroker communities at discord, facebook or telegram.
Regards, André
Thanks for the quick reply.
Yes, I'm using the --device option and using /dev/serial/by-id/...
produces the same error. Only if I use the /dev/ttyACMx
path the container starts successfully. But I've had cases that after unplugging or rebooting, the dongles weren't always mounted on the same ttyACMx, that's why I would prefer to use static paths. Any idea why this doesn't work?
Please show me your container config. Are you using cli or some kind of ui (portainer?)? Docker-compose? What system are you working on? DiskStation? Unraid? any other NAS?
This is from my docker-compose, working with latest image version:
environment:
- USBDEVICES=/dev/serial/by-id/rflink
devices:
- /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0:/dev/serial/by-id/rflink
Can you verify the path of the device you are using on the host?
andre@vm-debian-docker:~$ ls -al /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 80 4. Nov 13:25 .
drwxr-xr-x 4 root root 80 4. Nov 13:25 ..
lrwxrwxrwx 1 root root 13 4. Nov 13:25 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 4. Nov 13:25 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220713142537-if00 -> ../../ttyACM0
I'm using Portainer on OpenMediaVault. This is my Docker-Compose with the working config. If I use the currently commented lines, then I get the bootloop:
version: '2'
networks:
default:
external: true
name: docker_public_enp4s0f0
services:
iobroker:
container_name: iobroker
image: buanet/iobroker:v7.1.2
hostname: iobroker
restart: unless-stopped
volumes:
- /mnt/dockerdrive/iobroker:/opt/iobroker
- /mnt/dockerdrive/userscripts:/opt/userscripts
- /srv/dev-disk-by-uuid-03009889-6bfa-4f4c-8bf1-2dd595715acc/iobroker-backup:/opt/iobroker/backups
environment:
- ZWAVE=true
#1 - USBDEVICES=/dev/aeotec-z-wave-stick;/dev/conbee2
#2 - USBDEVICES=/dev/serial/by-id/usb-0658_0200-if00;/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00
- USBDEVICES=/dev/ttyACM1;/dev/ttyACM0
devices:
#1 - /dev/aeotec-z-wave-stick:/dev/ttyACM0 # Z-Wave-Stick
#2 - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0 # Z-Wave-Stick
#1 - /dev/conbee2:/dev/ttyACM1 # deConz
#2 - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00:/dev/ttyACM1 # deConz
- /dev/ttyACM1:/dev/ttyACM0 # Z-Wave-Stick
- /dev/ttyACM0:/dev/ttyACM1 # deConz
networks:
default:
ipv4_address: 192.168.2.6
labels:
- "com.centurylinklabs.watchtower.monitor-only=true"
Here's the output of ls -al /dev/serial/by-id/
rob@homeserver:/home/rob$ ls -al /dev/serial/by-id/
insgesamt 0
drwxr-xr-x 2 root root 80 21. Nov 20:59 .
drwxr-xr-x 4 root root 80 21. Nov 20:59 ..
lrwxrwxrwx 1 root root 13 21. Nov 20:59 usb-0658_0200-if00 -> ../../ttyACM1
lrwxrwxrwx 1 root root 13 21. Nov 20:59 usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00 -> ../../ttyACM0
Hi, sorry for the delay.
Your config is not correct. Let's break this down.
What's working:
environment:
- USBDEVICES=/dev/ttyACM1;/dev/ttyACM0
devices:
- /dev/ttyACM1:/dev/ttyACM0 # Z-Wave-Stick
- /dev/ttyACM0:/dev/ttyACM1 # deConz
#BTW why did you switch the path (ACM1 mounts to ACM0 and ACM0 mounts to ACM1)???
That means:
environment:
- USBDEVICES=[path1_in_container];[path2_in_container]
devices:
- [path1_on_host]:[path1_in_container] # Z-Wave-Stick
- [path2_on_host]:[path2_in_container] # deConz
What is correct! The path before the :
is the path on the host, the path after it is the path that is mapped to inside the container. The env DEVICES
contains only the paths from inside the container. Now check #1
and #2
#1
environment:
- USBDEVICES=/dev/aeotec-z-wave-stick;/dev/conbee2
devices:
- /dev/aeotec-z-wave-stick:/dev/ttyACM0 # Z-Wave-Stick
- /dev/conbee2:/dev/ttyACM1 # deConz
#2
environment:
- USBDEVICES=/dev/serial/by-id/usb-0658_0200-if00;/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00
devices:
- /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0 # Z-Wave-Stick
- /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00:/dev/ttyACM1 # deConz
You get the problem? If not, take another look at the code after "That means:"...
This would be the solution I preferring:
environment:
- USBDEVICES=/dev/zwave;/dev/conbee
devices:
- /dev/serial/by-id/usb-0658_0200-if00:/dev/zwave
- /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2128334-if00:/dev/conbee
Don't forget to configure your Adapters/ Software inside the container to to use the path /dev/zwave
for Z-Wave-Stick and /dev/conbee
for deConz.
Regards, André
Oh... I feel so stupid now...
I hadn't realized that the environment USBDEVICES variable requires the paths inside the container. I had used the paths on the host, that's why my config was messed up!
All issues are resolved now, thank you very much for your detailed answer and help André!!
Best regards, Rob
Description
I have configured my system to always bind my USB devices (Aeotec Z-Wave Stick and Conbee2) under a static name, so in case I unplug a device, it is reachable under the same path when plugged back in. Up until 7.0.1 this worked fine. The log showed the following chown/chmod errors, but the container started just fine and both Z-Wave and Zigbee devices worked flawlessly.
When upgrading to 7.1.0 or higher, the container enters a bootloop at the following point:
It would be great, if it were possible to continue using symlinks for the Z-Wave and Zigbee controllers.
Image version
v7.1.0+
Docker logs