Skip to content

[SUBSCRIBER] Implement alert engine in processing pipeline #40

Closed
ezehf2 opened this issue Apr 5, 2026 · 0 comments
Closed

[SUBSCRIBER] Implement alert engine in processing pipeline #40

ezehf2 opened this issue Apr 5, 2026 · 0 comments
Assignees

Comments

@ezehf2
Copy link
Owner

ezehf2 commented Apr 5, 2026

Extend mqtt/subscriber.py or create a new alert_engine.py in the mqtt/ folder that checks each validated reading against the defined thresholds — temperature above 28°C, CO2 above 1000 ppm, noise above 85 dB, occupancy above room capacity. If a threshold is exceeded, call Timi's insert_alert() function to log it in the database. The alert should include the room, sensor type, value, threshold breached, and timestamp. Test by publishing a CO2 reading above 1000 ppm and confirming an alert row appears in the Alerts table. Commit with message [SUBSCRIBER] Add threshold alert engine.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants