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


Question

Posted

Hi All,

 

I need your help.

 

I have 5 FIBARO door/windows sensor on my house. I use a LUA scene to arm/disarm the alarm.

 

Currently, I have several scenes that I activate according to the sensors that need to be armed or not.

 

I use this code to insert the sensors:

 

[...]
local sensors_list = {94}
[…]

 

[...]
    fibaro:debug("Attivo Sensori")
    for key, sensor_id in pairs(sensors_list) do
    fibaro:call(sensor_id, "setArmed", "1")
    end
    fibaro:debug("Sensori Attivi")
[…]

And I modify the sensors_list with the various IDs that need to be armed.

 

Now, I would like a single scene, in which the sensors_list value is automatically populated by all the sensors that are in a safe state and arm only the safe ones.

 

Is it possible to do such a thing?

 

Thanks.

Marco

6 answers to this question

Recommended Posts

  • 1
Posted

Good point....

Try that

sensors_list=fibaro:getDevicesId({interfaces={"fibaroAlarm"},properties={value=false}})

  • 0
Posted

Why don't you arm all necessary sensors w/o considering if the sensor is safe or breached?

For example

if main door sensor is breached, you don't need to arm it?

 

  • 0
  • Inquirer
  • Posted

    Hi,

     

    because in the summer, I leave some windows open because of my cat.

    So I'd like to not arm the window that's open to avoid false alarms and set off the siren.

    • 0
  • Inquirer
  • Posted

    Great!!! It works!!!!

     

    thanks :D

    • 0
    Posted (edited)

    Welcome

    Edited by cag014

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