Summary
This issue proposes adding two new sensor modules to OpenMQTTGateway:
- GPS sensor module — reads NMEA data via TinyGPS++ over hardware UART or software serial
- PMU sensor module — monitors AXP2101 power management chip (battery voltage, charging status, temperature, etc.)
These modules are designed for ESP32 boards with integrated GPS + LoRa + PMU (e.g., TTGO T-Beam), but are fully multi-platform (ESP32, ESP8266, AVR).
GPS Module (sensorGPS.cpp + config_GPS.h)
- Supports hardware UART (0/1/2/3) and software serial fallback
- Configurable pins, baud rate, and read interval
- Publishes: satellite count, latitude, longitude, altitude, date, time
- Platform-aware pin defaults (ESP32, ESP8266, ATmega2560, Arduino Uno)
PMU Module (sensorPMU.cpp + config_PMU.h)
- AXP2101 initialization and configuration
- Voltage regulators for ESP32, LoRa, GPS power rails
- Battery monitoring: voltage, percentage, charging status, VBUS, system voltage, temperature
- Low-battery warning and shutdown thresholds
- Charging LED control, fuel gauge learning
- Interrupt-driven IRQ handling
Both modules follow existing upstream conventions:
.cpp files (not .ino)
THEENGS_LOG_* macros for logging
enqueueJsonObject() for publishing data
#include "TheengsCommon.h" pattern
- GPLv3 license headers
The implementation is available in my fork for reference:
https://github.com/khengari77/TDOA-tracker/tree/development/main
Would the maintainers be interested in these additions? Happy to adjust based on feedback before submitting a formal PR.
Summary
This issue proposes adding two new sensor modules to OpenMQTTGateway:
These modules are designed for ESP32 boards with integrated GPS + LoRa + PMU (e.g., TTGO T-Beam), but are fully multi-platform (ESP32, ESP8266, AVR).
GPS Module (
sensorGPS.cpp+config_GPS.h)PMU Module (
sensorPMU.cpp+config_PMU.h)Both modules follow existing upstream conventions:
.cppfiles (not.ino)THEENGS_LOG_*macros for loggingenqueueJsonObject()for publishing data#include "TheengsCommon.h"patternThe implementation is available in my fork for reference:
https://github.com/khengari77/TDOA-tracker/tree/development/main
Would the maintainers be interested in these additions? Happy to adjust based on feedback before submitting a formal PR.