Okay, after running a few days I noticed one problem. Somehow .averageSince()
doesn’t work anymore.
This debug rule:
rule "debug output"
when
Time cron "0 * * * * ?"
then
logInfo("debug",PresenceCountdown.averageSince(now.minusMinutes(15)))
end
produces only this log output:
2019-12-02 18:13:00.002 [DEBUG] [ersistence.influxdb.internal.InfluxDBPersistenceService] - Got a query for historic points!
2019-12-02 18:13:00.002 [DEBUG] [ersistence.influxdb.internal.InfluxDBPersistenceService] - Query: SELECT * FROM "openhab_db"."autogen"./.*/ WHERE item = 'PresenceCountdown' AND time > 1575305880s LIMIT 2147483647
2019-12-02 18:13:00.028 [DEBUG] [ersistence.influxdb.internal.InfluxDBPersistenceService] - Returning query() with 985 items
2019-12-02 18:13:00.030 [ERROR] [thome.model.rule.runtime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'debug output': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.LogAction.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null
but when ask the persistence over HTTP I get meaningful data:
kandre@mainframe(pts/7) ~ % curl 'http://openhab.ak-online.be/rest/persistence/items/PresenceCountdown?starttime=2019-12-02T18:18:00'
{
"name":"PresenceCountdown",
"datapoints":"16",
"data":[
{"time":1575307080004,"state":"1798.0"},
{"time":1575307080060,"state":"1798.0"},
{"time":1575307081003,"state":"1797.0"},
{"time":1575307082058,"state":"1796.0"},
{"time":1575307083003,"state":"1795.0"},
{"time":1575307084002,"state":"1794.0"},
{"time":1575307085004,"state":"1793.0"},
{"time":1575307086003,"state":"1792.0"},
{"time":1575307087002,"state":"1791.0"},
{"time":1575307088003,"state":"1790.0"},
{"time":1575307089003,"state":"1789.0"},
{"time":1575307090003,"state":"1788.0"},
{"time":1575307091003,"state":"1787.0"},
{"time":1575307092077,"state":"1786.0"},
{"time":1575307093003,"state":"1785.0"},
{"time":1575307094003,"state":"1784.0"}
]
}
Does anyone have an idea if this is caused by the InfluxDB binding or where I could find more debugging information?