After retrieving a list of checks/sensor from an organisation with https://api.30mhz.com/api/check/organization/<organisationID> how to tell the type of a check e.g which is a temperature sensor, which is a humidity sensor etc?
Look at sensorType field in response. (sensorType can be a bit cryptic - e.g, PTH_MLX90614_SHT35, PAR_SQ1xx_3x, pir_s_ekmb1301111k, APS180flow, etc).
The sensorType value can be sent as the sensorTypeID when making a GET request to
https://api.30mhz.com/api/sensor-type/<sensorTypeID>.
The response to this request includes a metrics field which indicates what the sensor measures e.g
{
...
"metrics": [
"temperature",
"humidity"
],
jsonKeys: [
"sht25.temp",
"sht25.humidity”
],
…
}
The response also includes a jsonKeys field which shows the keys under which data will be returned when making a call to get the actual sensor data. The response there could look like
{
"1565079900000": {
"sht25.temp": 22.479999542236328,
"sht25.humidity": 51.03499984741211
},
"1565080200000": {
"sht25.temp": 22.506000137329103,
"sht25.humidity": 51.104000091552734
},
All sensor types can also be retrieved via GET request to
/sensor-type/user/{email}
(Swagger)
Please sign in to leave a comment.
Comments
0 comments