Where do you want to do this from? Outside of Ignition? Because if it’s inside, you should be able to use the queryTagHistory function with an aggregation mode of “Average” and a result size of 1. However, we’re aware that this doesn’t currently work as one would expect, but we’re trying to fix it for 7.3 (it currently returns 2 rows for the result- one for the start time bounding value, and one for the rest- unfortunately causing the average to get skewed a bit).
However, to get around that, you can query with a result size that’s slightly larger (say 10). This will give you evenly spaced values that are themselves time-weighted, allowing you to do your own simple average on them.
Of course, I’m probably writing all of this for nothing, because if you wanted to use scripting, you could just write the average function yourself…