Aeotec z-stick setup issues on openHABian (ESXi 6.0 & Ubuntu 17.04)

Yes, it’s a long post but i wanted to include all the debugging i did prior to asking for help

I just got started into home automation and have been struggling for weeks to get my z-stick online in openhab2. I won’t begin to tell you the different setups i’ve tried so here is what i’m using currently (below). Please help!!!

Setup:

  • HP Proliant DL360 G6 rack server
  • Server OS: VMware ESXi 6.0.0-Update2
  • SYBA 2 port USB 3.0 PCI-E card (I found the Proliant OOTB USB does not support 3.0…)
  • Aeotec z-stick gen5 (plugged into the PCI-E card)
  • VM OS: Ubuntu 17.04-server-amd64
  • Software: openHABian latest stable release (installed 9/23)
    * Used the openHABian Oracle Java option
    * Java version “1.8.0_144”
    * Java™ SE Runtime Environment (build 1.8.0_144-b01)
    * Java HotSpot™ 64-Bit Server VM (build 25.144-b01, mixed mode)

Problem:
No matter what I try the z-stick ‘thing’ will not show ‘online’. I’ve done tons of searching… here is all the information i’ve gathered to root cause the problem.

  1. The USB 3.0 card is recognized by the server and i passed through to the VM
    PCIE passthrough
    I verified the VM finds the USB card:
    administrator@ubuntu:~$ lspci
    03:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)

  2. openhab user permissions:
    administrator@ubuntu:~$ groups openhab
    openhab : openhab tty dialout

  3. I see the serial port in /dev/
    administrator@ubuntu:~$ ls -altr /dev/tty*
    crw-rw---- 1 root dialout 4, 64 Sep 24 11:52 /dev/ttyS0

  4. Binding and z-stick config in openhab
    Z-Wave Binding Installed binding-zwave - 2.1.0 (Chris Jackson @chris)

    Z-Wave Serial Controller OFFLINE
    Z-Wave Serial Controller
    zwave:serial_zstick:8f7c297d

    Serial Port config: /dev/ttyS0

  5. Logs on startup
    ==> /var/log/openhab2/openhab.log <==
    2017-09-24 11:51:01.802 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://10.0.0.94:8080
    2017-09-24 11:51:01.802 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://10.0.0.94:8443
    2017-09-24 11:51:02.104 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
    2017-09-24 11:51:02.133 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
    2017-09-24 11:51:02.215 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
    2017-09-24 11:51:02.331 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
    2017-09-24 11:51:03.302 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyS0’
    ==> /var/log/openhab2/events.log <==
    2017-09-24 11:51:03.304 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:8f7c297d’ changed from UNINITIALIZED to INITIALIZING
    2017-09-24 11:51:03.308 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:8f7c297d’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
    ==> /var/log/openhab2/openhab.log <==
    2017-09-24 11:51:03.330 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
    2017-09-24 11:51:03.336 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
    2017-09-24 11:51:03.342 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
    2017-09-24 11:51:03.343 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

  6. I see home odd logs when running dmesg command but not able to determine if its a real problem or not.
    administrator@ubuntu:~$ dmesg | grep -i tty
    [ 0.000000] console [tty0] enabled
    [ 2.094739] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
    [ 2.122365] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A

[ 0.965815] pci 0000:03:00.0: System wakeup disabled by ACPI
[ 0.965964] pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with ‘pcie_aspm=force’
[ 0.966195] pci 0000:00:15.0: PCI bridge to [bus 03]
[ 0.966323] pci 0000:00:15.0: bridge window [mem 0xfd500000-0xfd5fffff]
[ 0.966596] pci 0000:00:15.1: PCI bridge to [bus 04]
[ 0.966712] pci 0000:00:15.1: bridge window [io 0x7000-0x7fff]
[ 0.966728] pci 0000:00:15.1: bridge window [mem 0xfd100000-0xfd1fffff]
[ 0.966770] pci 0000:00:15.1: bridge window [mem 0xeb800000-0xeb8fffff 64bit pref]
[ 0.967011] pci 0000:00:15.2: PCI bridge to [bus 05]
[ 0.967127] pci 0000:00:15.2: bridge window [io 0xb000-0xbfff]
[ 0.967142] pci 0000:00:15.2: bridge window [mem 0xfcd00000-0xfcdfffff]
[ 0.967172] pci 0000:00:15.2: bridge window [mem 0xeb400000-0xeb4fffff 64bit pref]
[ 0.967420] pci 0000:00:15.3: PCI bridge to [bus 06]
[ 0.967550] pci 0000:00:15.3: bridge window [mem 0xfc900000-0xfc9fffff]
[ 0.967579] pci 0000:00:15.3: bridge window [mem 0xeb000000-0xeb0fffff 64bit pref]
[ 0.967823] pci 0000:00:15.4: PCI bridge to [bus 07]
[ 0.967952] pci 0000:00:15.4: bridge window [mem 0xfc500000-0xfc5fffff]
[ 0.967982] pci 0000:00:15.4: bridge window [mem 0xeac00000-0xeacfffff 64bit pref]
[ 0.968224] pci 0000:00:15.5: PCI bridge to [bus 08]
[ 0.968353] pci 0000:00:15.5: bridge window [mem 0xfc100000-0xfc1fffff]
[ 0.968383] pci 0000:00:15.5: bridge window [mem 0xea800000-0xea8fffff 64bit pref]
[ 0.968626] pci 0000:00:15.6: PCI bridge to [bus 09]
[ 0.968756] pci 0000:00:15.6: bridge window [mem 0xfbd00000-0xfbdfffff]
[ 0.968785] pci 0000:00:15.6: bridge window [mem 0xea400000-0xea4fffff 64bit pref]
[ 0.969028] pci 0000:00:15.7: PCI bridge to [bus 0a]
[ 0.969202] pci 0000:00:15.7: bridge window [mem 0xfb900000-0xfb9fffff]
[ 0.969232] pci 0000:00:15.7: bridge window [mem 0xea000000-0xea0fffff 64bit pref]
[ 0.969531] pci 0000:0b:00.0: [15ad:07b0] type 00 class 0x020000
[ 0.971114] pci 0000:0b:00.0: reg 0x10: [mem 0xfd4fc000-0xfd4fcfff]
[ 1.005998] pci 0000:0b:00.0: reg 0x14: [mem 0xfd4fd000-0xfd4fdfff]
[ 1.007555] pci 0000:0b:00.0: reg 0x18: [mem 0xfd4fe000-0xfd4fffff]
[ 1.009093] pci 0000:0b:00.0: reg 0x1c: [io 0x4000-0x400f]
[ 1.013752] pci 0000:0b:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[ 1.014084] pci 0000:0b:00.0: supports D1 D2
[ 1.014086] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 1.014227] pci 0000:0b:00.0: System wakeup disabled by ACPI
[ 1.014375] pci 0000:0b:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with ‘pcie_aspm=force’

administrator@ubuntu:~$ dmesg | grep -i ASPM
[ 0.718673] acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.965964] pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with ‘pcie_aspm=force’
[ 1.014375] pci 0000:0b:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with ‘pcie_aspm=force’

I also forgot to mention that the z-stick does not have any lights when i plug in to the USB card on the server. Does that mean it does not have the drivers loaded ? If so, i’m a bit lost on how to install the uzb.inf file on ubuntu 17.04…

First, thank you for providing so much relevant information. You’d be surprised how many “it doesn’t work, how do I fix it” postings we get.

I have a gen 2 dongle running on ESXi 6.5 with an Ubuntu 17.4 VM. To get it to work I had to disable the new USB drivers in ESXi and enable the older version, but I don’t know if that needs to be done for version 6.

I’ve always had the light come on on my dongle so I don’t know if that is relevant, but suspect it is a problem. The single shows up as a serial device in Ubuntu so there shouldn’t be any special drivers required.

Does the dongle show up in ESXi and can you just pass it through to the VM? It probably won’t say Aeotec but you should be able to figure out what it is though process of elimination. That is how I do it. I don’t have a separate YSB card though so it’s not like I had a lot of choice.

Typically on Ubuntu the dongle will show up as a /dev/ttyUSB0.

Given what I know from my experience and the info provided in going to guess that the USB card is not being recognized by your VM and therefore the dongle is not being mounted to dev.

I’d try to just pass the dongle through instead of the whole USB card.

THANK YOU for responding. I work in DevOps but first time working with ESXi directly - our infrastructure guys build the boxes…

I have switched back to the server USB vs. PCI-E card I installed. I know they work as i’ve used a USB keyboard to manage the host directly… I tried to disable the new USB drivers from what other posts have shared - vmkusb. Interestingly my host does not have that driver listed.

I decided to disable the main USB driver via ‘esxcli system module set -m=usb -e=FALSE’

when i restarted and ran a ‘lsusb’ command i saw NOTHING. Oops. time to renable and try another.

I ran esxcli system module set -m=usb -e=TRUE’ and restarted the ESXi host.

I didn’t expect this but see below.

(after re-enabling USB driver)
[root@localhost:~] lsusb
Bus 006 Device 002: ID 03f0:1027 Hewlett-Packard Virtual keyboard and mouse
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I plugged in the z-stick into the server USB port and BOOM. see below.
[root@localhost:~] lsusb
Bus 005 Device 002: ID 0658:0200 Sigma Designs, Inc.
Bus 006 Device 002: ID 03f0:1027 Hewlett-Packard Virtual keyboard and mouse
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Now trying to pass this new device through vSphere Client to the openhab Ubuntu VM. Will update soon!

If there are no lights when plugged into a powered USB port, the LEDs have been disabled or the stick is dead. If you push the button when it is unplugged, does the LED flash yellow? If not, this could be another sign of a bad stick. You can use the Aeon Labs Backup Tool to enable/disable the LED and see if you can at least communicate with it. I believe the default setting for the LEDs is enabled, so you may have a bad stick.

So I figured it out. Even after recycling the USB driver module using the commands i listed above i still could not find the z-stick when I went to ‘add’ USB device hardware on the VM settings. Originally I had marked ALL USB devices for passthrough on the host server in vSphere client config (Configuration Tab -->Advanced Settings). I decided to remove ALL USB devices for passthrough and rebooted the host server. I continued to see the "Sigma Designs, Inc.’ when running a ‘lsusb’ command on the host after reboot.
administrator@ubuntu:~$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 005 Device 004: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 005 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0658:0200 Sigma Designs, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I then shutdown the VM and was finally able to see the ‘Sigma Design, Inc’ device when adding hardware for the VM !
vm config
It seems as if the passthrough from the host is not always a good idea… I started the VM and did a ‘lsusb’ and found the usb module loaded! Added the serial port as /dev/ttyACM0 after searching for device leveraging the z-wave binding. ONLINE! Now the lights are blinking on the device plugged into the ESXi server.

Thanks so much for the help Rich! @rlkoshak If anyone needs help with using this type of setup let me know. Spent alot of hours debugging this one… :slight_smile: