-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: DB
-
None
The /datum/reading style queries rely on finding pairs of datum rows to calculate an overall change in their accumulation properties (i.e. in the jdata_a database column). Some data streams intermittently omit accumulating data while still providing other data such as instantaneous or status. For example, here's a pair of datum rows produced by an inverter that doesn't providing meter data when it transitions from "starting" to "normal" operating states at the start of the day:
"ts","node_id","source_id","jdata_a","jdata_s" "2019-07-01 13:10:31.013+12",318,"/LN/RC/S3/INV/2",,"{""opState"": 3}" "2019-08-01 12:43:31.013+12",318,"/LN/RC/S3/INV/2","{""wattHours"": 125177000}",
Ideally this query should ignore that first row, and go back further in time until it finds a row with a jdata_a value, and use that for the reading calculation.