lujop
(Joan Pujol)
October 21, 2020, 9:23pm
169
For people who had problems with types using the InfluxDB persistence addon I’ve submitted a PR that will solve the problem in the next milestone
main ← lujop:fix/8798
opened 09:08PM - 21 Oct 20 UTC
This PR mainly solves issue #8798 that was detected with OH 3.0 milestone 1 test… ing.
The issue has a long discussion/explanation on the problem, but summing up this PR ensures that always doubles are used to store numerical values. That is the safe way to store them due to the combination that OH doesn't have an IntegerType and Influx doesn't support different field types in the same series and shard.
This is compatible with old behavior because the old addon had the intent to use different types for integers but in the end it doesn't.
It also solves #8697 reflecting that with Influx2 RC version the port is the same as Influx1
And changes toString for `InfluxPoint` because some trace logs that logged the point were unuseful without this.
I attach the build addon for more easy testing:
[org.openhab.persistence.influxdb-3.0.0-SNAPSHOT.jar.zip](https://github.com/openhab/openhab-addons/files/5418770/org.openhab.persistence.influxdb-3.0.0-SNAPSHOT.jar.zip)
**Important note if testing addon**:
If you already used the previous addon version you can still have problems. You need to start with a new database or from a copy of OH 2 database where the 3.0 persistence addon was never used.
There is an already build version in the PR if someone wants to use
Important consideration :
If you already used the previous addon version you can still have problems. You need to start with a new database or from a copy of OH 2 database where the 3.0 persistence addon was never used.
5 Likes