@bernd Yes, it is off topic but I will humor you as I think I know what your issue is. From the page you linked to, I am guessing you have two usb devices plugged into the computer one for the 1-wire and one for Zigbee. On the page you linked to there is a section in the instructions titled 2. UDEV Rules. They don’t really explain what this is doing but I recognized it.
When you plug a USB device on Linux that is a USB serial connection, it creates a devices like /dev/ttyUSB1
. However when you plug and unplug or plug them in a different order or reboot they may get assigned to a different device. The number at the end changes.
My guess is that in your current 1-wire owserver configuration (/etc/owfs.conf
) you have a line with a device like this:
device = /dev/ttyUSB1
You need to add a UDEV rule so that the 1-wire USB devices serial port is always reachable at the same device, just like you did for the Zigbee devices serial port and change the device in /etc/owfs.conf
.
My 1-wire setup worked fine until I also plugged a 3D printer with a USB serial interface into the same computer. Then I had to setup these UDEV rules to make the USB serial devices always be named the same. Here are my notes on how to do this.
Create persistent USB serial device names on Linux: how to force a USB device to use the same ttyUSB number
Based on information from:
Used with OneWire USB devices for owserver part of owfs when using it with Home Assistant.
- find out what’s on ttyUSB:
dmesg | grep ttyUSB
- list all attributes of the device:
udevadm info --name=/dev/ttyUSBx --attribute-walk
(with your device number(s) instead of x, of course). Pick out a unique identifier set, eg idVendor + idProduct. You may also need SerialNumber if you have more than one device with the same idVendor and idProduct. SerialNumbers ought to be unique for each device.
3. Create a file /etc/udev/rules.d/99-usb-serial.rules
(or your own .rule file see examples below) with something like this line in it:
SUBSYSTEM=="tty", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="your_device_name"
(assuming you don’t need a serial number there, and of course with the numbers for idVendor and idProduct that you found in step 2.
4. Load the new rule:
sudo udevadm trigger
- Verify what happened:
ls -l /dev/your_device_name
will show what ttyUSB number the symlink went to. If it’s /dev/ttyUSB1
, then verify who owns that and to which group it belongs:
ls -l /dev/ttyUSB1
Then just for the fun of it:
udevadm test -a -p $(udevadm info -q path -n /dev/your_device_name)
Examples:
in /etc/udev/rules.d/62-fjh-persistant-x1-sidewinder-3d-printer.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="x1sidewinder"
in /etc/udev/rules.d/62-fjh-one-wire-usb-adapter.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="USBonewire"
Then run sudo udevadm trigger
to load the new rule(s).