Zwave controler is always offline

Ah, no, on the new setup, after I used openhabian-config to click “disable bluetooth” and “activate serial etc… on openhab Java machine”, now I see this:

[  202.332393] usb 1-1.5: new full-speed USB device number 4 using dwc_otg
[  202.465644] usb 1-1.5: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
[  202.465661] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  202.530374] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device
[  202.531384] usbcore: registered new interface driver cdc_acm
[  202.531391] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

So I think I have a problem with the config of my main openhab machine…
I guess I’ll have the opportunity to test the restore of a backup on the new machine and see where that takes me:-)

Yes.

Hi thefathefa
have you been able to fix issue?
I have same issue than you:

2019-10-10 23:34:26.679 [thome.event.ExtensionEvent] - Extension 'binding-zwave' has been installed.
2019-10-10 23:36:19.496 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_sof-zwave:serial_zstick:87d5069e:serial_sof' has been added.
2019-10-10 23:36:19.511 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_ack-zwave:serial_zstick:87d5069e:serial_ack' has been added.
2019-10-10 23:36:19.514 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_nak-zwave:serial_zstick:87d5069e:serial_nak' has been added.
2019-10-10 23:36:19.517 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_can-zwave:serial_zstick:87d5069e:serial_can' has been added.
2019-10-10 23:36:19.520 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_oof-zwave:serial_zstick:87d5069e:serial_oof' has been added.
2019-10-10 23:36:19.523 [.ItemChannelLinkAddedEvent] - Link 'zwave_serial_zstick_87d5069e_serial_cse-zwave:serial_zstick:87d5069e:serial_cse' has been added.
2019-10-10 23:36:19.573 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:87d5069e' changed from UNINITIALIZED to INITIALIZING
2019-10-10 23:36:19.602 [me.event.ThingUpdatedEvent] - Thing 'zwave:serial_zstick:87d5069e' has been updated.

==> /var/log/openhab2/openhab.log <==
2019-10-10 23:36:19.607 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'

==> /var/log/openhab2/events.log <==
2019-10-10 23:36:19.609 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:87d5069e' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

==> /var/log/openhab2/openhab.log <==
2019-10-10 23:36:19.628 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized

==> /var/log/openhab2/events.log <==
2019-10-10 23:36:19.645 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_sof changed from NULL to 0
2019-10-10 23:36:19.647 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_ack changed from NULL to 0
2019-10-10 23:36:19.653 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_nak changed from NULL to 0
2019-10-10 23:36:19.657 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_can changed from NULL to 0
2019-10-10 23:36:19.665 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_oof changed from NULL to 0
2019-10-10 23:36:19.668 [vent.ItemStateChangedEvent] - zwave_serial_zstick_87d5069e_serial_cse changed from NULL to 0

==> /var/log/openhab2/openhab.log <==
2019-10-10 23:36:19.672 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2019-10-10 23:36:19.674 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

but in my case I’m using a new Raspberry Pi 4 Model B Rev 1.1:

###############################################################################
###############  openhab  #####################################################
###############################################################################
##        Ip = 192.168.1.143
##   Release = Raspbian GNU/Linux 10 (buster)
##    Kernel = Linux 4.19.57-v7l+
##  Platform = Raspberry Pi 4 Model B Rev 1.1
##    Uptime = 0 day(s). 0:25:59
## CPU Usage = 0% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 0.00, 5m: 0.00, 15m: 0.00
##    Memory = Free: 3.23GB (84%), Used: 0.63GB (16%), Total: 3.86GB
##      Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
##      Root = Free: 53.54GB (95%), Used: 2.36GB (5%), Total: 58.30GB
##   Updates = 0 apt updates available.
##  Sessions = 2 session(s)
## Processes = 119 running processes of 32768 maximum processes
###############################################################################

I have also checked serial port and tty:

[23:55:21] openhabian@openhab:~$ cat /etc/default/openhab2 | grep SerialPorts
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"
EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

[23:58:08] openhabian@openhab:~$ dmesg -T | grep tty
[Thu Oct 10 23:29:19 2019] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M  smsc95xx.macaddr=DC:A6:32:29:88:73 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=be1d5779-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[Thu Oct 10 23:29:19 2019] console [tty1] enabled
[Thu Oct 10 23:29:19 2019] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2

[23:59:33] openhabian@openhab:~$ ls -lah /dev/ttyA*
crw-rw---- 1 root dialout 204, 64 Oct 10 23:29 /dev/ttyAMA0

I have also ran the following checks on the USB / serial interfaces:

[23:58:47] openhabian@openhab:~$ dmesg | grep -i usb
[    0.073137] usbcore: registered new interface driver usbfs
[    0.073203] usbcore: registered new interface driver hub
[    0.073312] usbcore: registered new device driver usb
[    0.392993] usbcore: registered new interface driver r8152
[    0.393070] usbcore: registered new interface driver lan78xx
[    0.393137] usbcore: registered new interface driver smsc95xx
[    0.393398] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    0.396307] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.396340] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.396369] usb usb1: Product: xHCI Host Controller
[    0.396392] usb usb1: Manufacturer: Linux 4.19.75-v7l+ xhci-hcd
[    0.396416] usb usb1: SerialNumber: 0000:01:00.0
[    0.396939] hub 1-0:1.0: USB hub found
[    0.397457] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    0.397495] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    0.397844] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    0.397876] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.397905] usb usb2: Product: xHCI Host Controller
[    0.397928] usb usb2: Manufacturer: Linux 4.19.75-v7l+ xhci-hcd
[    0.397952] usb usb2: SerialNumber: 0000:01:00.0
[    0.398444] hub 2-0:1.0: USB hub found
[    0.425187] dwc_otg fe980000.usb: base=(ptrval)
[    0.826959] dwc_otg fe980000.usb: DWC OTG Controller
[    0.827002] dwc_otg fe980000.usb: new USB bus registered, assigned bus number 3
[    0.827054] dwc_otg fe980000.usb: irq 37, io mem 0x00000000
[    0.827411] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.827443] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.827472] usb usb3: Product: DWC OTG Controller
[    0.827495] usb usb3: Manufacturer: Linux 4.19.75-v7l+ dwc_otg_hcd
[    0.827519] usb usb3: SerialNumber: fe980000.usb
[    0.828048] hub 3-0:1.0: USB hub found
[    0.828933] usbcore: registered new interface driver uas
[    0.829064] usbcore: registered new interface driver usb-storage
[    0.835368] usbcore: registered new interface driver usbhid
[    0.835391] usbhid: USB HID core driver
[    0.971642] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.153278] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20
[    1.153319] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.153347] usb 1-1: Product: USB2.0 Hub
[    1.154917] hub 1-1:1.0: USB hub found
[    3.948873] usbcore: registered new interface driver brcmfmac

Were you able to fix issue?
If so, would you mind helping me with this issue
Thanks in advance

I do not know about your version, but when this was first released there was a USB standards issue. You needed to connect the usb stick through a usb hub to be properly recognized.

Hello Javier,

I ended up rebuilding my openhabian config from scratch. It took a while but now back to normal.

I think that until your system will show you the ACM0 thing, it means there is a problem…

Hi thefathefa
Yes I’ve tried several times to config my openhabian from scratch using the latest openHABian system image ( openHABian v1.5 based on Debian Buster that supports RPi4), but I always get the same issue.
After initial instalation, the first thing that I do, is try to instal Zwave, in order to avoid any other iconfig issue, but I’m not able to see where is the issue

I’m stuck and I’m starting to be desperate

The first installation of the zwave binding can take some time until all the dependencies are installed. I usually look at the logs to verify. Occasionally I have restarted OH.

I wait for the binding to finish installation before trying to add a controller.

[Bruce_Osborne]
I do not know about your version, but when this was first released there was a USB standards issue. You needed to connect the usb stick through a usb hub to be properly recognized.

Thank for your answer

I’m Raspberry Pi 4 with openHABian v1.5. My bother is using same zwave stick in a Raspberry Pi 3B with openHABian v1.4.1 and he has not any issue. So I understand that is should be for first versions.


The first installation of the zwave binding can take some time until all the dependencies are installed. I usually look at the logs to verify. Occasionally I have restarted OH.

I wait for the binding to finish installation before trying to add a controller

Thanks for your answer

Instalation of binding it doesn’t take too much time, maybe 1-2 minutes, but I also wait for a while before adding the controlles.
I’ve tried with only one dependency and whiout dependencies, but I always get the same issue

I think the issue with the Pi was it thinks a stick is usb 3 when it is actually usb 2 only.

Next week I may be setting up OoenHAB again to test a Z-zwave usb stick from a vendor.

Hi Bruce
I think I know what is the problem, but not clear about hoe to fix it. Checking documentation from Z-wave usb sitck manual I can see hte following:

Linux should appear as a /dev/ttyACM0 (or other numbered such as /dev/ttyACM1 … ACMx ) device, if it does not, you may need to manually install the CDC-ACM module (should already be a part of the Linux kernel) or re-install Linux.your code goes here

So it seem that I need to use tty ACM0 instead of ttyAMA0. But I don’t have that option when I want to chage serial port configuration in Paper-UI:

image

Also, I’m not able to see this tty in /dev/ folder :

[21:40:02] openhabian@openhab:/dev$ ls -l /dev/ttyA*
crwxrwxrwx 1 root dialout 204, 64 Oct 11 15:31 /dev/ttyAMA0
[21:56:24] openhabian@openhab:/dev$ ls -l /dev/ | grep serial
lrwxrwxrwx 1 root root           5 Oct 11 15:31 serial0 -> ttyS0
lrwxrwxrwx 1 root root           7 Oct 11 15:31 serial1 -> ttyAMA0
[21:57:22] openhabian@openhab:/dev$

But is included in /etc/default/openhab2 file

[21:57:22] openhabian@openhab:/dev$ cat /etc/default/openhab2 | grep SerialPorts
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"
EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Do you know how can install port ttyACM0 in openhabian and get that option in Paper-UI?

Thanks in advance

what is the output of sudo dmesg | grep tty ? My controller is at /dev/ttyUSB0 in a RPI 3B+ running Raspbian Stretch.

image

Hi Bruce

this is the output:

[23:36:40] openhabian@openhab:/$ sudo dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M  smsc95xx.macaddr=DC:A6:32:29:88:73 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=be1d5779-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000702] console [tty1] enabled
[    0.840102] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[    0.843350] fe215040.serial: ttyS0 at MMIO 0x0 (irq = 36, base_baud = 62500000) is a 16550

Thanks in advance

Based on that I would try either of the 2 options in the PaperUI. Whichever works. The OS only sees those 2 serial devices.

I’ve tried both options, but smae issue is there.
I think that only optionthat I have is be able to get ttyACM0 defined.
It seems that is not in my sistem:

[21:40:02] openhabian@openhab:/dev$ ls -l /dev/ttyA*
crwxrwxrwx 1 root dialout 204, 64 Oct 11 15:31 /dev/ttyAMA0

Have you tried using a usb hub between the Pi & stick?
The Pi 4 does not properly meet USB standards. The issue was discovered after the product was released.
Try that & run the dmesg command again to see if another port appears.

Not yet. Tomorrow I’ll try to buy a usb hub . Do you recommend anyone?

Many people found a cheaper USB 2 hub worked better because sometimes the Pi misidentified a USB 2 stick as supporting USB 3.

Hi Bruce

Thank you very much! Finally I fixed the issue with the following USB hub:

It seems that is aknow issue for Aeotec Z-stick GEN 5, in coase of using Raspberry PI 4. And the workaround proposed by Aeotec is to use a powered USB 2.0 hub in between RPi4 and the Z-Stick Gen5 . Althought I connected a USB 3.0 hub

I found the following post:
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=245031&sid=2c71284006137282752555f8942858cd

and

After connect the USB hub, I was able to select port ttyACM0, and after select it. Z-stick went to online

Thank you very much for your help on this issue

2 Likes

This HUB worked for me;