OH3.0.0 and InfluxDB 2.0

Is InfluxDB 2.0 compatible with OH3 (3.0.0)? I’m running latest stable OH 3.0.0.

I have set my influxdb.cfg up as below but I get an error

2021-01-09 18:32:51.200 [WARN ] [luxdb.internal.InfluxDBConfiguration] - Invalid version "V2"

2021-01-09 18:32:51.200 [WARN ] [luxdb.internal.InfluxDBConfiguration] - InfluxDB configuration isn't valid. Addon won't work:  Unknown version

2021-01-09 18:32:51.201 [WARN ] [.influxdb.InfluxDBPersistenceService] - Some configuration properties are not valid {component.name=org.openhab.persistence.influxdb.InfluxDBPersistenceService, url=, retentionPolicy="autogen", service.config.category=persistence, token="<obfuscated>", service.config.description.uri=persistence:influxdb, user="openhab", version="V2", service.config.label=InfluxDB Persistence Service, service.pid=[org.openhab.influxdb, org.openhab.influxdb], service.config.factory=false, component.id=278, password=openhab, db="openhab"}

2021-01-09 18:32:51.202 [ERROR] [.influxdb.InfluxDBPersistenceService] - Cannot load configuration, persistence service wont work


# name of Organisation in InfluxDB V2
# name of Bucket in InfluxDB V2

have a look here: [influxdb] influxdb 2.0 bucket is not saved in configuration · Issue #8960 · openhab/openhab-addons · GitHub

Did you ever resolve this?
If yes, how?

On OH 3.0.0 release, I only get ‘V2 is illegal parameter’ and that ‘persistence won’t work’.

Yes, I fixed it by downgrading InfluxDB to V1.8. I was on V1.6 before I upgraded my openHAB from 2.5 to 3.0, so I suppose it was still an upgrade of sorts.
I spent some amount of time on trying to get V2 to work but I felt like I was disappearing down a rabbit hole, so gave up in the end. There didn’t appear to be any obvious advantages to moving to V2 as far as openHab is concerned (for me anyway). Upgrading to V2 also means that you have to modify any Grafana queries (if you are using it), unless you can get the V1 backward-compatibility part of V2 to work; and I couldn’t!
In a nutshell I think I will wait until V2 is better supported by both OH and Grafana.

I see.
I never got restore to work on OH3.0.0 release when on v1.6.
So I updated to v2, but then OH3.0 writing to influx failed.
So last night I updated OH3.0 to yesterdays snapshot. Still failed, until I tuned into a new bucket that appeared. Now it is writing to the new bucket, and restore works, and as you said, Grafana is complaining, so I need to look into that. My v1.6 database is still there in a separate bucket. Have to see if Grafana can be set up to read from both. Also need to figure out the new queries.

All OH3.0 ‘Analyze’ is reset to yesterday though, but no biggie for me. Most important is the restore on OH3 restarts.

1 Like

More detailed report here: OH3.0.0-1 w/influx 1.7.8 (& 2.0) restoreOnStartup fails - #2 by OMR