JSON Error

Hello,
ive problems with JSON, but i dont no why. perhaps anyone can help me.

my JSON file is here:
http://www.schatthaus-wetter.de/daily.json

my LOG:

2018-05-09 19:36:22.580 [WARN ] [ab.binding.http.internal.HttpBinding] - Transformation 'JSONPATH($.outTemp_raw)' threw an exception. [response={

"title": "Aktuelle Werte",

"location": "Pewsum, Niedersachen - DE",

"time": "09.05.2018 19:35:00",

"time2": "19:35",

"lat": "53° 26.60' N",

"lon": "007° 05.76' O",

"alt": "0 meter",

"hardware": "TFA Nexus",

"uptime": "8 Tage, 9 Stunden, 21 Minuten",

"serverUptime": "50 Tage, 23 Stunden, 0 Minuten",

"weewxVersion": "3.8.0",

"outTemp": "25,5°C",

"outTemp_raw": "25.5",

"PoolTemp": "20,5°C",

"PoolTemp_raw": "20.5"

"windchill": "28,0°C",

"heatIndex": "25,5°C",

"dewpoint": "14,0°C",

"humidity": "49%",

"humidity_raw": "48.9666666667",

"insideHumidity": "57%",

"barometer": "1005 mbar",

"barometer_raw": "1005.375",

"barometerTrendDelta": "3 Stunden",

"barometerTrendData": "-0 mbar",

"windSpeed": "4,1 km/h",

"windSpeed_raw": "4.08236928",

"windDir": "358°",

"windDirText": "N",

"windGust": "7,1 km/h",

"windGust_raw": "7.0811136",

"windGustDir": "   N/A",

"rainRate": "0,0 mm/h",

"rainRate_raw": "0.0"

}

]

org.openhab.core.transform.TransformationException: An error occurred while transforming JSON expression.

	at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [211:org.openhab.core.compat1x:2.2.0]

	at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:194) [240:org.openhab.binding.http:1.11.0]

	at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [211:org.openhab.core.compat1x:2.2.0]

	at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [211:org.openhab.core.compat1x:2.2.0

my items:

Group Wetterstation     "Wetterstation"
String WetS_Version        "Version"                          <clock>                 (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:12000:JSONPATH($.weewxVersion)]"}
Number WetS_Temp          "Aussentemperatur [%.1f °C]"        <icons8_temperatur>     (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:12000:JSONPATH($.outTemp_raw)]"}
Number WetS_Regenr        "Regenrate [%.1f mm/h]"             <icons8_regen>          (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:12000:JSONPATH($.rainRate_raw)]"}
Number WS_Luftfeuchte   "Luftfeuchtigkeit [%.1f %%]"        <icons8_feuchtigkeit>   (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:120000:JSONPATH($.humidity_raw)]"}
Number WS_Luftdruck     "Luftdruck [%.1f mBar]"             <icons8_luftdruck>      (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:120000:JSONPATH($.barometer_raw)]"}
Number WS_Wind          "Windgeschwindigkeit [%.1f km/h]"   <icons8_windsack>       (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:120000:JSONPATH($.windSpeed_raw)]"}
Number WS_Boen          "Windboen [%.1f km/h]"              <icons8_tornado>        (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:120000:JSONPATH($.windGust_raw)]"}
Number WS_PoolTemp      "Pool-Temperatur [%.1f °C]"         <icons8_temperatur>     (Wetterstation)     {http="<[http://www.schatthaus-wetter.de/daily.json:120000:JSONPATH($.PoolTemp_raw)]"}

You miss a comma at the end of the “PoolTemp_raw” line, right before “windshill”

1 Like

A suggestion use one item to fetch the JSON and then make the transformation and update for all information in a rule. As it seems to me it’s one JSON which information gets distributed to multiple items, this reduces the amount of requests.

1 Like

At least you should use the http cache.

https://docs.openhab.org/addons/bindings/http1/readme.html#example-of-how-to-configure-an-http-cache-item