This application note shows how to create a motion controlled light that automatically turns on for a predefined period during certain times of the day using the Fibaro Home Center central controller.
Project Aim
The aim of this project is to automatically control a light:
- Light turns on when motion is detected
- Light stays On for 1 minute after the last motion is detected
- This system only works during a set period of the day (18.45 and 06.30)
Components
For this project I used a Z-Wave system comprising of:
- Fibaro Dimmer module - used to control the light via Z-Wave
- Everspring SP103 Motion Detector - used to sense motion in the room
- Fibaro Home Center 2 or Home Center Lite (HC Lite) Z-Wave Controllers. - central Z-Wave controller
Scene Control
After including the devices into the Fibaro Home Center (HC2 or HCL) controller we will use 'Scenes' to control the behaviour of the sensor and the dimmer it's controlling.
We will need to create four scenes in Home Center (HC):
- Light Motion On - turns light On when motion detector sends a 'Breached' (movement) alert
- Light Motion Off - turns light Off when motion detector sends a 'Safe' (no movement) alert after a delay of 60 seconds
- Active - controls the start time when the scenes become active (18.45)
- Inactive - controls the end time when the scenes stop being active (06.30)
Create a Time Variable
Before we create the scenes to control the lights, we need to create a variable that can be used to control the times at which the scenes are active.
Variables are created and edited in HC's Variable Panel.
- Go to the Panels tab and select the Variables Panel from left-hand navigation bar
- In 'Predefined variables' click 'Add'
- Give the new variable a name - for example 'Active'
- We need to provide the variable with two predefined values - change Value 1 to 'Active' and Value 2 to 'Inactive'
- Click the blue 'Save' button
Create the Light Motion On Scene
Scenes are created and edited in HC's Scenes Tab, to create the 'Light Motion On' scene
- Go to the Scenes tab and click 'Add Scene' in left-hand navigation bar
- Give the new scene a name - for example 'Light Motion On'
- Choose a Room from the drop-down list - I selected 'Demo'
- Select the 'Active Scene' and 'Start when Home Center starts' boxes
- Click the 'Advanced' tab and then in 'Add scene using graphic block' click 'Save'
- In the black scene box click the '+' icon to add devices and triggers for the scene
- From the drop-down menu got to Devices and select the motion detector that will control this scene - for this example it is EVR-SP103
- With the EVR_SP103 sensor block in the scene, select 'Breached' from the drop-down menu in the Green condition block
- Click the click the '+' icon at the bottom of the black scene box
- From the drop-down menu got to Variables and select the 'Active' variable that we created earlier
- Make sure 'Active' is selected in the variable's Green block
- In the next Orange block change 'And' to 'Then'
- Click the click the '+' icon at the bottom of the black scene box
- From the drop-down menu got to Devices and select the device to be controlled by the scene - for this example it is Fibaro Dimmer
- In the Fibaro Dimmer's Green block set it to 'Turn On', you can also type a brightness level such as 80(%)
- Click the grey 'Save' button
- That's the main ON scene that will control the light.
Create the Light Motion Off Scene
This scene is created following the same process as for the 'Light Motion On' scene:
- Go to the Scenes tab and click 'Add Scene'
- Name the scene 'Light Motion Off' and allocate to a room
- Select 'Safe' for the EVR_SP103 sensor condition
- Set 60 seconds as the delay period in the EVR_SP103's Red delay block
- Select 'Turn Off' for the Fibaro Dimmer's state
- Remember to click the grey 'Save' button
- Also make sure the 'Active Scene' and 'Start when Home Center 2 starts' boxes are selected in the scene's General tab
Create the Active Scene
- Go to the Scenes tab and click 'Add Scene'
- Give the new scene a name 'Active' and allocate to a room
- Select the 'Active Scene' and 'Start when Home Center starts' boxes
- Click the 'Advanced' tab and then in 'Add scene using graphic block' click 'Save'
- In the black scene box click the '+' icon to add devices and triggers for the scene
- From the drop-down menu got to Timers and select 'Days or Week'
- Select the days that you would like the scenes to be active - Monday, Tuesday... Sunday
- Select 'Exact time' and select the time which you would like the scene to become active - 18.45 for this example
- In the Orange block change 'And' to 'Then'
- From the drop-down menu got to Variables and select the 'Active'
- Make sure 'Active' is selected in the variable's Green block
- Click the grey 'Save' button
- This scene changes the 'Active' variable's state to 'Active' at 18.45
Create the Inactive Scene
This scene is created following the same process as for the 'Active' scene:
- Go to the Scenes tab and click Add Scene
- Name the scene 'Inactive' and allocate to a room
- Select the same days of the week as the Active scene
- Select the time for this scene to start - 06.30 for this example
- Select 'Inactive' for the 'Active' variable condition
- Remember to click the grey 'Save' button
- Also make sure the 'Active Scene' and 'Start when Home Center starts' boxes are selected in the scene's General tab
- This scene changes the 'Active' variable's state to 'Inactive' at 06.30
We now have the four scenes that enable the lights to be motion activated at different times of the day.
Related Information
- APNT-61: Creating Scenes in Fibaro Home Center
- APNT-62: Scheduling Scenes in Fibaro Home Center
- APNT-28: Sunset / Sunrise controlled lighting with Fibaro Home Center
- APNT-1: Installing a Fibaro Dimmer module in a Wall Switch
- APNT-2: 2-way Lighting Using Fibaro Dimmer Modules
- APNT-11: Using Different Switch Types with Fibaro Dimmer Modules
- APNT-17: Controlling Lights with Fibaro Relays
- APNT-18: Using a Secondary Switch with a Fibaro Module
- APNT-23: Understanding 2-wire and 3-wire Lighting Systems
- APNT-24: Using Fibaro Dimmers with LED Lights