Filter results by

Z-Wave

ARTIK 530, 710, and 1020 development boards support use of Z-Wave® through a USB-based controller. Here we will describe the procedure using one such device, the Z-Stick Gen5, from Aeotec. Other similar devices may be available that give comparable results.


Aeotec
Z-Stick Gen5
Documentation Archive
Host Software

The removable USB approach is almost a necessity due to the nature of Z-Wave: the controller needs to be portable so that it can be placed near each device to be included in the network. The dongle-type solution allows the system to meet this requirement, regardless of whether the ARTIK-based product is portable or stationary.

  • Plugged into ARTIK host USB port: Acts as a serially-connected Z-Wave modem; controller software running on the ARTIK processor sends commands and data to the modem, and receives/manages incoming events and data.

  • Detached: Acts as a self-powered mobile Z-Wave network manager, with the ability to include or delete Z-Wave end devices.

For the host controller software, we'll be using the openzwave platform. It includes an example program called MinOZW that reads in the device information collected in the Z-Stick device and then monitors and reports on activity on the network.

MinOZW is not a complete automation solution; you need to develop your own code to customize it to your application. Various GUI-based automation management software solutions are available; some are discussed at the Host Software link noted above.

Installing Driver Programs

openzwave software is available to drive the Z-Wave component. With it you can scan the Z-Wave network for connected devices and send basic commands.

Before installing the software, run the following command to install the libudev.h headers (part of the pre-installed systemd package in the Linux version used on ARTIK).

dnf install systemd-devel

You can then run the main installation and follow the openzwave instructions for integrating Z-Wave components into your code.

To install from source files:

  1. Download UNIX source (rev. 1.4.0 or newer - we'll show 1.4.0 instructions here): http://old.openzwave.com/downloads/

  2. Copy the file to /usr/local/lib

  3. Uncompress using tar -zxvf openzwave-1.4.0

  4. Change to the newly created directory, such as cd openzwave-1.4.0

  5. Type make to build

  6. Type make install to finish the installation.

The driver programs and the MinOZW test program are now available under this directory.

Creating Z-Wave Network

The Z-Stick USB device collects and maintains all network device information. Follow the Aeotec Z-Stick instructions to include each of your Z-Wave end devices.

Running Test Program

To run the MinOZW example program:

  1. Plug your Z-Stick into one of the integrated USB host controller ports. (The ARTIK 520 does not have a USB host controller. Other ARTIK Linux systems have double-stacked type A receptacles.)

    If you get a message like this upon inserting the Z-Stick, you can safely ignore it:
       "This device cannot do calls on its own. It is not a modem."

  2. From within the same directory you created earlier, run
    ./MinOZW /dev/ttyACM0
    (or use ACM1 if you chose the second USB port).

You should see log output of various commands being sent to the controller along with the results. The program exits after a few minutes of inactivity, or you can hit Ctrl-C.

If you see "ERROR: Cannot open serial port /dev/tty…"
then the USB serial assignment you've made is incorrect or missing.

If you have included a report-capable device on the Z-Stick, you may see event messages from the device. This one from an Intermatic CA3750 Dual Contactor module indicates that the button on the contactor unit has been pushed to toggle it off.

2017-03-06 20:56:33.476 Info, Node002, Response RTT 107 Average Response RTT 101
2017-03-06 20:56:33.476 Info, Node002, Received a MultiInstanceEncap from node 2, instance 2, for Command Class COMMAND_CLASS_SWITCH_BINARY
2017-03-06 20:56:33.476 Info, Node002, Received SwitchBinary report from node 2: level=Off

On-Board Modem

The ARTIK 520 and 1020 development boards include a Z-Wave modem component for implementation of a Z-Wave network. However, a high level of commitment is required to use this circuit: to begin with, the modem requires firmware that is only available to purchasers of a Sigma Designs development kit, as listed in this note from Digi-Key.

For this reason, using a removable USB device ($25-$45) while doing initial prototyping is recommended. For a stationary (not portable) ARTIK-based end product, the removable-dongle approach may be best for the production solution as well.

Last updated on: