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

Door Sensor Scene


ahmad89

Question

Hello,

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

Recommended Posts

  • 0

Due to the loopholes mentioned, I on my part decided to implement "door open: light on for x minutes" in my cellar (multiple rooms). For a single room a presence sensor could be better for the same cost.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Due to the loopholes mentioned, I on my part decided to implement "door open: light on for x minutes" in my cellar (multiple rooms). For a single room a presence sensor could be better for the same cost.

    Thanks for the reply, can you suggest a good presence sensor that works well with HC2?

    Link to comment
    Share on other sites

    • 0
    Hello,

    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.

    ?

    if you don't close the door the first time the light wil stay on for ever

    or you open door, remind to do something else. go away and close it again, same problem

    better is using a pir

    when pir breach

    reset timer

    start timer 10 min

    after 10 min light out

    this can be done in homeseer, i don't know if hc2 supports timers and reset that timer

    this way every time you move in the bathroom the timer starts again with 10 min

    so a long shower won't turn the lights out

    Link to comment
    Share on other sites

    • 0
    Guest GG

    Please login or register to see this link.

    you have one solution for having a timer in HC2.

    In this case, I use a pir from Satel alarm system, but it could as well be any other trigger you want to use to trigger the light with.

    Link to comment
    Share on other sites

    • 0

    Door sensors, PIRs or other sensors all helps building an "intelligent/smart" automatic system. The thing is, it is allmost impossible not to end up with one or more loopholes. To me, bottom line is to determine when is enough enough ("good enough). And - ah yes - I preferably also have a manual type/sw/(simple scene) to override...

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