Influxdb 2.7 & openhab 2.5.12

Hi!

I’m currently running OH 2.5.12 with persistence setup with MAPDB and influxDB 1.8.10. Everything works great.

To ensure futureproofing i wan’t to migrate influxdb to v2.

I’m trying to setup persistence with influxdb 2.7 and OH 2.5.12, but i can’t seem to get it to work.

I tried all possible influxdb.cfg combinations but am unable to connect to influxdb2. I keep getting error

(ERROR] (org. infludb.impl.BatchProcessor] - Batch could not be sent. Data will be lost
Java. lang. RuntimeException: {"code": "unauthorized", "message": "Unauthorized" }

Influxdb.cfg

url=http://192.168.1.11:8086
version=V2 
db=myorg 
retentionPolicy=openhab 
token=<token>
##user = openhab
##password = habopen123

This got me to wondering if influxdb2 is supported on OH 2.5.12 at all ? The InfluxDB persistence bundle is version 1.14.0.

Any insight would be highly appreciated!

According to discussions in this thread influxdb2 only works with OH3.

then you anyway need to migrate to OH3.

To be futureproof you have to migrate to openHAB3 anyway. Please be aware that openHAB3.4.2 (this is current stable version) is the last version of openHAB3 branch, next version will be 4.0.0.

Luckily the transition between OH 3.4.2 and OH4.0.0 will not be nearly as hard as the upgrade from OH2.5.12 to OH3.4.2, so don’t be scared to do the work twice, you won’t have to.

Thx all for your responses.

All is clear now.