What is Scene Activation?
On our Five Easy Ways to Save Energy with Fibaro article we touch on using a Fibaro Dimmer module to trigger different functionality depending on the number of times the switch is clicked.
Scene activation provides the ability to call different scenes, turn devices on or off, set their values and so much more! Devices that are capable of scene activation send out different IDs depending on the switch that is pressed, the number of times it is pressed or in some cases, for how long it is pressed.
The Fibaro Dimmer Module is not the only device with this functionality. Other Fibaro devices that support scene activation are: the Door/Window Sensor, the Universal Sensor and the Roller Shutter 2.
Because scene activation causes extra traffic on the Z-Wave network, this functionality is disabled by default. To activate it: go to the options of the device, over to the Advanced tab and scroll all the way to the bottom. Depending which device you are configuring, you may see an explanation of the different IDs the device will send.
For the Fibaro Dimmer Module, the IDs are:
|Momentary S1||Momentary S2||Toggle S1||Toggle S2||Roller S1||Roller S2|
|Single Click||16||26||16 *||26 ^|
|Off to On||10 *||20 ^||10|
|On to Off||11 *||21 ^||11|
* When parameter 19 is in the default toggling state, 16 will be returned, otherwise 10 or 11 will be.
^ When parameter 19 is in the default toggling state, 26 will be returned, otherwise 20 or 21 will be.
Once you have enabled scene activation, you can then start creating scenes to use this – referring back to the device IDs when needed.
The first and second switch should be wired into Dimmer inputs S1 and S2 respectively.
Now that scene activation is enabled, we can write a scene that can be triggered by it. In the following example, the dimmer’s device ID is 30, change it as necessary:
– Line 3 is the trigger of this scene
– Lines 7 and 9 are defining the variables. In this case, the ID of the dimmer and the scene activation ID the dimmer has sent.– Line 3 is the trigger of this scene
– The rest of the lines are defining what will happen when different scene activation IDs are received.
Because each ID can trigger different actions, this means that from one Fibaro Dimmer with a toggle switch you are able to trigger up to 6 different actions and up to 10 with a momentary switch.
You can add the Lua code
fibaro:call() to perform the actions turnOn, turnOff and setValue on different devices, or
fibaro:startScene() to run a specific scene (perhaps a graphics block scene) to keep this code neat and tidy.
Graphics Block Scene Activation
Graphics blocks can be used for Scene Activation instead of Lua. Below is a simple example of how a the scene would look.
The first blue block is the device that has Scene Activation turned on – in this case a Fibaro Dimmer Module. The green block has been changed from ‘On’ to ‘Scene activation’ and the number 15 has been typed into the dark green box that appears. This represents the scene activation ID the dimmer sends when switch 1 (S1) is triple clicked.
Once this block has been created, the next part of the scene can run a scene or set the value of any device that you wish.