No such device /dev/ttyUSB0 after migrating to OH3

Hi, I’ve run out of ideas. I have OH 2.5 running using the powermax alarm binding connecting to my alarm over serial port working perfectly…

I’ve made an implace upgrade to OH3 and everything is working but the powemax keeps yielding the “No such device /dev/ttyUSB0” error after upgrade.

I’ve double checked all info related to this problem I’ve found in the forums, but to no avail.

I have de option properly set (here is my ps output of openhab comand)

openhab  2487223       1  7 23:13 ?        00:01:19 /usr/bin/java -XX:-UsePerfData
 -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab
--patch-module java.base=/usr/share/openhab/runtime/lib/endorsed/org.apache.karaf.specs.locator-4.3.7.jar --patch-module java.xml=/usr/share/openhab/runtime/lib/endorsed/ 
--add-opens java.base/ 
--add-opens java.base/ 
--add-opens java.base/java.lang=ALL-UNNAMED 
--add-opens java.base/java.util=ALL-UNNAMED -
-add-opens java.naming/javax.naming.spi=ALL-UNNAMED 
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED 
--add-opens java.base/ 
--add-opens java.base/java.lang.reflect=ALL-UNNAMED -
-add-opens java.base/java.text=ALL-UNNAMED 
--add-opens java.base/java.time=ALL-UNNAMED 
--add-opens java.desktop/java.awt.font=ALL-UNNAMED 
--add-exports=java.base/ -
-Dkaraf.base=/var/lib/openhab -Dkaraf.etc=/var/lib/openhab/etc -Dkaraf.log=/var/log/openhab -Dkaraf.restart.jvm.supported=true -Djava.util.logging.config.file=/var/lib/openhab/etc/ -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.3.7.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.jaas.boot-4.3.7.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.main-4.3.7.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.specs.activator-4.3.7.jar:/usr/share/openhab/runtime/lib/boot/osgi.core-7.0.0.jar:/usr/share/openhab/runtime/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/usr/share/openhab/runtime/lib/jdk9plus/jakarta.xml.bind-api-2.3.3.jar:/usr/share/openhab/runtime/lib/jdk9plus/javax.annotation-api-1.3.2.jar:/usr/share/openhab/runtime/lib/jdk9plus/jaxb-runtime-2.3.3.jar:/usr/share/openhab/runtime/lib/jdk9plus/org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:/usr/share/openhab/runtime/lib/jdk9plus/txw2-2.3.3.jar org.apache.karaf.main.Main

openhab user is in my dialout group and in my tty group
(sorry, command output in spanish but translated means User openhab already member of …)

root@Molinos4:/home/chano# adduser openhab dialout
El usuario `openhab' ya es un miembro de `dialout'.
root@Molinos4:/home/chano# adduser openhab tty
El usuario `openhab' ya es un miembro de `tty'.

I’m running openhab native (no docker) on debian 11

Any idea??

Thx in advance

what is the output of

ls -l /dev/serial/by-id/

Thx for your interest

root@Molinos4:/home/chano# ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 ene 10 14:30 usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB0

By the way, the Pc where its running also has “native” serial ports and it didn’t work either.

I’ve tried the pyhton pyvisonic module executing it as user openhab (su openhab) and it works. So it seems like is something related to java and serial ports.

I’m going to try some simpler java app to open the port to see if I can get more info.

No further ideas??? I’m stuck with this (and is my alarm system!)


What is the output of:

ls -l /dev/ttyUSB0

Hi, thx for your help

this is the output of ls -l /dev/ttyUSB0

crw-rw---- 1 root nut 188, 0 ene 11 17:23 /dev/ttyUSB0

Why group nut ?

If the openhab user is not part of the nut group it cannot access the port. So either add openhab to that group or change the group of the port to one that openhab is part of.

Thank You!!! that was the problem!!

A few month ago I installed a UPS with a USB to serial port connection and also installed Network UPS Tools (nut) to integrate its info in openhab. Later, I installed the USB to Serial connection to my powermax alarm and a few days after I removed the ups. Probably, when I rebooted my system after upgrading to OH3, my USB to Serial adapter changed the device name and the ols ttyUSB0 belongs to the nut group.

Thank you once again SOLVED!!