-
-
Notifications
You must be signed in to change notification settings - Fork 91
ZWave Device Installation
You are strongly advised to set masterController = true
in the binding configuration. This tells the binding that OpenHAB is the master in the network, and it will then initialise your devices with more configuration. The only time when this should not be set is if you have a different controller that you use to maintain your network.
ZWave devices must be included into a network before they can be used. The inclusion process registers the device with the network primary controller, which then allows openHAB to detect the registered nodes, and use them within the system. The network is identified using a HomeID which is provided by the primary controller to the devices upon inclusion. If a device is already included in another network, it must first be excluded from that network, or factory reset.
It is important that a device is included into the network physically configured in the way you intend to use it. This means that if the device can be operated on either batteries or mains, then it MUST be installed into the network powered in the way you will use it. DO NOT include the device into the network on batteries and then change to mains power - the controller will think the device is a battery device and it will not work as you expect. This same warning goes for devices to which you can attach a temperature sensor - if you attach these devices, it must be done before the device is included into the network, or, you must exclude it, attach the sensor, then re-include the device into the network.
Once included in the network, for a device to be usable, a number of additional steps need to be completed. For battery devices, the WAKEUP command class needs to be configured. Battery devices are generally sleeping in order to reduce power consumption, and they only wake periodically to allow configuration. When they wake, they will send a notification to the controller once the WAKEUP configuration is complete. Prior to this, the device needs to be within close range of the controller so that it can communicate directly. It can then send a Node Information Frame (NIF) which when received by the controller will be treated the same as a wakeup. It should be noted that the NIF is not routed within the mesh network, and therefore the device must be in direct range of the controller. The NIF is often sent by pressing a button on a battery device 3 times.
A common mistake is to think that because a device is sending sensor data, that the wakeup is configured - this is not necessarily the case. For the binding to configure the device, it must wake up by sending either the NIF (manual wakeup) or the wakeup class will cause it to periodically send the wakeup notification. If it sends sensor data, the device is only in a sending state - not a listening state.
Once the WAKEUP class is configured, the WAKEUP_NOTIFICATION can be sent directly to the controller, and this will be routed within the network.
Next, for a device to send status updates to the controller, an association is normally configured. An association will send a message from the device, to the controller, whenever the status changes (eg you switch on a light), or for sensor devices, it may send periodic updates of temperature/light/power/etc to the controller.
HABmin provides functions to include and exclude devices from the ZWave network. In the ZWave Network Menu is an Include and Exclude option - selecting either of these will put the controller into include or exclude mode for 30 seconds.
Once the controller is in this mode, you should press the appropriate button on your device to include (or exclude) the device. Often there's a button that needs to be pressed three times to enter inclusion/exclusion mode in the device - consult the device manual to see how this is done. Note that HABmin will automatically end inclusion/exclusion mode once one device is complete (or after 30 seconds if no devices are found). If you want to include another device, you must repeat the above steps.
NOTE: currently there is no immediate feedback on this process, so once you select the option to put the device into include/exclude mode, you should not wait for feedback in HABmin. Once complete you can update the node list by clicking on the zwave binding in the binding list and see if your new (or existing) device has been added (or removed). HABmin will periodically update the device list, so new devices will be seen in this list, and excluded devices will be removed.
The WAKEUP command class configuration is done through HABmin. Normally, if you have set masterController = true
in the binding configuration, then the binding will ensure that this is set correctly when the binding initialises. To perform this manually, you should go into the Wakeup configuration section in the device configuration in HABmin and change the wakeup time. This will ensure the binding sets the time, and the controller ID.
Note that setting too short a time may adversely affect the battery life of the device. As a rule, a time of 30 to 60 minutes is probably acceptable from a battery life and usability perspective.
It should also be noted that the wakeup period is not linked to the period at which sensor data is sent - this is normally configured separately via a configuration parameter.
NOTE the binding is only able to configure the device when it wakes up and sends a wakeup notification, or a node information frame (which is only sent following a manual wakeup by pressing an install type button on the device).
Associations are used by ZWave devices to send commands from one device to another, independent of the controller. This could be used to turn on a light when a movement sensor is triggered. Associations are also used to send state updates to the controller when the state of a device changes. For example, if you turn a light on, the device will let the controller know so that the state of the light is shown correctly within openHAB. If your device supports associations, then generally you will want to configure at least one association to the controller. Often the device will have a special association group that is used specifically to update the main controller - this will send all notifications to the controller to keep it informed about the devices state.
It should be noted that battery operated devices in zwave normally sleep most of the time. This means that they can not be configured until they wake up. The binding will queue messages for the device until it wakes, but this wakeup time is normally set to be many minutes, or, more often at least one hour. When the device wakes up, it will only stay awake for a few seconds - once the binding has no further information to send, it waits 2 seconds in case something further is required, and then tells the device to go back to sleep.
When installing a new battery device, you first need to include it into the network, then wake it up manually to allow the binding to configure the wake up parameters. Normally you can wake the device by pressing a button on the device 3 times, but you should check the devices instructions. This must be done in range of the controller since the initial wakeup will not be routed, and the controller needs to receive this wakeup in order to initialise the device.
For the binding to configure a device, it needs to send the wakeup notification. This is not the same as the device sending data (eg temperature, door status etc). So, just because your door sensor has updated its status, doesn't mean the device has woken up and is available for configuration. This is configured in the wakeup class.
Until a battery device has been woken up, it will show as uninitialised in HABmin (grey dot). Also, when the binding is restarted, it will also show with a grey dot until the first wakeup period (this is normally between one hour and one day).