Calculated feed functionality enables feed calculation in order to create unique combination specified for user’s business logic.
Calculated feed can be used on Dashboards, Rules and Reports as any other feed.
Create Calculated Feed
To create Calculated feed:
- Go to the Data Semantics module
- Select semantic group
- Go to the Calculated Feeds tab
- Click on
Fill in the Create calculated feed dialog with the following information:
- Feed name
- Unit - (If Unit is Numeric, specify minimum and maximum values)
Stale after (min) value is set to ‘0’ by default, which means that the last calculated value will be considered as always fresh. It can be set to a proper period of time according to your business needs, after which, value will be marked and considered as stale.
Note: You can only use a reading type which already exists on the Platform, otherwise you will need to create one! For further explanation on how to do that, please follow this link.
- Next step is to add inputs for calculation
Create calculation by using one out of two types of input: sensor value (device directly) or a feed.
You can search and select the existing sensor/feed by name. Its reference, value and stale after value which will be used for calculation are populated from the input by default. You can adjust them if needed.
Once the formula is written, you can evaluate it by clicking the Evaluate button. It will be evaluated and calculated based on the input values entered in the Value fields.
You will be notified of successful calculation.
Create Feed Thresholds
For more information on how to create Feed Thresholds, go to Data Semantics module, Create/Edit/Delete Feed section.
Update Calculated Feed
To update calculated feed:
- Select the calculated feed in question
- Click on next to it
- From the menu, select one of the available editing option (Edit, Set staleness, Set threshholds)
If you change the data within your calculated feed, recent feed history will be deleted.
Note: Feed unit cannot be edited.
You can delete feed history while updating calculation formula or while adding/deleting any of the inputs.
Note: Calculation is always based on the last values!
Calculation will be triggered when at least one input receives a new value, but if any other input has no value or its value is stale, the calculation will not be triggered and calculated feed will not get a new value.