Z-Wave serial controller is offline

Thanks for your response rgerrans. Could you tell me which version you mean, see releases (I can’t find any from 3/27)?

I’ve tried 2.0.0.001-DSM6 without success, even with -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 added to /volume1/@appstore/openHAB2/runtime/bin/setenv and restarting openHAB.

Sorry, should have had my first cup of coffee before responding. I missed that you were on a Synology. I’m using a Pi with the Linux snapshots.

This “-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0” would have been my first proposal.

Other things to check: User, Group and Permissions of /dev/ttyACM0 and the user as which openhab is running.
And: is librxtx.jar installed and in the library path of openhab?

1 Like

I recently had issues too with the serial controller using the latest code:


However, you should enable debug logging at least in the zwave binding to get an idea of what your issue might be.

Thank you for your reply. permissions are checked and are correct (openhab is running on user openhab2, permissions are openhab2:users).

Can’t find anything like this. Do you have some more information on this?

For “-Dgnu.io.rxtx.SerialPorts” to work, the Class gnu.io.rxtx.SerialPorts has to exist somewhere.
It is part of the librxtx-java.jar Library. See:


And the serial module has to be started in the OSGI Container.

do “ls -l /dev/ttyACM0” and post the result back here.

here’s my own saved set of instructions

// add user 'openhab2' to groups 'dialout' & 'uucp'
// create the two file below (all details below)
// and then reboot server.
// doing 'ls -l /dev/ttyA*' should give this output like
// #> crw-rw---- 1 root dialout 166, 0 Feb 26 09:40 /dev/ttyACM0


// create '/lib/udev/rules.d/openhab-zwave.rules' 
// with this content:
ACTION=="add", KERNEL=="ttyACM0", MODE="0660", GROUP="dialout"


// create file with text below.
// chmod to 755
// chown to root:root
// move to /usr/local/etc/rc.d/S98openhabzwave.sh

start_modules(){
echo ls -l /dev/tty* >> /volume1/public/tmp/zwavelog.txt
chown -R root.uucp /run/lock
chmod -R g+w /run/lock
chown -R root.uucp /var/lock
chmod -R g+w /var/lock
}
stop_modules(){
echo "do nothing"
}
case "$1" in
start)
start_modules
;;
stop)
stop_modules
;;
*)
echo "usage: $0 { start | stop }" >&2
exit 1
;;
esac
exit 0
1 Like

Thank you! This did the trick.

excellent, I have a use. :stuck_out_tongue:

BTW, sometimes the DSM updates delete those files - which has happened to me for the first of those files with the most recent DSM update.

If/when that happens, just re-create them.

The UDEV rules know the parameter RUN.
So everytime someone plugs in a ZWAVE usb controller or other bridges one may correct some access rights, users, groups, etc. per calling a script.

RUN+="/usr/bin/my_program"

With your method one has to reboot the Raspi instead.

Seems as the openhab-zwave.rules is removed with the last Synology update, did you found a workarround for this?

just recreate the deleted file, and then reboot.

It’s something that happens occasionally with the updates. I’ve turned off auto-updates to give me better control over maintaining things.

Yeah same for me too. It deleted also the .bashrc for the root, so all my aliases are gone too. There’s simply no way to recover except that you have to recreate the files. It also reminds me that i have to backup these specific files :slight_smile:

Just thought I would update this thread with my solution as I ran into the same problem. I noticed in the log that the openhab2 service appeared to be hanging on
2017-10-12 21:48:53.373 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

After reading some of the threads here, I suspected it might be user rights on the /dev/ttyACM0 device, as the mask is:
crw-rw---- 1 root dialout 166, 0 Oct 12 21:49 /dev/ttyACM0

so I checked which groups my openhab user belonged to:
groups openhab
and found this:
openhab : openhab gpio

So then I added the openhab user to both tty and dial out group,
sudo adduser username tty
sudo adduser username dialout

restarted the service and after the UI was ready, I saw the z-stick in my inbox. The log also confirmed this.

2017-10-12 21:48:53.433 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized```

Hope this helps someone.
2 Likes

Is there a way to get rid of my duplicate /dev/ttyACM0 (/dev/ttyACM0) entry in the Paper Ui serial port configuration of my z-wave controller? i have to manually adjust it after every upgrade to re-activate which makes the system not as stable as it should be.

Nobody an idea?

Rather than revive a 2 year old topic, you should start your own. From your screenshot, there does not appear to be a duplicate. You haven’t provided much info either, such as the versions of OH and the zwave binding, and the method used to update.

I was in fact undecided whether to attach the topic here or start a new thread. Thank you for the answer therefore. I installed openHAB 2.5.0~S1635 with the corresponding z-wave 2.5 binding (openhabian hassle free installation). I use apt-get upgrade.

Seems to be fixed with #1650.