Hello
I have been reading this post because it does someting very similar to what I need.
I have an heatmiser wifi thermostat and can monitor and control it via a perl script.
I get status in json format and should be able to read it.
Unfortunately I can’t
I suspect this is due to the format of the first key of the json that is an ip adess and so I am not able to use it in the item definiition:
my item:
Number HeatmiserTemperatura “Temperatura [%f]” (PianoTerra,PianoTerra_Salone,Riscaldamento) { http="<[heatmiser:JSONPATH($.192.168.2.251.heating.target)]"
from openhab.log:
2015-12-19 23:48:54.401 [WARN ] [h.i.HttpGenericBindingProvider] - bindingConfig is NULL (item=HeatmiserTemperatura (Type=NumberItem, State=Uninitialized)) -> process bindingConfig aborted!
removing the \ in the item as in:
Number HeatmiserTemperatura “Temperatura [%f]” (PianoTerra,PianoTerra_Salone,Riscaldamento) { http="<[heatmiser:JSONPATH($.192.168.2.251.heating.target)]"
I get:
2015-12-20 00:17:25.216 [ERROR] [i.internal.GenericItemProvider] - Binding configuration of type ‘http’ of item ‘HeatmiserTemperatura‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: bindingConfig ‘heatmiser:JSONPATH($.192.168.2.251.heating.target)’ doesn’t represent a valid in-binding-configuration. A valid configuration is matched by the RegExp ‘(.?)({.})?:(?!//)(\d*):(.*)’
my http binding config:
configuration of the first cache item
http:heatmiser.url=http://192.168.2.239/cgi-bin/heatmiser/heatmiser_json.pl
http:heatmiser.updateInterval=60000
the json:
{
“192.168.2.251” : {
“comfort” : [
[
{
“target” : 22,
“time” : “06:30:00”
},
{
“target” : 19,
“time” : “08:30:00”
},
{
“target” : 23,
“time” : “12:30:00”
},
{
“target” : 22,
“time” : “23:00:00”
}
],
[
{
“target” : 22,
“time” : “07:30:00”
},
{
“target” : 20,
“time” : “23:30:00”
}
]
],
“config” : {
“caloffset” : 0,
“locklimit” : 0,
“optimumstart” : 0,
“outputdelay” : 0,
“progmode” : “5/2”,
“sensor” : “internal”,
“switchdiff” : 1,
“units” : “C”
},
“dcblength” : 72,
“enabled” : 1,
“errorcode” : null,
“frostprotect” : {
“enabled” : 1,
“target” : 12
},
“heating” : {
“hold” : 0,
“on” : 1,
“target” : 23
},
“holiday” : {
“enabled” : 0,
“time” : “2015-12-19 23:19:00”
},
“keylock” : 0,
“product” : {
“model” : “PRT”,
“vendor” : “Heatmiser”,
“version” : 1.9
},
“rateofchange” : 20,
“runmode” : “heating”,
“temperature” : {
“floor” : null,
“internal” : 22.1,
“remote” : null
},
“time” : “2015-12-19 23:19:02”
}
}
tx for your help!