I’m trying to use http binding to execute an InfluxDB query using it’s http api.
The query url is:
http://openhabianpi.local:8086/query?db=openhab_db&q=SELECT mean("value") AS "mean_value" FROM "openhab_db"."origin"."IOT_Aerotermia" where time > now() -1m
And I had some problems escaping it. First I tried with using standard url encoding, but I got some strange java.util.UnknownFormatConversionException: Conversion = ‘F’ errors.
After some research I found in another thread that I’ve to escape the %
Are the escaping rules for http binding documented somewhere?
My use case is not about persisted item values by Openhab.
It’s about retrieved data previously stored in InfluxDB by a third party module.
That comes from a suggestion in that thread.
Also in the near future, I want to use InfluxDB 2 with flux queries, and it will be even more difficult.
Just last week I proposed to develop a new addon to be able to create Items from arbitrary InfluxDB queries, and it’s in study:
It’s a developer topic, but you can follow if have interest: