christoff-linde / pih-esp

ESP32 Firware for PIH
MIT License
0 stars 0 forks source link

Combine sensor readings into a single reading #9

Closed christoff-linde closed 1 month ago

christoff-linde commented 1 month ago

Currently, the temperature and humidity is sent to RabbitMQ as separate messages (i.e. one message for temperature data and one message for humidity data). While this works, it does create problems for writing to the database. Ideally, they can just be combined into one message. This would reduce the total amount of calls to RabbitMQ, and will potentially simplify data processing.

A better schema for the published messages could be:

{
  "device_id": "esp32-ee012",
  "temperature": 14.54,
  "humidity": 56.12
}
linear[bot] commented 1 month ago

CHR-54 Combine sensor readings into a single reading