Table of content

Plugin documentation

icon

Last change

New instructions to apply changes from immediatly previous version.

  • 0.4.0b1 : (12-10-2015) Compatibily library : OpenZwave >= 1.3.401, python_openzwave >= 0.3.0 (b4)
    • Target : python-openzwave, domogik (0.4.1)

    • Update, compile and install python_openzwave.

    • Change log :
      • New version for domogik 0.4.1
  • Previous change

Purpose

Z-Wave is a wireless ecosystem that lets all your home electronics talk to each other, and to you, via remote control. This plugin allows to control zwave devices.

It uses open source library openZwave c++ project and python-openzwave as interfacing cython, The Zwave network manager is directly integrated into the plugin

Simple action/sensor of devices have access via domogik devices (widgets). Viewing and setting Zwave devices is accessed via a special plugin page from the admin panel.

Development is in progress, features will get gradually

Dependencies

Controller/devices Compatibility List

Following interfaces are supported and verify with domogik:

  • Aeon Labs Z-Stick Series 2
  • RaZberry (using rule with /dev/ttyAMA0 instead of /dev/ttyUSBx)

Others controllers are supported by openzwave, you can check here

Following devices are supported :

  • Everspring
    • ST814 - Temperature, Humidity Sensor
    • AN158 - Switch Meter Plugin
    • SE812 - Siren
  • Everspring (C.T.)
    • HSM02 - Door windows sensor
  • Fibaro
    • FGS211 - Relay Switch 3KW
    • FGS221 - Double Relay Switch 2x1,5kW
    • FGD211 - Universal Dimmer 500W
    • WallPlug - Meter Switch with leds
  • Aeon Labs
    • HEM - Home Energy Metter
    • DSB05 - Motion Multi Sensor,
  • Express Controls
    • HSM100 - EZMotion luminosity and temperature sensor
  • Danfoss
    • Living connect (thermost heating)

Create the udev rule for controller

You may create a udev rule for this device. The rule and filename are given in the Requirements tab of the plugin configuration page.

Currently, your PC controller is known as /dev/ttyUSBx (by default). This is not very convenient nor meaningful. We will then create a new udev rule that will create a link called /dev/zwave that will point to /dev/ttyUSBx.

Gather information about your device controller (USB)

  • Example using Aeon Stick2 on USB port. For ohter model it’s should different.
  • Use lsusb command for listing of USB devices, check before and after plug your USB controller.
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 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 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 0040:073d
Bus 004 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Bus 004 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 007 Device 002: ID 0b05:179c ASUSTek Computer, Inc.
  • Use ls /dev/ttyUSB* to check your num USB, check before and after plug your USB controller.
  • Before
$ ls /dev/ttyUSB*
/dev/ttyUSB2
  • After USB plug
$ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB2
  • Use udevadm command to gather information about your device :
$ udevadm info  -a -n /dev/ttyUSB0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/ttyUSB0/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="cp210x"
    ATTRS{port_number}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0':
    KERNELS=="4-3:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="cp210x"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{interface}=="CP2102 USB to UART Bridge Controller"

  looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4/4-3':
    KERNELS=="4-3"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bmAttributes}=="80"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{urbnum}=="10835"
    ATTRS{idVendor}=="10c4"
    ATTRS{idProduct}=="ea60"
    ATTRS{bcdDevice}=="0100"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{speed}=="12"
    ATTRS{busnum}=="4"
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="3"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{authorized}=="1"
    ATTRS{manufacturer}=="Silicon Labs"
    ATTRS{product}=="CP2102 USB to UART Bridge Controller"
    ATTRS{serial}=="0001"

  looking at parent device '/devices/pci0000:00/0000:00:12.0/usb4':
    KERNELS=="usb4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{urbnum}=="134"
    ATTRS{idVendor}=="1d6b"
    ATTRS{idProduct}=="0001"
    ATTRS{bcdDevice}=="0300"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{speed}=="12"
    ATTRS{busnum}=="4"
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="5"
    ATTRS{quirks}=="0x0"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{authorized}=="1"
    ATTRS{manufacturer}=="Linux 3.0.0-24-generic ohci_hcd"
    ATTRS{product}=="OHCI Host Controller"
    ATTRS{serial}=="0000:00:12.0"
    ATTRS{authorized_default}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:12.0':
    KERNELS=="0000:00:12.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ohci_hcd"
    ATTRS{vendor}=="0x1002"
    ATTRS{device}=="0x4397"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{subsystem_device}=="0x8496"
    ATTRS{class}=="0x0c0310"
    ATTRS{irq}=="18"
    ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{numa_node}=="-1"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

Those information will be useful to determinate for sure that this device is your Zwave controller. We will use several information, flagged above as DRIVERS ATTRS{manufacturer} and ATTRS{product} With that, we will be sure that we’ll be talking to our controller. You can chose others attributs.

Create rule.

  • Create a new file, in folder etc/udev/rules.d Let’s call it 98-usbcp210x.rules
  • Enter those information in the file :
# for z-Stick serie 2 to domogik /dev/zwave
DRIVERS=="usb", ATTRS{manufacturer}=="Silicon Labs", ATTRS{product}=="CP2102 USB to UART Bridge Controller", SYMLINK+="zwave", MODE="0666"

The DRIVERS ATTRS{manufacturer} ATTRS{product} values must be coherent with what you have found above. * Ask udev to rediscover your device :

# udevadm test $(udevadm info --query path --name ttyUSB0)
  • Your device should now be re-discovered, let’s confirm it :
$ ls -l /dev/zwave
lrwxrwxrwx 1 root root 7 2012-08-27 00:46 /dev/zwave -> ttyUSB0

Plugin configuration

Configuration

In Domogik administration section, go to client plugin-ozwave details page.

menuconf

configuration1

Creating devices for ozwave

In clients page of admin UI, go to plugin-ozwave-<your_host_domogik>, select tab Devices, New to create your devices.

menudevices

Create a device for the primary zwave controller

Chose instance-type : primary.controller named Zwave Controler.

Or all other device type who are a controller (Z-Stick2)

creat_ctrldevice

That device create a link between the driver and openzwave, also between the zwave homeId and your networkId used by domogik for devices adresse. You can create it after starting the plugin, so it is possible to find its address in the devices table of the controller and devices You can create as many Zwave Controler you have primary controllers.

Note

  • Create this device is necessary to handle your zwave network.
  • Main parameters
Key Example Description
Device Name MyController | The display name for this device.
Description What you want | A short descriptionn for this device.
Reference Z-Stick 2 A reference for this device, eg.: manufacturer reference.
  • Global parameters
Key Example Description
driver /dev/zwave Z-wave device that you have define in UDEV rule
networkid MyHomeNetwork Home ID name for association with domogik devices
Feature example

example_device1

  • Main parameters
Key Example Description
Device Name MyController | The display name for this device.
Description What you want | A short descriptionn for this device.
Reference FGWPE Wall Plug A reference for this device, eg.: manufacturer reference.
  • Global parameters (Extra parameters for some particular zwave device)
Key Example Description
batterycheck True HCheck battery level at zwave device wakeup.
  • xPL parameters

example_device2

Key Example Description
networkid MyHomeNetwork Home ID name for association with domogik devices
node 14 Z-wave node id that you can find in the nodes table
  • xPL command parameters (if it’s a zwave device with command(s))
Key Example Description
<xpl_cmds> - instance 1 Zwave node instance id that you can find in the Commands Class table
  • xPL stat parameters (if it’s a zwave device with sensor(s))
Key Example Description
<xpl_stat> - instance 1 Zwave node instance id that you can find in the Commands Class table

Start the plugin

You can now start the plugin (start button) and use the created devices.

Configure the features widgets on Domoweb

You can now place the widgets of your devices features on Domoweb.

Dependencies installation

Install the tailer library for Python

Install tailer :

$ sudo pip install tailer

Install python-openzwave

Purpose

This not a plugin, but an external library for zwave plugin, is based on python-openzwave software.

python-openzawe and openzawe are in high development, by two different teams, so installing it can be sometimes not so easy. So we propose you different methods to install it.

For the operation of ozwave domogik plugin there is only need part python-openzwave Lib.

Of course you can install part python-openzwave API

Get information from bibi21000 home site form more python-openzwave details.

All information are extracted from the git repository https://github.com/OpenZWave/python-openzwave

Installing python-openzwave from archive

This is the simplest (and the fastest) way to install python- openzwave. It cames with openzwave source files and is already cythonized.

This is surely the best soltion to install python-openzwave on a raspberry pi.

Get archive of python-openzwave

You are now ready to download sources of python-openzwave here :

This archive contains sources of python-openzwave and openzwave.

tar xvzf python-openzwave-X.Y.Z.tar.gz

This command will extract all the needed sources. And change to the right directory.

cd python-openzwave-X.Y.Z
Install the needed tools

You must install git and other tools to get sources of python- openzwave and openzwave and build them. Look at the documentation of your Linux distribution to do that.

On a debian like distribution :

sudo make deps
Build process

Now, you can compile sources :

make build

If you have already built python-openzwave or the build failed you can use the clean option :

sudo make clean
make build

Do not use root to build python-openzwave as it will surely fails. Please use a “normal user”.

Installation

You can now install the packages using the following command will.

sudo make install

The installation script create a list of installed files. So you can remove python-openzwave using the following command :

sudo make uninstall
If it fails

Simply remove the python-openzwave-x.y.z directory and extract it again.

Installing python-openzwave from repository

Install the needed tools

You must install git and make to retrieve sources of python-openzwave and openzwave.

On a debian like distribution :

sudo apt-get install -y git make
Get sources of python-openzwave

You are now ready to download sources of python-openzwave :

git clone https://github.com/OpenZWave/python-openzwave

The previous command will create a copy of the official repository on your computer in a directory called python-openzwave.

Install dependencies

You need some tools (a c++ compiler, headers dir python, ...) to build python-openzwave and openzwave library.

On a debian like distribution :

sudo make repo-deps

For non-debian (fedora, ...), you can retrieve the packages needed in the Makefile.

Update and build process

Go to the previously created directory

cd python-openzwave

The following command will update your local repository to the last release of python-openzwave and openzwave.

make update

When update process is done, you can compile sources

make build

Or if you have already build python-openzwave in a previous installation, you can use the clean target to remove old builds.

sudo make clean

Do not use root to build python-openzwave as it will surely fails. Please use a “normal user”.

Installation

You can now ready to install the eggs using the following command :

sudo make install

You can also remove python-openzwave using :

sudo make uninstall
Running tests

You can launch the regression tests using :

make tests

Keep in mind that the tests will “play” with your nodes : switching on and off, dimming, adding and removing scenes, ...

Static vs dynamic (or shared)

The openzwave (c++) lib needs to run as a singleton : it means that it MUST have only one instance of the manager running on your computer.

There is 2 ways of linking libraries with a program :

static : includes a copy of the library in your binary program. This means

that your program has its own instance of the library. This the way the install.sh runs. So you CAN’T have another program (like the control-panel) running when using the python-openzwave library

dynamic or shared : includes a link to the library in your binary program.

This means that your program share the library with other programs. In this case, the instance is owned directly by the library. This the way the debian package works. So you CAN have another program running when using the python-openzwave library. Of course, this program MUST use the shared library.

Creating the zwave device controller

We need to create an udev rule in order to create the device /dev/zwave - check your device It’s suppose your zwave controller is at /dev/ttyUSB0

$ udevadm info --name=/dev/ttyUSB0 --attribute-walk
  • locate your idVendor and idProdroduct

In /etc/udev/rules.d, create a file zwave.rules, and write the following rule

Example, for aeon stick

| SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60",
               SYMLINK+="zwave", MODE="0666"

Other zwave tool

Migrating from python-openzwave 0.2.X to 0.3.0

I need to update source tree of python-openzwave and modules’s names because of a bug in setuptools : https://bitbucket.org/pypa/setuptools/issue/230/develop-mode-does-not-respect-src . Sorry for that.

Update your sources:

git pull

Before building python-openzwave 0.3.0, you must uninstall the old version :

sudo make uninstall

About cython : I’ve made many tests using cython installed via pip : (0.20, 0.21 and 0.22). Compilation is ok but a segfault appears when launching the tests. Please remove it.

sudo pip uninstall Cython

You also need to make some minor updates in you code, look at CHANGELOG

If you have problems, please submit an issue with :

  • cython -V
  • the content of the directory /usr/local/lib/python2.7/dist-packages/ (for python2.7)
  • the content of /usr/local/lib/python2.7/dist-packages/easy-install.pth (for python 2.7)
Ubuntu 64bits ... and the others

If you’re using Ubuntu 64 bits (and mayde others) and keep your distribution up to date, you certainly have the segfault problem.

It appears with the last update of python :

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

I’ve open a discussion on cython-users here : https://groups.google.com/forum/#!topic/cython-users/mRsviGuCFOk

The only way I found to avoid this is to rebuild and reinstall the old release of python :

wget https://launchpad.net/ubuntu/+archive/primary/+files/python2.7_2.7.6-8.dsc https://launchpad.net/ubuntu/+archive/primary/+files/python2.7_2.7.6.orig.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/python2.7_2.7.6-8.diff.gz

dpkg-source -x python2.7_2.7.6-8.dsc

sudo apt-get build-dep python2.7

cd python2.7-2.7.6

dpkg-buildpackage

Wait, wait and await again :)

cd ..

sudo dpkg -i *.deb

To prevent future updates of python, you could mark its packages. For example, if you use apt to update your distribution, use the following command :

sudo apt-mark hold idle-python2.7 libpython2.7-minimal python2.7-dbg python2.7-minimal libpython2.7 libpython2.7-stdlib python2.7-dev libpython2.7-dbg  libpython2.7-testsuite python2.7-doc libpython2.7-dev python2.7 python2.7-examples

Some users have reported that building python-openzwave using the archive (INSTALL_ARCH) can also do the trick. Let me know if it works for you.

Openzwave control-panel

In order to identify your network and collect the NodeID of your devices, you can use the openzwave-control-panel

Openzwave & Manager tools

State and version of libraries

menuadvanced

The two flag Openzwave and Manager give the state of respective library

  • Red : Stopped

managerstopped * Green : Alive * orange : Starting managerstarting1 managerstarting2 * Grey : Unknown * Black : Failed managerfail

Openzwave: is the openzwave librarie installed. Manager: is the ozwave plugin manager connected to openzwave.

On right python-openzwave and openzwave libraries version are display, only if the plugin is started.

This row can be collaspe to display openzwave configuration options.

Openzwave configuration options

ozwoptions

Here you can check all options. All details are commented in table.

Soon in a future release, it may be possible to edit them..

Controller and Network tab

Under state libraries row, a tab list and display all controller knowns.

managerdiscoverctrl

Controller & devices tools

menu2

Get Zwave controller informations

  • you can check to verify the information on zwave network state and controller in the first part of the page.

check-ctrl1

The status information can be refreshed using button. bt-refresh-ctrl

Get Zwave devices (Nodes) informations

Note

On a zwave system, devices are called Nodes.

  • Devices initialisation field give state of global initialize process.

The process can take a long time (up to 5 min). Be patient..... All nodes discovered and / or stored are scanned one by one to be initialized.

check-dev1

The status information can be refreshed using button. bt-refresh-ctrl

Representation Message Description

progess-state1

progess-state2

Pointing the mouse over icon in column “NodeId” give status of initializing.
Uninitialized No starting init operation.
Initialized - not known Node has completed init, but openzwave don’t know is model (shows xml openzwave files).
Completed Node has full completed init.
In progress - Can receive messages (Not linked) Node can now receive messages, but his initialization not finish. Probably node sleeping. Controller have finish init, when node awake it state should be Completed.
In progress - Linked to controller Node is recognize by controller, initialization is in progress.
In progress - Can receive messages Node can now receive messages, but initialization not finish.
Out of operation Node is mark as failed, controller don’t find him.
battery-level Pointing the mouse over battery icon in column “NodeId” give status of battery level.
Value in % Fill icon picture level of battery.

awake1

awake2

Pointing the mouse over icon in column “Awake” give status of listening mode.
Awake Node is awake, message can send immediately.
Sleeping Node probably sleeping, message are put on send queue.
det-type Pointing the mouse over icon in column “Type” give capacities of node.
Primary Controller

Node is primary controller, is the main device used to configure and control a Z-Wave network.

The only difference between a primary and secondary controller is that the primary is the only one that can be used to add or remove other devices.

For this reason, it is usually better for the primary controller to be portable, since most devices must be added when installed in their final location.

Secondary Controller There can only be one primary controller - all other controllers are secondary controllers.
Static Update Controller A Static Update Controller (SUC) is a controller that must never be moved in normal operation and which can be used by other nodes to receive information about network changes.
Bridge Controller A bridge controller is able to create virtual nodes that can be associated with other controllers to enable events to be passed on.
Routing Node is a routing device that passes messages to other nodes.
Listening Node is a setening device that does not go to sleep.
Beaming Node is a beam capable device..
Security Node supports security features.
FLiRS Node is a frequent setening device that goes to sleep but can be woken up by a beam. Useful to determine node and controller consistency..
cmd_node Buttons on column “Action” get access of others commands on nodes.
Detail Node Show/hide command class capacities table.
Update Node

Send to node Name and Location field to update it.

Saving modification in config file with “Save config” button

Edit association Manage groups association.

Force Refresh Node

refr-node-inf

Causes the nodes data to be obtained from the Z-Wave network in the same way as if it had just been added. This method would normally be called automatically by OpenZWave, but if you know that a node has been changed, calling this method will force a refresh of the data held by the library. This can be especially useful for devices that were asleep when the application was first run.

Four options possible :
  • Node informations : Fetch the data for a node from the Z-Wave network
  • State Node : Fetch the command class data for a node from the Z-Wave network
  • Dynamics data : Fetch only the dynamic command class data for a node from the Z-Wave network.
  • Heal node with reroute : Try to heal node and reroute it after.
Monitor Node and log it This commmand store all event send an receive by a node. To stop monitoring click again button. Log file saved in user path defined in config section. (defaut: share/domogik/data/ozwave/lognodeXXX.log) Log contains also openzwave log if unable.

Manage association devices (groups)

  • Some devices have the ability to be combined with other devices and can send their information.
  • These associations are using groups, access to the dialog management groups is done with the button grp-dialog-bt

grp-dialog

how to use management associations

Note

  • Due to the possibility of sleeping devices, the system considers the command to have been transmitted.
  • In the case of a device sleeping command will be transmitted when the device wakes up.
  • So the association will be effective as this momment there.

Warning

Careful if the plugin is stopped between time command is lost.

  • An icon indicates the status of the device in the group, it may be :

    • unknown
    • confirmed
    • to confirm
    • to update
  • The operations are performed by simply drag and drop.

  • After making the changes click on OK to send at the device.

  • To quit dialog box click Cancel.

  • Actually button Reset is not handled.

Example Description
grp-dialog1 If you drop at bad placement a icon forbidden is show.
grp-dialog2 When you drop in a group who device ins’it to add it, a icon plus is show.
grp-dialog3 After adding device in group, a icon to update is show.
grp-dialog4 If you drop at bad placement a icon forbidden is show.

Manage devices Commands Class

Display commands class list

  • All command class are listed in a table.

tab-cmdclass1

Change values of command class

  • You can edit the values that are in writing, if the value is changed one “Edit” button appears, you must click it to send change at device
  • If exist, pointing the mouse over icon “i” give information about command-class.

tab-cmdclass2

  • When a value of command class is updated, she his tagged during 5 secondes. Pointing the mouse over value give date of update.

update-cmdclass

Poll service

  • Modern devices will not require polling. Some old devices need to be polled as the only way to detect status changes.
  • Due to patent concerns, some devices do not report state changes automatically to the controller.

These devices need to have their state polled at regular intervals. The length of the interval is the same for all devices. To even out the Z-Wave network traffic generated by polling, OpenZWave divides the polling interval by the number of devices that have polling enabled, and polls each in turn. It is recommended that if possible, the interval should not be set shorter than the number of polled devices in seconds (so that the network does not have to cope with more than one poll per second).

Set time interval
  • Set in seconds global interval, click send button to confirm.

manage-plugin

Polling a command class
  • In first column a check box give access to poll value.

tab-cmdclass3

  • A dialog box appeared to confirme action. Here check if polled and set intensity, the number (frequency) of poll during global interval.

polling-dialog

Warning

  • Polling sleeping devices put openzwave library in waiting confirmation. This could raise a network error.
  • Using an intensity value more 2 could raise a network error.

Drivers and controller commands

In this section, orders can be sent directly to the driver

ctrl-cmd-bts

Stop and Start driver (controller)

Driver automatically starts and start/stop button automatically changes depending on the state of the driver.

  • You can stop it when it’s possible : ctrl-stop-bt

confimation dialog aks you to continue.

ctrl-stop-dlg

  • You can Start it when it’s possible : ctrl-start-bt

Initialization process running, you must be patient ....

Controller commands and actions

  • You access to dialog box by button ctrl-action-bt

ctrl-action-dialog

Actions process
  • This modal dialog contains informations to guide the user.
  • Just actions “CreateButton” and “DeleteButton” are not implemented yet.
Action / command Description
AddDevice Add a new device (but not a controller) to the Z-Wave network.
CreateNewPrimary Add a new controller to the Z-Wave network. The new controller will be the primary, and the current primary will become a secondary controller.
ReceiveConfiguration Receive Z-Wave network configuration information from another controller.
RemoveDevice Remove a new device (but not a controller) from the Z-Wave network.
RemoveFailedNode Move a node to the controller’s failed nodes list. This command will only work if the node cannot respond.
HasNodeFailed Check whether a node is in the controller’s failed nodes list.
ReplaceFailedNode Replace a non-responding node with another. The node must be in the controller’s list of failed nodes for this command to succeed.
TransferPrimaryRole Make a different controller the primary.
RequestNetworkUpdate Request network information from the SUC/SIS.
RequestNodeNeighborUpdate Get a node to rebuild its neighbour list. This method also does ControllerCommand_RequestNodeNeighbors.
AssignReturnRoute Assign a network return routes to a device.
DeleteAllReturnRoutes Delete all return routes from a device.
SendNodeInformation Send a node information frame.
ReplicationSend Send information from primary to secondary.
CreateButton Create an id that tracks handheld button presses.
DeleteButton Delete id that tracks handheld button presses.
Schematic processing
  • Each action have differents step, some will attempt user action on device, some will take a long time, some must be stop manually.
  • You can stop action, but stop result have some time a fail report.

ctrl-action-process

Reset controller

  • Two mode possible with acces by buttons : ctrl-reset-bt
Soft reset
  • Soft Reset a PC Z-Wave Controller who resets a controller without erasing its network configuration settings

ctrl-reset-dialog1

Hard reset

Warning

Be careful this action is irreverssible

ctrl-reset-dialog2

Zwave network tools

menu3

Graphic neighborhood network

  • You can refresh graphic by button netw-bt

neighboors1

  • You can move nodes and arrange it for better links view, but not function to save position for the moment.

neighboors2

Representation of the node according to the initialisation state.

Node awake Init state node sleeping
1-Node-W Uninitialized 1-Node-S
2-Node-W Initialized - not known 2-Node-S
3-Node-W In progress - Devices initializing 3-Node-S
4-Node-W In progress - Linked to controller 4-Node-S
5-Node-W In progress - Can receive messages 5-Node-S
6-Node-W In progress - Can receive messages (Not linked) Means that node probably sleeping during init process, at his wake-up initialization will be completed. 6-Node-S
7-Node-W Completed 7-Node-S
8-Node-W Out of operation (failed) 8-Node-S

Network statistic and tests

Tree actions possible :

  • Get information about network statistic.
  • Start a healing process with reroute all node (node byn node).
  • Send test message for all node awake (not sleeping node) - Enter number of send test message per node.

netw-stats

Node statistic and tests

two actions possible :

  • Get information about a node statistic - Enter node number and click button refresh.
  • Send test message for all node awake (not sleeping node) - Enter number of send test message per node.

Note

To heal a specific node use button on columm “Action” of nodes table .

node-stats

Device test messages

You can send test message to all active nodes, or just one. Enter node number, number of message and click button “Send test messages”. Results are display in “Node statistic” section for both case.

msg-test

Support tools

menu4

Memory usage

memusage

  • A click on button “refresh” show you how memory is use by plugin. It is an estimation.

Show log file informations

  • You can display n lines from beginning or until end of ozwave plugin log file or openzwave lib C++ log when is activate in plugin parameter.
  • Select type log, number of line(s) and click button.
  • Negative value on number of lines shows full log.

logfile

List of manufacturers and product compatibilities

  • You can check all manufacturers and products reognized by openzwave library.

listproducts

Development informations

Detailed architecture

principe-schema.png

Change log

New instructions to apply changes from immediatly previous version.

  • 0.4.0b1 : (12-10-2015) Compatibily library : OpenZwave >= 1.3.401, python_openzwave >= 0.3.0 (b4)
    • Target : python-openzwave, domogik (0.4.1)

    • Update, compile and install python_openzwave.

    • Change log :
      • New version for domogik 0.4.1
  • 0.4.0a1 : (30-03-2014) Compatibily library : OpenZwave >= 1.0.711 (/branches/2013-11-13_release_testing), python_openzwave >= 0.2.5 (rev >= 3bef0f1cb27f)
    • Target : python-openzwave, domogik (0.4a1)
    • Initial version for domogik 0.4 - Source plugin 0.2c4 for domogik 0.3
    • Not usuable, developpement version.

Historical for domogik version 0.3.x

  • 0.2c4 : (31-01-2014) Compatibily library : OpenZwave >= 1.0.711 (/branches/2013-11-13_release_testing), python_openzwave >= 0.2.5 (rev >= 3bef0f1cb27f)
    • Target : python-openzwave, domogik (0.2c4), domoweb (0.2c3)

    • An insert_data or a reinstall is necessary.

    • Update, compile and install python_openzwave.
    • Change log :
      • Add heal node/network functions.
      • Add command_class_sensor_alarm.
      • Add auto battery level request at wakeup node.
      • Update doc
  • 0.2c3 : (06-01-2014) Compatibily library : OpenZwave >= 1.0.706, python_openzwave >= 0.2.5 (rev >= 75d9b6a8dd77), Compatibilty with ws4py last update >= 0.3.3
    • Target : OpenZwave, python-openzwave, ws4py, domogik (0.2c3), domoweb (0.2c2)

    • Update ws4py with pip or easy_install or update source and compile it.

    • Update, compile and install python_openzwave.

    • Change log :
      • GetPollIntensity add in openzwave lib.
      • Add log debug information for wsServer.
      • Fix auto-startup failure (rest no response).
      • Fix automatique COMMAND_CLASS_SENSOR_BINARY type set for xpl (recreate devices and widget for changes).
      • Fix issue in monitornodes xpl-report if no conforme xpl_msg.
      • Fix wsClient error if ack = undefined (domoweb).
      • Force default name for controler device if not defined (CtrlMustBeCreate.1.1).
      • Update doc
  • 0.2c2 : (30-10-2013) Compatibily library : The same, Warning in case of ws4py install or update use >= 0.3.0-beta rev eec3a7dcb33b322eac598f5125425e62c0050969, see instructions in dependencies page.
    • Target : domogik (0.2c2), domoweb (0.2c1)

    • An insert_data or a reinstall is necessary.

    • Knows issue : At auto start plugin fail sometimes, stop it or kill process ($ps -ef | grep ozwave) and restart it.

    • Change log :
      • Add individual monitoring node(s) in log file for debugging and helper develop device compatibilities.
      • Add removing ghost node from groups capability.
      • Add Dimmer multi-controls (FGD211) and bright/dim commands.
      • Add Thermostat setpoint (Danfos living-connect)
      • Add NotifyTransactions option (You must probably modify openzwave lib to fix issues failling plugin start, see doc section options .)
      • Fix wsServer fail connection some time.
      • Fix memory change during websocket sending Broadcast and Ack Message.
      • Fix no display “Support tools” page with some browsers versions.
      • Fix select last controleur action in reopen dialog box.
      • Graph neighbors code improved.
      • Update doc
  • 0.2c1 : (15-09-2013) Compatibily library : The same, Warning in case of ws4py install or update use >= 0.3.0-beta rev eec3a7dcb33b322eac598f5125425e62c0050969, see instructions in dependencies page.
    • Target : domogik.

    • Change log :
      • Retrieve domogik device zwave ctrl address from rest.
      • Update doc
  • 0.2b5 : (29-07-2013) Compatibily library : OpenZwave >= 1.0.663, python_openzwave >= 0.2.5 (rev >= 18832df1dd95).
    • Target : python_openzwave, domogik and domoweb.

    • Update, compile and install python_openzwave.

    • An insert_data or a reinstall is necessary.

    • Change log :
      • Fix some report controller action.
      • Fix accent on node name and location.
      • Fix display update name and location name just after sended.
      • Fix some actions bug.
      • Fix some Exception error.
      • Forced unit conversion F -> °C for temperature device in F.
      • Double xPL message for switch multi-level. (for testing-not sure it’s a good idea !)
      • UI dialog node associations improvement.
      • Add device motion binary multi sensor 4-in-1.
      • Add polling command_class. Some limitations : there is an issue with getPollIntensity openzwave lib so for moment function is deactivated and value 1 is always received. Some command class like COMMAND_CLASS_POWERLEVEL seem to enable but the polling is not in effect.
      • Add timer reporting controller status on widget (every 60s) and report status “started plugin, started, init, lock, no-ctrl, ok, stop”.
      • Add list of recognized manufacturers and products by openzwave in “support tools” tab.
      • Add force refresh node.
      • Add openzwave log report in “support tools” tab.
      • Add Battery status in tab nodes.
      • Update doc.
  • 0.2b4 : (05-28-2013) Compatibily library : the same.
    • Target : domogik and domoweb

    • Change log :
      • Fixe bug plugin starting with package installation
      • Add Domoweb version. (first 0.2.b4)
      • Add support tools, memory usage and log report to UI.
      • Change websocket server private plugin to generic usage.
      • Add load xml open-zwave usage, don’t finish coding.
  • 0.2b3 : Compatibily library : python_openzwave >= 0.2.5 (rev : b434c50b795b), tailer >=0.2.1
    • Target : python_openzwave, domogik and domoweb

    • Update, compile and install python_openzwave

    • Install tailer : “sudo pip install tailer” or “sudo easy_install tailer”

    • Change log :
      • Add test network and node
      • Add id message req-ack
  • 0.2b2 : Compatibily library : the same.
    • Target : domogik and domoweb

    • An insert_data or a reinstall is necessary

    • Change log :
      • Check user directory and config directory acces
      • Realtime improvements for graph neighbors
      • Add Start/Stop driver function
      • Add zwave device switch with power meter (Everspring (C.T.) - AN158 full handling)
      • Fixe ON/OFF sensor return status
  • 0.2b1 : Compatibily library : OpenZwave >= 1.0.645, python_openzwave >= 0.2.5, ws4py >= 0.3.0-beta
    • Target : domogik and domoweb
    • Install new dependency ws4py 0.3.0-beta
    • An insert_data or a reinstall is necessary
    • Enter new wsportserver key (Plugin configuration) and save the config (necessary to restart plugin if is started)
  • 0.1b8 :
    • An insert_data or a reinstall is necessary.
    • Created primary controller device for domogik and traced back to the state it to domogik.

Do an insert data

In your domogik directory with user domogik :

$ src/tools/packages/insert_data.py src/share/domogik/plugins/ozwave.json