Welcome to Smart Home Forum by FIBARO
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!
Smart Home Forum by FIBARO Team
I am trying to make a scene regarding opening the bathroom door with a Fibaro door sensor insalled on it. I have the logic set up for this but since I have no knowledge of LUA scripting whatsover, I am having a hard time implementing it properly (one time it even made my HC hang, had to reboot it, probably went into an infinite loop of some sort).
The scenario for this would be as follows:
1-Open door to enter bathroom, light turns on.
2-Close door behind you, light stays on.
3-Open door to exit bathroom, light stays on.
4-Close door behind you, light turns off.
Using the traditional scripting I have done before this could be done easily by setting a variable (flag) for the status of the door and just working from that, I can do that with my limited LUA knowledge (2 hours old
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 I dunno how to set more than one "then" and I need that.
Also I would be glad to have suggestions as to how I can optimise this scenario since I know it has some "loopholes" like if the door is opened and then he closes it without entering, light stays on indefinitely or if he opens the door to exit but then closes it while still inside.
Should I just drop this whole idea and just use some presence sensor? or combine it with one?
Link to comment
Share on other sites
7 answers to this question
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.