Help wanted /dev/ttyUSB0 does not exsits?

Hi i’m trying to get the new DMSR binding for OH2 working on a synology but I get a /dev/ttyUSB0 doesn’t exsits message.

I’m running out of options for my OH2(#814) setup on a Synology NAS (x86) with DSM6.1.
I’m now using “nrjavaserial-3.12.1.jar” downloaded from nexus repository.and the new DMSR 2 Binding for OH2 (https://github.com/openhab/openhab2-addons/issues/1608)
I found out with “dmesg” that the driver version was not compatible and that was fix by jumbotroll (http://www.jadahl.com/synology6.1/ a couple of days back).
I changed the permission settings for /dev/ttyUSB0 to 666.
And still i’m getting this in the log.

[ERROR] [inding.dsmr.internal.device.DSMRPort] - Port /dev/ttyUSB0 does not exists
gnu.io.NoSuchPortException
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273)[230:com.neuronrobotics.nrjavaserial:3.12.1]
at org.openhab.binding.dsmr.internal.device.DSMRPort.open(DSMRPort.java:176)[232:org.openhab.binding.dsmr:2.1.0.201702282146]
at org.openhab.binding.dsmr.internal.device.DSMRDevice.handleInitializeDSMRDevice(DSMRDevice.java:353)[232:org.openhab.binding.dsmr:2.1.0.201702282146]
at org.openhab.binding.dsmr.internal.device.DSMRDevice.handleDeviceState(DSMRDevice.java:228)[232:org.openhab.binding.dsmr:2.1.0.201702282146]
at org.openhab.binding.dsmr.internal.device.DSMRDevice.access$1(DSMRDevice.java:215)[232:org.openhab.binding.dsmr:2.1.0.201702282146]
at org.openhab.binding.dsmr.internal.device.DSMRDevice$1.run(DSMRDevice.java:193) 232:org.openhab.binding.dsmr:2.1.0.201702282146]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

Setting the log level to DEBUG does not give me any use full information where this problem could be.
I also set the EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0" in the file /runtime/bin/setenv ( a quick solution to find the problem. then i’ve to find the correct spot for this code line)

There for i think its the nrjavaserail library or something else on my system but i can’t think of anything else what to check or change.
I made the openhab2 users part of the root group so I can rule out that permissions are the problem. I set these back if I got it to work.

I hope that someone has any idea what to do next.

Did you do this before you restarted OpenHAB? From looking at the source, it seems a port is only considered valid if it can be read when the library is initialised. Otherwise it will not be in the list of valid serial devices.

Have you tried “-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0” only as well?

The library will then consider that device valid if testRead() succeeds. However from skipping through the source I could not actually determine what testRead() tries to do. It might just check the file permissions or it actually tries to read from that port.

I have the same issue.

I don’t have a Z-wave stick but today i found out that there was driver update for the ftdi and other chips this month that worked with DSM 6.1. I used the driver package from jadahl to solve this.

@Temar,

Yes i did a OH2 restart after every change.

Yes i did. I edited the file /runtime/bin/setenv is now

export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS_ARCH} ${EXTRA_JAVA_OPTS} -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0"

Oke I found the solution. Don’t know why and how… but giving the users openHAB access to the HTTP user opened all ports to be found by OH2

found this solution by asking Synology for some help about this problem.

now going to trace back what is really needed and what is not .

there’s some info about getting a synology to see ttyACM0 in this topic … it’s for getting a z-stick to work (and it does work), but the info there can be used to get that port for any other reason too.