HTTP Binding, Handling JSON


So I am stuck trying to display a simple number on my sitemap.
What I have done so far:

  1. Installed the HTTP Binding
  2. Created an item as follows (Basically identical to the example provided):
    Number temp_name “temp” { http="<[http://ip-address:port/data.json:60000:JSONPATH($.temp)]" }
  3. Added a field into my sitemap
    Text item=temp

Now, my item is displaying on the sitemap but my temp values are not, I have checked and the JSON endpoint is fine so I have no idea what the problem could be.

If anyone could help me, i’d be very grateful.

Thanks, Daniel.

I changed the data type to a String and I am getting the entire json response body so it seems it’s just JSONPATH that’s not working

Had to install the JSONPATH transform in the paper UI. Would be handy if that was mentioned in the HTTP Binding documentation with the JSONPATH example.

1 Like

I’m having similar issue but even removing JSONPATH from the item does not help. Here my items’ definitions:

  1. Number Sensor "Sensor" { http="<[$.Sensors[1].TaskValues[1].Value)]" }

  2. String SensorText "SensorText" { http="<[]" }

URL shows correct json data in web browser.

Please help.

Maybe you need to add the update interval!


Hmm. Most probably you’re right.
After fist look into the documentation I thought this is port, not interval. so I’ve skipped this :slight_smile:
I will check this out in the evening.


Works now. Thanks!