v1
latestOpenAPI 3.0.32026-07-171140286.6 KBApi\MeasurementController
api/sensors/calibrateweight Legacy method, used by legacy webapp to store weight calibration value e.g.[w_v_kg_per_val] in Influx database, to lookup and calculate [weight_kg] at incoming measurement value storage
At the next measurement coming in, calibrate each weight sensor with it's part of a given weight. Because the measurements can come in only each hour/ 3hrs, set a value to trigger the calculation on next measurement
- If $next_measurement == true: save 'calibrating' = true in Influx with the sensor key
- If $next_measurement == false: save 'calibrating' = false in Influx with the sensor key and...
- Get the last measured weight values for this sensor key, Divide the given weight (in kg) with the amount of sensor values > 1.0 (assuming the weight is evenly distributed) Calculate the multiplier per sensor by dividing the multiplier = weight_part / (value - offset) Save the multiplier as $device_name.'_kg_per_val' in Influx
post/api/sensors/calibrateweight
Headers
Content-Typestring
Acceptstring
Accept-languagestring
Request body
Example request
{
"next_measurement": true,
"weight_kg": 142125817.9803
}