Setup:
- Raspberry Pi 3 Model B Rev 1.2
- OS: Raspbian 8 (jessie)
- Kernel: Linux THANATOS 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
- java version “1.8.0_161” Java™ SE Runtime Environment (build 1.8.0_161-b12)
- Openhab: openHAB 2.5.4 Release Build
- ZWave Binding: 2.5.4
- ZWave Controller: Aeon Labs Aeotec ZStick
Problem:
After upgrading from 2.3 to 2.5 and then rebooting, ZWave bindings don’t work as expected. My ZWave nodes all show “UNINITIALIZED - BRIDGE_UNINITIALIZED” and the controller shows “INITIALIZING”.
At best, I can get the controller to “ONLINE” and all nodes as “INITIALIZING” by changing the serial device to something and then back.
Attempted Solutions:
I went to PaperUI and Edited the controller Thing to verify the serial output, which does show up as /dev/ttyACM0
. If I change this to /dev/ttyAMA0
and back (as recommended elsewhere on these forums to do this to make sure the setting is set correct), then sometimes the Things all go ONLINE, but changing their state in habpanel, paperui, etc. don’t actually trigger any changes (real or logged attempts). Or other times, the controller goes “ONLINE” but all nodes are stuck at “INITIALIZING”. Yet others, the controller goes to “OFFLINE - BRIDGE_OFFLINE” with all the nodes as “INITIALIZING”.
I followed instructions in the “ZWave Binding Updates” post to upgrade the Things for ZWave.
Additional Info:
I have other bindings that are in a broken state, but I believe those are different issues. For example, Nest is broken due to migrating my account to Google (ugh, mistake), Hue is offline because I haven’t yet done the Hue bridge fix, and Chromecasts are all stuck at “INITIALIZING”. Additionally, stopping Openhab as a service takes a while and eventually times out and there are messages on startup that starting handlers takes more than 5000ms.
This was working (ZWave binding and all Things on ZWave) on 2.5 when I first did the upgrade, but when I rebooted the device it broke. I found out this was likely due to the cache reinstalling an old snapshot, and it’s at this point that I cleaned the cache. Specifically, when I rebooted, there were 2 ZWave bindings installed according to the karaf console with list -s | grep zwave
– a 2.5 version from PaperUI and a 2.3 version from a .jar snapshot install. Despite removing the 2.3 version with bundle:uninstall <id>
and confirming it was gone with list -s | grep zwave
, it kept re-appearing after each reboot of Openhab as a service or reboot of the Pi. This is even with the 2.5 PaperUI version removed. Clearing the cache with openhab-cli --clean-cache
after stopping OpenHAB with sudo systemctl stop openhab2.service
resolved this. Then I added the binding back with PaperUI, confirmed there was only one, and am hitting this issue.
Here are the serial interfaces showing they should be configured correctly for my Aeon Labs Aeotec ZStick:
$ ls -alph /dev | grep ttyA
lrwxrwxrwx 1 root root 7 Apr 28 19:30 serial1 -> ttyAMA0
crw-rw---- 1 root dialout 166, 0 Apr 28 19:37 ttyACM0
crw-rw---- 1 root dialout 204, 64 Apr 28 19:30 ttyAMA0
$ groups openhab
openhab : openhab tty dialout audio bluetooth
$ lsusb
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I’ve let the nodes sit at “INITIALIZING” for over 30 minutes, and enabled DEBUG loglevel for the zwave binding. They don’t finish initializing.
Attached is a log from a fresh boot into openhab running (controller at “INITIALIZING” and all nodes “UNINITIALIZED - BRIDGE_UNINITIALIZED” the whole time), then after 5 minutes changing the serial port from /dev/ttyACM0
to /dev/ttyAMA0
and back at 7:58:30 PM, then 5 more minutes waiting (controller and nodes all still the same state as before).
/var/log/openhab2/events.log
: https://drive.google.com/open?id=1cxOA_3VCZJV-FDIFUU2jTU6VTcVfQyDi
/var/log/openhab2/openhab.log
: (DEBUG mode): https://drive.google.com/open?id=1JgDtRruHsByS2GIQ-8qlLjWp1hb5yZx2