The moment I hit save, NULL items were updated and I thought all was OK.
Now, on the first restart after adding restoreOnStartup no items are restored:
omr@shs2:~$ grep -i influx /var/log/openhab/openhab.log
2021-01-16 12:25:36.582 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2021-01-16 12:26:31.288 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.persistence.influxdb.InfluxDBPersistenceService@3cc94b25': error parsing query: found ALL, expected identifier at line 1, char 27
org.influxdb.InfluxDBException: error parsing query: found ALL, expected identifier at line 1, char 27
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[?:?]
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:827) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:814) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:714) ~[?:?]
at org.openhab.persistence.influxdb.internal.influx1.InfluxDB1RepositoryImpl.query(InfluxDB1RepositoryImpl.java:150) ~[?:?]
at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query(InfluxDBPersistenceService.java:228) ~[?:?]
2021-01-16 12:26:31.409 [ERROR] [ence.internal.PersistenceManagerImpl] - Exception occurred while querying persistence service 'influxdb': error parsing query: found ALL, expected identifier at line 1, char 27
org.influxdb.InfluxDBException: error parsing query: found ALL, expected identifier at line 1, char 27
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[?:?]
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:827) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:814) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:714) ~[?:?]
at org.openhab.persistence.influxdb.internal.influx1.InfluxDB1RepositoryImpl.query(InfluxDB1RepositoryImpl.java:150) ~[?:?]
at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query(InfluxDBPersistenceService.java:228) ~[?:?]
2021-01-16 12:26:39.399 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.persistence.influxdb.InfluxDBPersistenceService@3cc94b25': error parsing query: found ALL, expected identifier at line 1, char 27
org.influxdb.InfluxDBException: error parsing query: found ALL, expected identifier at line 1, char 27
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[?:?]
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:827) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:814) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:714) ~[?:?]
at org.openhab.persistence.influxdb.internal.influx1.InfluxDB1RepositoryImpl.query(InfluxDB1RepositoryImpl.java:150) ~[?:?]
at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query(InfluxDBPersistenceService.java:228) ~[?:?]
2021-01-16 12:26:39.404 [ERROR] [ence.internal.PersistenceManagerImpl] - Exception occurred while querying persistence service 'influxdb': error parsing query: found ALL, expected identifier at line 1, char 27
org.influxdb.InfluxDBException: error parsing query: found ALL, expected identifier at line 1, char 27
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[?:?]
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:827) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:814) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:714) ~[?:?]
at org.openhab.persistence.influxdb.internal.influx1.InfluxDB1RepositoryImpl.query(InfluxDB1RepositoryImpl.java:150) ~[?:?]
at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query(InfluxDBPersistenceService.java:228) ~[?:?]
omr@shs2:~$
Item states are saved OK and the Analyze in MainGU works fine. (here an random item)
I should add that just before the reboot, I deleted a bunch of ‘virtual’ Switch items no longer needed.
I also have a virtual switch item named All: Switch All
Never got OH3.0.0 release version to work with Influx.
It could write and update 1.7.8, but restore didn’t work.
Updated to Influxdb v2.0 and entered openhab/openhab for org/bucket.
After that OH3.0.0-1 always complained about the wrong version “V2” and nothing worked.
Updated OH3.0 to snapshot #2158.
My original v1.7.8 openhab_db database got updated to a bucket named openhab_db/autogen.
It took me a while to grasp the new Organization/bucket concept, but I was able to tune the setting using the info in the doc: InfluxDB (0.9 and newer) - Persistence Services | openHAB
My influxdb.cfg now looks like: (my influxdb user is openhab)
# The name of the database user, e.g. openhab.
# Defaults to: openhab
# The password of the database user.
password=*xxxx*
# The name of the database, e.g. openhab.
# Defaults to: openhab, in V2 this is the organization
db=openhab
# In V2 this is the bucket name:
retentionPolicy=openhab_db/autogen
version=V2
Update: the bucket openhab/autogen converted from v1.7.8 fails on restore. Had to revert to the new bucket created on startup.
Got these log entries during restore:
2021-01-23 21:05:23.620 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.0 (StringType) on item BulbRoofMJ3Bright of type DimmerItem, ignoring it
2021-01-23 21:05:23.699 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:23.700 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.0 (StringType) on item BulbRoofMJ1State of type SwitchItem, ignoring it
2021-01-23 21:05:23.767 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:23.768 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 49.0 (StringType) on item BulbBodColorTemp of type DimmerItem, ignoring it
2021-01-23 21:05:24.025 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.025 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1 (StringType) on item WallPlugMasterBathMirror of type SwitchItem, ignoring it
2021-01-23 21:05:24.123 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.123 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0 (StringType) on item WallplugFlygel of type SwitchItem, ignoring it
2021-01-23 21:05:24.214 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.214 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1 (StringType) on item BathMovement of type SwitchItem, ignoring it
2021-01-23 21:05:24.265 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.266 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0 (StringType) on item ClosetMovement of type SwitchItem, ignoring it
2021-01-23 21:05:24.351 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.352 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1.0 (StringType) on item WallSwitchStua of type NumberItem, ignoring it
2021-01-23 21:05:24.395 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.396 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1.0 (StringType) on item SqueezeBoxControllerPower of type SwitchItem, ignoring it
2021-01-23 21:05:24.439 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.440 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1 (StringType) on item vupdateOnce of type SwitchItem, ignoring it
2021-01-23 21:05:24.514 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.515 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.0 (StringType) on item kjellerstueLampe1Dimm of type DimmerItem, ignoring it
2021-01-23 21:05:24.747 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.748 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1 (StringType) on item hallLights of type SwitchItem, ignoring it
2021-01-23 21:05:24.830 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.831 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 57.0 (StringType) on item BulbRoofMJ3ColorTemp of type DimmerItem, ignoring it
2021-01-23 21:05:24.919 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:24.920 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.0 (StringType) on item FlygelLEDlampe of type DimmerItem, ignoring it
2021-01-23 21:05:25.027 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.027 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 374.46 (StringType) on item HVACBoilerkWh of type NumberItem, ignoring it
2021-01-23 21:05:25.103 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.104 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.0 (StringType) on item HVACHalltempExt of type NumberItem, ignoring it
2021-01-23 21:05:25.162 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.163 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1.1 (StringType) on item ButtonRed1 of type NumberItem, ignoring it
2021-01-23 21:05:25.236 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.237 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0 (StringType) on item SmokeAlarms of type SwitchItem, ignoring it
2021-01-23 21:05:25.552 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.553 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1 (StringType) on item BedroomMovement of type SwitchItem, ignoring it
2021-01-23 21:05:25.724 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.725 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0.02 (StringType) on item HVACBathWatts of type NumberItem, ignoring it
2021-01-23 21:05:25.862 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.863 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 30.0 (StringType) on item BuildInBedroomRoof of type DimmerItem, ignoring it
2021-01-23 21:05:25.975 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:25.976 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 1.0 (StringType) on item vwallswitchOnce of type SwitchItem, ignoring it
2021-01-23 21:05:26.064 [INFO ] [b.internal.InfluxDBStateConvertUtils] - Could not find item 'null' in registry
2021-01-23 21:05:26.065 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state 0 (StringType) on item BodMovement of type SwitchItem, ignoring it
2021-01-23 21:05:26.162 [INFO ] [b.i