Table of contents
Description
Do you want to use FIBARO Intercom in Lua scenes but you don’t know how? In this article you can find some examples that you can use.
Looking for something else? Need help? Check FIBARO Forum for more!
Remember to change Intercom ID (1000 in examples) and other IDs in the code!
Ring a bell connected to Wall Plug or Switch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
--[[ %% properties %% events 1000 DevicePropertyUpdatedEvent buttonTwoIsPressed true %% globals --]] -- id of Wall Plug or Switch connected to sound alarm local ringID = 500 -- time in ms of ringing local ringingTime = 5000 -- start ringing fibaro:call(ringID, "turnOn") -- stop ringing after set time setTimeout(function() fibaro:call(ringID, "turnOff"); end, ringingTime) |
Notify using push notification that someone entered a wrong PIN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
--[[ %% properties 1000 incorrectPinLastTyped %% events %% globals --]] -- id of phone to sent notification to local phoneID = 200 -- notification message local message = "Intercom: Someone entered wrong PIN" if ( fibaro:getValue(1000, incorrectPinLastTyped) == "1" ) then --send notification fibaro:call(phoneID, "sendPush", message) end |
Start “Welcome Home” scene depending on who entered the house
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
--[[ %% properties 1000 recentlyCame %% events %% globals --]] -- id of phone to sent notification to local dadSceneID = 100 local momSceneID = 110 local sonSceneID = 120 -- get who recently came local recentlyCame = fibaro:getValue(1000, "recentlyCame") if ( recentlyCame == "Dad" ) then --run scene for Dad fibaro:startScene(dadSceneID) elseif ( recentlyCame == "Mom" ) then --run scene for Dad fibaro:startScene(momSceneID) elseif ( recentlyCame == "Son" ) then --run scene for Dad fibaro:startScene(sonSceneID) end |
October 4, 2019 7897 Use Cases
Total 11 Votes:
1
10