Time Trigger
Set a trigger based on current time
Overview
Set a trigger based on current time. This node is useful to get downstream nodes to take action (or not) depending on the day of week or time of day.
Example use cases:
- Don't send alarms or alerts during work hours when a person enters an area. Occupancy Monitor -> Time Trigger -> Trigger Email Alert Node (with trigger set of Time Trigger and Occupancy Monitor Trigger)
- Don't process the rest of the pipeline outside a set range of hours. Video Source Node -> Time Trigger -> Filter Stream Node (with trigger set to Time trigger metadata) -> rest of pipeline.
Remember : To use the output of the Time Trigger Node, you must use a Trigger Condition of type
nodes.time_trigger1.triggeredin a downstream node.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : Time trigger state
Properties
Property | Value |
|---|---|
| Trigger on these days of the week. If Type: Array of options. Options:
|
| Trigger periodically Options:
|
| Trigger at a fixed interval, when Ex. 60 will trigger at every sixty seconds. |
| Comma separated times or time ranges to trigger at. If you specify days of week or dates as a part of the time ranges, you may want to leave out specifying ex.
|
| Timezone. Options:
|
| Timezone Offset in hours from GMT, when Ex. |
Time Range Format
The time_ranges property supports multiple time ranges, comma separated. Each range must be of the following format, although you can mix and match types in a single node:
| Range Type | Format | Example |
|---|---|---|
| Specific time, on all days of the week. | HH:MM am/pm | 12:59am4pm |
| Specific time range, on all days of the week. Time range can cross midnight when day/date is not specified. | HH:MM am/pm - HH:MM am/pm | 3pm - 5pm4:30pm - 9pm5pm to 1am |
| Specific day of week / date and time. | MM/DD/YYYY HH:MM am/pmDAY_OF_WEEK HH:MM am/pmDAY_GROUP HH:MM am/pmDAY_OF_WEEK is one of:monday, tuesday, wednesday, thursday, friday, saturday, sundayDAY_GROUP is one of weekdays, weekends | 04/13/2022 4:50pmmonday 9amweekdays 10amweekends 9:55am |
| Specific time range | MM/DD/YYYY HH:MM am/pm - MM/DD/YYYY HH:MM am/pmDAY_OF_WEEK HH:MM am/pm - DAY_OF_WEEK HH:MM am/pmDAY_OF_WEEK HH:MM am/pm - HH:MM am/pmDAY_GROUP HH:MM am/pm - HH:MM am/pmDAY_OF_WEEK is one of:monday, tuesday, wednesday, thursday, friday, saturday, sundayDAY_GROUP is one of weekdays, weekends | 12/1/2022 5am - 12/15/2022 9ammonday 9am - friday 5pmweekdays 12am - 6amweekends 12am - 11:59pm |
Behavior
This node will set a trigger when current time meets the 3 criteria specified : day_of_week and period and time_ranges.
- Setting a
periodalong withday_of_weekand/ortime_rangeslets you trigger it periodically within those time ranges - Setting
day_of_weekvalues along withtime_rangeswill limit the trigger to the overlap of both.
Metadata
| Metadata Property | Description |
|---|---|
nodes.<node_id> | Format : as defined in the table below.<node_id> for is of the form time_triggerX (ex. time_trigger1) |
Example
"nodes": {
"time_trigger1": {
"type": "time_trigger",
"triggered": True,
"triggered_delta": True
}
}Format
| Key | Type | Description |
|---|---|---|
triggered | Boolean | True if current time matches the configuration, else False |
triggered_delta | Boolean | True if the triggered property changed from False to True in this frame, else False |
Updated 5 days ago
