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.
Setting values with specific timestamps
-
Hey guys, I'm sure this has been asked somewhere in here before. Is there a way I can create a dashboard page which would allow me to set the value of a specified point but also pass a timestamp? We have several parameters which come from the electrical company which change every few months and then need to applied to calculations. I need to be able to allow end users to open a dashboard, select the point and basically specify something like May 2019. The system would take that value and apply it to the point as of May 1 2019 00:00:00.000
-
What about using scheduled events to trigger a script to change a data points value?
Surely there is some set pattern to the dates that the value should change?
You could still have a dashboard where they set a virtual point that will be used in their calculation. -
Hi psysak,
There are a few ways you could go about it,
- Build a UI widget that POSTs to the /rest/v2/point-values endpoint.
[ { "xid": "DP_Num_Example", "timestamp": 1557250438657, "dataType": "NUMERIC", "value": 123.456 } ]
- Encode the date and rate information into one or more points, then trigger a scripting data source which "Saves historic" to
.set(value, timestamp)
to the appropriate points. I may set an alphanumeric to52.13~1557250438657
which is a context point that updates the context of a script which simply splits the string on~
and turns it back to numbers.
Neither of these methods would cause point events to run currently (no websocket notification of the new value, , but the value would be available for recalculating meta point histories, for instance.