Cumulus MX Local API: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1,068 bytes removed ,  16:06, 18 October 2020
(Add graph data)
(10 intermediate revisions by the same user not shown)
Line 44: Line 44:
== Predetermined Data ==
== Predetermined Data ==
=== Graph Data ===
=== Graph Data ===
Cumulus MX will return graph data on request, it is formatted as JSON
Cumulus MX will return graph data on request, it is formatted as JSON, please refer to this page [[API Graph Data]]
=== Records Data ===
Cumulus will return weather records on request, it is formatted as JSON, please refer to this page [[API Records Data]]
=== Today/Yesterday Data ===
Cumulus will return weather data on request, it is formatted as JSON, please refer to this page [[API Today/Yesterday Data]]
=== Extra Sensor Data ===
Cumulus will return weather data on request, it is formatted as JSON, please refer to this page [[API Extra Sensor Data]]
=== Reports Data ===
Cumulus will return NOAA reports on request, it is formatted as an array of strings. You can also request that Cumulus MX regenerate an NOAA report on demand, please refer to this page [[API NOAA Reports]]
=== Data Logs ===
Cumulus will return data from its log files on request. You can request data from...
* dayfile
* a monthly log file
* the extra sensors log file
* weather diary data
* a selection of current data


The general format of the request is as follows...
Please refer to this page [[API Data Logs]]
<pre>http://localhost:8998:/api/graphdata/xxxxx</pre>
Where xxxx is the specific request as below:
==== tempdata.json ====
Returns inside temp, dew point, apparent temp, feels like, wind chill, heat index, outdoor temp as a JSON object, each value is an array of timestamp (JavaScript number) and value pairs...
{
    "intemp": [[timestamp1,value1],[timestamp2,value2]...],
    "dew": [[timestamp1,value1],[timestamp2,value2]...],
    "apptemp": [[timestamp1,value1],[timestamp2,value2]...],
    "feelslike": [[timestamp1,value1],[timestamp2,value2]...],
    "wchill": [[timestamp1,value1],[timestamp2,value2]...],
    "heatindex": [[timestamp1,value1],[timestamp2,value2]...],
    "temp": [[timestamp1,value1],[timestamp2,value2]...]
}
==== winddata.json ====
Same as temp data...
{
    "wgust": [[,],[,]...],
    "wspeed": [[,],[,]...]
}
==== raindata.json ====
Same as temp...
{
    "rfall": [[,],[,]...],
    "rrate": [[,],[,]...]
}
==== pressdata.json ====
Same as temp...
{
    "press": [[,],[,]...]
}
==== wdirdata.json ====
Same as temp...
{
    "bearing": [[,],[,]...],
    "avgbearing": [[,],[,]...]
}
==== humdata.json ====
Same as temp...
{
    "hum": [[,],[,]...],
    "inhum": [[,],[,]...]
}
==== solardata.json ====
Same as temp...
{
    "UV": [[,],[,]...],
    "SolarRad": [[,],[,]...],
    "CurrentSolarMax": [[,],[,]...]
}
==== sunhours.json ====
Same as temp...
{
    "sunshours": [[,],[,]...]
}
==== dailyrain.json ====
Same as temp...
{
    "dailyrain": [[,],[,]...]
}
==== dailytemp.json ====
{
    "mintemp": [[,],[,]...],
    "maxtemp": [[,],[,]...],
    "avgtemp": [[,],[,]...]
}
==== units.json or graphconfig.json ====
Returns the units of measurement used for the graph values above.
{
    "temp": {"units": "C|F", "decimals": 0|1|2},
    "wind": {"units": "windunit", "decimals": N},
    "rain": {"units": "rainunit", "decimals": N},
    "press": {"units": "pressunit", "decimals": N},
    "hum": {decimals": N},
    "UV": {decimals": N}
}

Navigation menu