how do you parse results? Can you post me some example on how you read a temperature sensor in example?
{"type":"NumberItem","name":"ACQUARI_TF_TEMP","state":"25.3","link":"http://192.168.1.72:8080/rest/items/ACQUARI_TF_TEMP"}
Now I use this nagios plugin to parse JSON and ger state:
http://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions/check_json--2D-check-JSON-attributes-via-http(s)/details
With this polugin I can check if value is greater or lower than a treashold using nagios syntax: https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMATThis is my command:
Inserisci qui il codicedefine command{command_name check_openhab command_line $USER1$/check_json.pl --url http://myserver.home:8080/rest/items/$ARG1$?type=json --attribute {state} --warning $ARG2$ --critical $ARG3$ -o {state} }...ARG1 is the Item to ckek
ARG2 is warning level
ARG3 is critical level
All works like a charm.
Many thanks to all