API Extra Sensor Data

From Cumulus Wiki
Revision as of 15:33, 18 October 2020 by Mcrossley (talk | contribs) (Created page with "''Back to Cumulus MX Local API'' == Station Extra Sensors == The extra sensors data response provides current data, it is designed for displaying on a web page, the text...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Back to Cumulus MX Local API

Station Extra Sensors

The extra sensors data response provides current data, it is designed for displaying on a web page, the text is formatted with HTML codes. The general format of the response is

["sensor_name", sensor_value, "units"]

The sensor name can be customised in the Strings.ini file

The general format of the records data API request is as follows...

http://localhost:8998:/api/records/extra/xxxxx

Where xxxx is the specific request as below:

temp.json

Returns current data for extra temperature sensors.

An example response is:

{
   "data": [
       ["Sensor 1", "0.0", "°C"],
       ["Sensor 2", "0.0", "°C"],
       ["Sensor 3", "0.0", "°C"],
       ["Sensor 4", "0.0", "°C"],
       ["Sensor 5", "0.0", "°C"],
       ["Sensor 6", "0.0", "°C"],
       ["Sensor 7", "0.0", "°C"],
       ["Sensor 8", "0.0", "°C"],
       ["Sensor 9", "0.0", "°C"],
       ["Sensor 10", "0.0", "°C"]
   ]
}

hum.json

{
   "data": [
       ["Sensor 1", "0", "%"],
       ["Sensor 2", "0", "%"],
       ["Sensor 3", "0", "%"],
       ["Sensor 4", "0", "%"],
       ["Sensor 5", "0", "%"],
       ["Sensor 6", "0", "%"],
       ["Sensor 7", "0", "%"],
       ["Sensor 8", "0", "%"],
       ["Sensor 9", "0", "%"],
       ["Sensor 10", "0", "%"]
   ]
}

dew.json

{
   "data": [
       ["Sensor 1", "0.0", "°C"],
       ["Sensor 2", "0.0", "°C"],
       ["Sensor 3", "0.0", "°C"],
       ["Sensor 4", "0.0", "°C"],
       ["Sensor 5", "0.0", "°C"],
       ["Sensor 6", "0.0", "°C"],
       ["Sensor 7", "0.0", "°C"],
       ["Sensor 8", "0.0", "°C"],
       ["Sensor 9", "0.0", "°C"],
       ["Sensor 10", "0.0", "°C"]
   ]
}

soiltemp.json

{
   "data": [
       ["Sensor 1", "0.0", "°C"],
       ["Sensor 2", "0.0", "°C"],
       ["Sensor 3", "0.0", "°C"],
       ["Sensor 4", "0.0", "°C"],
       ["Sensor 5", "0.0", "°C"],
       ["Sensor 6", "0.0", "°C"],
       ["Sensor 7", "0.0", "°C"],
       ["Sensor 8", "0.0", "°C"],
       ["Sensor 9", "0.0", "°C"],
       ["Sensor 10", "0.0", "°C"],
       ["Sensor 11", "0.0", "°C"],
       ["Sensor 12", "0.0", "°C"],
       ["Sensor 13", "0.0", "°C"],
       ["Sensor 14", "0.0", "°C"],
       ["Sensor 15", "0.0", "°C"],
       ["Sensor 16", "0.0", "°C"]
   ]
}

soilmoisture.json

{
   "data": [
       ["Sensor 1", "0", "cb"],
       ["Sensor 2", "0", "cb"],
       ["Sensor 3", "0", "cb"],
       ["Sensor 4", "0", "cb"],
       ["Sensor 5", "0", "cb"],
       ["Sensor 6", "0", "cb"],
       ["Sensor 7", "0", "cb"],
       ["Sensor 8", "0", "cb"],
       ["Sensor 9", "0", "cb"],
       ["Sensor 10", "0", "cb"],
       ["Sensor 11", "0", "cb"],
       ["Sensor 12", "0", "cb"],
       ["Sensor 13", "0", "cb"],
       ["Sensor 14", "0", "cb"],
       ["Sensor 15", "0", "cb"],
       ["Sensor 16", "0", "cb"]
   ]
}

leaf.json

{
   "data": [
       ["Temp 1", "0.0", "°C"],
       ["Temp 2", "0.0", "°C"],
       ["Wetness 1", "0", " "],
       ["Wetness 2", "0", " "]
   ]
}

leaf4.json

The four leaf sensor variant, returns leaf temp and wetness for all four channels.

{
   "data": [
       ["Temp 1", "0.0 °C", "0"],
       ["Temp 2", "0.0 °C", "0"],
       ["Temp 3", "0.0 °C", "0"],
       ["Temp 4", "0.0 °C", "0"]
   ]
}

airqual.json

{
   "data": [
       ["Sensor 1", "0.0", "µg/m³"],
       ["Sensor 2", "0.0", "µg/m³"],
       ["Sensor 3", "0.0", "µg/m³"],
       ["Sensor 4", "0.0", "µg/m³"],
       ["Sensor Avg 1", "0.0", "µg/m³"],
       ["Sensor Avg 2", "0.0", "µg/m³"],
       ["Sensor Avg 3", "0.0", "µg/m³"],
       ["Sensor Avg 4", "0.0", "µg/m³"]
   ]
}

lightning.json

{
   "data": [
       ["Distance to last strike", "0.0", "miles"],
       ["Time of last strike", "01/01/0001 00:00:00", ""],
       ["Number of strikes today", "0", ""]
   ]
}

usertemp.json

{
   "data": [
       ["Sensor 1", "0.0", "°C"],
       ["Sensor 2", "0.0", "°C"],
       ["Sensor 3", "0.0", "°C"],
       ["Sensor 4", "0.0", "°C"],
       ["Sensor 5", "0.0", "°C"],
       ["Sensor 6", "0.0", "°C"],
       ["Sensor 7", "0.0", "°C"],
       ["Sensor 8", "0.0", "°C"]
   ]
}

Davis AirLink Sensor

For each sensor type, the readings for [1 minute, 1 hour, 3 hour, 24 hour, Nowcast] are given.

airLinkCountsOut.json

Outdoor sensor PM averages.

{
   "data": [
       ["1 μm", "0.0", "--", "--", "--", "--"],
       ["2.5 μm", "0.0", "0.0", "0.0", "0.0", "0.0"],
       ["10 μm", "0.0", "0.0", "0.0", "0.0", "0.0"]
   ]
}

airLinkAqiOut.json

Outdoor sensor AQI values.

{
   "data": [
       ["2.5 μm", "0.0", "0.0", "0.0", "0.0", "0.0"],
       ["10 μm", "0.0", "0.0", "0.0", "0.0", "0.0"]
   ]
}

airLinkPctOut.json

Outdoor sensor percentage complete values for the averages.

{
   "data": [
       ["All sizes ", "0", "0", "0", "0", "0"]
   ]
}

airLinkCountsOut.json

As outdoor above.

airLinkCountsIn.json

As outdoor above.

airLinkPctIn.json

As outdoor above.