we'd use General Logic for this, with a TimeWindow gate in the logic …
Tools … General Logic … … Add … Time Window … Add … AND …
Hi All,
Anyone know of a way to create a macro, when that when triggered, checks the time (and does something based on it)?
In this case, I want to connect it to an outside light level sensor, such that when it goes dark in the evening, if it's within a particular time range, to turn on some driveway lights.
Cheers,
Marcus
we'd use General Logic for this, with a TimeWindow gate in the logic …
Tools … General Logic … … Add … Time Window … Add … AND …
Last edited by chris_j_hunter; 13th March 2014 at 10:45 AM.
There is an existing behaviour for the light object (At lighting up time and dark to turn on, lighting off time to turn off). Or would this not cover the full requirement?
I use that mode of operation for the lamppost in the driveway, but this only gives one operating period (this is every evening for us).
I then have a virtual light object set to switch only on light level that is enabled and disabled by events - these are set for appropriate times on weekday mornings.
The virtual light object is connected to the follow state input of the lamppost light object, so triggers it on for dark mornings - thanks to Karam for explaining how to do this.
The advantage of this approach is that I have also been able to set a separate event which turns the lamppost on earlier on the morning that my wife has a very early start.
Hope this helps.
virtual just means an object that's not been enabled - so, for a light, add a module of any type that has a relay, and add a Light in the usual way - the module has no physical reality, so don't enable it, and its virtual …
You may find the legacy relay object is useful for creating such virtual objects
Thanks for everyone's assistance.
I'm looking into this, and I'm not sure if I can find a way to get this to work.
Specifically:
- I have an event scheduled that at 6:30pm every week day it checks if it's dark, if so, turn light on
- I have an event scheduled at 7:30pm every week day it turns light off
However I want to cover the possibility that in between 6:30 and 7:30pm, on week days, if it goes from bright to dark outside, it turns on the light.
Not sure how I can do this last bit?