From a28931493aa4f73d8cf336fea30a57d0140e47aa Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Fri, 24 Jan 2025 18:03:13 +0700 Subject: [PATCH] Add docs about how to set correction from local server --- docs/local-server.md | 56 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/docs/local-server.md b/docs/local-server.md index f56d7f1..06dcdf1 100644 --- a/docs/local-server.md +++ b/docs/local-server.md @@ -2,7 +2,7 @@ From [firmware version 3.0.10](firmwares) onwards, the AirGradient ONE and Open Air monitors have below API available. -#### Discovery +### Discovery The monitors run a mDNS discovery. So within the same network, the monitor can be accessed through: @@ -11,7 +11,7 @@ http://airgradient_{{serialnumber}}.local The following requests are possible: -#### Get Current Air Quality (GET) +### Get Current Air Quality (GET) With the path "/measures/current" you can get the current air quality data. @@ -80,7 +80,7 @@ You get the following response: Compensated values apply correction algorithms to make the sensor values more accurate. Temperature and relative humidity correction is only applied on the outdoor monitor Open Air but the properties _compensated will still be send also for the indoor monitor AirGradient ONE. -#### Get Configuration Parameters (GET) +### Get Configuration Parameters (GET) "/config" path returns the current configuration of the monitor. @@ -111,7 +111,7 @@ Compensated values apply correction algorithms to make the sensor values more ac } ``` -#### Set Configuration Parameters (PUT) +### Set Configuration Parameters (PUT) Configuration parameters can be changed with a PUT request to the monitor, e.g. @@ -131,11 +131,11 @@ Example to set monitor to Celsius ``` -d "{\"param\":\"value\"}" ``` -#### Avoiding Conflicts with Configuration on AirGradient Server +### Avoiding Conflicts with Configuration on AirGradient Server If the monitor is set up on the AirGradient dashboard, it will also receive the configuration parameters from there. In case you do not want this, please set `configurationControl` to `local`. In case you set it to `cloud` and want to change it to `local`, you need to make a factory reset. -#### Configuration Parameters (GET/PUT) +### Configuration Parameters (GET/PUT) | Properties | Description | Type | Accepted Values | Example | |-----------------------------------|:-----------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------| @@ -160,9 +160,9 @@ If the monitor is set up on the AirGradient dashboard, it will also receive the -#### Corrections +### Corrections -The `corrections` object allows configuring PM2.5 correction algorithms and parameters locally. This affects both the display and local server response values. +The `corrections` object allows configuring PM2.5, Temperature and Humidity correction algorithms and parameters locally. This affects both the display, local server response and open metrics values. Example correction configuration: @@ -176,11 +176,29 @@ Example correction configuration: "scalingFactor": 0, "useEpa2021": false } - } + }, + "atmp": { + "correctionAlgorithm": "