[SOLVED] OpenHab serial port permission

Hello,
i’m using correctly openhab 2.4; to use zwave dognle i need every restart to give /dev/tty permission with:
“sudo chown openhab:openhab /dev/***” and then works.
Now i have 2 questions:

  1. is possibile to run it with sudoers permission?
  2. i’m trying to use socat (rs232-tcp for EpsonPJ) but i can’t give openhab user to it so i can’t use that port
    Any suggestions?
    thanks in advance!

Try adding group=dialout,mode=0660 to the socat cmdline

Example:

socat -d -d pty,link=/dev/ttyUSB0,group=dialout,mode=0660,cfmakeraw tcp4:192.168.2.10:2000

Also consider creating a systemd service that starts the socat.

Just search for socat in the forum

Thanks for help.
I added Openhab user to dialout group.
Then, with this:
pty,link=/dev/vircom0,raw,user=openhab,group=dialout,mode=777 tcp:x.x.x.x:port

now works correctly!

@khael87 glad I could help and happy to see it’s working working.:+1:

If you would please mark the topic solved by clicking the square box (lower right corner) on the post that provided the solution. This helps other with a similar issue find a quick solution.

Thanks

1 Like