How to work with history data
I posted this today at Niagara Central and I'll try here too...
I have a customer site that is using the axcommunity driver Trend Analyzer function to poll a history for a power meter. They can enter a date range and generate a report for billing. The power meter has a Consumption field on it that is a totalizer.
I can't get that function to work on N4. Plus we don't want to use an unsupported driver. (This is a JCI FX-60). To add to the problem, the totalizer randomly is setting itself to '0' (and other random values), and when the history is taken, it occasionally captures the value of 0. Then when the analyzer executes, it subtracts the Min from the Max and skews the data since the min will be 0.
I would like to rebuild this using stock modules, but I haven't had much luck. I'll still need to enter the date range for query execution of the history, then I'll have to put in some logic to ignore values of '0' and I'll probably write last month's end value into a field to be used as a backup.
How do I work with history data? I've been looking at seriesTransform, but haven't had any luck yet. I can query data, but can't seem to work with individual values from it. Anyone have any ideas how to accomplish this? I know there is a Tenant Billing module, but it's not a JCI module, so we won't be using it.