Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
How to force old not calculated metadata to be calculated ?
-
Hi, I've set some metadata datapoints based on other datapoints, but new metadata is only applied for new datapoints values ...
How can I force mango to recalculate all allready past existing points medatada ?
-
There is a generate history button on the metapoint in the datasource page. Unfortunately, this button has some known issues associated with it, and may not work quite as expected.
I believe the best results with that button can be achieved by changing the meta point's update/logging information to be 1. run on context update and 2. log on change.
-
:-( can't find that button. Could you please tell me where exactly is suposed to be ?
-
In line with the data point on its data source page. The table should be:
Name --< Type --> Enable/Disable Button --> Generate History Button --> Edit Point Button -
OK. Im' afraid ScadaBR fork doesn't have this feature :-(
Thank you !
-
You could theoretically perform this task with a scripting datasource. Say you have a need to generate the last 1000 points...
- Add all the context points to your script as you would your meta point.
- Write a big for loop, iterate i :
var dt = new Date(); for(var i = 1; i < 1000; ++i) { pnt1 = point1.prev(MINUTE, i).firstValue; ... pntN = pointN.prev(MINUTE, i).firstValue; result = //do work on the pnt values meta.set(result, dt.getTime()-(i*60*1000)); }
and you could just have it get generated in one run of the script. Not pretty, but it should work.
Note: This is for numeric points. Binaries and multistates would have a different solution.
-
It's good workaround. Thankyou