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
RossA 1
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.