Observations
Observations
Observations "connect" Resources to each other. They are the bridge that allows Events to flow from one application to another.
Observations represent rules that define:
- How often Octave polls a Resource (e.g. every 10 seconds).
- The data to collect (e.g. latest value, average of the last 10 readings, etc.)
- When an Action should be taken (e.g. when a value execeeds 10, changes by 2, etc.)
- The next task to perform with data (e.g. forward to the cloud now).
Whenever the rules defined in an Observation are met, a new Event is generated.
Observations describe how we want to sample/store Resource data and what we should do when the data meets a specified condition.
For example, to stream data from the redSensor/temperature/value
Resource to the lcd/txt1
Resource, you must use an Observation.
Note
Applications cannot write outside their own namespace.
Observations are also technically Resources, so you can also read / write directly to an Observation. Their data type is defined and set when the first value arrives, and they have the path: /obs/<observation_name>
.
Note
Although Observations are also Resources, they do not appear on the Device > Resources screen in the Octave dashboard.
Additional Features
Observations also feature:
- Filters such as high and low filters that discard values which fall outside of a given range.
- Buffers which store more than a single value as state. Buffers are bounded FIFO queues and can be queried with Octave APIs. This functionality is known as Storing and Forwarding Events.
Updated almost 5 years ago