I’ve been using OH 2 very successfully for several year. Now I want to move on to OH3.
I want to extract a sensor value with the new HTTP binding but I don’t really get it.
I tried that but no success. I don’t think that there is a transformation error.
The log message tells me that the creation of the request failed. We are at least one step before the transformation.
Maybe something is wrong with the URL. Do I have to mask certain characters?
The reference to Conversion = 'v' shows that the problem comes from the %20v in the URL. I’m betting all the occurrences of %20 will cause similar issues. Take note of the README section on formatting.
I don’t see any mention of a way to disable this “feature”. You could try replacing the %20 values in your URL with spaces and see if it improves.
Ok, we are on the right track. I replaced the %20 with blanks and the message shows:
2020-12-31 07:39:33.331 [WARN ] [ttp.internal.http.RefreshingUrlCache] - Creating request for 'http://10.0.0.5:8086/query?pretty=true&db=openhab&q=select value_mgdl from glucose ORDER BY time DESC limit 1' failed: Illegal character in query at index 58: http://10.0.0.5:8086/query?pretty=true&db=openhab&q=select value_mgdl from glucose ORDER BY time DESC limit 1
Character 58 is the first blank in the URL.
I also tried to use ’ ’ around the URL. No success.