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:
@@ -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)
|
||||
Reference in New Issue
Block a user