Announcement

Collapse
No announcement yet.

Auto Turn Off Lights With Disable Function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Auto Turn Off Lights With Disable Function

    So here is my goal:

    * When a door is opened turn on the light.
    * After x minutes automatically turn off the light.
    * If the light is automatically turned off but then turned on again within y seconds (by closing and reopening the door or by hitting the light switch) turn the light back on and disable the auto turn off feature
    * At 4am in the morning turn the "auto turn off feature", i.e. the next day the light will again automatically turn off after x minutes.

    The auto turn off can be easily achieved by delayed triggers/events. Disabling the "auto turn off" can be implemented with some virtual device (I did something like that in the past but lost the events). Has anybody else implemented something like that? If so, how did you do this?

    #2
    Greetings mulu,

    I do something similar with the Auto-Locking Event for my Z-Wave Locks. I have a couple questions that will affect the Events programming.

    What is the manufactuer make and model of the Z-Wave switch?
    Is the switch Scene capable? IE: Dbl or Triple taps?
    Do you know in advance that when the light is turned on that you will want to disable the Auto-Off event?

    Thanks,

    Roger D

    Comment


      #3
      Have a virtual device - 'Auto light' with two states ON and OFF. In the event to turn the light on, add - 'and If Auto Light is ON'

      This Virtual Device can the be controlled by another event for 4am and another for the door open and closing within the y seconds - you will probably need Easy Trigger or a script for that.

      Comment


        #4
        mulu,

        If the dimmer is Scene capable, you can use a single press to turn the light on for X minutes and a double tap to turn the lights on till 4 AM. That will be the easiest way. I use that here for my ceiling fans.

        If you want it to turn on till 4 by opening the door or turning the light on again within Z Seconds, then that will take the Virtual device Scott mentioned. As far as turning off at 4:00 that's just a separate Event that triggers at 4 and if the light is on, turn it off.

        Be Safe,

        Roger D

        Comment


          #5
          As far as I know, the switch (Cooper Wiring dimmers) don't support scenes, meaning, they don't know the difference between single click, double click, triple click, etc. I whish they did. It's not the most intuitive solution but one that would work very well/efficiently if you know about it. I guess I will have to do the virtual device thingy again.

          Comment


            #6
            Do you have a model number of the switch? It might support "last" which will work also. If you double click, does it go to the last dim setting?
            If you go to the Status/Graphics page do you see anything that says "Last" like in the following screenshot?

            Click image for larger version  Name:	Screenshot_2021-08-13_03-57-37.png Views:	0 Size:	265.1 KB ID:	1488981

            And is it possible to post the information details from the root of the switch by clicking on the root, go to Z-Wave, then Manage, then click on the drop down for Information About Node...


            Also, can you duplicate then run this Event?

            Click image for larger version  Name:	Screenshot_2021-08-13_04-24-39.png Views:	0 Size:	169.3 KB ID:	1488982

            If all goes well, then if the light is already on for at least 1 second and you press the ON Button then the the lights will be turned off. That will tell if we can check for a double click a different way.

            There's always a way...

            Roger D

            Comment


              #7
              Roger D My switches are Cooper Wiring 9540 (master) and 9542 (slave). The switch has a "last" status (see attachment). The last state is activated by a SINGLE click, i.e. when you turn on the light it automatically goes to the last dimming level.
              Attached Files

              Comment


                #8
                So those dimmers don't support scenes as far as I can tell. If I double click the switch the light doesn't come on. The log also shows that the switch was turned on and then immediately turned off. So I have to figure out some other way to do this, i.e. turning off the "auto turn off".

                Comment


                  #9
                  I am still trying to wrap my head around this. The switch doesn't support scenes as far as I can tell. So I am trying to emulate scenes by either a) somebody turns on, turns off and then turns on a light switch (either manually or through a sensor) in short sequence or b) somebody turns a light switch back on within x seconds after it turned off. I don't want to use scripts and I would like to avoid timers. Right now I use a virtual "Auto off" device that resets every day at 4am, i.e. it turns "auto light off" on. But how do I set this "auto light off" to off based on the above criteria?

                  Comment


                    #10
                    The expensive way :

                    Click image for larger version  Name:	Scene Master.png Views:	0 Size:	61.0 KB ID:	1493566


                    Click image for larger version  Name:	SceneMaster 2.png Views:	0 Size:	54.8 KB ID:	1493567


                    You can try with no obligation to buy.


                    Eman.
                    TinkerLand : Life's Choices,"No One Size Fits All"

                    Comment


                      #11
                      Okay let's try this...

                      With the lights off, press and hold the switch for 2 seconds or so until the lights go full on. What is transmitted to the Interface?

                      With the lights on, press and hold the switch for 2 seconds or so until the green LED flashes, What is transmitted to the interface?

                      Roger D

                      Comment


                        #12
                        mulu,

                        There is a way to do what you want as far as turning the light on, then off, then back on as in Post #1 above. As far as I can tell it takes 5 Events and 1 Timer to do. The 5 Events are all short and simple to do. I'll post them later tomorrow.

                        Roger D

                        Comment


                          #13
                          Roger D I am looking forward to your setup. As for the long button presses, it turns out the light switch does not respond to presses but only to releases. So it does nothing while you keep the button pressed and once you release it it is just a simple on/off that shows up in the log.

                          What I did so far is creating a virtual device that represents if the light should turn off automatically or not. Every day at 4am I reset that virtual device. The tricky part is how to turn the "auto off" off. I am trying not to use timers but maybe I don't get around that. Or maybe I can add another feature in the virtual "auto off" device that tracks when the light was last turned off. So then when it turns back on I can check if the time between it being turned on again and when it was last turned off was less than x minutes then I turn the off feature off. I need to try that.
                          Attached Files

                          Comment


                            #14
                            mulu,

                            Here's the list of Events to do want you want. I used devices in my system to test with so you will need to change the names accordingly.

                            N. B. Note the use of negative numbers for the timer values.













                            Hope this Helps,


                            Roger D​

                            Comment


                              #15
                              Thanks but I don't see any attachments or any link.

                              Comment

                              Working...
                              X