From e625b69a0010ca9a11e2838edc249a26bee6ecd0 Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Thu, 3 Nov 2022 08:06:21 +0000 Subject: [PATCH] Update doctypes.md --- docs/ecolyo/project_architecture/doctypes.md | 1400 +++++++++--------- 1 file changed, 708 insertions(+), 692 deletions(-) diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index 7acbb18..6ca2855 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -1,692 +1,708 @@ -# Doctypes - -## Timeseries doctypes - -**Description :** - -Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: - -- **half an hour** - use `com.grandlyon.\*.minute` doctype -- **day** - use `com.grandlyon.\*.day` doctype -- **month** - use `com.grandlyon.\*.month` doctype -- **year** - use `com.grandlyon.\*.year` doctype - -**Doctype :** - -Here are the available doctypes: - -| Fluid type | Doctype wildcard | Doctypes | -| ------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| electricity fluid / enedis | **`com.grandlyon.enedis.*`** | **`com.grandlyon.enedis.minute`**<br>**`com.grandlyon.enedis.day`**<br>**`com.grandlyon.enedis.month`**<br>**`com.grandlyon.enedis.year`** | -| gas fluid / grdf | **`com.grandlyon.grdf.*`** | **`com.grandlyon.grdf.day`**<br>**`com.grandlyon.grdf.month`**<br>**`com.grandlyon.grdf.year`** | -| water fluid / eau du grand lyon | **`com.grandlyon.egl.*`** | **`com.grandlyon.egl.day`**<br>**`com.grandlyon.egl.month`**<br>**`com.grandlyon.egl.year`** | - -**Structure :** - -| Field | Type | Description | -| ------ | ------ | ---------------------------------------------------------------- | -| load | number | load (in kWh or L) | -| minute | number | minute of the date<br>_set to 0 except for minute serie_ | -| hour | number | hour of the date<br>_set to 0 except for minute and hour series_ | -| day | number | day of the date<br>_set to 1 for month and year series_ | -| month | number | month of the date<br>_set to 1 for year series_ | -| year | number | year of the date | - -Example: - -```json -{ - "load": 770.18, - "minute": 0, - "hour": 0, - "day": 1, - "month": 1, - "year": 2020 -} -``` - -## User profile - -**Description :** - -This doctype is used to store all information about the user. - -**Doctype:** - -**`com.grandlyon.ecolyo.profile`** - -**Structure:** - -| Field | Type | Description | -| ------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| id | string | Profile id | -| ecogestureHash | string | Hash used to verify the content of ecogestures | -| challengeHash | string | Hash used to verify the content of challenges | -| duelHash | string | Hash used to verify the content of duels | -| quizHash | string | Hash used to verify the content of quiz | -| explorationHash | string | Hash used to verify the content of exploration | -| isFirstConnection | boolean | Boolean used to inform if the user connects for the first time | -| lastConnectionDate | DateTime | Date of the last user connection | -| haveSeenLastAnalysis | boolean | Boolean used to inform if user has seen the last analysis | -| haveSeenOldFluidModal | Datetime or boolean | Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it | -| sendAnalysisNotification | boolean | Boolean used to inform if user has seen the analysis notification | -| monthlyAnalysisDate | DateTime | Date of the last monthly analysis | -| profileType | ProfileType | User consumption profile | -| isProfileTypeCompleted | boolean | Check if a user has completed his consumption profile | -| showConsentModal | boolean | Boolean used to show the terms acceptation page, and to protect the app private routes if last terms are not accepted or outdated | - -**Example:** - -```json -{ - "id": "0e016e853592e18155e87b85ce00a33a", - "challengeHash": "4cbcafe514788757c377534f1a407e022c29e38c", - "duelHash": "48371ffabb2853b0503b882f11e1fa8e730bac76", - "ecogestureHash": "9798a0aaccb47cff906fc4931a2eff5f9371dd8b", - "haveSeenLastAnalysis": true, - "haveSeenOldFluidModal": false, - "isFirstConnection": false, - "lastConnectionDate": "2021-03-08T17:33:18.727Z", - "monthlyAnalysisDate": "2021-01-03T00:00:00.000+01:00", - "quizHash": "11372a56c03edef1d6656f8a76d5ec457174f2c1", - "explorationHash": "cdbc7a84d041318253a10b3cc0c02f9020c78c0b", - "sendAnalysisNotification": false, - "profileType": { - "area": "123", - "coldWater": "individual", - "constructionYear": "between_1948_and_1974", - "cookingFluid": 0, - "floor": "not_applicable", - "hasInstalledVentilation": "yes", - "hasReplacedHeater": "yes", - "heating": "individual", - "hotWater": "individual", - "hotWaterEquipment": "solar", - "hotWaterFluid": 0, - "housingType": "individual_house", - "individualInsulationWork": [ - "roof_insulation" - ], - "occupantsNumber": 1, - "outsideFacingWalls": "2", - "warmingFluid": 0 - }, - "isProfileTypeCompleted": true, - "showConsentModal": true -} -``` - -## Ecogesture - -**Description :** - -This doctype is used to store ecogestures. - -**Doctype:** - -**`com.grandlyon.ecolyo.ecogesture`** - -**Structure:** - -| Field | Type | Description | -| --------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| id | string | ecogesture id | -| shortName | string | short name of the ecogesture | -| longName | string | long name of the ecogesture | -| longDescription | string | long description of the ecogesture | -| usage | Usage | usage of the ecogesture<br><br>_Usage enum:_<br>- _ALL = 0_<br>- _HEATING = 1_<br>- _AIR_CONDITIONING = 2_<br>- _ECS = 3_<br>- _COLD_WATER = 4_<br>- _ELECTRICITY_SPECIFIC = 5_<br>- _COOKING = 6_ | -| fluidTypes | FluidType[] | Array of fluid type on which ecogesture can have an impact<br><br>_FluidType enum:_<br>- _ELECTRICITY = 0_<br>- _WATER = 1_<br>- _GAS = 2_<br>- _MULTIFLUID = 3_ | -| impactLevel | number | impact level of the ecogesture | -| efficiency | number | efficiency of the ecogesture | -| difficulty | number | difficulty of the ecogesture | -| room | Room | room affected by the ecogesture<br><br>_Room enum:_<br>- _ALL = 0_<br>- _BATHROOM = 1_<br>- _KITCHEN = 2_<br>- _LAUNDRY = 3_<br>- _TOILET = 4_ | -| season | Season | season suited to the ecogesture<br><br>_Season enum:_<br>- _NONE = 'Sans saison'_<br>- _WINTER = 'Hiver'_<br>- _SUMMER = 'Été'_ | -| equipment | boolean | used to know if one or more equipment are affected by the ecogesture | -| equipmentType | EquipmentType[] | equipment affected by the ecogesture<br><br>_EquipmentType enum:_<br>- _AIR_CONDITIONING = 0_<br>- _COMPUTER = 1_<br>- _MICROWAVE = 2_<br>- _OVEN = 3_<br>- _WASHING_MACHINE = 4_<br>- _DISHWASHER = 5_<br>- _COOKING_PLATES = 6_<br>- _DRYER = 7_<br>- _REFREGIRATOR = 8_<br>- _GARDEN = 9_<br>- _WATER_HEATER = 10_<br>- _FAN = 11_<br>- _CURTAIN = 12_<br>- _INTERNET_BOX = 13_<br>- _VENTILATION = 14_<br>- _FREEZER = 15_<br>- _BOILER = 16_<br>- _HYDRAULIC_HEATING = 17_ | -| equipmentInstallation | boolean | used to know if it is required an installation | -| investment | string or null | investment required | -| action | boolean | used to know if the ecogesture is used for action challenge | -| actionName | string or null | action description of the ecogesture | -| actionDuration | number | duration required to do an action challenge | - -**Example:** - -```json -{ - "shortName": "Déesse des eaux", - "longName": "Je coupe l'eau de la douche pendant que je me savonne.", - "longDescription": "Si vous n’êtes pas frileux, coupez l'eau pendant que vous vous savonnez : l'économie en eau peut aller jusqu'à 50% !", - "usage": 3, - "fluidTypes": [ - 1 - ], - "impactLevel": 5, - "investment": null, - "room": [ - 1 - ], - "difficulty": 1, - "efficiency": 4, - "season": "Sans saison", - "action": true, - "actionDuration": 3, - "actionName": "Je coupe l'eau de la douche pendant que je me savonne.", - "equipment": false, - "equipmentInstallation": true, - "equipmentType": [], - -} -``` - -## Challenge - -**Description :** - -This doctype is used to store all challenges. - -**Doctype:** - -**`com.grandlyon.ecolyo.challenge`** - -**Structure:** - -| Field | Type | Description | -| ------------- | ------ | ------------------------------------------------- | -| \_id | string | challenge id - respect the format _CHALLENGE000X_ | -| title | string | title of the challenge | -| description | string | description of the challenge | -| target | number | The number of stars required to unlock the duel | -| relationships | any | relation to quiz and duel | - -**Example:** - -```json - { - "_id": "CHALLENGE0001", - "title": "Nicolas Hublot", - "description": "foobar", - "target": 15, - "relationships": { - "quiz": { - "data": { "_id": "QUIZ001", "_type": "com.grandlyon.ecolyo.quiz" } - }, - "exploration": { - "data": { "_id": "EXPLORATION001", "_type": "com.grandlyon.ecolyo.exploration" } - }, - "duel": { - "data": { "_id": "DUEL001", "_type": "com.grandlyon.ecolyo.duel" } - } - } - } -``` - -## User challenge - -**Description :** - -This doctype is used to store all additional information about a challenge started or ended by the user. - -**Doctype:** - -**`com.grandlyon.ecolyo.userchallenge`** - -**Structure:** - -| Field | Type | Description | -| ----------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| id | string | userChallenge id | -| title | string | userChallenge title | -| state | UserChallengeState | state of the challenge<br><br>UserChallengeState enum<br>- _LOCKED = 0_<br>- _UNLOCKED = 1_<br>- _ONGOING = 2_<br>- _DUEL = 3_<br>- _DONE = 4_ | -| target | number | Number of stars required to unlock the duel | -| progress | ChallengeProgress | Number of stars earned by the user for each challenge<br><br>ChallengeProgress enum<br>- _quizzProgress: number_<br>- _explorationProgress: number_<br>- _actionProgress: number_ | -| quiz | UserQuiz | Complete Quiz object with progress | -| exploration | UserExploration | Complete Exploration object with progress | -| action | UserActionEntity | Complete Action object | -| duel | UserDuelEntity | Complete Duel object with progress included | -| success | UserChallengeSuccess | Success state of the challenge<br><br>UserChallengeSuccess enum<br>- _ONGOING = 0_<br>- _LOST = 1_<br>- _WIN = 2_ | -| startDate | string null | starting date of the the challenge | -| endingDate | string null | ending date of the challenge | - -**Example:** - -```json -{ - "_id": "eae3a79a05d677a739bdd2b46b009936", - "description": "foobar", - "duel": { - "description": "Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION € en 1 semaine", - "duration": { - "days": 7 - }, - "fluidTypes": [ - 0, - 1, - 2 - ], - "id": "DUEL001", - "startDate": null, - "state": 4, - "threshold": -1, - "title": "Nicolas Hublot", - "userConsumption": 0 - }, - "endingDate": null, - "id": "CHALLENGE0001", - "progress": { - "actionProgress": 0, - "explorationProgress": 0, - "quizProgress": 0 - }, - "quiz": { - "customQuestion": { - "interval": 30, - "period": {}, - "questionLabel": "Quel jour ai-je le plus consommé la semaine dernière ?", - "result": 1, - "timeStep": 20, - "type": 0 - }, - "id": "QUIZ001", - "questions": [ - { - "answers": [ - { - "answerLabel": "Vapeur d'eau", - "isTrue": false - }, - { - "answerLabel": "Fumée", - "isTrue": false - }, - { - "answerLabel": "Gouttelettes d'eau et cristaux de glace", - "isTrue": true - } - ], - "explanation": "Les nuages sont constitués de gouttelettes d'eau et parfois aussi de cristaux de glace", - "questionLabel": "De quoi les nuages sont-ils constitués ?", - "result": 1, - "source": "string" - }, - { - "answers": [ - { - "answerLabel": "86 km", - "isTrue": true - }, - { - "answerLabel": "78 km", - "isTrue": false - }, - { - "answerLabel": "56 km", - "isTrue": false - } - ], - "explanation": "L’aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant alimenté la ville en eau, et celui dont les structures sont le mieux conservées. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rhône", - "questionLabel": "Quelle longueur faisait l’aqueduc du Gier pour acheminer l’eau sur Lyon à l’époque romaine ?", - "result": 1, - "source": "string" - }, - { - "answers": [ - { - "answerLabel": "Crémieux", - "isTrue": false - }, - { - "answerLabel": "Crépieux-Charmy", - "isTrue": true - }, - { - "answerLabel": "Charly", - "isTrue": false - } - ], - "explanation": "Crépieux-Charmy est le principal champ captant de la Métropole de Lyon", - "questionLabel": "Quelle est le nom du principal champ de captage d’eau potable de la Métropole ?", - "result": 1, - "source": "string" - }, - { - "answers": [ - { - "answerLabel": "Pompe à air", - "isTrue": false - }, - { - "answerLabel": "Pompe à cordes", - "isTrue": true - }, - { - "answerLabel": "Pompe de Cornouailles", - "isTrue": false - } - ], - "explanation": "Mise en fonctionnement en 1856, 3 pompes à vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.", - "questionLabel": "Quelle type de pompes étaient utilisées à l'usine des eaux de Caluire jusqu'en 1910 ?", - "result": 1, - "source": "string" - } - ], - "result": 5, - "state": 2 - }, - "exploration": { - "id": "EXPLORATION001", - "date": "2021-01-13T17:03:11.964Z", - "description": "Consultez 3 fois Ecolyo", - "ecogesture_id": "", - "fluid_condition": [], - "message_success": "Vous vous êtes connecté 3 fois à Ecolyo", - "progress": 0, - "state": 2, - "target": 3, - "type": 2 - }, - "action": { - "ecogesture": { - "_id": "ECOGESTURE0004", - "_rev": "3-da2ad5c7b81e4260e2254c98ec6ee971", - "_type": "com.grandlyon.ecolyo.ecogesture", - "action": true, - "actionDuration": 3, - "actionName": "Je coupe l'eau de la douche pendant que je me savonne.", - "cozyMetadata": { - "createdAt": "2021-03-08T09:52:41.029Z", - "createdByApp": "Ecolyo", - "createdByAppVersion": "1.0.4", - "metadataVersion": 1, - "updatedAt": "2021-03-08T09:52:41.029Z", - "updatedByApps": [ - { - "date": "2021-03-08T09:52:41.029Z", - "slug": "Ecolyo", - "version": "1.0.4" - } - ] - }, - "difficulty": 1, - "efficiency": 2.5, - "equipment": false, - "equipmentInstallation": true, - "equipmentType": [], - "fluidTypes": [ - 1 - ], - "id": "ECOGESTURE0004", - "impactLevel": 5, - "investment": null, - "longDescription": "Si vous n’êtes pas frileux, coupez l'eau pendant que vous vous savonnez : l'économie en eau peut aller jusqu'à 50% !", - "longName": "Je coupe l'eau de la douche pendant que je me savonne.", - "room": [ - 1 - ], - "season": "Sans saison", - "shortName": "Déesse des eaux", - "usage": 3 - }, - "startDate": "2021-03-09T17:57:44.600Z", - "state": 1 - }, - "startDate": "2021-01-04T00:00:00.000Z", - "state": 3, - "success": 0, - "target": 15, - "title": "Nicolas Hublot" -} -``` - -## Quiz - -**Description :** - -This doctype is used to store all quiz. - -**Doctype:** - -**`com.grandlyon.ecolyo.quiz`** - -**Structure:** - -| Field | Type | Description | -| -------------- | -------------------- | ------------------------------------------- | -| \_id | string | quiz id - respect the format _QUIZ00X_ | -| questions | QuestionEntity[] | Array of questions entities | -| customQuestion | CustomQuestionEntity | Custom question based on user's consumption | - -**Example:** - -```json -{ - "_id": "QUIZ001", - "questions": [ - { - "questionLabel": "Quelle longueur faisait l’aqueduc du Gier pour acheminer l’eau sur Lyon à l’époque romaine ?", - "answers": [ - { "answerLabel": "86 km", "isTrue": true }, - { - "answerLabel": "78 km", - "isTrue": false - }, - { - "answerLabel": "56 km", - "isTrue": false - } - ], - "explanation": "L’aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant alimenté la ville en eau, et celui dont les structures sont le mieux conservées. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rhône", - "source": "string" - }, - { - "questionLabel": "Quelle type de pompes étaient utilisées à l'usine des eaux de Caluire jusqu'en 1910 ?", - "answers": [ - { - "answerLabel": "Pompe à cordes", - "isTrue": true - }, - { - "answerLabel": "Pompe de Cornouailles", - "isTrue": false - }, - { - "answerLabel": "Pompe à air", - "isTrue": false - } - ], - "explanation": "Mise en fonctionnement en 1856, 3 pompes à vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.", - "source": "string" - }, - { - "questionLabel": "Quelle est le nom du principal champ de captage d’eau potable de la Métropole ?", - "answers": [ - { "answerLabel": "Crémieux", "isTrue": false }, - { - "answerLabel": "Crépieux-Charmy", - "isTrue": true - }, - { - "answerLabel": "Charly", - "isTrue": false - } - ], - "explanation": "Crépieux-Charmy est le principal champ captant de la Métropole de Lyon", - "source": "string" - }, - { - "questionLabel": "De quoi les nuages sont-ils constitués ?", - "answers": [ - { "answerLabel": "Vapeur d'eau", "isTrue": false }, - { - "answerLabel": "Fumée", - "isTrue": false - }, - { - "answerLabel": "Gouttelettes d'eau et cristaux de glace", - "isTrue": true - } - ], - "explanation": "Les nuages sont constitués de gouttelettes d'eau et parfois aussi de cristaux de glace", - "source": "string" - } - ], - "customQuestion": { - "questionLabel": "Quel jour ai-je le plus consommé la semaine dernière ?", - "type": 0, - "timeStep": 20, - "interval": 30, - "period": {}, - "singleFluid": true - } - } -``` - -## Exploration - -**Description :** - -This doctype is used to store all explorations. - -**Doctype:** - -**`com.grandlyon.ecolyo.exploration`** - -**Structure:** - -| Field | Type | Description | -| --------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| \_id | string | exploration id - respect the format _EXPLORATION00X_ | -| state | UserExplorationState | State of the exploration<br><br>UserExplorationState enum<br>- _UNLOCKED = 0_<br>- _ONGOING = 1_<br>- _DONE = 2_ | -| description | string | description of the exploration | -| target | number | number of stars required to unlock an exploration | -| type | UserExplorationType | type of the exploration<br><br>UserExplorationType enum<br>- _DECLARATIVE = 0_<br>- _ACTION = 1_<br>- _CONSUMPTION = 2_<br>- _ECOGESTURE = 3_ | -| date | string or null | date of the exploration | -| ecogesture_id | string | ecogesture id | -| fluid_condition | FluidType[] | Array of fluid type on which an exploration can have an impact<br><br>_FluidType enum:_<br>- _ELECTRICITY = 0_<br>- _WATER = 1_<br>- _GAS = 2_<br>- _MULTIFLUID = 3_ | -| message_success | string | message when exploration is done | - -**Example:** - -```json - { - "_id": "EXPLORATION001", - "description": "Consultez l'écogeste Chat échaudé", - "target": 1, - "type": 3, - "date": null, - "ecogesture_id": "0032", - "fluid_condition": [], - "message_success": "Vous avez consulté l'écogeste Chat échaudé", - "state": 0, - } -``` - -## Duel - -**Description :** - -This doctype is used to store all duels. - -**Doctype:** - -**`com.grandlyon.ecolyo.duel`** - -**Structure:** - -| Field | Type | Description | -| ----------- | -------- | -------------------------------------- | -| \_id | string | duel id - respect the format _DUEL00X_ | -| title | string | title of the duel | -| description | string | description of the duel | -| duration | Duration | Luxon Duration of the duel | - -**Example:** - -```json - { - "_id": "DUEL001", - "title": "Nicolas Hublot", - "description": "Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION € en 1 semaine", - "duration": { "days": 7 } - } -``` - -## Usage event - -**Description :** - -This doctype is used to store all usage events. - -**Doctype:** - -**`com.grandlyon.ecolyo.usageevent`** - -**Structure:** - -| Field | Type | Description | -| ------- | -------------- | ------------------------------------------------------------------------------------------ | -| date | DateTime | Date of the event | -| type | UsageEventType | Type of the event | -| target | string | Targeted konnector, page, challenge, quiz, exploration, action or timeStep | -| result | string | Result for KonnectorConnectEvent or KonnectorRefreshEvent.<br>Values: "success" or "error" | -| context | string | Luxon Duration of the duel | - -## Terms - -**Description :** - -This doctype is used to store the different version of the terms of the application. - -**Doctype:** - -**`io.cozy.terms`** - -**Structure:** - -| Field | Type | Description | -| ---------- | -------- | ----------------------------------------------------------------- | -| accepted | boolean | The fact that the terms has been accepted by the Cozy user or not | -| 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 | +# Doctypes + +In the cozy self data context, each data is storred in a **doctype**. Their primary use is for permissions: an app (`manifest.webapp`) or konnector (`manifest.konnector`) will request permissions for one or several doctypes and will not be able to access other doctypes. See [Doctypes documentation](https://docs.cozy.io/en/cozy-doctypes/docs/#doctypes) for more information. + +## Manipulate data with ACH + +On a local environment, you can direclty consult the couch db and interract with doctypes. But on a hosted environment like on alpha, couch db is not exposed. + +You will need to cozy ACH _Automated Cozy Hydrater_ to manipulate data. See [ACH doc](https://docs.cozy.io/en/ach/#ach). + +Usage example : +```sh +ACH -t TOKEN -u COZY_URL export com.grandlyon.enedis.minute ./result.json +``` + +!!! info "" + The url must not contains an app or home in it. https://~~ecolyo~~.jhon.cozygrandlyon.cloud + +## Timeseries doctypes + +**Description :** + +Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step: + +- **half an hour** - use `com.grandlyon.\*.minute` doctype +- **day** - use `com.grandlyon.\*.day` doctype +- **month** - use `com.grandlyon.\*.month` doctype +- **year** - use `com.grandlyon.\*.year` doctype + +**Doctype :** + +Here are the available doctypes: + +| Fluid type | Doctype wildcard | Doctypes | +| ------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| electricity fluid / enedis | **`com.grandlyon.enedis.*`** | **`com.grandlyon.enedis.minute`**<br>**`com.grandlyon.enedis.day`**<br>**`com.grandlyon.enedis.month`**<br>**`com.grandlyon.enedis.year`** | +| gas fluid / grdf | **`com.grandlyon.grdf.*`** | **`com.grandlyon.grdf.day`**<br>**`com.grandlyon.grdf.month`**<br>**`com.grandlyon.grdf.year`** | +| water fluid / eau du grand lyon | **`com.grandlyon.egl.*`** | **`com.grandlyon.egl.day`**<br>**`com.grandlyon.egl.month`**<br>**`com.grandlyon.egl.year`** | + +**Structure :** + +| Field | Type | Description | +| ------ | ------ | ---------------------------------------------------------------- | +| load | number | load (in kWh or L) | +| minute | number | minute of the date<br>_set to 0 except for minute serie_ | +| hour | number | hour of the date<br>_set to 0 except for minute and hour series_ | +| day | number | day of the date<br>_set to 1 for month and year series_ | +| month | number | month of the date<br>_set to 1 for year series_ | +| year | number | year of the date | + +Example: + +```json +{ + "load": 770.18, + "minute": 0, + "hour": 0, + "day": 1, + "month": 1, + "year": 2020 +} +``` + +## User profile + +**Description :** + +This doctype is used to store all information about the user. + +**Doctype:** + +**`com.grandlyon.ecolyo.profile`** + +**Structure:** + +| Field | Type | Description | +| ------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| id | string | Profile id | +| ecogestureHash | string | Hash used to verify the content of ecogestures | +| challengeHash | string | Hash used to verify the content of challenges | +| duelHash | string | Hash used to verify the content of duels | +| quizHash | string | Hash used to verify the content of quiz | +| explorationHash | string | Hash used to verify the content of exploration | +| isFirstConnection | boolean | Boolean used to inform if the user connects for the first time | +| lastConnectionDate | DateTime | Date of the last user connection | +| haveSeenLastAnalysis | boolean | Boolean used to inform if user has seen the last analysis | +| haveSeenOldFluidModal | Datetime or boolean | Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it | +| sendAnalysisNotification | boolean | Boolean used to inform if user has seen the analysis notification | +| monthlyAnalysisDate | DateTime | Date of the last monthly analysis | +| profileType | ProfileType | User consumption profile | +| isProfileTypeCompleted | boolean | Check if a user has completed his consumption profile | +| showConsentModal | boolean | Boolean used to show the terms acceptation page, and to protect the app private routes if last terms are not accepted or outdated | + +**Example:** + +```json +{ + "id": "0e016e853592e18155e87b85ce00a33a", + "challengeHash": "4cbcafe514788757c377534f1a407e022c29e38c", + "duelHash": "48371ffabb2853b0503b882f11e1fa8e730bac76", + "ecogestureHash": "9798a0aaccb47cff906fc4931a2eff5f9371dd8b", + "haveSeenLastAnalysis": true, + "haveSeenOldFluidModal": false, + "isFirstConnection": false, + "lastConnectionDate": "2021-03-08T17:33:18.727Z", + "monthlyAnalysisDate": "2021-01-03T00:00:00.000+01:00", + "quizHash": "11372a56c03edef1d6656f8a76d5ec457174f2c1", + "explorationHash": "cdbc7a84d041318253a10b3cc0c02f9020c78c0b", + "sendAnalysisNotification": false, + "profileType": { + "area": "123", + "coldWater": "individual", + "constructionYear": "between_1948_and_1974", + "cookingFluid": 0, + "floor": "not_applicable", + "hasInstalledVentilation": "yes", + "hasReplacedHeater": "yes", + "heating": "individual", + "hotWater": "individual", + "hotWaterEquipment": "solar", + "hotWaterFluid": 0, + "housingType": "individual_house", + "individualInsulationWork": [ + "roof_insulation" + ], + "occupantsNumber": 1, + "outsideFacingWalls": "2", + "warmingFluid": 0 + }, + "isProfileTypeCompleted": true, + "showConsentModal": true +} +``` + +## Ecogesture + +**Description :** + +This doctype is used to store ecogestures. + +**Doctype:** + +**`com.grandlyon.ecolyo.ecogesture`** + +**Structure:** + +| Field | Type | Description | +| --------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | string | ecogesture id | +| shortName | string | short name of the ecogesture | +| longName | string | long name of the ecogesture | +| longDescription | string | long description of the ecogesture | +| usage | Usage | usage of the ecogesture<br><br>_Usage enum:_<br>- _ALL = 0_<br>- _HEATING = 1_<br>- _AIR_CONDITIONING = 2_<br>- _ECS = 3_<br>- _COLD_WATER = 4_<br>- _ELECTRICITY_SPECIFIC = 5_<br>- _COOKING = 6_ | +| fluidTypes | FluidType[] | Array of fluid type on which ecogesture can have an impact<br><br>_FluidType enum:_<br>- _ELECTRICITY = 0_<br>- _WATER = 1_<br>- _GAS = 2_<br>- _MULTIFLUID = 3_ | +| impactLevel | number | impact level of the ecogesture | +| efficiency | number | efficiency of the ecogesture | +| difficulty | number | difficulty of the ecogesture | +| room | Room | room affected by the ecogesture<br><br>_Room enum:_<br>- _ALL = 0_<br>- _BATHROOM = 1_<br>- _KITCHEN = 2_<br>- _LAUNDRY = 3_<br>- _TOILET = 4_ | +| season | Season | season suited to the ecogesture<br><br>_Season enum:_<br>- _NONE = 'Sans saison'_<br>- _WINTER = 'Hiver'_<br>- _SUMMER = 'Été'_ | +| equipment | boolean | used to know if one or more equipment are affected by the ecogesture | +| equipmentType | EquipmentType[] | equipment affected by the ecogesture<br><br>_EquipmentType enum:_<br>- _AIR_CONDITIONING = 0_<br>- _COMPUTER = 1_<br>- _MICROWAVE = 2_<br>- _OVEN = 3_<br>- _WASHING_MACHINE = 4_<br>- _DISHWASHER = 5_<br>- _COOKING_PLATES = 6_<br>- _DRYER = 7_<br>- _REFREGIRATOR = 8_<br>- _GARDEN = 9_<br>- _WATER_HEATER = 10_<br>- _FAN = 11_<br>- _CURTAIN = 12_<br>- _INTERNET_BOX = 13_<br>- _VENTILATION = 14_<br>- _FREEZER = 15_<br>- _BOILER = 16_<br>- _HYDRAULIC_HEATING = 17_ | +| equipmentInstallation | boolean | used to know if it is required an installation | +| investment | string or null | investment required | +| action | boolean | used to know if the ecogesture is used for action challenge | +| actionName | string or null | action description of the ecogesture | +| actionDuration | number | duration required to do an action challenge | + +**Example:** + +```json +{ + "shortName": "Déesse des eaux", + "longName": "Je coupe l'eau de la douche pendant que je me savonne.", + "longDescription": "Si vous n’êtes pas frileux, coupez l'eau pendant que vous vous savonnez : l'économie en eau peut aller jusqu'à 50% !", + "usage": 3, + "fluidTypes": [ + 1 + ], + "impactLevel": 5, + "investment": null, + "room": [ + 1 + ], + "difficulty": 1, + "efficiency": 4, + "season": "Sans saison", + "action": true, + "actionDuration": 3, + "actionName": "Je coupe l'eau de la douche pendant que je me savonne.", + "equipment": false, + "equipmentInstallation": true, + "equipmentType": [], + +} +``` + +## Challenge + +**Description :** + +This doctype is used to store all challenges. + +**Doctype:** + +**`com.grandlyon.ecolyo.challenge`** + +**Structure:** + +| Field | Type | Description | +| ------------- | ------ | ------------------------------------------------- | +| \_id | string | challenge id - respect the format _CHALLENGE000X_ | +| title | string | title of the challenge | +| description | string | description of the challenge | +| target | number | The number of stars required to unlock the duel | +| relationships | any | relation to quiz and duel | + +**Example:** + +```json + { + "_id": "CHALLENGE0001", + "title": "Nicolas Hublot", + "description": "foobar", + "target": 15, + "relationships": { + "quiz": { + "data": { "_id": "QUIZ001", "_type": "com.grandlyon.ecolyo.quiz" } + }, + "exploration": { + "data": { "_id": "EXPLORATION001", "_type": "com.grandlyon.ecolyo.exploration" } + }, + "duel": { + "data": { "_id": "DUEL001", "_type": "com.grandlyon.ecolyo.duel" } + } + } + } +``` + +## User challenge + +**Description :** + +This doctype is used to store all additional information about a challenge started or ended by the user. + +**Doctype:** + +**`com.grandlyon.ecolyo.userchallenge`** + +**Structure:** + +| Field | Type | Description | +| ----------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | string | userChallenge id | +| title | string | userChallenge title | +| state | UserChallengeState | state of the challenge<br><br>UserChallengeState enum<br>- _LOCKED = 0_<br>- _UNLOCKED = 1_<br>- _ONGOING = 2_<br>- _DUEL = 3_<br>- _DONE = 4_ | +| target | number | Number of stars required to unlock the duel | +| progress | ChallengeProgress | Number of stars earned by the user for each challenge<br><br>ChallengeProgress enum<br>- _quizzProgress: number_<br>- _explorationProgress: number_<br>- _actionProgress: number_ | +| quiz | UserQuiz | Complete Quiz object with progress | +| exploration | UserExploration | Complete Exploration object with progress | +| action | UserActionEntity | Complete Action object | +| duel | UserDuelEntity | Complete Duel object with progress included | +| success | UserChallengeSuccess | Success state of the challenge<br><br>UserChallengeSuccess enum<br>- _ONGOING = 0_<br>- _LOST = 1_<br>- _WIN = 2_ | +| startDate | string null | starting date of the the challenge | +| endingDate | string null | ending date of the challenge | + +**Example:** + +```json +{ + "_id": "eae3a79a05d677a739bdd2b46b009936", + "description": "foobar", + "duel": { + "description": "Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION € en 1 semaine", + "duration": { + "days": 7 + }, + "fluidTypes": [ + 0, + 1, + 2 + ], + "id": "DUEL001", + "startDate": null, + "state": 4, + "threshold": -1, + "title": "Nicolas Hublot", + "userConsumption": 0 + }, + "endingDate": null, + "id": "CHALLENGE0001", + "progress": { + "actionProgress": 0, + "explorationProgress": 0, + "quizProgress": 0 + }, + "quiz": { + "customQuestion": { + "interval": 30, + "period": {}, + "questionLabel": "Quel jour ai-je le plus consommé la semaine dernière ?", + "result": 1, + "timeStep": 20, + "type": 0 + }, + "id": "QUIZ001", + "questions": [ + { + "answers": [ + { + "answerLabel": "Vapeur d'eau", + "isTrue": false + }, + { + "answerLabel": "Fumée", + "isTrue": false + }, + { + "answerLabel": "Gouttelettes d'eau et cristaux de glace", + "isTrue": true + } + ], + "explanation": "Les nuages sont constitués de gouttelettes d'eau et parfois aussi de cristaux de glace", + "questionLabel": "De quoi les nuages sont-ils constitués ?", + "result": 1, + "source": "string" + }, + { + "answers": [ + { + "answerLabel": "86 km", + "isTrue": true + }, + { + "answerLabel": "78 km", + "isTrue": false + }, + { + "answerLabel": "56 km", + "isTrue": false + } + ], + "explanation": "L’aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant alimenté la ville en eau, et celui dont les structures sont le mieux conservées. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rhône", + "questionLabel": "Quelle longueur faisait l’aqueduc du Gier pour acheminer l’eau sur Lyon à l’époque romaine ?", + "result": 1, + "source": "string" + }, + { + "answers": [ + { + "answerLabel": "Crémieux", + "isTrue": false + }, + { + "answerLabel": "Crépieux-Charmy", + "isTrue": true + }, + { + "answerLabel": "Charly", + "isTrue": false + } + ], + "explanation": "Crépieux-Charmy est le principal champ captant de la Métropole de Lyon", + "questionLabel": "Quelle est le nom du principal champ de captage d’eau potable de la Métropole ?", + "result": 1, + "source": "string" + }, + { + "answers": [ + { + "answerLabel": "Pompe à air", + "isTrue": false + }, + { + "answerLabel": "Pompe à cordes", + "isTrue": true + }, + { + "answerLabel": "Pompe de Cornouailles", + "isTrue": false + } + ], + "explanation": "Mise en fonctionnement en 1856, 3 pompes à vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.", + "questionLabel": "Quelle type de pompes étaient utilisées à l'usine des eaux de Caluire jusqu'en 1910 ?", + "result": 1, + "source": "string" + } + ], + "result": 5, + "state": 2 + }, + "exploration": { + "id": "EXPLORATION001", + "date": "2021-01-13T17:03:11.964Z", + "description": "Consultez 3 fois Ecolyo", + "ecogesture_id": "", + "fluid_condition": [], + "message_success": "Vous vous êtes connecté 3 fois à Ecolyo", + "progress": 0, + "state": 2, + "target": 3, + "type": 2 + }, + "action": { + "ecogesture": { + "_id": "ECOGESTURE0004", + "_rev": "3-da2ad5c7b81e4260e2254c98ec6ee971", + "_type": "com.grandlyon.ecolyo.ecogesture", + "action": true, + "actionDuration": 3, + "actionName": "Je coupe l'eau de la douche pendant que je me savonne.", + "cozyMetadata": { + "createdAt": "2021-03-08T09:52:41.029Z", + "createdByApp": "Ecolyo", + "createdByAppVersion": "1.0.4", + "metadataVersion": 1, + "updatedAt": "2021-03-08T09:52:41.029Z", + "updatedByApps": [ + { + "date": "2021-03-08T09:52:41.029Z", + "slug": "Ecolyo", + "version": "1.0.4" + } + ] + }, + "difficulty": 1, + "efficiency": 2.5, + "equipment": false, + "equipmentInstallation": true, + "equipmentType": [], + "fluidTypes": [ + 1 + ], + "id": "ECOGESTURE0004", + "impactLevel": 5, + "investment": null, + "longDescription": "Si vous n’êtes pas frileux, coupez l'eau pendant que vous vous savonnez : l'économie en eau peut aller jusqu'à 50% !", + "longName": "Je coupe l'eau de la douche pendant que je me savonne.", + "room": [ + 1 + ], + "season": "Sans saison", + "shortName": "Déesse des eaux", + "usage": 3 + }, + "startDate": "2021-03-09T17:57:44.600Z", + "state": 1 + }, + "startDate": "2021-01-04T00:00:00.000Z", + "state": 3, + "success": 0, + "target": 15, + "title": "Nicolas Hublot" +} +``` + +## Quiz + +**Description :** + +This doctype is used to store all quiz. + +**Doctype:** + +**`com.grandlyon.ecolyo.quiz`** + +**Structure:** + +| Field | Type | Description | +| -------------- | -------------------- | ------------------------------------------- | +| \_id | string | quiz id - respect the format _QUIZ00X_ | +| questions | QuestionEntity[] | Array of questions entities | +| customQuestion | CustomQuestionEntity | Custom question based on user's consumption | + +**Example:** + +```json +{ + "_id": "QUIZ001", + "questions": [ + { + "questionLabel": "Quelle longueur faisait l’aqueduc du Gier pour acheminer l’eau sur Lyon à l’époque romaine ?", + "answers": [ + { "answerLabel": "86 km", "isTrue": true }, + { + "answerLabel": "78 km", + "isTrue": false + }, + { + "answerLabel": "56 km", + "isTrue": false + } + ], + "explanation": "L’aqueduc du Gier est un des aqueducs antiques de Lyon desservant la ville antique de Lugdunum. Avec ses 86 km il est le plus long des quatre aqueducs ayant alimenté la ville en eau, et celui dont les structures sont le mieux conservées. Il doit son nom au fait qu'il puise aux sources du Gier, affluent du Rhône", + "source": "string" + }, + { + "questionLabel": "Quelle type de pompes étaient utilisées à l'usine des eaux de Caluire jusqu'en 1910 ?", + "answers": [ + { + "answerLabel": "Pompe à cordes", + "isTrue": true + }, + { + "answerLabel": "Pompe de Cornouailles", + "isTrue": false + }, + { + "answerLabel": "Pompe à air", + "isTrue": false + } + ], + "explanation": "Mise en fonctionnement en 1856, 3 pompes à vapeur dites de Cornouailles produisent quelque 20 000 m3 d'eau par jour. Ces pompes mesurent 20 m de haut et 13 m de large pour un poids de 200 tonnes. Leur balancier de 35 tonnes s'actionne toutes les 6 secondes, permettant ainsi l'envoi de 600 m3 d'eau par heure.", + "source": "string" + }, + { + "questionLabel": "Quelle est le nom du principal champ de captage d’eau potable de la Métropole ?", + "answers": [ + { "answerLabel": "Crémieux", "isTrue": false }, + { + "answerLabel": "Crépieux-Charmy", + "isTrue": true + }, + { + "answerLabel": "Charly", + "isTrue": false + } + ], + "explanation": "Crépieux-Charmy est le principal champ captant de la Métropole de Lyon", + "source": "string" + }, + { + "questionLabel": "De quoi les nuages sont-ils constitués ?", + "answers": [ + { "answerLabel": "Vapeur d'eau", "isTrue": false }, + { + "answerLabel": "Fumée", + "isTrue": false + }, + { + "answerLabel": "Gouttelettes d'eau et cristaux de glace", + "isTrue": true + } + ], + "explanation": "Les nuages sont constitués de gouttelettes d'eau et parfois aussi de cristaux de glace", + "source": "string" + } + ], + "customQuestion": { + "questionLabel": "Quel jour ai-je le plus consommé la semaine dernière ?", + "type": 0, + "timeStep": 20, + "interval": 30, + "period": {}, + "singleFluid": true + } + } +``` + +## Exploration + +**Description :** + +This doctype is used to store all explorations. + +**Doctype:** + +**`com.grandlyon.ecolyo.exploration`** + +**Structure:** + +| Field | Type | Description | +| --------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| \_id | string | exploration id - respect the format _EXPLORATION00X_ | +| state | UserExplorationState | State of the exploration<br><br>UserExplorationState enum<br>- _UNLOCKED = 0_<br>- _ONGOING = 1_<br>- _DONE = 2_ | +| description | string | description of the exploration | +| target | number | number of stars required to unlock an exploration | +| type | UserExplorationType | type of the exploration<br><br>UserExplorationType enum<br>- _DECLARATIVE = 0_<br>- _ACTION = 1_<br>- _CONSUMPTION = 2_<br>- _ECOGESTURE = 3_ | +| date | string or null | date of the exploration | +| ecogesture_id | string | ecogesture id | +| fluid_condition | FluidType[] | Array of fluid type on which an exploration can have an impact<br><br>_FluidType enum:_<br>- _ELECTRICITY = 0_<br>- _WATER = 1_<br>- _GAS = 2_<br>- _MULTIFLUID = 3_ | +| message_success | string | message when exploration is done | + +**Example:** + +```json + { + "_id": "EXPLORATION001", + "description": "Consultez l'écogeste Chat échaudé", + "target": 1, + "type": 3, + "date": null, + "ecogesture_id": "0032", + "fluid_condition": [], + "message_success": "Vous avez consulté l'écogeste Chat échaudé", + "state": 0, + } +``` + +## Duel + +**Description :** + +This doctype is used to store all duels. + +**Doctype:** + +**`com.grandlyon.ecolyo.duel`** + +**Structure:** + +| Field | Type | Description | +| ----------- | -------- | -------------------------------------- | +| \_id | string | duel id - respect the format _DUEL00X_ | +| title | string | title of the duel | +| description | string | description of the duel | +| duration | Duration | Luxon Duration of the duel | + +**Example:** + +```json + { + "_id": "DUEL001", + "title": "Nicolas Hublot", + "description": "Je parie un ours polaire que vous ne pouvez pas consommer moins que #CONSUMPTION € en 1 semaine", + "duration": { "days": 7 } + } +``` + +## Usage event + +**Description :** + +This doctype is used to store all usage events. + +**Doctype:** + +**`com.grandlyon.ecolyo.usageevent`** + +**Structure:** + +| Field | Type | Description | +| ------- | -------------- | ------------------------------------------------------------------------------------------ | +| date | DateTime | Date of the event | +| type | UsageEventType | Type of the event | +| target | string | Targeted konnector, page, challenge, quiz, exploration, action or timeStep | +| result | string | Result for KonnectorConnectEvent or KonnectorRefreshEvent.<br>Values: "success" or "error" | +| context | string | Luxon Duration of the duel | + +## Terms + +**Description :** + +This doctype is used to store the different version of the terms of the application. + +**Doctype:** + +**`io.cozy.terms`** + +**Structure:** + +| Field | Type | Description | +| ---------- | -------- | ----------------------------------------------------------------- | +| accepted | boolean | The fact that the terms has been accepted by the Cozy user or not | +| 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 | -- GitLab