Access Technical Experts

100's of Free Guides

 365 Day Guarantee

Z-Wave & Zigbee Specialists

APNT-16 - Motion Activated Light with Light Level sensor

This application note shows how to Associate two Z-Wave devices and use them to control a motion activated light that automatically turns on for a predefined period when motion is detected and the ambient light level is below a set threshold level.

Project Aim

The aim of this project is to automatically control a light:

  • Light turns on when motion is detected
  • Light stays On for 90 seconds after the last motion is detected
  • This system only works when the ambient light level is below a particular level (dusk)
  • Directly 'Associate' the motion sensor with the light control so that it does not need the Z-Wave Central controller to control the lighting


For this project I used a Z-Wave system comprising of:

Z-Wave Devices for motion activated light control

The HSP02 Motion Detector was chosen as it includes a motion sensor, a light sensor that can be used to stop the detector sending commands until the ambient light level is below a defined threshold, and it includes a variable delay that will send an Off command to the Fibaro after a preset time period.

In other words it has all we need to create this light control and if we associate it directly with the Fibaro Dimmer module, we will not need to use the VERA controller for day-day control of the lighting.

Z-Wave Association

Before going further, it's probably good to have a quick word about Z-Wave Association.

In most Z-Wave applications we configure them so that the central controller (VERA in this case) handles all commands. So for this example; the motion detector would send a signal to the controller and as a second step the controller would send a command to the Fibaro dimmer. However this adds unnecessary steps which can make this communication take too long.

Associating the motion detector and dimmer, enables the motion detector to send signals directly to the dimmer without involving the controller. This saves time, reduces the complexity of the communication and the amount of airtime taken. It also allows sensors to be used in networks without a static controller. Further information is available in Z-Wave Groups, Scenes & Associations.

Configuring the HSP02 Motion Detector

For this system to work correctly we need to set some of the HSP02's parameters, these are set in VERA by going to the DEVICE OPTIONS tab. For full information on setting device configuration parameters in VERA take a look at Application Note 3.

  • 4 - re-trigger interval, the length of time after the sensor has detected motion that it will re-trigger on motion, set to 5 seconds
  • 5 - light level, the level of light below which the the detector will send an On command when motion is detected, set to 10
  • 6 - On-Off duration, sends an Off command after the preset delay period, set to 90 seconds


Setting Motion Sensor Parameters in VERA

Setting the HSP02's configuration parameters can be a little difficult. The best approach I have found is to make sure it is set into it's 'Configuration Mode' by pressing its Tamper switch On and Off and then:

  • Change Parameter
  • Click 'SAVE' in VERA
  • In the 'Settings' tab click 'Configure node right now'
  • Press the HSP02 tamper switch closed - open, the green LED will start to flash
  • Wait for VERA to finish setting the HSP02's configurations
  • You can also check that the parameter has been correctly saved by clicking 'Reload' and then check 'VariableSet' and 'VariableGet' in the 'ADVANCED' tab.

Setting the Association

Associating the Everspring Sensor with the Fibaro Dimmer module is very straightforward:

  • Go to the HSP02's 'DEVICE OPTIONS tab
  • In 'Associations' enter '2' in 'Group ID' - this is because the HSP02 sends its motion commands to Z-Wave Group 2
  • Click 'Add Group'
  • Click 'Set'
  • Choose the device you wish to associate the sensor with - in this example it is 'Stairs Light' - Device ID 5
  • Click 'Back to ZWave options' (you will need to scroll down)
  • Close the 'DEVICE OPTIONS' tab and click 'SAVE' in the main VERA Window
  • Wait for VERA to complete this save
  • Press the HSP02 tamper switch to save the new configurations


Associating Z-Wave Devices in VERA


The Motion Sensor is now associated with the Fibaro Dimmer Module, allowing it to directly control the dimmer via Z-Wave. When the ambient light level is below the threshold, the motion detector will send an On command to the Fibaro dimmer to turn the light On. After 90 seconds of no movement being detected the motion detector will then send an Off command to the dimmer, turning the light Off.


Take a look at the video to see how quick and easy this is to do in VERA.

Related Information


Rated Excellent on