Page 1 of 1

custom sensor in graphs

Posted: Friday 11 January 2019 12:39
by vincentwijermars
I am using json to retrieve historical data from the different sensors using:
<my-ip>:8080/json.htm?type=graph&sensor=<sensortype>&idx=<my-idx>&range=<my range>
This works fine for sensorstypes such as temp ,wind, counter and Percentage
I can't however find the correct sensortype for devices of type General and subType Custom Sensor
An example of such a sensor is the RaspberryPi Proces Usage sensor

It would be handy to have a complete list of usable sensor types for the graphs.
Maybe that's available, but I haven't found it.

It took me a long time to find-out that the Percentage type should have a uppercase P while all others I found are all lowercase

Thanks,

Vincent

Re: custom sensor in graphs

Posted: Saturday 12 January 2019 11:20
by vincentwijermars
Digging some deeper in de code showed me that Custom Sensor is mapped on Percentage graph
The same holds for Waterflow.

Vincent

Re: custom sensor in graphs

Posted: Saturday 12 January 2019 11:50
by waaren
vincentwijermars wrote: Saturday 12 January 2019 11:20 Digging some deeper in de code showed me that Custom Sensor is mapped on Percentage graph
You don't have to dig into the code to get this type of information. If you use the GUI and go into developer mode ([ctr][shift]I in Chrome) while doing the action that you want to investigate, you will see the API calls in the developer window.
And please add the found ones to the wiki That will save others from having "to invent the wheel" :)