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

Auto Lights off


Question

Posted

I have a Lua script that turn lights on when the condition ->light is off ->and sensor is breached.  Then turn light off based on timer where when time sensor is breached  the timer starts again based on checking every 1 sec. If you switch the light on by actual physical switch then on/off goes to manual as the condition -> lights off ->and sensor breached is not met.  I am sure you have all seen something similar.

 

All works well except for when you are in manual mode and then switch off light by physical switch whilst the sensor is still breached.    As we know, when sensor is breached it stays in breach state for a certain amount time, say 5 sec.  As such, the problem is that if in manual mode and you switch off light, while sensor is breached, then condition ->light off and sensor breached is true, and light turn back on, f you have breached sensor when leaving room.

 

I have tried many different options to the point I am going crazy, and suggestions re Lua code to achieve this would be greatly appreciated.

 

Or to put it  better:

 

I need to be able to use auto on and off which works well, but also be able to override it at physical switch level, based on using Fibaro switch 2 assuming the sensor may be breached when you switch off.

 

Thanks in advance.

 

Ross

 

6 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted
    On 24/03/2018 at 11:28 PM, RossA said:

    I have a Lua script that turn lights on when the condition ->light is off ->and sensor is breached.  Then turn light off based on timer where when time sensor is breached  the timer starts again based on checking every 1 sec. If you switch the light on by actual physical switch then on/off goes to manual as the condition -> lights off ->and sensor breached is not met.  I am sure you have all seen something similar.

     

    All works well except for when you are in manual mode and then switch off light by physical switch whilst the sensor is still breached.    As we know, when sensor is breached it stays in breach state for a certain amount time, say 5 sec.  As such, the problem is that if in manual mode and you switch off light, while sensor is breached, then condition ->light off and sensor breached is true, and light turn back on, f you have breached sensor when leaving room.

     

    I have tried many different options to the point I am going crazy, and suggestions re Lua code to achieve this would be greatly appreciated.

     

    Or to put it  better:

     

    I need to be able to use auto on and off which works well, but also be able to override it at physical switch level, based on using Fibaro switch 2 assuming the sensor may be breached when you switch off.

     

    Thanks in advance.

     

    Ross

     

     

    • 0
    Posted
    On 3/27/2018 at 1:01 PM, RossA said:

     

    check out the downloads section and use the light script

    • 0
    Posted (edited)

    Is there a better way to make a retriggerable timer and don't start muliple instances of the script?

    Edited by Urfalo
    • 0
    Posted
    1 hour ago, Urfalo said:

    Is there a better way to make a retriggerable timer and don't start muliple instances of the script?

    did you check out downloads smart light script It's only 1 instance 

    • 0
    Posted
    On 21.3.2017 at 3:03 PM, T.Konopka said:

    The topic has been moved from "

    Please login or register to see this link.

    " to "

    Please login or register to see this link.

    ".

     

    Temat został przeniesiony z "

    Please login or register to see this link.

    " do "

    Please login or register to see this link.

    ".

    Thanks for the reply. I didn't fint the smart light script.  All i can see is the Very smart light

    .

    • 0
    Posted
    On 4/22/2018 at 3:21 PM, Urfalo said:

    Thanks for the reply. I didn't fint the smart light script.  All i can see is the Very smart light

    .

    yes very smart lights will do it. auto turns on motion for x time. then turns off. during this you can use the manual switch. I use the same script in all my rooms

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