Query API: only works with current log - not so, explained

You’ve opened up a few issues here. I’ll start by saying that your result should be different, but not in the way you expect.

The history log has resolution of 1 minute and you are asking for 5 second grouping. That presents a dilemma as to the appropriate response. Some possibilities are:

  1. Reject the query as not possible.
  2. Adjust the grouping 1m.
  3. Respond with only current log data.
  4. Respond with 5 second timestamps but only one in 12 for history log data.
  5. For Watts, Amps etc respond with the 1m value for all 12 groups from history log and 1/12 for Wh.

It does seem to work as expected with history log data when the grouping is a multiple of 1m.

I’ll revisit the failure mode after giving any others a reasonable time to comment on this thread.