### Get Diagnostics (AP Setup Mode Only)
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Retrieves diagnostic information. This endpoint is only available in AP setup mode.
```APIDOC
## GET /api/diag
### Description
Retrieves diagnostic information. This endpoint is only available in AP setup mode.
### Method
GET
### Endpoint
/api/diag
```
--------------------------------
### Prepare Release Assets
Source: https://github.com/21cncstudio/project_aura/blob/main/docs/releases/RELEASING.md
Prepares release files and refreshes website installer files. Specify the version to be released.
```powershell
powershell -ExecutionPolicy Bypass -File scripts\prepare_release_assets.ps1 -Version X.Y.Z
```
--------------------------------
### Copy Secrets Configuration File
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Copy the example secrets file to create your own configuration. This file is ignored by git and should contain your private settings.
```text
copy include\secrets.h.example include\secrets.h # Windows
cp include/secrets.h.example include/secrets.h # macOS / Linux
```
--------------------------------
### Get State
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Retrieves the current state of the device. This is a simple GET request to fetch the overall status.
```APIDOC
## GET /api/state
### Description
Retrieves the current state of the device.
### Method
GET
### Endpoint
/api/state
```
--------------------------------
### Get Events
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Retrieves a list of events recorded by the device.
```APIDOC
## GET /api/events
### Description
Retrieves a list of events recorded by the device.
### Method
GET
### Endpoint
/api/events
```
--------------------------------
### Run Native Tests with PlatformIO CLI
Source: https://github.com/21cncstudio/project_aura/blob/main/TESTING.md
Execute native tests using the PlatformIO CLI. Ensure MSYS2 and PlatformIO CLI are installed and available in your PATH.
```powershell
& $env:USERPROFILE\.platformio\penv\Scripts\platformio.exe test -e native_test
```
--------------------------------
### Get Charts
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Retrieves chart data for various metrics. Allows filtering by core, gases, or PM, and by time window.
```APIDOC
## GET /api/charts
### Description
Retrieves chart data for various metrics.
### Method
GET
### Endpoint
/api/charts
### Parameters
#### Query Parameters
- **group** (string) - Optional - Specifies the data group to retrieve (e.g., core, gases, pm).
- **window** (string) - Optional - Specifies the time window for the data (e.g., 1h, 3h, 24h).
```
--------------------------------
### Build and Flash Firmware with PlatformIO
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Use these PlatformIO CLI commands to clone the repository, build the firmware, flash it to the device, upload the filesystem, and monitor serial output.
```powershell
git clone https://github.com/21cncstudio/project_aura.git
cd project_aura
pio run -e project_aura # build firmware
pio run -e project_aura -t upload # flash firmware
pio run -e project_aura -t uploadfs # flash LittleFS image (web/UI assets)
pio device monitor -b 115200 # serial monitor
```
--------------------------------
### Run Native Tests with Helper Script
Source: https://github.com/21cncstudio/project_aura/blob/main/TESTING.md
Utilize the provided PowerShell helper script to run native tests. This script simplifies the execution process.
```powershell
.\scripts\run_tests.ps1
```
--------------------------------
### Publish to GitHub Release
Source: https://github.com/21cncstudio/project_aura/blob/main/docs/releases/RELEASING.md
Publishes the firmware to a GitHub Release. Use -SkipReleaseUpdate to avoid metadata patching and -PruneAssetsToList to remove stale assets. By default, only the OTA firmware file is uploaded.
```powershell
powershell -ExecutionPolicy Bypass -File scripts\publish_github_release.ps1 -Version X.Y.Z -SkipReleaseUpdate -PruneAssetsToList
```
--------------------------------
### Upload Firmware (OTA)
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Initiates an Over-The-Air (OTA) firmware update by uploading a new firmware file.
```APIDOC
## POST /api/ota
### Description
Initiates an Over-The-Air (OTA) firmware update by uploading a new firmware file.
### Method
POST
### Endpoint
/api/ota
```
--------------------------------
### Project Aura Firmware Architecture Diagram
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
This diagram illustrates the data flow and responsibilities within the Project Aura firmware, showing the interaction between hardware components, core modules, data storage, and user interfaces.
```mermaid
graph TD
subgraph Hardware
Sensors[Sensors
SEN66, SFA30/SFA40, SEN0466, optional DFR gas, BMP58x/BMP3xx/DPS310]
Touch[Touch
GT911]
RTC[RTC
PCF8523 or DS3231]
DAC[DAC
GP8403]
Actuator[External Fan / Actuator]
LCD[LCD + Backlight]
end
subgraph Core
SM[SensorManager]
FC[FanControl]
NM[NetworkManager]
MM[MqttManager]
TM[TimeManager]
CoreLogic[BootPolicy / Watchdog / MemoryMonitor]
end
subgraph Data
History[PressureHistory]
Storage[(LittleFS
config/last_good/voc/pressure)]
end
subgraph UI
LVGL[LVGL UI]
Web[Web Config Portal]
end
Sensors -->|I2C| SM
RTC -->|I2C| TM
Touch -->|I2C| LVGL
LCD --> LVGL
SM -->|Data| LVGL
SM -->|Data| FC
SM -->|Data| History
FC -->|I2C| DAC
DAC -->|0-10V| Actuator
History <-->|save/load| Storage
Storage <-->|config| NM
Storage <-->|config| MM
NM --> Web
NM --> MM
MM -->|Publish| HA[Home Assistant]
style CoreLogic fill:#f96,stroke:#333,stroke-width:2px
```
--------------------------------
### Update Settings
Source: https://github.com/21cncstudio/project_aura/blob/main/README.md
Updates the device settings. This is a POST request to modify configuration parameters.
```APIDOC
## POST /api/settings
### Description
Updates the device settings.
### Method
POST
### Endpoint
/api/settings
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.