Working with Observations

An Observation describes how to sample/store Resource data and what should be done when the data meets a specified condition. When defining an Observation, you can optionally configure how to manage, manipulate, and filter data that has been observed from a Resource, which in turn, defines how and when an event is generated.

📘

Note:

Octave supports up to 64 Observations.

An event is generated by an Observation containing the data, when the rules defined by the Observation are met. This event is then routed to different destinations (e.g., to another Resource, to the cloud, etc.), as defined in the Observation.

Rules defined by an Observation include:

  • Which input Resource to screen/observe.
  • Optional: how to process the data (e.g. latest value, average of the last 10 readings, etc.).
  • Optional : filtering rules to return data (e.g., when a value exceeds 10, changes by 2, etc.).
  • Where to route the output data (e.g., forward to the cloud now, to an Edge Action, to another Resource, etc.).

For example, an Observation can stream data from the redSensor/temperature/value Resource to the lcd/txt1 Resource.

Observations filters and processing capabilities:

  • Buffers which store more than a single value as state. Buffers are bounded FIFO queues and can be queried with Octave APIs.
  • Filters such as high and low filters that discard values which fall outside of a given range.

The following topics describe how to work with Observations:

  • Creating an Observation: how to create an Observation in the Octave dashboard.
  • Sending and Storing Events: configuring what the Observation should do with the data.
  • Buffering Data: buffer data that is arriving at some frequency from a sensor or input.
  • Throttling: define the rate at which to generate an event. This can be useful when input is being received at a high frequency, but you don't want to generate an event for every value.