Influxdb persistence error in logs


I’m on 3.4.4 but I had this error since at least 3.4.0, just never really looked into it. Now, I upgraded from 3.4.3 to 3.4.4 and there seems to be a lot more of these error:

[ERROR] [ence.internal.PersistenceManagerImpl] - Exception occurred while querying persistence service 'influxdb': Character array is missing "e" notation exponential mark.
java.lang.NumberFormatException: Character array is missing "e" notation exponential mark.
	at java.math.BigDecimal.<init>( ~[?:?]
	at java.math.BigDecimal.<init>( ~[?:?]
	at java.math.BigDecimal.<init>( ~[?:?]
	at org.openhab.persistence.influxdb.internal.InfluxDBStateConvertUtils.objectToState( ~[?:?]
	at org.openhab.persistence.influxdb.internal.InfluxDBStateConvertUtils.objectToState( ~[?:?]
	at org.openhab.persistence.influxdb.InfluxDBPersistenceService.mapRow2HistoricItem( ~[?:?]
	at$3$1.accept( ~[?:?]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at$ReduceOp.evaluateSequential( ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query( ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor116.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
	at java.lang.reflect.Method.invoke( ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect( [bundleFile:?]
	at [bundleFile:?]
	at [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ [?:?]
	at [?:?]

Thank you!

Just start by commenting out some of your number items until the error goes away. I think at a certain point your number spew something wrong in the database especially when you did some testing

from what I found, it seems to be datetime value. Looking in influxdb, the value is there. So I really don’t know what’s going on

something I found out.
My item currently show NULL as a datetime in openhab management gui (under items), but if I change to String, it show value like 2022-09-22T21:33:53.145Z. If I change back to datetime, it show NULL.

Weirdly, if I toggle the item that change that datetime, it will show the new datetime in this item. But the data is never restoredonstartup (well not showed).

I just tried creating new datetime data and I think this is what he doesn’t like. These value are saved also as datetime in influxdb but the value is weird. There’s no error when saving, but it cannot restore it

Influx is not made for that datetime and string … You need sql

The documentation (InfluxDB (0.9 and newer) - Persistence Services | openHAB) says:

  • The states of an item are persisted in measurements points with names equal to the name of the item, its alias, or from some metadata depending on the configuration. In all variants, a tag named “item” is added, containing the item name. All values are stored in a field called “value” using the following types:
    • float for DecimalType and QuantityType
    • integer for OnOffType and OpenClosedType (values are stored using 0 or 1) and DateTimeType (milliseconds since 1970-01-01T00:00:00Z)
    • string for the rest of types

I’m a bit surprised by this myself. So is the documentation wrong? I didn’t think InfluxDB would work with strings, but it does seem that a datetime might work as long as it is stored as an integer.

My bad then. I confused with rdd4j but what are you trying to accomplish with this to do a item restore on startup ?

it’s 2 simple item that store a date. The date is changed when a certain item is put on or off. So it’s the last time this item was turned on or off.

I do have other, I have a lot of influxdb error on startup but I cannot find other data that aren’t properly set after a reboot. I have so much persistance data that it’s very long to find which one have error.

For now, I added another persistence with mariadb since I already have this database to save the 2 datetime. I didn’t try a reboot yet to see if they persist yet (I do see the values in the database though).