d-rec / drec-origin

D-REC Origin
https://d-rec.github.io/drec-origin/
GNU General Public License v3.0
8 stars 1 forks source link

Feat: Storing failed meter reads #432

Closed Kingcedru closed 2 weeks ago

Kingcedru commented 1 month ago

Objective

To create a Model for the influx db that will store the Meter Reads for the failed analytics and store them

Description

Acceptance Criteria

Kingcedru commented 3 weeks ago

The function I create receives one parameter unit because if I use two parameters the function will only be used when storingFailedReads method yet there are other places we are converting to different units. I decided to use the NewroundMeasurementsToUnit method because it is used when recording new reads and it returns the unit with a Wh value. This means each read value in the project must be converted to 'Wh' even if it was submitted in a different unit.