more G-Labs products

Author Topic: X10 trigger only if between certain times.  (Read 614 times)

October 14, 2015, 08:01:32 AM
Read 614 times

brumster

  • *
  • Information
  • Newbie
  • Posts: 4
Hopefully someone out there can point me in the right direction.

My alarm panel can trigger an X10 command either when it is activated or when the alarm is disabled via the panel. In the case of the panel being disabled by the panel I intend to capture the X10 event in HG and then use that to turn a number of lights on.

Here's the question. Is there anyway to put a condition on the trigger within the HG program so that it only activates between certain times? For example, could I use HG to capture X10:A:4:ON and then turn on A6 if the time was between 20:00 and 23:00?

Thanks in advance for any help!

October 14, 2015, 05:01:38 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If you want to use C#, you can look at either the built-in Smart Lights APP or my Advanced Smart Lights code.  The built in code uses a luminance sensor to trigger when the motion detection triggers lights to come on.  My code modifies this to use the jkUtils APP to determine day/night.  In my code, the current time is compared to the sunrise/sunset values set by jkUtils and only allows lights to come on at when it's dark.  This should give you one way to only allow your code to turn lights on between given times.

Alternately, you could probably just use a CRON statement and simply use the isscheduling command on it.