Other than defining properties whose value is static (e.g. Phone Number), you can also define properties which are bound to metrics, statistics or insights.
Into a property definition, the Data Binding section allows you to define how the property can be bound to a metric or statistic. The Data Binding section is available for Thing (General and Thing Definition), Location, Customer, Partner property definitions.
A property, with a configured data binding, is automatically updated by the Servitly backend, and it is no longer visible into DPS editing pages (e.g. Thing editing page), nor updatable via APIs.
Computation interval may be different according to the project needs and requirements.
Metric Data binding
This data binding is available only for thing definition properties, this because you need to select a thing-definition metric.
By selecting a metric, the property value on the things will be periodically updated (e.g. 90 seconds), with the last value available for the metric.
This data binding is useful in case you need to display a metric in the list of things and allow DPS users to sort and search by the value of the metric.
Statistic Data Binding
This binding is available for all property definition types (General and Thing Definition).
In the panel you can select a Statistic and optionally specify a period and filtering criteria
When the statistic is configured, the property value on the objects will be periodically updated (e.g. every 10 minutes) with the result of the configured statistic.
You can use the following statistics:
- Alert Count: count the number of alerts occurred that were active during the selected period.
- Active Alert Count: count the number of active alerts.
- Activated Alert Count: count the number of alerts that have been activated during the selected period.
- Location Count: count the number of locations under a customer.
- Thing Count: count the n umber of things under a location or a customer.
- Thing Property Aggregation: aggregate the values of a property of the things under a location or a customer.
- User Count: count the users under a location, customer or partner.
Insight Data Binding
General properties (thing, location and customer) can be bound to Insights in order to use the last computed value for sorting, searching and grouping thing, location and customers lists.
Insight metrics are defined on thing definition level, but you can save on each level (thing, location and customer), the insight aggregated value, also with different timeframes (LAST 30 DAYS, LIFETIME).
These properties are automatically updated every day, once the underlying insights have been computed (after the midnight, local thing time).
In case this data binding is configured on a location or customer property, the computation aggregates the insight values for the single underlying things and timeframe.