Hi there,
I’m a beginner in openhab and have some problems to make an item with a exec binding work.
I installed the openhab-offline-2.0.0-SNAPSHOT version so that I assume all the extentions are installed as well.
My simple item looks like this:
Number Aussentemperatur "Aussentemperatur [%.1f °C]" <temperature> {exec="<[curl -i -H "Accept: application/json" http://192.168.0.12:8182/properties/HTIII_EMS_OutdoorTemperature:JSONPATH($.value)]"}
…and the sitemap like this:
sitemap test label="Temperatur"
{
Frame label="Aussentemperatur" {
Text item=Aussentemperatur label="Aussentemperatur [%.1f °C]"
}
}
If I use the curl instruction in a cmd window then I get back the expected answer from a REST server in JSON format.
This command:
C:\temp\curl>curl -i -H "Accept: application/json" http://192.168.0.12:8182/properties/HTIII_EMS_OutdoorTemperature
gives the following reply from the REST server:
HTTP/1.1 200 The request has succeeded
Content-Type: application/vnd.com.bosch.bios.fusion.ems.http.property+json; charset=ISO-8859-1
Content-Length: 392
Date: Mon, 26 Sep 2016 19:39:11 GMT
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Accept-Ranges: bytes
Server: Noelios-Restlet-Engine/1.1.7
Connection: close
{“unitOfMeasure”:"?C","_links":{“getFromECU”:{“href”:“http://192.168.0.12:8182/properties/HTIII_EMS_OutdoorTemperature?forceUpdate=true"},“self”:{“href”:“http://192.168.0.12:8182/properties/HTIII_EMS_OutdoorTemperature”},“update”:{“href”:“http://192.168.0.12:8182/properties/HTIII_EMS_OutdoorTemperature”}},“lastChanged”:“2016-09-26T21:39:11”,“name”:“HTIII_EMS_OutdoorTemperature”,"value”:14}
But openhab only returns this error message in the log:
22:57:48.018 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Aussentemperatur’ for widget org.eclipse.smarthome.model.sitemap.Text
22:57:48.019 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
22:57:48.020 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
22:57:48.023 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Aussentemperatur’ for widget org.eclipse.smarthome.model.sitemap.Text
22:57:48.023 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Aussentemperatur’ for widget org.eclipse.smarthome.model.sitemap.Text
Any idea what I made wrong? Or what is missing?