These concepts will help you better understand what everything means in the SIB. Below is a short summary of each concept.
- sensemetrics Thread
- Devices
- Sensors
- Observations
- Metrics
- Derived Metrics
- Units
- Properties
- Controls
- Algorithms
- Categories
- Integration Definitions
- Instances
- Code Hooks
- JavaScript
- Python
- YAML
- Templates
sensemetrics Thread
The Thread is a plug and play data aggregation instrument that is used to power and connect any device/sensor. See here for more info.
Devices
A device that is associated with a sensemetrics Thread connection, is something that is connected to the Thread via one of the two device ports. That device can then have multiple sensors associated with it. An example of a device is a Geokon datalogger or a SlideMinder or a Vaisala Weather Station. A device is something the Thread communicates with over serial or USB to obtain readings or observations.
Sensors
A sensor is associated with a device and represents the data or observations in sensemetrics. A single device can have multiple sensors. Every sensor has an associated set of metric and unit pairs. An example of a sensor is a temperature sensor that records observations in units of Celsius. Another example of a sensor is a vibrating wire piezometer that records frequency in hertz and temperature in Celsius.
Observations
An observation is a numerical reading or group of readings for a sensor with an associated timestamp. An example of an observation is 75.6 degrees Fahrenheit at December 10, 2019 for a temperature sensor. Every observation has an associated set of metrics and units and a unique timestamp. Retrieving observations is a key goal of a successful device and sensor integration. Observations on the sensemetrics platform are then used for downstream analytics and processing and drive features such as reporting, alerting, and graphing.
Metrics
A metric is a representation of a measurement. Examples include temperature, velocity, frequency, and x, y, z position. All metrics have a unit. A raw metric is the metric that is directly reported by the device without any changes or conversions. See Metrics and Units Reference for a full list of available metrics.
Derived Metrics
A derived metric is a metric that is calculated based on a given raw metric using an algorithm. An example of a derived metric is velocity. Given position and time, velocity can be calculated using an algorithm. See Metrics and Units Reference for a full list of available metrics.
Units
A unit is associated with a metric. Examples include feet, celsius, hertz, and meters per second. See Metrics and Units Reference for a full list of available units.
Properties
A property is a key-value pair associated with a device or sensor. These can include things such as serial numbers, names, or any arbitrary key-value pair that describes the device or alters its integration behavior. These can also include site installation specific values such as collar elevation, sensor depth, or calibration factors for a vibrating wire. Keys are 'strings' and values can be most any type, including integers, strings, booleans, longs, doubles, or maps. Properties usually appear on a device or sensor's config form for editing or viewing. See the PropertyTypes Reference for a full list of available PropertyTypes.
Controls
A control is a UI component that appears on a form and can be declared using YAML. Controls can be added/removed to/from forms at runtime. These include such things as text boxes, text areas, select drop-downs, buttons, modals, and other common UI components. A control is associated with Properties and is two-way bound to those properties. See UI Controls for more info.
Algorithms
An algorithm is used to calculate derived metrics which are metrics that are calculated from a raw metric. An example of an algorithm is the calculation of pressure for a vibrating wire given frequency and the manufacturer's associated calibration factors. Another example of an algorithm is the calculation of velocity given position and time.
Categories
A category is an arbitrary grouping of SIB integrations. For example, a category might represent all of the device integrations made by a particular manufacturer. A different category might represent all vibrating wires that are strain gauges. Categories can be altered at runtime and members can be added/removed at any time.
Integration Definitions
SIB integration definitions describe how to communicate with any device or sensor and all of the metadata associated with that device or sensor. These definitions are exported/imported to/from the sensemetrics platform as a single YAML file. The SIB UI builder that is part of the sensemetrics web application is a tool to assist in the building of these integration definitions. Integration definitions can also be created using any other tool to create the YAML file and then inserted into the sensemetrics platform using a REST API. Integration definitions specify the following:
- The code to interact with the device over serial or USB
- Any metadata associated with the device or sensor, e.g. icons, default sampling rates, baud rate
- The UI controls associated with the config form for the device or sensor
- The algorithm code to calculate derived metrics from raw metrics
Instances
A device or sensor instance is a device or sensor at a specific customer site or out in the field. All instances have an integration definition associated with it. An example of a device integration definition is a Geokon Data Logger 8002, whereas an example of a device instance is the specific Geokon Data Logger 8002 that is installed at a customer site in Brazil with a specific latitude/longitude location. Any change to a device or sensor integration definition is immediately pushed out to all instances of that device or sensor integration definition.
Code Hooks
Code hooks are secure, self-contained methods that represent key extensibility points in the lifecycle of an integration on the sensemetrics platform. They allow you to customize the behavior of your integration using the full power of an industry-standard non-proprietary scripting language such as Python or JavaScript. Furthermore, implied objects are automatically made available inside the hooks to expose various convenience methods related to integrations:
- api - this object is available in all integrations and includes an assortment of commonly used methods to assist with development
- log - this object is available in all integrations and is a basic logger that is useful for debugging and printing out diagnostics
JavaScript
JavaScript is a popular scripting language. The SIB offers the choice of using either JavaScript or Python to implement the various code hooks for integrations.
Python
Python is a popular scripting language. The SIB offers the choice of using either JavaScript or Python to implement the various code hooks for integrations.
YAML
YAML is a popular human-readable data-serialization language. It is very similar to JSON and it is commonly used for configuration files and in applications where data is being stored or transmitted. YAML is the format that all SIB integrations are stored as. An entire device integration is encapsulated in a single YAML file. Similarly, an entire sensor integration is encapsulated in a single YAML file.
Templates
Templates are canned snippets of code or YAML that make it easy to insert code or UI controls in an editor pane. The template menu appears on the right side of the editors as part of the integration builders. Clicking a template will automatically insert the relevant snippet at the cursor in the editor pane.
Comments
0 comments
Please sign in to leave a comment.