Access Measurements

Concept

The global measurements object allows you to access the device's current measurements. It is structured like this:

{
"BATTERY": {
"field_name": "BATTERY",
"timestamp": "1600378287",
"value": 3.301
},
"SOIL_CONDUCTIVITY": {
"field_name": "SOIL_CONDUCTIVITY",
"timestamp": "1600378287",
"value": 121
}
}

Code Example

function decoder() {
// get current value from field in Database
var field_in_db = measurements.FIELD_IN_DB.value;
}