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 do I arm breached sensors?


Question

Posted

Hi people,

 

I hope someone is willing to help me with my issue on arming breached motion sensors from Fibaro. Here goes:

 

 

I have 3 scenes:

- arming sensors

- triggering sensors

- disarming sensors/ switching off alarm

 

When I try to arm a breached sensor it normally gets excluded from the arming scene, because it's not safe.

So I found the "alarm conditions" on the advanced tab.

There I can setup the condition for a motion sensor if it should be safe or breached to be armed.

Also the option "automatically force device state at arming" doesn't give me any luck.

 

If I set it to breached, the breached sensor does get armed, but also the trigger scene starts immediately , because the sensor was already breached and gets armed.

So my question is how can I arm a sensor while its breached and wait with arming untill the sensor is safe? Or prevent the trigger scene to start immediately , because the sensor was already breached before arming.

 

 

thanks in advance,

MD360

 

 

 

7 answers to this question

Recommended Posts

  • 0
Posted

On the device settings you should have an Alarm settings section which has the arm/disarm delay. Tick "Sensor is armed with delay or it will trigger the alarm after some delay" and then set the required values for the arm/disarm delays. Arm delay is how long it waits to arm the sensor (to allow you to get out the house) and disarm is the delay it waits after it notices movement before setting it breached to allow you to get in the house and disarm the alarm. 

  • 0
  • Inquirer
  • Posted
    22 hours ago, Cameleon said:

    On the device settings you should have an Alarm settings section which has the arm/disarm delay. Tick "Sensor is armed with delay or it will trigger the alarm after some delay" and then set the required values for the arm/disarm delays. Arm delay is how long it waits to arm the sensor (to allow you to get out the house) and disarm is the delay it waits after it notices movement before setting it breached to allow you to get in the house and disarm the alarm. 

     

    Hi Cameleon,

     

    Thank your for your reply. This is more of a work around, if I may say so.  Because, if you set the alarm, you are not allowed to move afterwards in front of the motion sensor otherwise the sensor (re)starts counting and then delay could be to short. Or I have to set the delay even longer. Besides that the sensor has always a delay, also when it's not breached.

     

    I'd rather have a solution where the sensor remembers the fibaro:call(arm sensor) and execute the command when its safe. If that's not possible, then a scene that checks if the sensor is safe and than arms the sensor. I thinking on something like underneath:  .....but I have no clue yet how I can get this working in in a scene.

     

    If <sensor is breached>, then

    <wait untill sensor is save>

    and <arm sensor>

    else <arm sensor>

     

    So the scene start with a trigger that arms the sensors, but in the "THEN" part it first have to check if sensor is safe. I don't think it's possible to use a second trigger (sensor is safe) halfway the scene, in the "THEN" part" 

    But maybe something like "If sensor is not safe wait x seconds and check again", would work??

     

     

    greets,

    MD360

     

     

     

    • 0
    Posted (edited)

    OK, so I had to go look at my code again to remind myself how my alarm scene works. I think I took the code originally from Sankotrnic's alarm scene. It looks to see if a sensor has a wait time and if it does it waits that long before trying to arm it, so not quite a built in function as I remembered. 

     

    Another option is to use - fibaro:call(sensorID, 'forceArm') - I think this arms it instantly as so long as there is no more movement, it will arm and stay armed until it gets motion. So if you are out of the way and not going to breach it again before you leave the house then this is fine. I used to do this for my hallway motion sensor. 

     

    Or you can do as you propose but it could be dangerous and get into a loop that it might not exit if there is some constant motion for some reason. 

     

    if <sensor breached > then

      while (sensor breached)

        wait(XX seconds)

      end

      <arm sensor>

    else

      <arm sensor>

    end

      

    Edited by Cameleon
    • 0
  • Inquirer
  • Posted

    Hi Cameleon,

     

    thanks for helping.

    I'll give it a try.

    • 0
  • Inquirer
  • Posted

    the while loop works. And I understand I have to stop moving at a certain moment ;D, otherwise it keeps looping.

     

    Thank you.

     

     

    • 0
  • Inquirer
  • Posted

    I think I have found the solution for exact what I wanted.

     

    I fixed it with the LUA code repeat untill

     

        repeat <do nothing> until
        tonumber(fibaro:getValue(19, "value")) == 0
        fibaro:debug("the sensor is safe")
        fibaro:call(19, "setArmed", "1")
        fibaro:debug ("the sensor is armed")

     

    With this setup the Fibaro HC2 keeps doing nothing (the text <do nothing> should be erased), until the sensor is safe.

    Then I instruct the Fibaro to arm the sensor.

     

    With this LUA code, you don't need to set up the arming conditions in the advanced settings of the sensor, the sensor has to be safe.

    The difference with the arming conditions is that this LUA code not only checks if the sensor is safe, but also set the the sensor to armed when it change to safe.

     

    First I had as first line: repeat fibaro:call(19, "setArmed", "1") until,

    But then you do need to set the above mentioned arming conditions, otherwise it doesn't wait arming until it's safe.

    But also you setup the arming conditions, then the debug window gives every 5 seconds a "Bad request" error, until the sensor is safe and it immediately arms the sensor.

     

    So I also noticed that apparently repeat works every 5 seconds.

     

    I hope it can help other people. 

    Also if someone can point me at something I've missed, please let me know.

     

    greets,

    MD360

     

     

     

     

     

    • Thanks 1
    • 0
  • Inquirer
  • Posted

    Ik guess the repeat until function is actually checking every 5 seconds if the condition after until is true and then executes the command after repeat.

    So it is not really waiting for a kind of push message, like how starting a scene works with the sourcetrigger. Am I right?

    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...