Dear Community,
at the moment I perform an upgrade from Openhab 2.5/ Influx 1 to Openhab 3.1 /Influx 2. If working very good but i have trouble with rules.
To manage the daliy consumption I read calculate Item based on figure from the Influx 2 DB.
Due to the fact that deltasince(now.withStartofDay) is not working anymore I tried to adjust to the new behavior. As nothing was working I tried to put several values to the log. At the end I want to have this line running
Produktion_Tag.
postUpdate(Lesekopf3Channel0.deltaSince(now().with(LocalTime.MIDNIGHT)) as Number)
These are the testās I did to understand the problem. average.since is working but delta.scince not.
logInfo("Tageswerte", "Test 1 {}", start_of_day)
logInfo("Tageswerte", "Test 2 average {}", FRITZDECT2001Energy.averageSince(start_of_day, "influxdb"))
logInfo("Tageswerte", "Test 3 Zeit-Min {}", ZonedDateTime.now().with(LocalTime.MIN))
logInfo("Tageswerte", "Test 4 Zeit-Midnight {}", ZonedDateTime.now().with(LocalTime.MIDNIGHT))
logInfo("Tageswerte", "Test 5 Zeit-Now {} wh", ZonedDateTime.now().withHour(0).withMinute(0).withSecond(0))
logInfo("Tageswerte", "Test 6 average {} wh", Lesekopf3Channel0.averageSince(start_of_day, "influxdb") as Number)
logInfo("Tageswerte", "Test 7 deltaSince {} wh", Lesekopf3Channel0.deltaSince(now.withHour(0).withMinute(4).withSecond(0), "influxdb") as Number)
logInfo("Tageswerte", "Test 8 deltaSince {} wh", Lesekopf3Channel0.deltaSince(start_of_day, "influxdb") as Number)
As you see in the log until Test6 it is working - Test 7 is the deltaSince and just before i got this strange Could not find item ānullā in registry - Why is the item null when it isnāt with average. I am lost
LOG
2021-06-13 19:56:46.421 [INFO ] [openhab.core.model.script.Tageswerte] - Test 1 2021-06-13T00:00+02:00[Europe/Berlin]
2021-06-13 19:56:46.429 [INFO ] [openhab.core.model.script.Tageswerte] - Test 2 average 1196.5195
2021-06-13 19:56:46.429 [INFO ] [openhab.core.model.script.Tageswerte] - Test 3 Zeit-Min 2021-06-13T00:00+02:00[Europe/Berlin]
2021-06-13 19:56:46.429 [INFO ] [openhab.core.model.script.Tageswerte] - Test 4 Zeit-Midnight 2021-06-13T00:00+02:00[Europe/Berlin]
2021-06-13 19:56:46.429 [INFO ] [openhab.core.model.script.Tageswerte] - Test 5 Zeit-Now 2021-06-13T00:00:00.429519+02:00[Europe/Berlin] wh
2021-06-13 19:56:46.437 [INFO ] [openhab.core.model.script.Tageswerte] - Test 6 average 24179137.88801619 wh
2021-06-13 19:56:46.458 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item ānullā in registry
2021-06-13 19:56:46.459 [INFO ] [openhab.core.model.script.Tageswerte] - Test 7 deltaSince null wh
2021-06-13 19:56:46.480 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item ānullā in registry
2021-06-13 19:56:46.480 [INFO ] [openhab.core.model.script.Tageswerte] - Test 8 deltaSince null wh
Thanks for your support how to use deltaSince with Openhab 3.1 and Influx 2
JĆ¼rgen