Hi all,
I use influxdb as my default persistence service. Items updates are recorded at influxdb. Everything works fine. Now I want to query data from influxdb within rules and sum up values. But I don’t get any values back.
versions:
openhab 2.5.2-1
influxdb 1.7.10-1
snipset from my rule
rule “Update Gas”
when
Item GasqmTotal001 changed
then
var Number tempValue// Read Today Value
tempValue = GasqmTotal001.deltaSince(now.withTimeAtStartOfDay,“influxdb”)if (tempValue == null) {
GasToday_001.postUpdate(0)
}else{
GasToday_001.postUpdate(tempValue)
}
}
end
but the rule does not return any data
I turned on tracelevel for influxdb
020-02-24 22:48:18.070 [DEBUG] [.internal.InfluxDBPersistenceService] - got a query
2020-02-24 22:48:18.071 [TRACE] [.internal.InfluxDBPersistenceService] - Filter: itemname: GasqmTotal001, ordering: DESCENDING, state: null, operator: EQ, getBeginDate: null, getEndDate: Sun Feb 23 00:00:00 CET 2020, getPageSize: 1, getPageNumber: 0
2020-02-24 22:48:18.072 [DEBUG] [.internal.InfluxDBPersistenceService] - descending ordering
2020-02-24 22:48:18.072 [TRACE] [.internal.InfluxDBPersistenceService] - appending limit 1
2020-02-24 22:48:18.073 [TRACE] [.internal.InfluxDBPersistenceService] - startEntryNum 0
2020-02-24 22:48:18.074 [DEBUG] [.internal.InfluxDBPersistenceService] - query string: select value from "autogen"."GasqmTotal001" where time < 1582412400s ORDER BY time DESC limit 1
2020-02-24 22:48:18.078 [DEBUG] [.internal.InfluxDBPersistenceService] - query returned no series
if I type in the query, it will be empty
select value from "autogen"."GasqmTotal001" where time < 1579820400s ORDER BY time DESC limit 10¨
if I type in with ns timestamp I receive the expected data
select value from "autogen"."GasqmTotal001" where time < 1582563909809000000 ORDER BY time DESC limit 10
Result:
name: GasqmTotal001
time value
1582563609 5266.59
1582563310 5266.57
1582563010 5266.55
1582562709 5266.51
1582562410 5266.41
1582562110 5266.3
1582561809 5266.23
1582561509 5266.17
1582561210 5266.12
1582560910 5266.1
scripts are proven to work with older versions
openhab 2.4
influxdb 1.7.6
has anyone else similar experiences?
thanks
markus