Jump to content

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


  • 0

how to disarm devices by scene triggered by physical device?


Question

Posted

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

  • 0
Posted

make sure you add the pincode when disarming stuff:)

i use scene and vd where id22 is the vd

scene:

--[[

%% autostart

%% properties

22 value

%% globals

--]]

if ( tonumber(fibaro:getValue(22, "value")) > 0 )

then

fibaro:call(80, "pressButton", "3");

end

button for vd to disarm where xxxx is your personal pincode

fibaro:call(70, "setArmed", 0, xxxx);

fibaro:call(67, "setArmed", 0, xxxx);

fibaro:call(52, "setArmed", 0, xxxx);

--fibaro:call(79, "setArmed", 0, xxxx);

fibaro:debug("Disarmed");

fibaro:call(2, "sendDefinedEmailNotification", "2");

fibaro:call(60, "sendDefinedPushNotification", "2");

  • 0
  • Inquirer
  • Posted

    how easy can it be...!? thanks, this works!

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...