Open mcuiobroker opened 6 months ago
Please enable the debug mode of influxdb adapter, additionally enable for one affected objects the enhanced debig lkogging in the object custommsettngs. Then please post a log of such a getHistory call. thank you
Send: 502 of: 501 in: 70ms
0_userdata.0.PV.SignedBat17150970902550.21461031104686312 getHistory message: {"id":"0_userdata.0.PV.SignedBat","options":{"start":1715010686903,"end":1715097086903,"aggregate":"onchange","limit":5000,"ignoreNull":true}}
Query to execute: from(bucket: "iobroker_short") |> range(start: 2024-05-06T15:51:26.903Z, stop: 2024-05-07T15:51:26.903Z) |> filter(fn: (r) => r["_field"] == "value") |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.PV.SignedBat" and contains(value: r._value, set: [true, false])) |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") |> group()
Query to execute: from(bucket: "iobroker_short") |> range(start: 2024-02-04T15:51:26.903Z, stop: 2024-05-06T15:51:26.902Z) |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.PV.SignedBat") |> last() |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
Query to execute: from(bucket: "iobroker_short") |> range(start: 2024-05-06T15:51:26.903Z, stop: 2024-05-07T15:51:26.903Z) |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.PV.SignedBat") |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") |> group() |> sort(columns:["_time"], desc: false) |> limit(n: 500)
Query to execute: from(bucket: "iobroker_short") |> range(start: 2024-05-07T15:51:26.904Z) |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.PV.SignedBat") |> first() |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
Send: 502 of: 501 in: 64ms
The log is not necessaray, because if you have a closer look to https://github.com/ioBroker/ioBroker.influxdb/blob/a7214d819f29556d8f1b3e7cf5b4c1d506a1ff1f/main.js#L1978
you see that count is always set, so that is the reason for not getting into the questioning https://github.com/ioBroker/ioBroker.influxdb/blob/a7214d819f29556d8f1b3e7cf5b4c1d506a1ff1f/main.js#L1995
and therefore the limit is not set https://github.com/ioBroker/ioBroker.influxdb/blob/a7214d819f29556d8f1b3e7cf5b4c1d506a1ff1f/main.js#L1997
If you compare it with historyDB-Adapter there is the right count defined https://github.com/ioBroker/ioBroker.history/blob/4c2faf570209a0a28726da453c2d3bbca4e5c75e/main.js#L1165
@Apollon77 What do you think?
Describe the bug
https://forum.iobroker.net/topic/52228/howto-zusatz-programme-fuer-jarvis-v3/586 and ff The questioning in https://github.com/ioBroker/ioBroker.influxdb/blob/a7214d819f29556d8f1b3e7cf5b4c1d506a1ff1f/main.js#L1995 is not used, because you set count in options before.
To Reproduce
Steps to reproduce the behavior: sendTo with
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.
Versions:
Additional context
Add any other context about the problem here.