First of all thanks for the development of openHAB and the Zigbee binding, it’s a great piece of software
I just upgraded to OpenHAB 3.3 running on an Ubuntu 20.04 system (apt installation).
My system sometimes changes the assignments of the USB ports to the tty
devices, i.e. sometimes the Zigbee stick will be at /dev/ttyUSB0
and sometimes /dev/ttyUSB1
. So I changed the device to a symlink that always resolves to the right device: /dev/serial/by-id/usb-Silicon_Labs_BV_2010_10_01382705-if00-port0
. I also added those devices to the gnu.io.rxtx.SerialPorts
setting in /etc/default/openhab
like so:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/serial/by-id/usb-SHK_NANO_CUL_433-if00-port0:/dev/serial/by-id/usb-Silicon_Labs_BV_2010_10_01382705-if00-port0:/dev/ttyUSB0:/dev/ttyUSB1"
Since this change I have a major problem: when OH starts up, it only reaches the point where the Zigbee binding connects to the serial port:
2022-07-02 11:20:53.064 [DEBUG] [nding.zigbee.serial.ZigBeeSerialPort] - Connecting to serial port [/dev/serial/by-id/usb-Silicon_Labs_BV_2010_10_01382705-if00-port0] at 57600 baud, flow control FLOWCONTROL_OUT_XONOFF.
This is the last log entry I see, then the system seems to crash completely. Then there are no log entries anymore and the system starts up again from the beginning. I can’t do much on the UI or the console (only for a few seconds), then the serial connection kills openHAB completely and it goes into a restart loop.
Do you have any advice on how to fix this? A few specific questions:
- Do I need to do anything to reload the configuration in
/etc/default/openhab
apart fromsystemctl daemon-reload
andopenhab-cli clean-cache
? My openHAB runs as asystemd
service. - Is there a known problem when I use symlinks as serial devices? The symlink itself belongs to
root
, but everyone can read, write and execute it (lrwxrwxrwx
). The device itself (currentlyttyUSB1
) belongs to groupdialout
and theopenhab
user is in thedialout
group. This part has been working without problems in openHAB 3.2. - I don’t have any chance to change the serial device setting back because the UI is only available for a few seconds before it is killed. Same for the console. Is there a way to change the setting very quickly with one single command on the console or can I change it back directly in the database? If so, can you point me to the right table?
Any other ideas on how I could fix this are highly appreciated.