Announcement

Collapse
No announcement yet.

Conditions - The Time Is...

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

    Conditions - The Time Is...

    As with triggers, each plug-in you install may provide additional conditions. For now we will just cover the conditions provided with the base program and attempt to further clarify how conditions and triggers differ. The first group of conditions are time based





    The first thing you will notice is that there are a lot more time conditions, than time triggers. This is possible because conditions do not need to be a moment in time, but can cover a range of times. There are some of the choices that are specific like triggers such as
    • The time is this:
    • The time is sunrise/sunset
    • The time is this before sunrise/sunset
    • The time is this after sunrise/sunset
    The rest of the condition choices cover a range of times.

    This concept is extremely important in HomeSeer. For the execution of event conditions the day begins and ends at midnight. This concept really affects certain conditions such as
    • The time is before this: really means if the time is after midnight but before this:. So if you set the condition the time is before 6:00 AM it is the same as stating the time is between midnight and 6:00 AM.
    • The time is after this: really means if the time is after this: but before midnight.
    The last four follow the same rules so The time is before sunrise but after 9:00 PM will not work because midnight divides the day. The lone exception to the midnight rule is: The time is nighttime (after sunset, before sunrise). This condition by design ignores the dividing line at midnight.

    The only way to have a time condition that spans the midnight dividing line is to use two separate conditions. To have the condition cover the time span from 11:00PM until 3:00AM is to use a more complex event construction tool, the OR IF. That is a topic we will cover later in building events, but it is in its simplest form:

    IF Trigger
    AND IF The time is after 11:00PM

    OR IF Trigger
    AND IF The time is before 3:00AM

    When you choose conditions such as the time is this before sunrise, the time is after this or any other choice that requires a specific value entry, will prompt you to enter the value. As illustrated in the following two screenshots. First you select the time in the prompts





    After you have made your selection, the condition will be populated with the time. Obviously we have created an event that would never run.



    Last edited by randy; August 9, 2018, 11:01 AM.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    #2
    What if you need to set the trigger to happen only between 10pm - 6am?

    If i have an event to turn on the landscape lights at 8pm and turn it off at 10pm, using IF and OR IF will override it.

    For example

    If the time is 30mins after Sunset, then turn on "landscape lights"

    If the time is 10pm, and if the landscape lights are "ON", then turn off landscape lights.


    I'd like to have an additional event to turn on the landscape lights if motion is detected. however, i want the lights stay on regardless any condition between sunset - 10pm.

    so by using IF and OR IF, this will override it and turn off the lights.

    Comment


      #3
      Originally posted by mike2016 View Post
      What if you need to set the trigger to happen only between 10pm - 6am?

      If i have an event to turn on the landscape lights at 8pm and turn it off at 10pm, using IF and OR IF will override it.

      For example

      If the time is 30mins after Sunset, then turn on "landscape lights"

      If the time is 10pm, and if the landscape lights are "ON", then turn off landscape lights.


      I'd like to have an additional event to turn on the landscape lights if motion is detected. however, i want the lights stay on regardless any condition between sunset - 10pm.

      so by using IF and OR IF, this will override it and turn off the lights.
      Here is one way using 4 events. The first one turns the landscape lights and the second turns them off. The third is On by motion and I have it set to run at nighttime. The downside of using the condition "nighttime" is that if there is motion after sunset but before 30 minutes after sunset, the lights would trigger on. That requires the "Remove Delayed Device Action" in event 1. If you want times relative to sunrise/sunset other than simply nighttime, you will have to build a pair of events controlling a virtual device because there are no conditions that would accommodate "If the time after this after Sunset..." or "The time is before this before Sunrise...". You might use Spud's Easy Trigger plug-in, but it doesn't yet schedule relative to the sun. I think he is planning it.

      The fourth event is the Lights Off by No Motion event and I have added conditions that would prevent it from turning the lights off until after 10:00 PM.

      EDIT: Corrected images, had Remove Delayed Device Action in Off event. It should have been in the On event.
      .
      Attached Files
      Last edited by randy; June 10, 2015, 08:18 PM.
      HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        Another approach would be to use a virtual device in conjunction with the Landscape Lights. When this virtual device is ON the motion control OFF event would not run.

        You could also create a pair of events and a virtual device that determines the hours your exterior motion control is active such as I did in this thread.

        EDIT: Corrected images, had Remove Delayed Device Action in Off event. It should have been in the On event.

        Click image for larger version

Name:	image_46800.jpg
Views:	1979
Size:	209.5 KB
ID:	1179042 .
        Last edited by randy; August 9, 2018, 11:43 AM.
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Thanks Randy. This helped a lot.

          I am thinking to further improve this "event" a bit by adding a "timer" so that if there's motion, the lights will stay on. instead of turning off the lights after 10 mins.

          but i haven't been able to test it yet, though. let me know if this works?

          all i am doing is to create a timer and a seperate event, it will reset the timer to 0 everytime there's a motion detected.

          then add a "AND IF" condition to the OFF event triggers.

          AND IF "Motion Timer's value is more than 3m,0s"


          basically it means if there's no motion for the past 3 minutes, turn off the lights.

          Comment


            #6
            Originally posted by mike2016 View Post
            Thanks Randy. This helped a lot.

            I am thinking to further improve this "event" a bit by adding a "timer" so that if there's motion, the lights will stay on. instead of turning off the lights after 10 mins.

            but i haven't been able to test it yet, though. let me know if this works?

            all i am doing is to create a timer and a seperate event, it will reset the timer to 0 everytime there's a motion detected.

            then add a "AND IF" condition to the OFF event triggers.

            AND IF "Motion Timer's value is more than 3m,0s"


            basically it means if there's no motion for the past 3 minutes, turn off the lights.
            You don't 't need a timer, you caught a mistake I made when I was building the events for you. I've built similar events so often, I don't know how I goofed this one up. I'll post revised screenshots later today.

            If you see the Action "Then Remove Delayed Device Actions for: Lighting Exterior Landscape Lights" in the "landscape Lights OFF by No Motion" event, it really should have been in the "Landscape Lights ON by Motion" event.

            That action is your timer. When the detector changes to No Motion a Delayed Device Action is created to turn the lights off 10 minutes later. When there is Motion detected the delayed action created by the OFF by no motion event is deleted. What that means is that the lights will be turned off 10 minutes after the LAST Motion ends. The timer is in the delayed device action created in the OFF event. Deleting the Delayed Device Action essentially resets the timer. In the examples I arbitrarily set it for 10 minutes, you can make that whatever you want = 3 minutes, 30 minutes, etc.

            Sorry for the mistake, you'd think I could do these events in my sleep - apparently not

            EDIT: Corrected images in the two posts above, had Remove Delayed Device Action in Off event. It should have been in the On event.
            Last edited by randy; June 10, 2015, 08:21 PM.
            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

            Comment


              #7
              1 hour before sunrise and 1 hour before sunset

              How do I create an event that will under the condition of the time periode 1 hour before sunrise and 1 hours before sunset.
              A kind of Nighttime +1 so to say.
              Best,
              Jakob Sand, I automate everything!

              Comment


                #8
                Originally posted by Jakob.Sand View Post
                How do I create an event that will under the condition of the time periode 1 hour before sunrise and 1 hours before sunset. A kind of Nighttime +1 so to say.
                The way I do this is with a virtual device. Turn it on one hour before sunset. Turn it off one hour before sunrise. Then use it's value as a condition on other events.
                Mike____________________________________________________________ __________________
                HS3 Pro Edition 3.0.0.548, NUC i3

                HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                Comment


                  #9
                  I do the same thing as Uncle Mike. Makes it so much easier to control things. Now you only have to remember that the "time" device is on or off and work that way.

                  I use this since I use a light level detector coupled with a randomized "15 minutes before sunset" to turn my "night time" virtual on. That triggers lighting and other things to start up for the night.

                  --Dan
                  Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                  Comment


                    #10
                    Originally posted by Jakob.Sand View Post
                    How do I create an event that will under the condition of the time periode 1 hour before sunrise and 1 hours before sunset.
                    A kind of Nighttime +1 so to say.
                    A virtual device as Mike describes works very well. I have moved everything to schedules in Spud's Easy Trigger plug-in. I like it much better because I can have a different schedule for weekdays vs weekends and all times can be absolute or relative to sunrise and sunset. Plus editing the schedule changes every event that looks to it.
                    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      Is there a way to use a virtual device to store a day of week, or date and time of day and use that time of day to trigger an event? The purpose of this is to run a wake up routine at a time and day that are easily adjustable. Thanks for any help.


                      Tis a good question that is asked this day

                      Comment


                        #12
                        Originally posted by BeenHeavyinFlorida View Post
                        Is there a way to use a virtual device to store a day of week, or date and time of day and use that time of day to trigger an event? The purpose of this is to run a wake up routine at a time and day that are easily adjustable. Thanks for any help.


                        Tis a good question that is asked this day
                        I use Spud's Easy Trigger schedules. It allows you to set schedules and use them as triggers (enter/leave schedule) or conditions (within/outside of schedule). There are dozens of neat features that plug-in adds. It is linked below in my signature.
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          If the condition does not span across midnight, do you need to have the trigger in there twice? In the event below, I want the garage door to close if it has been open for 25 minutes, and the time is between 12:25a and 5:30a.

                          Another question: but may be in the wrong place...
                          If you have multiple actions, and each action has an "After waiting...." delay.
                          Is it correct that the delay of each action is based on the time of the trigger, and do not build upon the delays of the actions above them?

                          For instance, Action A has a 1 min delay
                          Action B has a 2 min delay.
                          Then Action B will run 2 min after the trigger, not 3 minutes.
                          Attached Files

                          Comment


                            #14
                            Originally posted by CinBRandon View Post
                            If the condition does not span across midnight, do you need to have the trigger in there twice? In the event below, I want the garage door to close if it has been open for 25 minutes, and the time is between 12:25a and 5:30a.

                            Another question: but may be in the wrong place...
                            If you have multiple actions, and each action has an "After waiting...." delay.
                            Is it correct that the delay of each action is based on the time of the trigger, and do not build upon the delays of the actions above them?

                            For instance, Action A has a 1 min delay
                            Action B has a 2 min delay.
                            Then Action B will run 2 min after the trigger, not 3 minutes.
                            Your event looks like it should work. You're correct if it doesn't span midnight you do not need duplicate triggers.

                            Delayed Device actions are all based upon the original trigger time of the event. They are not cumulative.

                            A "Wait" action is cumulative. It makes the event pause for that period. Subsequent "Wait" actions are obsevered sequentially.
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #15
                              HomeSeer Doesn't Seem to Recognise Nighttime

                              Hi, folks.

                              I wanted to light up my desk lamp when motion is detected during nighttime and when the room is dark. I've set up the conditions as follows:

                              [IMG][/IMG]

                              The desk lamp does light up when motion is detected but it seems to still light up even after sunrise as long as the room is dark. Can anyone please tell me what is wrong with my conditions?

                              Thanks in advance.

                              Comment

                              Working...
                              X