Z-Wave devices need to be included into the network before they can be used. This process, known as inclusion, or “including a device”, requires putting the controller into the include mode, and then putting the device into its include mode which is normally doe by pressing a button on the device (refer to the device manual for this).

This provides a quick overview of how to initialise the openHAB2 Z-Wave binding and configure devices.

Adding the controller

Firstly, you need to add the controller. In the HABmin main menu on the left of the screen, select Configuration, and then Thing Configuration. You will be presented with the following screen.

 

In the top toolbar is a + button. Click on this and you will see a wizard which will allow you to add the Serial Controller. First select the Z-Wave Binding, then select the controller - there should only be a single option here (for new bindings). You will then be asked to enter a name for the controller - a default will be provided using a random number, but it is advisable to use something more recognisable.

 

Once you click on Save, you should go back to the Thing Configuration menu. Here you should find the controller in the list of things. Select the controller, and you should add the port name into the port settings box.

 

 

Adding Z-Wave Devices

Once this has been saved, you can click on the Discovery button in the top toolbar to discover your Z-Wave devices. This will put the controller into Inclusion mode for 30 seconds. Once the controller is in inclusion mode, you should also put the device to be included into inclusion mode (refer to the device manual for this step).

 

When a device is discovered, it will be added to the discovery inbox. You should see a notification pop-up in the top right corner of the screen.  If you click on the inbox button, you will be presented with a list of items in the inbox - click on the Add button for the device you want to add and it will be added to the list of things.

 

Adding Items

Once you have your device included and added as a thing, and assuming that it's in the database, you need to add items and link them to the device channels. HABmin will show a list of channels available, and you can link to an existing item, or create a new item and link the channel to it.  Unlinking an item from a channel simply removes the link, but keeps the item so you can relink it later if you want. If you click the red trash icon, it will remove the link and delete the item.

 

If you select the + button to create a new item, or when editing the item, you will get the following dialog pop-up. This allows you to add or edit the main attributes of the item.

 

 

If you select the link button, you will be provided with a list of existing items that can be linked to the channel.

 

Configuring a device

Once the device is added into openHAB as a thing, you can configure its settings. The settings you see will depend on the device, and the information in the database.  The database contains information that can't be derived directly from the device such as configuration information, however other configuration may be provided depending on the features a device offers. For example, if a device supports the User Code command class, there will be a section for entering the user codes - other settings might simply be put in the Device Configuration section.

 

When you change a setting, the binding keeps track of its state. If it has not been transferred to the device yet, then HABmin shows a pending... flag so that you know that the device hasn't been updated. Once the device confirms the setting, the setting itself will be updated with the latest value from the device, and the flag will be removed. For mains devices, this normally happens very quickly, and you may not see the flag - for battery devices, it will take much longer, but the exact time will depend on the wakeup settings in the device.

Note that if you restart the binding with data still pending, then it will not be updated and what you see in HABmin might not be the configuration stored in the device. During the binding startup, this should be resynchronised, but for battery devices especially, this may take some time.

 

Excluding Z-Wave Devices

To exclude a Z-Wave device, first select the controller, then click on the Tools menu and select Show advanced settings. Select the Tools menu again, and you should see the Exclude Devices option. Select this to put the controller into Exclusion mode for 30 seconds, and then put your device into exclusion mode (refer to the device manual for this step).