Homeseer Event Conditions


I need some help with setting some conditions associated with a trigger. I have an event set to turn on some hallway lights from my upstairs to my kitchen when I get up in the morning. The event is trigger by my motion sensor that is tied into my alarm panel that homeseer can see. I have the event set up correctly as I have tested it and all the lights come on when the motion sensor is tripped. I want to write a condition that will suspend the trigger 23 hours before sunrise and 15 minutes after sunrise. Obviously, I want the lights to come on when I get up between 60 minutes before sunrise and 15 minutes after sunset. I then would want to create another event that would turn the lights off 30 minutes after sunrise.

It seems simple enough to write but I am not having any luck.

any suggestions?

The issue you are probably running into is understanding the midnight crossing. In Homeseer, the day starts at midnight. "before sunrise" means midnight to sunrise, and "after sunset" means sunset to midnight. Therefore 23 hours before sunrise is never going to happen within the Homeseer day (except possibly in extreme northern areas).

You need to split up your logic based on the timeframes you are looking for AND the Homeseer day. For example, if you only want to trigger between an hour before and sunrise, set that up - time is between (sunrise - 60) and (sunrise + 15).

It would be easier to do this within a script where you can do some time addition and subtraction and control complex conditional logic. However, you could also set up a logical flag device (usually called a semaphore) that would be changed when the timeframe you want is active, and then just test that device along with the motion sensor trigger. That is, the light only goes on when the flag device is ON -AND- the motion sensor triggers. Then set up events to change the flag device on at sunrise-60 and off at sunrise+15, etc.

Clear as mud?
Clear as Mud. I will have to read that over about a dozen times but I think I will eventually get it. I have no idea about what script is and how to write it. What is the best way to get familiar with script. Is there a "Script writing for Dummies" book out there any?

Thanks for the reply.

Mvesprini ,
You shouldn't need a script for this. Depending on what version of HS you are running. I'm running 2.1.142 but this has been available since 2.1.104. You can pick a trigger of "Received X10" and then using the Cpply conditions select the Time of Day or Sunrise/Sunset condition and add this. Then drop and select Minutes Before Sunset and select the hours/minutes before. Then add another condition and Select "Minutes before sunrise" or what ever you need.


  • a.jpg
    63.9 KB · Views: 17