Skip to content

[SUBSCRIBER] Build message validation logic #22

Closed
ezehf2 opened this issue Mar 11, 2026 · 0 comments
Closed

[SUBSCRIBER] Build message validation logic #22

ezehf2 opened this issue Mar 11, 2026 · 0 comments
Assignees

Comments

@ezehf2
Copy link
Owner

ezehf2 commented Mar 11, 2026

Extend subscriber.py to validate every incoming message before accepting it. Validation must check that the message is valid JSON, that all required fields are present (room, sensor_type, value, unit, timestamp), and that the value field is a number. Any message that fails validation must be rejected and logged with a clear error message explaining which field failed. Valid messages should be passed to the database insert function once Timi's database.py is ready. Commit with message [SUBSCRIBER] Add message validation logic and reference this issue.

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

No branches or pull requests

2 participants