2020-04-05 07:51:07.441 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.util.UnknownFormatConversionException: Conversion = '2'
at java.util.Formatter.checkText(Formatter.java:2579) [?:?]
at java.util.Formatter.parse(Formatter.java:2555) [?:?]
at java.util.Formatter.format(Formatter.java:2501) [?:?]
at java.util.Formatter.format(Formatter.java:2455) [?:?]
at java.lang.String.format(String.java:2940) [?:?]
at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:144) [217:org.openhab.binding.http:1.12.0]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [223:org.openhab.core.compat1x:2.3.0]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [223:org.openhab.core.compat1x:2.3.0]
Just trying to get anything out of it. This one is giving me a
2020-04-06 07:05:56.341 [WARN ] [ab.binding.http.internal.HttpBinding] - Transformation 'JSONPATH($.results[0])' threw an exception. [response={"error":"error parsing query: found BADSTRING, expected ; at line 1, char 58"}
]
org.openhab.core.transform.TransformationException: Invalid path '$.results[0]' in '{"error":"error parsing query: found BADSTRING, expected ; at line 1, char 58"}
'
at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [223:org.openhab.core.compat1x:2.3.0]
at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:194) [217:org.openhab.binding.http:1.12.0]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [223:org.openhab.core.compat1x:2.3.0]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [223:org.openhab.core.compat1x:2.3.0]
But who knows what the url is being given to influx now with all the escaping. I this it must be getting an error returned to it, as the json requires the following path to get the value I want:
This may be a bit of a digression, but perhaps it would be easier to use the sendHttpGetRequest action in a rule instead? I use this for a post request to InfluxDB and it works well without the escaping. But maybe it is harder with a get compared to a post.
Yes, it’s right there in the message - this comes from influx {"error":"error parsing query: found BADSTRING, expected ; at line 1, char 58"}
I reckon char 58 in the query is around that +-+1h%%27 area
What might help is looking in influx log to see what it received.
I think that’s probably true, there’s a bunch of things processing the URL
Yeah I wasn’t sure where that bit came from in the url encoding. I thnk the encoding I used converted space to + and maybe it’s needs the - escaped as well.
Once you figure out the format of the query, there’s probably a lot of data you might be able to pull in. For this one I’m mostly wanting to alert that the entry hasn’t updated as the grafana alerts aren’t great for lack of data.