Json from web over https

Hello,

could you help me and could you suggest me any solution how to do as simple as possible to get content of the file from any Web site.

I don’t want to install my MQTT server outside local network (due to security reason), so from other device I call URL with parameters and data, which are wirtten to local file on the server.

From OH I would like to dowload this file as eg.:

https://any.server.com/mydata.json

which contains json data.

And the question is - how to get the file from OH as rule? Over any binding (which one)? Over any other method?

Hi @ra_dzik

this is relatively simple with the standard HTTP binding HTTP - Bindings | openHAB

If you also install the Json Path transformation the you are able to extract a single item into a particular channel JsonPath - Transformation Services | openHAB

Once you have the binding configured to retrieve the json you add one or more channels and when defining the item choose the jsonpath profile and add the relevant jsonpath to return the desired data.

I was thinking about this binding, but I wasn’t sure if it would be suitable for this.

I have JsonPath installed because I use it.

Thank you very much for your help.

Have a nice day.

you are welcome

as a bonus here is a link to a free jsonpath tool that can help you find the actually data item you are looking for

Wow! Very good and user frendly tool!

Thank you x 2 :slight_smile: