so here is my Problem. I use a Raspberry Pi 4 (4GB), Openhab 2.5 (Mileston5/6), InfluxDB 1.7 and Grafana. I store some data with openhab rules in the influxdb (persistance service), temperature, humidity, windspeed, partifcular matter… I can write the data in the database and desplay them via a rule oder in Grafana. Works. BUT, some displayed values are wrong or could not be displayed.
Example: I store the outside temperature every 5min and have a rule to display the minimum and maximum since last hour and last 365 days. And the value from the rule mininum since 365 days Displays: -0.28°C, but in the values in the database (look via cli) i find a minimum from -1.12°C, and when i change the rules from 365 to 25 days, it shows the right value.
The second think is (and i am not shure if it is a influxdb or openhab Problem) that openhab send me an error if i try to get the maximum values from my particular matter since last 365 days.
The Code from the rule
TF_FS_10_max.postUpdate(Feinstaub_10.maximumSince(now.minusDays(365), "influxdb")) TF_FS_10_max.postUpdate(Feinstaub_25.maximumSince(now.minusDays(365), "influxdb")) TF_FS_10_max.postUpdate(Feinstaub_100.maximumSince(now.minusDays(365), "influxdb"))
The error Code:
[ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Feinstaub Maxwerte': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.postUpdate(org.eclipse.smarthome.core.items.Item,org.eclipse.smarthome.core.types.State) on instance: null
BUT, this Code for the average works:
TF_FS_10_average.postUpdate(Feinstaub_10.averageSince(now.minusDays(365), "influxdb")) TF_FS_25_average.postUpdate(Feinstaub_25.averageSince(now.minusDays(365), "influxdb")) TF_FS_100_average.postUpdate(Feinstaub_100.averageSince(now.minusDays(365), "influxdb"))
As i´ll be no coding expert and install openhab, influxdb and grafan via the “Installation tool”, i did not know what to Google for and the request in the offical and inoffical openhab-community get no Response.
Maybe someone here has an idea?