[vc_row][vc_column][vc_column_text]Z-Wave is a wireless communications protocol designed for home automation, specifically to remotely control applications in residential and light commercial environments. The technology uses a low-power RF radio embedded or retrofitted into electronics devices and systems, such as lighting, home access control, entertainment systems and household appliances.
We follow the steps in post to install z-wave controller on pcDuino. In this tutorial, we show what we did on pcDuino.
[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1391835110-1-18″][vc_column_text]
- 1 x pcDuino v2
- 1 x Aeon DSA02203-ZWUS Labs Z-Wave Z-Stick Series 2 USB Dongle
- 1 x Jasco 45609 Z-Wave Wireless Lighting Control On/Off Switch
[/vc_column_text][/vc_tab][vc_tab title=”Install Z-wave switch” tab_id=”1391835110-2-47″][vc_column_text]First, we need to make sure we shutdown power to the branch. The Z-wave switch needs main power (110V) to power it up. As shown below, we connect the hot of line in (Black wire) and neutral (White wire) to the lower end (where the LED is located). We also need to connect the hot wire of load (Black wire) to the upper end. We also hook up the ground.
To see if we get it correct to connect the line in, we can then turn on the breaker. If the connection is correct, we will see the blue LED on.
The installed switch is shown below:
[/vc_column_text][/vc_tab][vc_tab title=”Pair the Z-stick with switch” tab_id=”1391836243709-2-9″][vc_column_text]The Z-stick has built-in battery. We come close to the z-wave switch and press button on the Z-stick once, the LED on z-stick will slowly blink. Then, we press the z-wave switch once, the LED on z-stick will blink much faster, which means the pairing is successful. We press the button on z-stick again to finish the pairing.[/vc_column_text][/vc_tab][vc_tab title=”Install and Test software on pcDuino” tab_id=”1391836460857-3-0″][vc_column_text]1. Install build-essentials, make, subversion applications (maybe others).
$sudo apt-get install build-essential make subversion
libudev-dev
2. Plug in z-stick
3. Install open-zwave:
$cd /home/ubuntu $svn checkout http://open-zwave.googlecode.com/svn/trunk/ open-zwave $cd open-zwave/cpp/build/linux $make
This step will take some time.
4. Build the open-zwave example to test if everything is Okay.
$cd ../examples/linux/MinOZW (change Makefile if your device is not at /dev/ttyUSB0) $make $./test
While this is running – hit the button on the switch and we will see some output from test, and it will create a config file – zwcf_yourhome.xml, where yourhome is replaced by a hex string.
5. Install openzwave-control-panel.
$cd /home/ubuntu $svn checkout http://openzwave-control-panel.googlecode.com/svn/trunk/ openzwave-control-panel
6. Install libmicrohttpd.
$wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.20.tar.gz $tar -xzvf libmicrohttpd-0.9.20.tar.gz $cd libm* $./configure $make $sudo make install
7.Went to back to openzwave-controller
$cd ~/openzwave*
Edit file ‘Makefile”, and make sure OPENZWAVE and LIBMICRoHTTPD are as below:
OPENZWAVE := ../open-zwave LIBMICROHTTPD := /usr/local/lib/libmicrohttpd.a
We also need to uncomment the three lines for linux:
# for Linux uncomment out next three lines LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/linux/*.a) LIBUSB := -ludev LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB)
Then we compile by:
$make
8. Time to test (the number after p is port number):
$./ozwcp -p 55555
Before we run ozwcp, we need to copy the directory ‘config’ from open-zwave to openzwave-control-pannel.
9. On a PC, launch browser, and point to http://pcduino_ip_address:55555
We input ‘/dev/ttyUSB0’ under device name, and hit button ‘Initialize’, then we will see our z-wave switch shown up under tab devices, we can then turn on and off the switch![/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.