at first - see var/val: but that’s irrelevant in this context.
As you wrote, the rule worked for you, I didn’t look any further, but the Syntax
var Kanal = http="<[http://192.168.1.150:80/web/getcurrent:3000:REGEX(.*?<e2servicename>(.*?)</e2servicename>.*)]" }
can’t work for two reasons:
- you’re using
Ìtemsyntax in a rule - you have a
}which doesn’t belong at the end of that line.
ad 1)
within a rule, you can’t just use the Syntax from a binding. if you’d like to have http-functionality within a rule - you have to use http-action: https://docs.openhab.org/addons/actions.html#http-actions
in your case:
- sendHttpGetRequest(String url)
- use
var temperature = transform("JSONPATH", "$.temperature", jsonstring)to transform your JSON (https://docs.openhab.org/addons/transformations.html#usage)
ad 2)
just remove it: