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
pos 22
Hi
I am new to Fibaro and lua since a week or so. Just tried to create some lua scripts and a few global variables. But due to lack of documentation I have a few question of the behavior of the motion sensor.
I have a Fibaro mutlisensor and trigger on ""<device id> value" in one scene. My lua script do not however work as expected. The script shall light up a dimmer 2 to a certain value if it sees motion and it is below nn lux. And if someone touch the wall switch (set to off or change the light level) the scene should exit and auto-trigger next time the light is off if lux and motion matches. If motion is seen when the light is on and it was light up by the scene and not manually the timer should be reset to extend the on time. If motion is seen if the light was manually switched on, the motion sensor should not trigger anything.
The scene trigger on movement. But I also use "lastBreached" in the lua script.
Now...
Question 1
I have the motion sensor "Motion detection - alarm cancel delay" to 30s. It seems lastBreach is not updated if you have movement in front of the sensor within this time frame. Therefor, if you have constant movement I will not have a timer reset as the lastBreached wont be updated. If I leave the room and get back a minute later the lastBreached is updated and my timer is reset and keeps the light on. How does this work? Can any kind person describe the trigger, trigger reset, lastBreached etc on the motion sensor as it is not in any manual or spec.
Question 2
It seems the motion sensor value triggers the scene both when it sees motion and also when it resets after the "Motion detection - alarm cancel delay". Probably to it is a change of the "value". This causes unnecessary coding to go around. It it possible to trigger a scene just on when the motion sensor sees motion and not when it resets the value back? How?
Thanks in advance
/Peo
2 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.