I’m trying to get json data from a http server with this item:
String Weer "Temperature [%s]" {http="<[http://192.168.0.163:5001/weer:30000:JS(weer.js)]"}
And this javascript:
JSON.parse(input).temp;
This is the json data:
{
"temp": "11"
}
Hoping that the string would turn up 11 in my sitemap, but I only get a ‘-’.
Nothing to see in the logs
I must be doing something wrong but I can’t figure out what
cli indicates that http & javascript bindings are enabled:
openhab> bundle:list | grep JavaScript
213 │ Active │ 75 │ 0.10.0.oh240 │ Eclipse SmartHome JavaScript Transformation Service
openhab> bundle:list | grep HTTP
115 │ Active │ 80 │ 0.10.0.oh240 │ Eclipse SmartHome HTTP Interface Bundle
Somebody there that can figure this out?
PS opening the link in a browser gives me the Json. Tried first with JsonPath, same results.