Zwave

From Domoticz
Revision as of 20:32, 20 August 2016 by Trixwood (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Z-Wave in Domoticz

Domoticz use an open source library named "OpenZWave" library. It's commonly written "OZW". As Z-Wave protocol isn't "free" not all the devices or functionnalities are known in OZW. Most devices are fully working (Fibaro, BeNext, Aeon for the most known), others are just referenced without action (fortrezz, and others, ...).

To be usable in Domoticz, you'll have first to check if your Z-Wave devices are usable with OZW. If not, follow the Adding Devices instructions to get yours included in the OpenZWave Device Database.


List: OZW devices

| OZW : Supported devices

| OZW : Adding-Devices
| OZW : List of open issues
| OZW : forum support

Razberry to OpenZWave

Excelent tutorial how to get a Razberry working with OpenZWave

Network and group info

ZWaveNetworkInfo.jpg

The Z-Wave network info screen is available under setup > hardware. If there is a Z-Wave controller in the system (a USB-stick for instance), there is a "Setup" button beside it. Click this and the list of controlled nodes appears. At the top right the node management button houses the "groups & network" button. The screen above appears. To the left is a chord diagram that shows which nodes see each other. This is a feature of the Z-Wave mesh network; some devices do not see each other directly but communicate through intermediate nodes. This graph helps you understand how the network communicates. If the Z-Wave network controller has just started up (due to Domoticz start or reboot), it takes a while for the connections to display. Please wait a moment and return to this screen. Hover the mouse over a node to only display the connections for that node; this makes it easier to examine specific connections.

To the right is the group table. It shows the reported groups for each node, plus the nodes that are in the group. Z-Wave groups are an essential part of a functioning system; it operates even without Domoticz or the controller active, so it is a good thing to understand how they work and how they are setup. Groups are not global, but exist per node. Each node has its own group(s), in which you can place other nodes as listeners. If two nodes (devices) have a group 2, this is not the same group. Clicking a node number shows the option to remove the node from that group. If there is a plus symbol in a group, the node has this group enabled. Click the plus symbol to add another node to that group.

An example: the tz66-d wall switch has two paddles (left and right). The left paddle controls the lamp attached to it physically. The right paddle only signals groups. The tz66-d has four groups:

  • Group 1: gets a signal when the left paddle is pressed
  • Group 2: gets a signal when the right paddle is pressed
  • Group 3: gets a signal when the right paddle is pressed twice
  • Group 4: gets a signal when the tz66-d is commanded to turn on or off.

Using the group table, you can include another node (lamp for instance) in one of the tz66d's groups. By putting it in group 2, you can control it though the right paddle. By putting another lamp in group 3, you control that one via a double tap on the right paddle, etc.

Groups also play a big role in where measurement devices (temperature for instance) send their data. Some devices (like the Aeon 4in1) can be configured to send to group 1 (where the controller and thus Domoticz is), but others just send to a fixed group, which requires a receiving device to be put in that group.

The info screen will be extended with more functionality in the future. For now it has the bare necessities ;) There is no scene management (yet), since that can be done through Domoticz itself.

Using the Tag Reader

First Include the device in the zwave network, you should see this in the node overview of OpenZWave
Important : Make sure the controller (node 1) is associated in the SAME GROUP of the tag reader (See Groups and Network in the OpenZWave setup)

By default no tags are programmed inside the reader.

The reader sends its current codes to OpenZWave when it is awake, to force todo this, press the tamper switch, or press the away button and scan a tag.

You also have todo this after a restart of Domoticz when you want to add/remove tags.

(Best done after all awake-nodes have been queried)

To program a new tag in the reader proceed as follow:

  • 1. press the tamper switch on the reader and wait 5 seconds (to force the reader to wake up and sends its current code list)
  • 2. go to the hardware setup of OpenZWave
  • 3. select the tag reader from the node list.
  • 4. from the 'Node Management' select the option 'Start User Code Enrollment'
  • 5. press the away button on the reader, when the red light is on, scan the tag.
  • 6. the tag should now be included (you can follow this in the log screen)
  • 7. press the tamper switch again to force the reader to send the current code
  • 8. from the 'Node Management' select the option 'User Code Management'
  • 9. you should now see the new tag
  • 10. make a note which Code/Value belongs to which tag

After you included a tag you can press the Home/Away button and scan your tag.

When you do this, you will receive a device update for a switch (on/off) that indicates the Home/Away status

To remove a tag from the reader:

  • 1. press the tamper switch on the reader and wait 5 seconds (to force the reader to wake up and sends its current code list)
  • 2. go to the hardware setup of openzwave
  • 3. select the tag reader from the node list.
  • 4. from the 'Node Management' select the option 'User Code Management'
  • 5. select the tag you wish to remove, and press the 'remove' button
  • 6. to force a quick update in the reader (specially for battery operated devices), press the tamper switch again (and wait 5 seconds)
  • 7. press the 'Refresh' button, and the tag should be removed

Running Domoticz as a secondary controller

A secondary controller can receive all Z-Wave signals as the master, and thus can act also as a router in 3.20 protocol. A secondary controller can also send orders. This way, a Domoticz Z-Wave box can work as a supplementary box of its own.

To achieve this, the Domoticz version must be superior to 1660. The actually tested configurations are from Vera systems (and fibaro lite to be confirmed) as master in 3.20 version of Z-Wave and Domoticz running the Aeon S2 (given it will work also with other adapters to Domoticz).

Considerations on using a secondary controller

Please remember that Z-Wave device configuration isn't stored in the Z-Wave device so it is the master who has stored device parameters, and thus for Domoticz you'll have to reset all devices parameters.

After some tests, when Domoticz is used as secondary controller, all the parameters in the hardware tab of Z-Wave device are ignored. It's the master controller parameters which are used.

To check this, you can watch Watt consumption on a device on the Vera and on Domoticz. With no modification in Domoticz you can see the same value.

Another test with a Fibaro switch, if you use an "auto-release" you will see that it's the same as the master when using Domoticz.

Despite of those observations, Domoticz will display default value and not the primary controller value.

Steps to make Domoticz a secondary controller

  • First you have to put the Master in full inclusion power mode, and then set Domoticz (through Hardware / your Z-Wave adapter) in "receive configuration from other controler" after activating vera to include domoticz.
  • For the Vera, the Domoticz Z-Wave adapter is recognized as a scene controller, but not well configured.
  • Then the list of device will get transferred to the Domoticz server (Hint: making a heal from Vera may speed-up things).


Generate Security Key

To generate a random security key for your OpenZwave device you can use the following command from Linux, it requires pwgen to be installed apt-get install pwgen

pwgen -s 16 1|od -A n -t x1|sed 's/ /,0x/g'|sed 's/,//'|sed 's/0x0a//'

0x46,0x6e,0x4c,0x75,0x4d,0x6f,0x6e,0x38,0x59,0x6b,0x55,0x6d,0x42,0x70,0x39,0x78

Alternatively you can take the output from this link, prefix it with 0x, remove spaces and separate with commas so it looks like the output above


Please note once you change your key, any devices already securely paired will be unable to communicate.. you should do this BEFORE including secure devices.