Skip to content

[SUBSCRIBER] Store validated messages in database #39

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

[SUBSCRIBER] Store validated messages in database #39

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

Comments

@ezehf2
Copy link
Owner

ezehf2 commented Apr 5, 2026

Update mqtt/subscriber.py so that valid incoming messages are passed to Timi's insert_reading() function in database.py rather than just printed to the console. Import the database module and call insert_reading() inside the on_message callback after validation passes. If validation fails the message should still be logged and rejected without being stored. Test by running the subscriber alongside the sensor publisher and confirming readings appear in the SQLite database. Commit with message [SUBSCRIBER] Store validated readings in database.

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

No branches or pull requests

2 participants