I am trying to add an aeotec Z-Wave stick to my openHAB.
The Z-Wave stick is “Aeotec Z-Stick S2”. Aeotec say the “S2”
represents the fact it was the 2nd edition of Z-Stick, not S2 security.
The stick is model DSA02203-ZWAU (921.42MHZ) is (in 2021) discontinued, but aeotec list 2 support articles here: Z-Stick S2 : Aeotec Help Desk.
My openHAB is openHAB 3.0.1 running on MacMini (M1 chip). I installed the M1 (arm64) native Java 11 runtime environment (JRE) from https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jre
I identified what serial port the stick uses by comparing the content of the /dev folder before and after the stick being plugged in:
To save including all 350 entries in /dev, let me filter out the two new entries to show the 2 entries created when I plug in the stick:
Before plugging Z-Wave stick in:
john@Johns-Mac-mini /dev % ls -l cu.* crw-rw-rw- 1 root wheel 9, 5 8 Mar 17:46 cu.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 9, 1 8 Mar 17:46 cu.debug-console crw-rw-rw- 1 root wheel 9, 3 8 Mar 17:46 cu.wlan-debug john@Johns-Mac-mini /dev % ls -l tty.usb* zsh: no matches found: tty.usb*
after plugging Z-Wave stick in:
john@Johns-Mac-mini /dev % ls -l cu.* crw-rw-rw- 1 root wheel 9, 5 8 Mar 17:46 cu.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 9, 1 8 Mar 17:46 cu.debug-console crw-rw-rw- 1 root wheel 9, 7 9 Mar 04:41 cu.usbserial-0001 crw-rw-rw- 1 root wheel 9, 3 8 Mar 17:46 cu.wlan-debug john@Johns-Mac-mini /dev % ls -l tty.usb* crw-rw-rw- 1 root wheel 9, 6 9 Mar 04:41 tty.usbserial-0001 john@Johns-Mac-mini /dev %
I note that the added /dev entries BOTH have permissions of crw-rw-rw-. The final rw means anyone can read and write to the port, independant of the fact they have a user and group of root and wheel.
crw-rw-rw- 1 root wheel 9, 6 9 Mar 04:41 tty.usbserial-0001 crw-rw-rw- 1 root wheel 9, 7 9 Mar 04:41 cu.usbserial-0001
I think this means the java process should be able to read and write to/from the serial port without further ado.
I added the Z-Wave Binding (binding-zwave) version 3.0.1.
I added a Thing “Z-Wave Serial Controller”, and set the Serial Port to ‘/dev/tty.usbserial-0001’ and clicked save in the top right hand corner of the ‘Z-Wave Serial COntroller’ screen. I also tried ‘/dev/cu.usbserial-001’. Same result for both: In the shell running openHAB, I get:
java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
This logs to the console again and again. I removed the Thing I created above, and the logging to the console stops.
Looking at gatekeeper6838’s suggestion from [SOLVED] OH3: zwave binding Z-Wave Serial Controller Aeotec Z-Stick Gen5 remains offline - #32 by gatekeeper6838
On my MacMini, /var/lock does not exist:
sudo ls -al /var/lock ls: /var/lock: No such file or directory
SO I looked at this thread: [SOLVED] No access to USB zwave stick - #10 by sihui
and sought how to install RXTX java extension on my mac. I followed this short tutorial: RXTX for Mac OS X
But in the GUI, the Thing I create is still showing offline, and the RXTXCommDriver error is stil logging to the console when ever the Thing exists.
How can I get my Z-Wave stick working in openHAB3? I am considering installing openHAB2.5 instead, as this problem appears to have started only with 3.
Thanks in advance.