Smart Devices
Virtual device fed with data from real sensors (“Devices”), data on which mathematical transformations and aggregations are applied. The smart device is mainly used on consumption data (energy, machines) in order to convert units, and perform aggregations by day, week, month or year.
There are 2 types of Smart Devies:
- Primary:
- Secondary
Primary Smart Devices processing are triggered when new measurements (payload) - specified in the formula of the smart device - are received by the IOT Platform. A typical use of a primary smart device is the calculation of instant/daily/weekly/monthly Consumptions (delta, aggregation) based on a formula applied to index (counter) data from a device.
Secondary Smart Devices are triggered at specified time intervals - specified in the smart device -. A typical use of a secondary smart device is the calculation of a global daily/weekly/monthly/yearly consumption, as the sum of individual consumptions (primary smart devices).
Smart Devices generate, as a result to the formula, smart measurements, equivalent to device measurements. They are stored in the database, and can then be used as Devices measurements in Dashboards, Reports, Rules…
Create a Primary Smart Device
- Press the Add button at the top/right of the screen, and select “Add”
- Choose Primary as Degree
- In the Processing tab:
- Choose if you want to apply aggregation. Aggregation will generate daily/weekly/monthly/yearly smart measurements.
- Offset: a parameter, in minutes, specifying if you want measurements collected around the end of the day, to be considered as being part of the aggregation. This parameter is used when measurements are generated around the end of the day, but not exactly at midnight.
- Delta: Process and store differences (delta) between smart measurements, by day, week, month, year. A typical use of delta is the calculation of consumptions, as the difference between indexes of 2 consecutive days/week/month/year.
- Signed delta: Process positive and negative delta separately. An example is a water tank, when you want to split between volume of water retrieved / added in the tank
- Low and High: save the lowest smart measurement and the highest one, per day/week/month/year
- Variables: choose the inputs to the formula: specific measures from device, smart device, asset, static lists, tags. Give those inputs a name.
- Formula: define how those variable are used to process the value of the smart device.
- Type: define the type of (smart) measure that will be produced
- Unit: define the unit of the (smart) measure that will be produced
- Rebuild since: this option allows you to reprocess smart measurements, from a specific dates. Use this feature when you create the smart device, in order to process past data. Or use it if you change the formula (previously smart measurements will be deleted and re-created).
Tips:
- The formula is designed to accept mathematical expressions. Click the 'i' icon for more information.
- To initialise the first value in the time series of an Smart device, you need to create a variable that refers to the smart device itself. Next, you need to edit the variable and enter an initial value at a date and time. This method is mainly used for counters that need to be initialised in order to avoid an exception on the first iteration.
- To refer to previous data in a series, you must edit the variable and access the advanced settings. To access the previous value, you choose an offset of one second in the past.
NB: Smart Devices, as all objects on the IOT Platform, must be in ACTIVE State, in order to operate and process payloads from connected devices.
History Tab
View smart measurements. Be aware that if you rebuild smart devices, it may take some time to get all new smart measurements, depending on the amount of smart measurements that need to be rebuild.
Analytics Tab
Standard chart showing your smart measurements. You can see:
- Measurement values (with date-time matching the measurements that have triggered the processing of the smart device)
- Last Delta: if you ask for Delta calculation
- Daily Delta
- Weekly Delta
- Monthly Delta
- Yearly Delta
Journal Tab
View a log of Alerts triggered based on (smart) measurements of this smart device
links Tab
Shows which Asset(s) have attached this smart device.
Smart Device Templates
It is possible to save a smart device as a template.
Smart Device templates can be used to create new smart devices faster. But it can also be used to automatically create a smart device when an asset is created, if a smart device Data Source is defined in the Asset Type, and linked to a Smart Device template.
Be aware that Smart Device templates should always refer (the variables) to “generic” inputs. It means inputs that will always be available when creating a smart device.