There are two types of Global variables: standard variables and predefined variables.
We will go through both of these below.
There are two types of Global variables: standard variables and predefined variables.
We will go through both of these below.
A standard variable contains a numerical value.
To create a standard variable click on the Panels tab at the top and locate the Variables Panel section on the left hand side.
Once we are in the Variables Panel, click on the first Add button.
		In the first box we are going to use Test as the example and set the value to 0.
Click save once this is done.
		
		
		An example of this would be a counter that counts the number of times a doorbell is pressed while the occupants of a home are out. A predefined Global variable would be set so the system knows the user is out and if the doorbell is pressed while the user is out then it will count and add each press to a variable value. This counted value can then be used to determine another action when the user comes home.
Example:
-- the door bell has been pressed while we were away
-- Add 1 to the global variable called 'counter'
fibaro:setGlobal('counter', fibaro:getGlobalValue('counter') + 1)
		Predefined variables use words instead of numbers and allow you to limit the content of the variables you create.
To create a predefined variable click on the Panels tab at the top and locate the Variables Panel section on the left hand side.
Once we are in the Variables Panel, click on the second Add button.
		In the first box we are going to use HomeMode as the example and set one of the values to In and the other to Out. You can add as many values as you require.
Click save once this is done.
		
		Using a ‘HomeMode’ Global Variable that defines whether or not the house is occupied, we can cause scenes to behave in different ways if we are at home or out. We can automatically change a Global Variable at different times of the day and in this way have ‘moods’ in the house based on Morning, Afternoon, Evening, Night. The imagination is the limit.

Fibaro UK Ltd. has decided to stop distributing Fibaro products in the UK.
Please go to www.fibaro.com for a list of current UK distributors or call 0845 154 2852 for support with your Fibaro products.
