Fibaro HCL Cookbook (1)
Fibaro HCL Cookbook (1)
Fibaro HCL Cookbook (1)
1 Introduction .................................................................................................................................2
1.1 Motivation.................................................................................................................................................2
1.2 Things I would like to document ..............................................................................................................2
1.3 Abbreviations ...........................................................................................................................................2
1.4 Definitions ................................................................................................................................................2
1.5 References...............................................................................................................................................2
1.6 Disclaimer ................................................................................................................................................2
2 Introduction .................................................................................................................................2
2.1 Recommended Update Procedure by chaicka ........................................................................................3
2.2 Time Synchronization ..............................................................................................................................3
3 Forcing Brackets in Block Scenes ............................................................................................3
4 Virtual Device calling a Specific Scene .....................................................................................4
4.1 Definition of the Global Variables ............................................................................................................4
4.2 Definition of the scenes ...........................................................................................................................4
4.3 Definition of the Virtual Device ................................................................................................................5
4.4 Overview and Function ............................................................................................................................6
5 Virtual Device Setting Global Variable ......................................................................................7
5.1 Definition of the Global Variables ............................................................................................................7
5.2 Definition of the Virtual Device ................................................................................................................7
5.3 Overview and Function ............................................................................................................................9
6 Virtual Device Setting Global Variables using Scenes ...........................................................10
6.1 Definition of the Global Variables ..........................................................................................................10
6.2 Definition of the Virtual Device ..............................................................................................................11
6.3 Definition of the scenes .........................................................................................................................12
6.4 Overview and Function ..........................................................................................................................16
7 Virtual Device and Scenes to Globally Activate/Deactivate Scene Execution ......................16
7.1 Definition of the Global Variables ..........................................................................................................16
7.2 Definition of the Virtual Device ..............................................................................................................17
7.3 Definition of the scenes .........................................................................................................................19
7.4 Overview and Function ..........................................................................................................................21
7.5 Using the Conditions to execute Scenes ...............................................................................................21
8 Restarting HCL with a VD and Scene with Bootup Scene .....................................................23
8.1 The VD initiating the restart ...................................................................................................................23
8.2 Scene to call the VD to restart ...............................................................................................................25
9 Smart heating, using Scenes Instead of the Panel .................................................................27
9.1 Global Variables ....................................................................................................................................27
9.2 Scene definition .....................................................................................................................................28
9.3 VD ..........................................................................................................................................................33
10 Robomow® RS615 Telling Operational State .........................................................................36
10.1 The VD representing the mower ............................................................................................................36
10.2 Global Variable ......................................................................................................................................37
10.3 Scenes to evaluate the mower state .....................................................................................................37
11 Downgrading HCL/HC2.............................................................................................................41
12 HCL Recovery mode (as available from Fibaro.com) .............................................................43
Keep in mind:
Do NOT copy scenes as they will most probably not work as intended, open a second window and rewrite it with
the necessary modifications.
If a global variable used in a scene is changed, the scene must most probably be rewritten, as it will not be
possible to change the variable in the scene unless all the commands below the variable are deleted. The same
applies if a VD is renamed.
Try to have items where a modification is very likely all at the bottom of the IF and the THEN, because this
allows removing and adding without deleting most of the scene.
It is recommended to use Internet Explorer® to access the web interface as firefox and chrome show a slow
performance when updating the pages. At least this is the observation on computers running Windows®.
1.3 Abbreviations
1.4 Definitions
1.5 References
1.6 Disclaimer
All the proposals are tested on the available HCL and seem to work fine on this system. If they perform the
same way on other system is unknown.
2 Introduction
For all examples, the following user account is used:
Username (superuser or administrator): admin
Password for this account: password
To make this account usable in all the examples, where the authentication is necessary the string
admin:password is to be converted to a base64 string.
Human readable admin:password
base64 encoded YWRtaW46cGFzc3dvcmQ=
This can be done using the following web service: https://www.base64encode.org/
To have the system totally cleaned up and start from scratch, refer to chapter 11 or 0 after having made a
backup of the system. Running the recovery is for sure the cleanest way.
Attention: the THEN of the scene is executed without any evaluation of the IF. So, even the IF is FALSE, the
THEN will be executed. Might be wanted in some situations, but might not be wanted in others. If the IF needs
to be evaluated before the THEN is executed, the approach as described in chapter 6 is to be used.
Each time the button is pressed, the Scene with ID 83 is called and the testvariable is incremented by 10.
PUT /api/globalVariables/Testvariable HTTP/1.1 # command to be executed, including the name of the variable to be modified
Host: 127.0.0.1 # the local host of the HCL
Authorization: Basic YWRtaW46cGFzc3dvcmQ= # admin:password coded base64
# empty line between header and body
{"name":"Testvariable","value":"12"} # body, setting the Testvariable to the desired value
Clicking the buttons Low, Medium or High leads to the values as below in the global variable
When clicking Low:
This does not make the current value of the variable visible in the VD. If this is wanted, use the scene approach
as described in chapter 6. Unfortunately, the value to be shown in the Label of the VD has to be hard wired as
the content of the variable cannot be used directly (or I do not know how).
Some real variables modified by the scene, when triggered by the virtual device:
For the examples used, this variable has three predefined values as shown below:
In the advanced section, define a device using a label and three buttons:
Select Main and tick Favorite to have the label visible in the overview
Open the VD and click any button to initialize the Status. In the background, the running instances of the scenes
are visible.
Within the Advanced tab a VD having two labels and twice two buttons is created. The label will later show the
state of the global variable, while the buttons call the scenes to change the value of the global variable and the
label value.
Add twice a Label and two buttons:
As now all the information from the VD is available, the scenes should be created, so the IDs of the Scenes are
known to complete the code of the VD.
Open the VD and click any buttons to initialize the Status. In the background, the running instances of the
scenes are visible.
The status of the VD is updated as defined in the scenes.
The IP address must be set to the IP address of the HCL, the local address 127.0.0.1 does not work in this
case. The port is to be set to 80, also here the local port 11111 does not work.
The restart Scene, setting the variable to true and ‘pressing’ the button of the VD to initiate the restart.
More reasonable would be a scene like this to trigger a regular restart of the HCL:
On Monday, Wednesday and Friday at noon the scene presses the button of the VD and restarts the HCL.
As this scene will trigger immediately when the variable is TRUE, something is needed to delay the setting of
the variable to FALSE again. This delay must be longer than it takes the previous scene to press the restart
button of the VD. In the example, an AEON wall switch is taken and the wattage of the switch is evaluated to be
something bigger or equal to 0W after 300 Seconds. This is long enough for the restart to be initiated, before the
variable is set to FLASE again. As far as tested it does even work when the AEON wall switch is not present in
the network. To be on the safe side, there could be several of such silly conditions ORed.
About 5 minutes after the restart of the HCL, the variable is then set back to FLASE. Within this THEN anything
can be done, necessary after a restart of the HCL.
Attention:
If there are scenes like the one shown below, the restart of the HCL must not be done between the on and Off
time, as the restart will not ‘return’ to the scene and finish it, so the controlled switch “Ventilatoren” will remain
on until the next time the scene is triggered and the “Turn Off” command is reached. So if the HCL is restarted
e.g. at 10:00, the “Turn Off” which should happen at 09:00 + 7200 s (11:00) will not be performed.
As some of the scenes are called explicitly and do not have an internal or automatic trigger condition an artificial
scene trigger is needed as a scene does not work without a valid if condition.
The scene trigger is set to TRUE in the variable panel, but also allows easily to disable scenes when set to
FALSE.
In the advanced section, the trigger condition and the temperatures for all the valves are defined.
9.2.1.3 Summer
In the advanced section, it looks identical to the normal day or night temperature settings. My valves support a
minimal temperature of 4°C, so the “Set target level” is set to 4.
Here the temperature is set to 15°C. However, this could be same as the night scene for the room temperature.
9.2.1.5 Returning
The temperature in the advanced section is set to 24°C for all the valves and at the very end of the scene after
4h, the button in the VD to return to normal operation mode is ‘pressed’. The scene is also checking if the
heating is in the away (Abwesend) mode.
For testing purposes the time is set to e.g. 10 Minutes to allow the valves to adjust to the returning temperature
(24°C) and then to the normal operation mode again. Check the wakeup time of the valves and set the time for
testing ot e.g. 3 times the wakeup time to be sure the settings can be transferred to the valves.
The scene could also be split up to allow returning to normal operation mode fir daytime and nighttime. In this
example the scene will always put the system to the day mode (Heizung Tag). An IF-THEN-ELSE would be
perfect to sort day and night time heating in one scene. An additional variable like daytime (TRUE/FALSE) can
be used to have two scenes, sorting it out.
IF (SceneTrigger == TRUE)
THEN
Heizbetrieb = Normal
AND
Betriebszustand = Normalbetrieb
AND
CallScene(Heizung Tag)
CallScene(Check Day or Night) #this scene would check if daytime is FALSE and call the Scene
Heizung Nacht
9.3 VD
Create a device with a Label, one button and four buttons
The button for Normalbetrieb is also set as the main button, so this will force the heating system into normal
operation mode.
This button is calling the scene with the ID 96, which is the normal operation mode of the heating system
The buttons for the different special modes of the heating system
Opening the VD gives this view with not so nice text on the buttons:
Charging:
Balancing:
Waiting:
OFF
We are often asked how it is the procedure put back the Z-Wave controller HClite Fibaro HC2 or into a stable
previous firmware version.
The first thing to do is a backup of the system, just in case, as usual.
The procedure to downgrade the firmware version of the controller requires putting the controller in recovery
mode. To do this, you have to tour it off (by removing the power supply). Then you have to push the “+” button is
and keep it pressed while turning it on. You will see that the boot sequence of blue lights is different from the
usual. If we enter the IP address of the controller, instead of the usual screen we find this one:
The following step by step guide is taken from Fibaro linked page:
1. Make sure the device is turned ON.
2. Press and hold two buttons at the same time: Power and Recovery.
3. Release the buttons when the LED diodes start moving in a sequence. Entering into Recovery mode is
signalled by the LED diodes moving to the middle and back.
Don’t hold the Recovery button for too long! If you hold the Recovery button for 10 seconds the Home
Center IP will be set to 192.168.81.1 and you’ll need to adjust the network settings on your computer in
order to access the device.
4. Type in the IP address of Home Center Lite in your web browser or use Fibaro Finder.
5. Recovery Mode screen will be displayed:
9. After successful reboot you can access the Login Panel. Remember that login and password will be set
back to admin / admin and that the HCL needs updating the firmware.