Code: Select all
http://raspberry:8083/ZAutomation/api/v1/devices/OpenWeather_72/data/metrics/level
A call with only rhe widget id yields the following JSON blurp:{"data":null,"code":404,"message":"404 Not Found","error":"Device OpenWeather_72/data/metrics/level doesn't exist"}
Code: Select all
{
"data" : {
"creatorId" : 72,
"deviceType" : "sensorMultilevel",
"id" : "OpenWeather_72",
"location" : null,
"metrics" : {
"scaleTitle" : "°C",
"title" : "Leens",
"probeTitle" : "Temperature",
"level" : 0.7,
"icon" : "http://openweathermap.org/img/w/01d.png"
},
"permanently_hidden" : false,
"tags" : [],
"updateTime" : 1423210517
},
"code" : 200,
"message" : "200 OK",
"error" : null
}
Whatever separators I use in the full http string; no success. What am I doing wrong?data.metrics.level
results in:
'0' => "0.7"
Update 13:51 On OpenRemote I can get the correct value using:
Code: Select all
URL: http://raspberry:8083/ZAutomation/api/v1/devices/OpenWeather_72
Method: GET
Content-type: application/json
Polling: 5m
JSONPath: $.data.metrics.level