Announcement

Collapse
No announcement yet.

Event for night time but x time before sunset?

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

    Event for night time but x time before sunset?

    How would I write an event where I'd like it to run only if it's night time but have ie trigger X minutes before sunset and x minutes after sunrise?

    wouldn't the event below cancel each other out?

    Click image for larger version  Name:	image_71071.png Views:	1 Size:	129.7 KB ID:	1243680

    #2
    Originally posted by dannieboiz View Post
    How would I write an event where I'd like it to run only if it's night time but have ie trigger X minutes before sunset and x minutes after sunrise?

    wouldn't the event below cancel each other out?

    Click image for larger version Name:	image_71071.png Views:	1 Size:	129.7 KB ID:	1243680
    Those conditions are both exact times, so they can never be true at the same time.

    In HomeSeer native conditions you cannot have "after 30 minutes before sunset" or "before 30 minutes after sunrise".

    Your best options are either using Easy Trigger Conditions or schedules or to use a virtual device controlled by two events.

    The virtual device control events and light control event would look like this. The first event is the light control that will only run when the virtual device is on. The second event turns the virtual device off 30 minutes after sunrise. The third turns the virtual device on 30 minutes before sunset.

    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	76.5 KB ID:	1243707

    An event using an Easy Trigger schedule would be like this. This event checks a preconfigured schedule with offsets for sunrise and sunset times. This is what I use, with one schedule for upstairs and a different one for the basement.

    Click image for larger version  Name:	Capture1.PNG Views:	1 Size:	29.1 KB ID:	1243704

    The schedule looks like this

    Click image for larger version  Name:	Capture3.PNG Views:	1 Size:	32.3 KB ID:	1243708

    Using Easy Trigger conditions would be like this. You trigger on motion and use a condition check that it is after 30 minutes before sunset. Understand that all time conditions begin and end at midnight, making the condition actually after 30 minutes before sunset, but before midnight. Then a second identical trigger is added with a similar condition for sunrise. When you have incompatible conditions, you add a second identical trigger.


    Click image for larger version  Name:	Capture2.PNG Views:	1 Size:	40.0 KB ID:	1243705
    Last edited by randy; August 26, 2018, 05:14 PM. Reason: typo
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      thanks rprade, the virtual device is what I'm using now... I was doing a clean up of my events and thought if ther was another way to do it.

      Comment


        #4
        Originally posted by dannieboiz View Post
        thanks rprade, the virtual device is what I'm using now... I was doing a clean up of my events and thought if ther was another way to do it.
        The virtual device is a good method as you can use it in all of your motion controlled lighting events.

        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment

        Working...
        X