• Professional advice
  • Order before 23.59 uur shipped today (choose Trunkrs)
  • Almost always available (+31 73 762 0 762)
  • Monday open late (odd weeks)

Fibaro:getGlobal command



Action :

Recieves the value and the last time modified from a global variable which are defined in the variable panel.
This function is part of a group of functions:
 The functions only differ in there returned value.


Usage and parameters :


  • variabelename : The name of the global variable.


Returned Value :

This function returns 2 values.

  1. A string with the actual value of the variable and,
  2. a timestamp when the variable was last changed.

De waarden worden teruggeven in tekst-string formaat. wanneer u er een getal van wilt maken dient u het tonumber() commando te gebruiken.


Programming example :

-- Request the value of variabable isNight and also get the last modification time
local value, lastchange = fibaro:getGlobal('isNight');

-- in lua you can skip the second value
local value2 = fibaro:getGlobal('isNight');

-- The returned value can be used to perform other tasks

if value == '1'  then
   fibaro:debug('It's night');


See also



Customer Service Phone

mon-fri: 10am-5pm and sat 10am-3pm


Gerstakker 16 5236 VG Empel Netherlands

Google maps