What's going on under the hood?
In DevicePilot you define how to turn streaming telemetry into key business metrics such as uptime. Your definitions will probably change from time to time, as your business changes and matures, yet you probably don’t want these changes in definition to cause sudden "steps" in your performance charts. Instead, you want all the past, present and future values of the chart to magically update to reflect your new definition.
For this reason, whenever DevicePilot evaluates anything (a KPI, or a filter, or a Calculated Property) it always does so right from first principles from the raw data that streams in and is stored within the service. Just like a spreadsheet, this ensures that if you change anything about your analysis then all the things which depend on it will update correctly.
To help understand how Calculated Properties work, let’s take a snapshot of some data that’s just arrived within DevicePilot:
The first two properties temperature and target_temperature are streaming from the device, and the third is calculated from them:
- Initially the device’s target_temperature was set to 5
- Then some temperature readings started arriving from the device
- Once all the properties in its definition became defined, the Calculated Property temp_OK became defined. Since temperature < target_temperature, its first value was True.
- Whenever any of the properties in its definition change, the Calculated Property temp_OK changes too. Initially this doesn’t make any difference because it still evaluates to True.
- But then target_temperature is reduced to 3 and for a while temp_OK becomes False, until the fridge cools down a bit and it becomes True again.