|
Climaps API
version 1
|
Static Public Member Functions | |
| static | getDataByStationId () |
| static | getMostRecentValuesByStationId () |
Static Public Attributes | |
| static | MAX_DOWNLOAD_RANGE = 5356800 |
| Maximum range in seconds, scale with the number of stations (e.g., 1 station: MAX_DOWNLOAD_RANGE, 2 stations: MAX_DOWNLOAD_RANGE / 2, ...) | |
| static | NOT_CALIBRATABLE = 0 |
| The measurement cannot be calibrated. | |
| static | NOT_CALIBRATED = 1 |
| The measurement can be calibrated but has not been calibrated. | |
| static | CALIBRATED = 2 |
| The measurement has been calibrated. | |
| static | CAT_SENSOR = 1 |
| Sensors plugged into a station (e.g., an Apogee SI-11, a Sensirion SHT75) | |
| static | CAT_HEALTH_SYSTEM = 2 |
| System health data (e.g., battery level, current consumption) | |
| static | CAT_NETWORK = 3 |
| Networking data, including GPRS data (e.g., radio signal quality, next hop) | |
| static | CAT_SYSTEM = 4 |
| System data (e.g., compilation date) | |
| static | CAT_HEALTH_SENSOR = 5 |
| Sensor health data (e.g., external battery level) | |
This class lets you access the data sent by stations. To download large amounts of data, it is recommended to use the downloads class which works asynchronously.
|
static |
Get the data sent by a station.
| string | stationsId | Comma-separated list of stations id (e.g., "301,652,1604") |
| string | measurementsId | Comma-separated list of measurements id (e.g., "246,246,265") |
| string | slots | Comma-separated list of slots (e.g., "0,2,2") |
| int | from | Begining of the time interval in epoch time |
| int | to | End of the time interval in epoch time |
| string | resolution | Resolution of the requested data, can be either full, 15m, 1h, or 1d |
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| stationId | int | Station id |
| id | int | Measurement id |
| stationName | string | Name of the station |
| catId | int | Id of the category the sensor falls in (e.g., data::CAT_HEALTH_SYSTEM) |
| name | string | Name of the measurement (e.g., "Temperature") |
| sensor | string | Name of the sensor (e.g., "SHT75") |
| slot | int | Number of the slot the sensor is installed on |
| units | string | Units of the measurement (e.g., "°C") |
| data | array | Array of points such as [[epoch, value], [epoch, value], ...] |
|
static |
For each measurement sent by a station, get the most recent value received.
| int | stationId | The station Id |
| int | notOlderThan | Deadline for data in seconds, older data is ignored (set to 0 to remove age restriction) |
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| id | int | Measurement id |
| name | string | Name of the measurement (e.g., "temperature") |
| sensor | string | Name of the sensor (e.g., "Apogee SI-11") |
| catId | int | Id of the category the sensor falls in (e.g., data::CAT_HEALTH_SYSTEM) |
| slot | int | Slot number |
| calibration | int | The calibration state of the measurement (e.g., data::CALIBRATED) |
| displayOrder | int | Preferred order for display (lowest value should come first) |
| visible | boolean | Whether the measurement is visible to the user (e.g., see account::setOwnMeasurementHidden) |
| units | string | Units of the sensor (e.g., "°C") |
| epoch | int | Date of the value, in epoch time |
| value | float | Value measured |
1.8.8