I know I can get a sensors value via:
http://192.168.1.13/api/getsensordetails.json?id=2247&username=xxx&passhash=xxx
but I can't figure out how to get the channel values?
Any help would be great!
Thanks
Article Comments
That sort of worked, but I'm getting funny raw values:
{
prtg-version: "15.4.21.5215",
treesize: 0,
channels: [
{
name: "Downtime",
lastvalue: ""
},
{
name: "Humidity",
lastvalue: "93.4 %",
lastvalue_raw: 930.4
},
{
name: "Light",
lastvalue: "82 %",
lastvalue_raw: 820
},
{
name: "Reservoir",
lastvalue: "Reservoir Level OK",
lastvalue_raw: 1
},
{
name: "Temperature",
lastvalue: "5.6 °C",
lastvalue_raw: 50.6
}
]
}
Why is the temperature 5.6 getting a raw value of 50.6?
Jan, 2016 - Permalink
Unfortunately it's not that simple. I need to do a string replace on "0." and replace it with ".". Dividing by 10 would make the units wrong by10.
Jan, 2016 - Permalink
Hi,
in order to get the channel data, use the following API call:
http://192.168.1.13/api/table.json?content=channels&output=json&columns=name,lastvalue_&id=2247
The result will look like this:
Jan, 2016 - Permalink