• Professional advice
  • Order before 16.30 uur shipped today
  • Almost always available (+31 73 762 0 762)
  • Monday open late

Lights off scene

FIBARO Scene : All lights off automaticly.

 

 

When a device is added to the FIBARO system, you can tell the Home Center what type of device is connected (see picture below).
If you select 'lighting' the system knows the module is connected to a light and with a bit of LUA scripting you can turn of all lights. Even the lights that will be added in the future will turn off, because the script checks all modules and turns of only the ones that are marked light.

 Superdupereasy!

 

 

 

 

The LUA-script:

 

 

--[[
%% properties
380 value
382 value
%% globals
--]]

-- ID's 380 en 382 are switches that execute the command.


if (fibaro:countScenes() > 1) then fibaro:abort() end;
local i = 0
local maxNodeID = 1000
for i = 0, maxNodeID do

if fibaro:getValue(i, "isLight") == "1" then

if (fibaro:getValue(i, "value") >= "1")
then
local DeviceName = fibaro:getName(i);
local RoomName = fibaro:getRoomNameByDeviceID(i)
fibaro:call(i, "turnOff");
fibaro:debug("Switched off device "..i.." "..DeviceName.." "..RoomName);
else
local DeviceName = fibaro:getName(i);
local RoomName = fibaro:getRoomNameByDeviceID(i);
fibaro:debug("Device "..i.." "..DeviceName.." "..RoomName.. " was already off");
end
end
end

 

 
Customer Service Phone

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

 
Adress

Gerstakker 16 5236 VG Empel Netherlands

Google maps