Hi all, i’m not that good in transformation services and wanted to know how would i do best a JSON transformation.
An ESP8266 provides a webservice with data from the solarpanel, battery, … so I have an IP address plus a subpage that provides following output
Sorry, that would be part of my question…if openhab is able to read an http link every minute that replys the JSON above…and further transform it into an item value.
That’s what HTTP binding is made for.
As you are likely to eventually want to extract more than one value from your JSON, set it up to fetch to cache each minute.
Then link Item(s) to cache.
While developing, link a String Item with default transform, so that you can view the whole payload.
If it is pure JSON, use JSONPATH transform with each real Item to extract the value you want.
Note that it’s an OH version 1.x binding, you may not have used one before. You’ll ned to enable legacy bindings. It doesn’t use Things and channels, it is configured partly in a xxx.cfg file and partly in the Items, which you will also need to define in xxx.items file