Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
Ritsjert 1
Goal: to enable or disable alarm
Trigger: RFID tag
Setup: see scenes below
Question: arming works (scene 8, 9), but why does disarming (scene 28, 29) not work? do I have to do something with alarm pincode?
-----
LUA CODE BEHIND RFID TRIGGER
--[[
%% properties
88 value
--%% globals
--Alarm_DeurRaam
--]]
if
tonumber(fibaro:getValue(88, "value")) > 0
then
if fibaro:getGlobalValue("Alarm_DeurRaam") == "UIT"
then
fibaro:setGlobal("Alarm_DeurRaam", "AAN");
--fibaro:debug("AAN");
--fibaro:call(76,'sendpush',"Door/Window Arming Started");
fibaro:call(76, "sendDefinedPushNotification", "17");
fibaro:sleep(30*1000);
fibaro:startScene(8); --Raam
fibaro:startScene(9); --Deur
fibaro:call(62, "turnOn");
--fibaro:call(76,'sendpush',"Door/Window Armed");
fibaro:call(76, "sendDefinedPushNotification", "16");
else
fibaro:setGlobal("Alarm_DeurRaam", "UIT");
--fibaro:debug("UIT");
fibaro:startScene(28); --Raam
fibaro:startScene(29); --Deur
fibaro:call(62, "turnOff")
--fibaro:call(76,'sendpush',"Door/Window Disarmed");
fibaro:call(76, "sendDefinedPushNotification", "18");
end
end
-----
SCENE 28 AND 29 CREATED by GRAPHICAL BLOCKS
see attachment with printscreens
Please login or register to see this attachment.
Please login or register to see this attachment.
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.