Hi.
I am trying to use the the http-binding to get informations of my 3d printer, which is connected to repetier server.
When typing in
http://192.168.77.5:3344/printer/list/Printername?a=%3Caction%3E&apikey=0815d12-3299-99be-96e7-7ue23424
I get a json message like this
‘{“data”:[{“active”:true,“job”:“none”,“name”:“Anet A8”,“online”:0,“pauseState”:0,“paused”:false,“slug”:“Anet_A8”}]}’
But http binding does not accept the adress:
‘2019-12-15 17:28:22.056 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.util.IllegalFormatConversionException: c != java.util.Date
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) ~[?:?]
at java.util.Formatter$FormatSpecifier.printCharacter(Formatter.java:2869) ~[?:?]
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2757) ~[?:?]
at java.util.Formatter.format(Formatter.java:2520) ~[?:?]
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) ~[?:?]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) ~[226:org.openhab.core.compat1x:2.4.0]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [226:org.openhab.core.compat1x:2.4.0]’
What am I doing wrong?
This is an example of the item:
‘String repetierName “bla” {http://192.168.77.5:3344/printer/list/Printername?a=<action>&apikey=0815d12-3299-99be-96e7-7ue23424:10000:JSONPATH($.data[0].slug)]"}’
The api key is anything random, just an example.
Thanks for your help!