@dsj and @corrineb, I have been tracking down a bug in the PiConsole and I have noticed that the fields returned from a device endpoint API call vary based on the bucket_step. When the bucket_step is 1, 5, 30, or 180 minutes, the returned fields match the existing Implementation Notes for the API. However, when the bucket_step is 1440 minutes, there are a number of extra fields in the response that are not documented. These appear to be high/low/mean values, but I can’t work out exactly what everything is. The result is that the PiConsole is extracting data from the wrong fields when the bucket_step is 1440 minutes (e.g. when trying to calculate the number of lightning strikes over a year by summing the total number of lightning strikes per day).
Here are some examples of individual observations copied from the obs array for API requests with different bucket_steps. First for a Sky device:
"bucket_step_minutes":1440
[“2020-01-07”,2189,0.11,0.003804,0,1.42,8.67,230,16233,0,0.83,0,765,18,135,0,2.9,null,0,1,3,1,null]
"bucket_step_minutes":180
[1584921600,0,0.0,0,0,0.53,2.73,078,3.25,180,0,0,0,3,null,null,0]
"bucket_step_minutes":30
[1590969600,0,0.0,0,0,0.21,1.65,068,3.27,030,0,0,0,3,null,null,0]
"bucket_step_minutes":5
[1593561900,0,0.0,0,0,0.59,2.01,230,3.32,005,0,0,0,3,null,null,0]
"bucket_step_minutes":1
[1593561000,0,0.0,0,0,0.49,0.94,224,3.33,001,0,0,0,3,null,null,0]
and a Tempest device:
"bucket_step_minutes":1440
[“2020-05-22”,1016.4,1018.2,1015.6,18.9,20.1,17.4,94,98,87,6954,28023,0,0.4,1.74,0,58,234,0,0.49,4.16,0,299,3,0,0,528,2.56,0.192568,null,18,null,1,0]
"bucket_step_minutes":180
[1591088400,0.00,0.31,1.79,342,3,1016.5,11.3,89,0007,0.00,00,0,0,0,0,2.55,180,0,0,0,1]
"bucket_step_minutes":30
[1592713800,0.00,0.00,0.00,000,3,1014.2,19.2,98,0000,0.00,00,0,0,0,0,2.49,030,0,0,0,1]
"bucket_step_minutes":5
[1593129600,0.00,0.28,0.85,146,3,1012.4,22.1,83,1628,0.04,14,0,0,0,0,2.49,005,0,0,0,1]
"bucket_step_minutes":1
[1593561000,0.31,1.09,1.79,349,3,1008.9,24.6,72,6210,0.42,52,0,0,0,0,2.52,001,0,0,0,1]
I would assume similar behaviour for an Air device, but I haven’t tested it. Can you provide documentation for the additional fields when bucket_step = 1440?