Z-Wave serial controller is offline

Hi,

I’ve recently installed OpenHab2 on Synology DSM 6.0 (using this guide) and trying to setup a Z-wave controller (from Z-wave.me). But the controller status keeps telling me Status: OFFLINE - BRIDGE_OFFLINE Controller is offline. I’ve installed UsbSerialDrivers_bromolow-6.0_3-0.spk from Jadahl.com. Anyone know what this might be?

events.log:

2017-04-04 15:08:21.870 [ThingAddedEvent           ] - Thing 'zwave:serial_zstick:15b390ad91f' has been added.
2017-04-04 15:08:26.747 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:15b390ad91f' changed from UNINITIALIZED to INITIALIZING
2017-04-04 15:08:26.749 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:15b390ad91f' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

ls -al /dev/ttyACM0 output:

crwxrwxr-x 1 openhab2 users 166, 0 Apr  5 11:48 /dev/ttyACM0

dmesg | grep -i usb output:

[    5.072404] ACPI: bus type USB registered
[    5.072869] usbcore: registered new interface driver usbfs
[    5.073287] usbcore: registered new interface driver hub
[    5.074476] usbcore: registered new interface driver ethub
[    5.076416] usbcore: registered new device driver usb
[    5.082575] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.086539] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    5.096161] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    5.096317] hub 1-0:1.0: USB hub found
[    5.096489] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    5.106156] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    5.106324] hub 2-0:1.0: USB hub found
[    5.116666] uhci_hcd: USB Universal Host Controller Interface driver
[    5.122141] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
[    5.122472] hub 3-0:1.0: USB hub found
[    5.124600] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 4
[    5.125791] hub 4-0:1.0: USB hub found
[    5.152237] usbcore: registered new interface driver usb-storage
[    5.418849] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    5.554221] hub 1-1:1.0: USB hub found
[    5.677609] usb 2-1: new high-speed USB device number 2 using ehci-pci
[    5.812812] drivers/usb/core/hub.c (2675) Same device found. Change serial to ffffffd1ffffffb2ffffffdbffffffa0
[    5.813101] hub 2-1:1.0: USB hub found
[    6.936377] usb 3-2: new full-speed USB device number 2 using xhci_hcd
[    6.948030] drivers/usb/core/hub.c (2675) Same device found. Change serial to ffffffd1ffffffb2ffffffdbffffffa0
[    6.948031] drivers/usb/core/hub.c (2675) Same device found. Change serial to ffffffd1ffffffb2ffffffdbffffffa1
[    8.071279] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    8.082348] usb 3-3: not running at top speed
[    8.450911] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    8.461972] usb 3-3: not running at top speed
[    8.830547] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    8.841609] usb 3-3: not running at top speed
[    9.210174] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    9.221239] usb 3-3: not running at top speed
[    9.589805] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    9.600870] usb 3-3: not running at top speed
[    9.969437] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    9.980508] usb 3-3: not running at top speed
[    9.981347] usb-storage 3-3:1.0: USB Mass Storage device detected
[    9.981752] scsi6 : usb-storage 3-3:1.0
[   24.829676] usbcore: registered new interface driver ax88179_178a
[   27.042265] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[   27.042403] usbcore: registered new interface driver cdc_acm
[   27.042404] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   37.589930] usbcore: registered new interface driver usblp
[   37.606262] usbcore: registered new interface driver usbhid
[   37.606264] usbhid: USB HID core driver
[   47.800187] usbcore: registered new interface driver usbserial
[   47.813828] usbcore: registered new interface driver ftdi_sio
[   47.813837] usbserial: USB Serial support registered for FTDI USB Serial Device
[   48.092861] usbcore: registered new interface driver cp210x
[   48.092871] usbserial: USB Serial support registered for cp210x
[   48.110016] usbcore: registered new interface driver pl2303
[   48.110027] usbserial: USB Serial support registered for pl2303
[   48.116250] usbcore: registered new interface driver ch341
[   48.116260] usbserial: USB Serial support registered for ch341-uart
[   48.159776] usbcore: registered new interface driver ti_usb_3410_5052
[   48.159786] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[   48.159791] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
1 Like

I had similar problems with the latest snapshot and rolled back to the 3/27 version and it started working again.

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.