Serial port not recognized

Hi,

I was trying this some time ago without success - now I gave it another try still without success that kinds of frustrates me… :confused:

I see this binding working for others here in the community that use adapters or direct serial connection so it should work with an ESP as serial connector as well. I’m using socat to define a serial port ttyS2 for the Comfoair Binding to connect to and I permanently get the same error message from the binding when its started:

2017-06-15 14:47:43.080 [ERROR] [ng.comfoair.internal.ComfoAirBinding] - Serial port '/dev/ttyS2' could not be found. Available ports are:
/dev/ttyS0
/dev/ttyAMA0

Now the serial problem has been around for quiet some time here, so I found to update my etc/default/openhab2 file with the ttyS2 serial port (I’m also using a Razberry board):

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

The ttyS2 was added to the dialout group as well and serial port definition for ttyS2 looks the same as for ttyS0 and ttyAMA0 that are recognized by the binding (there is currently no ACM0 or USB0 defined):

lrwxrwxrwx 1 root dialout    10 Jun 15 14:47 /dev/ttyS2 -> /dev/pts/0

I run openhabian snapshot #928 on an RPI3 and I really would appreciate your thoughts here. I am clearly missing something here.

Why are the other 2 dev/ttyS0 and dev/ttyAMA0 recognized by the binding and dev/ttyS2 is not?

Bernd

Did anybody have similar issues with other bindings e.g. serial binding?

Any serial port experts out there to give me a hint in the right direction?

That is odd, non standard ports are working for me.

[root@lisa ~]# cat /etc/default/openhab2
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:\
/dev/ttyPort0:/dev/ttyPort1:/dev/ttyPort2:/dev/ttyPort3:/dev/ttyPort4:/dev/ttyPort5:/dev/ttyPort6:/dev/ttyPort7:/dev/ttyPort8 \
-Dfile.encoding=ISO-8859-1 -Duser.timezone=America/New_York"

Hi Nathan,
thank you for your reply. It looks like your etc/default/openhab2 is similar to mine (no “,” no spaces in between the ports…)
Do you have your ports /dev/ttyPortn also as “root” owner or is it “openhab” user ?

Regards,
Bernd

I am lazy and running openHab as root because I was having issues with some sudo commands via exec binding and a few other issues that I just did not want to mess with.

Just in case someone hits the same problem as I did:
Finally the solution for this one was not just to chmod the /dev/xxx device but the link it is pointing to… /dev/pts/xxx

1 Like