You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: