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 light in Bathroom [LUA] [READY SOLUTION]


rafal.m
 Share

Question

Have fun!

Please login or register to see this code.

Link to comment
Share on other sites

Recommended Posts

  • 0

Thanks for your ready LUA -code for Auto light for bathroom.

It have worked brilliant until Alarm panel added to HC2 (I am using v3.560 beta). Now I get tons of notifications and emails to my iPhone, iPads and gmail -> like "Warning! Some devices could not be armed. Arm conditions not met: WC-door".

The problem seems to be that in the LUA-code the bathroom door sensor is put to armed state and everytime you open the toilet door the alarm goes on... at least I think that is the problem

Please login or register to see this image.

/emoticons/default_icon_biggrin.gif" alt=":-D" />

Have you come across the same problem ? If so I wonder have you made a new LUA code for the auto light for bathroom already ? Can we also have it please

Please login or register to see this image.

/emoticons/default_icon_razz.gif" alt=":-P" />

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Go to advanced tab in door configuration.

    Scroll to "Sensor arming conditions".

    You probably have something on list?

    Click "Add or remove device" below list.

    Deselect everything and click "Add".

    Now you have clear list.

    Save configuration.

    Voilà

    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" />

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    Thank you!

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Link to comment
    Share on other sites

    • 0

    rafal.m can you please explain how does it work? I mean when does the light turn on and off... etc? I do not understand LUA that much

    Please login or register to see this image.

    /emoticons/default_icon_sad.gif" alt=":-(" />

    I was looking for that kind of script for a long time. I found one (

    Please login or register to see this link.

    on polish forum) but I am not entirely satisfied...

    Thnk you!

    Vect0r.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I'll try to explain ...

    The bathroom has light and doors.

    The light has two states: on and off.

    The door has an event: the opening, closing, and the state: armed, disarmed.

    Arming status I use as an indicator of the presence of someone in the bathroom.

    We detect the moment of opening the door and if no one is inside, switch on a light.

    We detect the moment of closing the door, and if someone was already inside, put out the light.

    Also, we count the time from open to close the door to see if anyone went inside and closed the door (arming) or leave it opened for a long time (for example, to clean up) - leave disarmed.

    In addition, we support manual switching on and off lights that properly arming and disarming the door.

    Thats all.

    Link to comment
    Share on other sites

    • 0

    I guess that you also need a movement detector to confirm the states

    As if someone enter the bathroom when someone is already inside, or a false exit (open the door, then go back inside)

    Or you consider that people have to use the switch to inverse the logic in those cases ?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I guess that you also need a movement detector to confirm the states

    Definitely not!

    Or you consider that people have to use the switch to inverse the logic in those cases ?

    In my case, manual control is not often. That situation is only when you resign from entrance to the bathroom and shut the door

    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" />

    Link to comment
    Share on other sites

    • 0

    Definitely not!

    Greetings,

    If movement detector is not needed how will false exit or false entry problem be solved? To simplify lets assume a person opens the door but for some reason would rather close the door than go inside bathroom. So in this scenario the lights will be on right?

    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • If movement detector is not needed how will false exit or false entry problem be solved? To simplify lets assume a person opens the door but for some reason would rather close the door than go inside bathroom. So in this scenario the lights will be on right?

    Then you need to switch off manualy light

    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" />

    Or you can use this for automation:

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0

    rafal.m,

    I removed my doors from Alarm panel, but I still get notify on HC2 when it's disarmed. Any solution?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • rafal.m,

    I removed my doors from Alarm panel, but I still get notify on HC2 when it's disarmed. Any solution?

    Can you post screenshot from this settings?

    Link to comment
    Share on other sites

    • 0

    Here is the screenshots

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Here is the screenshots

    Strange.

    Search for the door sensor in Alarm panel/Advanced/Actions:

    Please login or register to see this link.

    Meybe some action still use that sensor?

    Link to comment
    Share on other sites

    • 0

    Nope nothing there. All empty. Is there any other way? I tried to include and exclude but it didn't help...it does the same with all door/window sensors when opened before disarm...

    won't be better to use Global Variable?

    The Disarm Alarm signal is only ON when the doors are open for second time, before closing them and turning lights off. When you close them, the alarm goes away...

    Link to comment
    Share on other sites

    • 0

    This function will work in 3.571 next release so be patient

    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" />

    Link to comment
    Share on other sites

    • 0

    I think the possibility to remove some device to activate alarm.

    Also for me the alarm is ringing.

    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.

     Share

    ×
    ×
    • Create New...