Pool sensor v2: VCC monitoring, database resilience, receiver improvements

- Added voltage monitoring table and storage pipeline
- Extended pool payload to 17 bytes with VCC field (protocol v2)
- Improved database connection pool resilience (reduced pool size, aggressive recycling, pool disposal on failure)
- Added environment variable support for database configuration
- Fixed receiver MQTT deprecation warning (CallbackAPIVersion.VERSION2)
- Silenced excessive RSSI status logging in receiver
- Added reset flag tracking and reporting
- Updated Docker compose with DB config and log rotation limits
This commit is contained in:
2026-01-25 11:25:15 +00:00
parent d1c1f63cb9
commit f55c1fe6f1
9 changed files with 1512 additions and 101 deletions

View File

@@ -85,4 +85,13 @@ class Precipitation(Base):
sensor_id = Column(Integer, ForeignKey('sensors.id'))
sensor = relationship('Sensor', backref='precipitation')
timestamp = Column(DateTime, default=datetime.utcnow)
precipitation = Column(Float)
precipitation = Column(Float)
# Define the Voltage table
class Voltage(Base):
__tablename__ = 'voltage'
id = Column(Integer, primary_key=True)
sensor_id = Column(Integer, ForeignKey('sensors.id'))
sensor = relationship('Sensor', backref='voltage')
timestamp = Column(DateTime, default=datetime.utcnow)
vcc_mv = Column(Integer)