Value historization¶
OnSphere values content can be saved when used alongside an output, provided by the analytics module.
Capabilities¶
Capability |
Support |
Comment |
---|---|---|
Define a measurement for a group of values |
See Measurements |
|
Define a field for a value |
See Fields |
|
Save the current state of a value |
See Save value |
|
Fetching the last states of a value |
Only with front-end charts widgets. See Queries |
Define a measurement for a group of values¶
Concept¶
A measurement defines a term that characterises what the values that compose this measurement actually represent or any term that could be used to group these values. For example, multiple devices with sensors sending a temperature value could be grouped within a measurement called ‘Temperature’ or within a measurement ‘Site 1’ that groups this sensor by their locations.
Use-cases¶
Group sensors values by a measurement representing their content
Usage¶
Defining a measurement is done by defining a measure.ospp file.
Bind a value to a field name¶
Concept¶
A field associates a value with a name and a description that will be used to identify this value when we attempt to fetch its last states. If no field is bound to a value, the value name will be used instead.
Use-cases¶
Define a specific name to identify a historized value
Usage¶
Defining a field is done by defining a field.ospp file.
Save the current state of a value¶
Concept¶
A value can be saved after each update or upon initialization when pairing with an output. These values are stored inside an InfluxDB instance.
Use-cases¶
Keep track and follow the evolution of a sensor values
Usage¶
Values can be saved by using outputs. When the output is called, it retrieves the measurement by searching for a mesure with the same ItemId as its own and retrieves the field name by either looking for the closest field to the value or, if none found, by directly using the value name.
With both of these information and with the value actual content, the output creates a new point inside the provided InfluxDB instance.
Fetching the last states of a value¶
Concepts¶
Retrieves values stored inside the InfluxDB instance by defining queries. Currently, only the front-end charts widgets can use these queries to display results.
Use-cases¶
Display the last values stored within a time range
Examples¶
Usage¶
Define a query and create a front-end dashboard with a chart widget.