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

Turn off lights when no movement has been detected for x amount of time


heretic1988

Question

Hi,

 

I am new to the Fibaro system and I am creating my scenes for the house. I use the HCL, so I can't use LUA.

I have a working scene that turns on the lights when movement is detected after sunset. That is working good.

What I want to do next, is have the lights turn off, starting after a certain time; when no movement is detected for 30 minutes.

This I 'cant seem to get working. I use a variable with settings :movement, and no movement

How can I count the time that the motion sensor has not been detecting any movement?

 

 

 

Please login or register to see this attachment.

Please login or register to see this attachment.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Maybe better using lua :

 

assuming you have an array for PIRS where put PIRS device ID , like

Please login or register to see this code.

inattivitaPIRS is an array with stored the time that single PIR (identified by i) have no detected movement.

 

I use a "little bit more complicated" script to automaticall turn on alarm in my house after X time of PIRs inactivity

 

 

Hope this help

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thank you for taking the time to try to help me with creating my first scenes.

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    But as I clearly stated in my post  :  I use the HCL, so I can't use LUA.

    So I am afraid I can't do much with your solution

    Please login or register to see this image.

    /emoticons/default_icon_sad.gif" alt=":-(" />

    Link to comment
    Share on other sites

    • 0

    Sorry 

    Please login or register to see this image.

    /emoticons/default_icon_redface.gif" alt=":oops:" /> 

    Please login or register to see this image.

    /emoticons/default_icon_redface.gif" alt=":oops:" /> 

    Please login or register to see this image.

    /emoticons/default_icon_redface.gif" alt=":oops:" />

    Link to comment
    Share on other sites

    • 0

    Correct me if i'm wrong but i think for the this situation:

     

    On:

    (optional > time settings, sunset, time between etc)

    (and)

    Motionesensor = breached

    then 

    Light [ On ]  (in red bar seconds for delay to turn on)

     

    Off:

    Motionsensor =  safe [ in red bar the time 1800  ]   (= in seconds)

    then

    light [Off]

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Putting the 1800s in the delay box did the trick.

    I was confused as I thought it would just wait 30 minutes after a "safe" state, not taking in account if movement would be detected in those 1800.

    Combined with the possibility to have a box next to the state option where you can put a value is confusing. Documentation on this is very rare

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Thanks for your help and time ppl

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    No problem, glad i could help.

     

    It's hard to find good documentation, that is still a problem of fibaro.

    But with google you find some examples also. 

    Or this forum

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

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