diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index 6facc0e5fd9e2d467950c6dbd043cbcd1aee4074..1ff0c2d31d22eec4c497dbcd8d3a1875a0cb9a22 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -647,3 +647,46 @@ This doctype is used to store the different version of the terms of the applicat | acceptedAt | DateTime | The date when the Cozy user accepted these terms | | termsId | string | The id of the terms | | version | string | The version number | + +## MaxPower + +### Description + +This doctype is used to store the enedis maxpower values retrieved by the konnector on a daily basis. The value is in kVA. + +### Doctype + +**`com.grandlyon.enedis.maxpower`** + +### Structure + +| Field | Type | Description | +| ------ | ------ | ---------------------------------------------------------------- | +| load | number | maxPower in kVA | +| minute | number | minute of the date | +| hour | number | hour of the date | +| day | number | day of the date | +| month | number | month of the date | +| year | number | year of the date | + + +## Enedis Monthly Analysis Data + +### Description + +This doctype is used to store the enedis monthly analysis, it includes the month average half-hour consumption for weekdays and weekends, the minimum half-hour load, and the max power consumption of the month. + +### Doctype + +**`com.grandlyon.enedis.monthly.analysis.data`** + +### Structure + +| Field | Type | Description | +| ------- | -------------- | ------------------------------------------------------------------------------------------ | +| weekDaysHalfHourAverageValues | number[] | Half-hour average value for week days (monday to friday) | +| weekEndDaysHalfHourAverageValues | number[] | Half-hour average value for weekend days (saturday and sunday) | +| month | number | Month of the analysis | +| year | number | Year of the analysis | +| minLoad | number or null | Minimum half hour load of the month | +| maxPower | number or null | Max power value of the month | diff --git a/docs/ecolyo/services/enedis_halfhour_monthly_analysis.md b/docs/ecolyo/services/enedis_halfhour_monthly_analysis.md index 056d7913ae56522740b159ea760f363355de5bdb..2a15fea7630b10f3e6850a37da63354c9edcf848 100644 --- a/docs/ecolyo/services/enedis_halfhour_monthly_analysis.md +++ b/docs/ecolyo/services/enedis_halfhour_monthly_analysis.md @@ -49,19 +49,16 @@ weekEndValuesArray : [ ``` - Once the array is filled with all available values, we just have to calculate the average for each half-hour step -****Insert minimum cons value part once it's done**** - +- The **minimum value** is calculated by the *getMonthMinLoad* function, it takes the complete week and weekend values arrays as parameters and return the minimum value, excluding -1 (empty values), and 0 (null values). +- The **maxPower** value is fetched from the doctype *com.grandlyon.enedis.maxpower*, the value is stored on a daily basis, so take the maximum value for the given month. - The result is stored in *com.grandlyon.enedis.monthly.analysis.data* according to the following model : ``` EnedisMonthlyAnalysisData { - weekDays: { - halfHourAverageValues: number[] - } - weekEndDays: { - halfHourAverageValues: number[] - } + weekDaysHalfHourAverageValues: number[] + weekEndDaysHalfHourAverageValues: number[] minLoad: number + maxPower: number month: number year: number } diff --git a/docs/konnectors/enedis.md b/docs/konnectors/enedis.md index 1eb843b4c510845b5f04d30cf8eecba4c955b645..2bf0677908d8b24a69dabd9199d2a3d6ae9102c1 100644 --- a/docs/konnectors/enedis.md +++ b/docs/konnectors/enedis.md @@ -36,6 +36,9 @@ Route : **/v4/metering_data/consumption_load_curve** Method : **GET** Route : **/v4/metering_data/daily_consumption** +Method : **GET** + +Route : **/v4/metering_data/daily_consumption_max_power** ```json "params": @@ -72,6 +75,7 @@ For more information about Datahub-Enedis API, checkout the [Datahub documentati | formateData | Format data for DB storage and remove bad data | | buildAgregatedData | Retrieve and remove old data for a specific doctype and return an array of agregated data | | buildDataFromKey | Format an entry for DB storage using key and value. For year doctype: key = "YYYY". For month doctype: key = "YYYY-MM" | +| getMaxPower | Retrieve data from the maxPower API. Format: `{ value: "kVA", "date": "YYYY-MM-DD" }` | | isHistoryLoaded | Function checking if the history is loaded | | resetInProgressAggregatedData | Function handling special case.The temporary aggregated data need to be remove in order for the most recent one te be saved. Ex for com.grandlyon.enedis.year : `{ load: 76.712, year: 2020, ... }` need to be replace by `{ load: 82.212, year: 2020, ... }` after enedis data reprocess |