Skip to content

⚖️ Simplify data model ⚖️ #90

@Terkwood

Description

@Terkwood

Simplify data model

Description

This change set simplifies the flow of data so that we deal with two main abstractions:

  • devices which may hold arbitrary sensor reading data: temp, humidity, or PH
  • areas to which devices are attached

Sensor readings flow onto devices, and the devices being linked to individual areas drives the display in the LED status helper, and in the web app.

The introduction of the DHT11 sensor in #89 was done in a sloppy manner, introducing a dichotomy between "tanks" and "areas". "Tanks" are no longer tracked, they're just called "areas".

"Sensors" in Redis are renamed to "devices". This ends the distinction between a PH sensor, a temp sensor, or a DHT11 sensor. Every sensor reading simply attaches to a single Redis device record, so matter how many individual sensors are wired up to that device.

Components altered

  • sensor_tracker
  • redis_aggregator
  • pond
  • led_status_helper
  • frontend
  • ph_ref_calibration (be careful with the redis values!)

Testing strat

  • Use a testing namespace!
  • Pi: use images tagged as :fix_data on the build server 🔬

Branch info

We are working in the fix/data branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestservices.rsMiddleware & data management written in rust

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions