var end = new Date();
var start = new Date("2024-05-16T00:00:00.000+02:00");
end.setMinutes(0);
end.setSeconds(0);
end.setMilliseconds(0);
end.setHours(end.getHours() + 1);
sendTo('influxdb.0', 'getHistory', {
id: 'javascript.0.energyFeedIn',
options: {
start: start.getTime(),
end: end.getTime(),
// step: 3600000,
aggregate: 'integral',
integralUnit: 3600,
integralInterpolation: 'none',
}
}, function (result) {
console.log('Result: ' + result.result.length);
});
We have following Influx query v1:
SELECT value from "javascript.0.energyFeedIn" WHERE time <= '2024-05-15T21:58:48.000Z' ORDER BY time DESC LIMIT 1;
SELECT integral(value, 3600s) as val from "javascript.0.energyFeedIn" WHERE time > '2024-05-15T21:58:48.000Z' AND time < '2024-05-16T08:01:12.000Z' GROUP BY time(72000ms) fill(previous) ORDER BY time ASC LIMIT 2002;
SELECT value from "javascript.0.energyFeedIn" WHERE time >= '2024-05-16T08:01:12.000Z' LIMIT 1
By the following getHistory request:
We have following Influx query v1:
Result
Expected are max 24 values.... but got 470