A-HAP v2 Sensor Library
These are the built-in sensor presets included in A-HAP v2. ESP32 sketches should send the listed raw telemetry channel names to A-HAP. Trigger logic, alerts, calculations, and output actions are then handled centrally by the A-HAP server.
Current built-in library
A-HAP v2 currently includes 35 built-in sensor presets across 12 categories. Use the channel keys shown below in ESP32 telemetry payloads.
How sensor readings are used
A-HAP stores readings under sensor channels. Any triggerable channel can be used for output triggers, schedule conditions, or email alert rules inside the server. Keep the ESP32 sketch focused on reading the sensor and sending the value; keep thresholds and actions in A-HAP.
Gas, smoke, CO, flame, load, and estimated values depend on the hardware, calibration, and installation. They are useful for automation and monitoring, but they are not a replacement for certified safety alarms.
Air / Gas
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| MH-Z19B CO2 Sensor | CO2 sensor with ppm output. | 30 sec |
|
| MQ-135 Air Quality Sensor | General air quality sensor for air quality, CO2 estimate and common gas estimate values. | 30 sec |
|
| MQ-2 Gas / Smoke Sensor | Smoke, LPG and combustible gas level sensor. Readings are estimates and not certified safety alarm values. | 30 sec |
|
| MQ-7 Carbon Monoxide Sensor | Carbon monoxide gas level sensor. Readings are estimates and not certified safety alarm values. | 30 sec |
|
| PMS5003 / PMS7003 Particulate Sensor | Particulate matter air quality sensor. | 30 sec |
|
| SGP30 Air Quality Sensor | Digital indoor air quality sensor for TVOC and equivalent CO2. | 30 sec |
|
Distance / Level
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| HC-SR04 Ultrasonic | Ultrasonic distance sensor. | 30 sec |
|
| JSN-SR04T Waterproof Ultrasonic | Waterproof ultrasonic distance sensor, useful for outdoor distance or tank level monitoring. | 30 sec |
|
Environment
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| BME280 | Temperature, humidity and atmospheric pressure sensor. | 60 sec |
|
| BMP280 | Temperature and atmospheric pressure sensor. | 60 sec |
|
| DHT11 | Basic temperature and humidity sensor. | 60 sec |
|
| DHT22 / AM2302 | Temperature and humidity sensor. | 60 sec |
|
| DS18B20 Waterproof Temperature Sensor | OneWire temperature sensor, commonly used for water or outdoor temperature. | 60 sec |
|
Fire / Flame
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| IR Flame Sensor | Infrared flame detection sensor. Not a certified fire alarm. | 10 sec |
|
Garden / Soil
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| Capacitive Soil Moisture Sensor | Analog soil moisture sensor for garden and irrigation use. | 60 sec |
|
Generic / Custom
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| Custom Sensor | User-defined sensor with custom data channels. | 60 sec | User-defined channels |
| Generic Analog Sensor | Generic analog input sensor. | 30 sec |
|
| Generic Digital Sensor | Generic digital on/off sensor. | 10 sec |
|
Light
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| BH1750 Light Sensor | Digital lux light sensor. | 30 sec |
|
| LDR Light Sensor | Analog light-dependent resistor sensor. | 30 sec |
|
Load / Weight
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| Force Sensitive Resistor / FSR | Analog force or pressure sensor useful for presence, touch, pressure pad or rough load detection. | 10 sec |
|
| Generic Load / Weight Sensor | Generic weight, load or strain sensor with user-calibrated output. | 10 sec |
|
| HX711 Load Cell Amplifier | Common 24-bit ADC module for load cells and strain gauge weight sensors. | 10 sec |
|
| HX711 Scale / Four Load Cell Kit | Common bathroom-scale style setup using four load cells through an HX711 amplifier. | 10 sec |
|
| NAU7802 Load Cell ADC | I2C 24-bit load cell ADC module for weighing, tension and force measurements. | 10 sec |
|
Motion / Orientation
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| MPU6050 Accelerometer / Gyro | Acceleration, gyroscope and tilt/orientation sensor. | 10 sec |
|
Motion / Security
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| PIR Motion Sensor | Passive infrared motion detection sensor. | 10 sec |
|
| Reed Switch / Door Sensor | Magnetic contact sensor for doors, windows, gates or lids. | 10 sec |
|
| SW-420 Vibration Sensor | Vibration or shock detection sensor. | 10 sec |
|
Power Monitoring
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| ACS712 Current Sensor | Analog current sensor. | 10 sec |
|
| PZEM-004T Power Sensor | AC voltage, current, power and energy monitoring sensor. | 10 sec |
|
Water
| Sensor preset | Common use | Default poll | Channels sent to A-HAP |
|---|---|---|---|
| Float Switch | Simple float switch for water level detection. | 10 sec |
|
| Rain Sensor | Rain or wetness detection module. | 30 sec |
|
| Water Leak Sensor | Water leak detection sensor. | 10 sec |
|
| YF-S201 Flow Sensor | Water flow rate sensor. | 10 sec |
|