Skip to main content

Trigger Examples

This page provides a few examples of triggers within Sage. Triggers are programs which generally use data and events from the edge or cloud to automatically drive or notify other behavior in the system.

Cloud-to-Edge Examples

Cloud-to-edge triggers are programs running in the cloud which monitor events or external data sources and then, in response, change some behavior on the nodes.

Severe Weather Trigger

This example starts and stops jobs in response to severe weather events scraped from the National Weather Service API.

Wildfire Trigger

This example looks at results from the smoke detector job and modify its own scheduling interval in response. The concept is that as smoke is detected, we want to run more frequent detections.

Edge-to-Cloud Examples

Edge-to-cloud triggers are programs which monitor data published from the nodes and use it, potentially along with additional data sources, to perform some computation or actions.

Sage Data Client Batch Trigger

This is a simple batch trigger example of using Sage Data Client to print nodes where the internal mean temperature exceeds a threshold every 5 minutes.

Sage Data Client Stream Trigger

This is an example of using Sage Data Client to watch the data stream and print nodes where the internal temperature exceeds a threshold.