Closed tipp88 closed 10 months ago
The error means that there seems to be a value in the DB which is NOT a string, but a boolean and so selection do not work ...
Else pleas eenable debug log for the adapter AND turn on enhanced logging for this datapoint in the config and post a debug log from such a query ... Then we maybe can look at the reasons for the error
The adapter tries to find out whether the data type is "boolean" by checking whether at least one content is "true" or "false". This query is incorrect, a filter is missing here.
Incorrect:
from(bucket: "iobroker")
|> range(start: 1999-12-31T23:00:00.000Z, stop: 2025-12-01T14:31:44.004Z)
|> filter(fn: (r) => r["_measurement"] == "0_userdata.0.example2" and contains(value: r._value, set: [true, false]))
|> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
|> group()
Correct:
from(bucket: "iobroker")
|> range(start: 1999-12-31T23:00:00.000Z, stop: 2025-12-01T14:31:44.004Z)
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r["_measurement"] == "0_userdata.0.example2" and contains(value: r._value, set: [true, false]))
|> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
|> group()
As a result, the columns "ack" and "value" are mixed and lead to the error message described.
The error means that there seems to be a value in the DB which is NOT a string, but a boolean and so selection do not work ...
Else pleas eenable debug log for the adapter AND turn on enhanced logging for this datapoint in the config and post a debug log from such a query ... Then we maybe can look at the reasons for the error
It is a completely new object which has been created as String and logging activated as String. There is not a single value stored as bool, it only 7 values at all:
I think Marc already found the issue. Thanks
PR merged, thank yopu, preparing release
History for states of type String are not shown. A type conflict error is thrown.