You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2021. It is now read-only.
It appears that if a URL has the special characters of 20% to represent a space then the HTTP Binding fails.
The use case is the Google Maps Distance Matrix API that allows you to query the estimated travel time between two addresses.
This is my Item Number TTW_Sonay "Sonay TTW [%s]" (GroupOutdoors) { http="<[https://maps.googleapis.com/maps/api/distancematrix/json?origins=OriginAddressHere&destinations=DestinationAddressHere&key=GoogleAPIKeyHere&language=en&departure_time=now:300000:JS(ttw_trafficTimesNumber.js)]"}
In my case the origin and distination addresses have spaces in them represented by 20%
This causes the error below.
2016-06-11 16:10:37.053 [ERROR] [.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.util.UnknownFormatConversionException: Conversion = 'R'
at java.util.Formatter$FormatSpecifier.conversion(Unknown Source) ~[na:1.8.0_60]
at java.util.Formatter$FormatSpecifier.(Unknown Source) ~[na:1.8.0_60]
at java.util.Formatter.parse(Unknown Source) ~[na:1.8.0_60]
at java.util.Formatter.format(Unknown Source) ~[na:1.8.0_60]
at java.util.Formatter.format(Unknown Source) ~[na:1.8.0_60]
at java.lang.String.format(Unknown Source) ~[na:1.8.0_60]
at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:136) ~[na:na]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) ~[na:na]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) ~[na:na]
It appears that if a URL has the special characters of 20% to represent a space then the HTTP Binding fails.
The use case is the Google Maps Distance Matrix API that allows you to query the estimated travel time between two addresses.
This is my Item
Number TTW_Sonay "Sonay TTW [%s]" (GroupOutdoors) { http="<[https://maps.googleapis.com/maps/api/distancematrix/json?origins=OriginAddressHere&destinations=DestinationAddressHere&key=GoogleAPIKeyHere&language=en&departure_time=now:300000:JS(ttw_trafficTimesNumber.js)]"}
In my case the origin and distination addresses have spaces in them represented by 20%
This causes the error below.
With assistance from watou it appears the issue is with this line?
https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/HttpBinding.java#L144
The text was updated successfully, but these errors were encountered: