From 4ea0ddd7657ccbd07913cc2f9fa6a62919be10a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20VALENTIN?= Date: Tue, 27 Feb 2024 22:27:27 +0100 Subject: [PATCH 1/5] fix: update config.yaml --- .../rootfs/templates/config.yaml | 117 +++++++++--------- .../rootfs/templates/config.yaml | 117 +++++++++--------- 2 files changed, 114 insertions(+), 120 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/templates/config.yaml b/enedisgateway2mqtt/rootfs/templates/config.yaml index 7f189963c..04ec0a336 100644 --- a/enedisgateway2mqtt/rootfs/templates/config.yaml +++ b/enedisgateway2mqtt/rootfs/templates/config.yaml @@ -1,4 +1,4 @@ -cycle: 14400 # 4H +cycle: 14400 # 4H debug: true log2file: false wipe_influxdb: false # Work only with influxdb > 2.X @@ -6,20 +6,27 @@ wipe_influxdb: false # Work only with influxdb > 2.X # Mais il est possible de basculer sur une base de données externe de type SQLite ou PostgreSQL # Exemple pour Postgres : # storage_uri: postgresql://myelectricaldata:myelectricaldata@postgres:5432/myelectricaldata -tempo: +mqtt: enable: true - price_blue_hc: 0.097 - price_blue_hp: 0.1249 - price_red_hc: 0.1216 - price_red_hp: 0.6712 - price_white_hc: 0.114 - price_white_hp: 0.1508 -home_assistant: + hostname: mosquitto + port: 1883 + username: null + password: null + prefix: myelectricaldata + client_id: myelectricaldata # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT + retain: true + qos: 0 +home_assistant: # MQTT est obligaoire pour Home Assistant enable: true discovery: true discovery_prefix: homeassistant -influxdb: +home_assistant_ws: enable: true + ssl: true + token: TOKEN_LONGUE_DUREE + url: URL_VERS_HOME_ASSISTANT +influxdb: + enable: false hostname: influxdb port: 8086 token: myelectricaldata @@ -27,7 +34,7 @@ influxdb: bucket: myelectricaldata # ATTENTION, L'activation de l'importation asynchrone va réduire fortement le temps d'importation dans InfluxDB # mais va augmenter la consommation mémoire & CPU et donc à activer uniquement sur un hardware robuste. - method: synchronous # Mode disponible : synchronous / asynchronous / batching + method: synchronous # Mode disponible : synchronous / asynchronous / batching # batching_options permet uniquement de configurer la methode `batching`. # Pour plus d'information : https://github.com/influxdata/influxdb-client-python#batching batching_options: @@ -39,69 +46,59 @@ influxdb: max_retries: 5 max_retry_delay: 125_000 exponential_base: 2 -mqtt: - enable: true - hostname: mosquitto - port: 1883 - username: null - password: null - prefix: myelectricaldata - client_id: myelectricaldata # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT - retain: true - qos: 0 myelectricaldata: "MON_PDL_1": - enable: 'true' + enable: "true" token: TOKEN_DE_MON_PDL_1 name: "Maison" - addresses: 'true' - cache: 'true' - consumption: 'true' - consumption_detail: 'true' - consumption_price_base: '0.145907' - consumption_price_hc: '0.124364' - consumption_price_hp: '0.164915' + addresses: "true" + cache: "true" + consumption: "true" + consumption_detail: "true" + consumption_price_base: "0.145907" + consumption_price_hc: "0.124364" + consumption_price_hp: "0.164915" consumption_max_date: "2021-06-01" consumption_detail_max_date: "2021-06-01" - offpeak_hours_0: 22H00-6H00 # LUNDI - offpeak_hours_1: 22H00-6H00 # MARDI - offpeak_hours_2: 22H00-6H00 # MERCREDI - offpeak_hours_3: 22H00-6H00 # JEUDI - offpeak_hours_4: 22H00-6H00 # VENDREDI - offpeak_hours_5: 22H00-6H00;12H00-14H00 # SAMEDI - offpeak_hours_6: 22H00-6H00;12H00-14H00 # DIMANCHE + offpeak_hours_0: 22H00-6H00 # LUNDI + offpeak_hours_1: 22H00-6H00 # MARDI + offpeak_hours_2: 22H00-6H00 # MERCREDI + offpeak_hours_3: 22H00-6H00 # JEUDI + offpeak_hours_4: 22H00-6H00 # VENDREDI + offpeak_hours_5: 22H00-6H00;12H00-14H00 # SAMEDI + offpeak_hours_6: 22H00-6H00;12H00-14H00 # DIMANCHE plan: HC/HP - production: 'false' - production_detail: 'false' - production_price: '0.0' + production: "false" + production_detail: "false" + production_price: "0.0" production_max_date: "2021-06-01" production_detail_max_date: "2021-06-01" - refresh_addresse: 'false' - refresh_contract: 'false' + refresh_addresse: "false" + refresh_contract: "false" "MON_PDL_2_AVEC_PRODUCTION": - enable: 'true' + enable: "true" token: TOKEN_DE_MON_PDL_2 name: "Maison de vacances" - cache: 'true' - consumption: 'true' - consumption_detail: 'true' - consumption_price_base: '0.175' - consumption_price_hc: '0.175' - consumption_price_hp: '0.175' + cache: "true" + consumption: "true" + consumption_detail: "true" + consumption_price_base: "0.175" + consumption_price_hc: "0.175" + consumption_price_hp: "0.175" consumption_max_date: "2021-06-01" consumption_detail_max_date: "2021-06-01" - offpeak_hours_0: '' - offpeak_hours_1: '' - offpeak_hours_2: '' - offpeak_hours_3: '' - offpeak_hours_4: '' - offpeak_hours_5: '' - offpeak_hours_6: '' + offpeak_hours_0: "" + offpeak_hours_1: "" + offpeak_hours_2: "" + offpeak_hours_3: "" + offpeak_hours_4: "" + offpeak_hours_5: "" + offpeak_hours_6: "" plan: BASE - production: 'true' - production_detail: 'true' - production_price: '0.10' + production: "true" + production_detail: "true" + production_price: "0.10" production_max_date: "2021-06-01" production_detail_max_date: "2021-06-01" - refresh_addresse: 'false' - refresh_contract: 'false' + refresh_addresse: "false" + refresh_contract: "false" diff --git a/enedisgateway2mqtt_dev/rootfs/templates/config.yaml b/enedisgateway2mqtt_dev/rootfs/templates/config.yaml index 7f189963c..04ec0a336 100644 --- a/enedisgateway2mqtt_dev/rootfs/templates/config.yaml +++ b/enedisgateway2mqtt_dev/rootfs/templates/config.yaml @@ -1,4 +1,4 @@ -cycle: 14400 # 4H +cycle: 14400 # 4H debug: true log2file: false wipe_influxdb: false # Work only with influxdb > 2.X @@ -6,20 +6,27 @@ wipe_influxdb: false # Work only with influxdb > 2.X # Mais il est possible de basculer sur une base de données externe de type SQLite ou PostgreSQL # Exemple pour Postgres : # storage_uri: postgresql://myelectricaldata:myelectricaldata@postgres:5432/myelectricaldata -tempo: +mqtt: enable: true - price_blue_hc: 0.097 - price_blue_hp: 0.1249 - price_red_hc: 0.1216 - price_red_hp: 0.6712 - price_white_hc: 0.114 - price_white_hp: 0.1508 -home_assistant: + hostname: mosquitto + port: 1883 + username: null + password: null + prefix: myelectricaldata + client_id: myelectricaldata # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT + retain: true + qos: 0 +home_assistant: # MQTT est obligaoire pour Home Assistant enable: true discovery: true discovery_prefix: homeassistant -influxdb: +home_assistant_ws: enable: true + ssl: true + token: TOKEN_LONGUE_DUREE + url: URL_VERS_HOME_ASSISTANT +influxdb: + enable: false hostname: influxdb port: 8086 token: myelectricaldata @@ -27,7 +34,7 @@ influxdb: bucket: myelectricaldata # ATTENTION, L'activation de l'importation asynchrone va réduire fortement le temps d'importation dans InfluxDB # mais va augmenter la consommation mémoire & CPU et donc à activer uniquement sur un hardware robuste. - method: synchronous # Mode disponible : synchronous / asynchronous / batching + method: synchronous # Mode disponible : synchronous / asynchronous / batching # batching_options permet uniquement de configurer la methode `batching`. # Pour plus d'information : https://github.com/influxdata/influxdb-client-python#batching batching_options: @@ -39,69 +46,59 @@ influxdb: max_retries: 5 max_retry_delay: 125_000 exponential_base: 2 -mqtt: - enable: true - hostname: mosquitto - port: 1883 - username: null - password: null - prefix: myelectricaldata - client_id: myelectricaldata # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT - retain: true - qos: 0 myelectricaldata: "MON_PDL_1": - enable: 'true' + enable: "true" token: TOKEN_DE_MON_PDL_1 name: "Maison" - addresses: 'true' - cache: 'true' - consumption: 'true' - consumption_detail: 'true' - consumption_price_base: '0.145907' - consumption_price_hc: '0.124364' - consumption_price_hp: '0.164915' + addresses: "true" + cache: "true" + consumption: "true" + consumption_detail: "true" + consumption_price_base: "0.145907" + consumption_price_hc: "0.124364" + consumption_price_hp: "0.164915" consumption_max_date: "2021-06-01" consumption_detail_max_date: "2021-06-01" - offpeak_hours_0: 22H00-6H00 # LUNDI - offpeak_hours_1: 22H00-6H00 # MARDI - offpeak_hours_2: 22H00-6H00 # MERCREDI - offpeak_hours_3: 22H00-6H00 # JEUDI - offpeak_hours_4: 22H00-6H00 # VENDREDI - offpeak_hours_5: 22H00-6H00;12H00-14H00 # SAMEDI - offpeak_hours_6: 22H00-6H00;12H00-14H00 # DIMANCHE + offpeak_hours_0: 22H00-6H00 # LUNDI + offpeak_hours_1: 22H00-6H00 # MARDI + offpeak_hours_2: 22H00-6H00 # MERCREDI + offpeak_hours_3: 22H00-6H00 # JEUDI + offpeak_hours_4: 22H00-6H00 # VENDREDI + offpeak_hours_5: 22H00-6H00;12H00-14H00 # SAMEDI + offpeak_hours_6: 22H00-6H00;12H00-14H00 # DIMANCHE plan: HC/HP - production: 'false' - production_detail: 'false' - production_price: '0.0' + production: "false" + production_detail: "false" + production_price: "0.0" production_max_date: "2021-06-01" production_detail_max_date: "2021-06-01" - refresh_addresse: 'false' - refresh_contract: 'false' + refresh_addresse: "false" + refresh_contract: "false" "MON_PDL_2_AVEC_PRODUCTION": - enable: 'true' + enable: "true" token: TOKEN_DE_MON_PDL_2 name: "Maison de vacances" - cache: 'true' - consumption: 'true' - consumption_detail: 'true' - consumption_price_base: '0.175' - consumption_price_hc: '0.175' - consumption_price_hp: '0.175' + cache: "true" + consumption: "true" + consumption_detail: "true" + consumption_price_base: "0.175" + consumption_price_hc: "0.175" + consumption_price_hp: "0.175" consumption_max_date: "2021-06-01" consumption_detail_max_date: "2021-06-01" - offpeak_hours_0: '' - offpeak_hours_1: '' - offpeak_hours_2: '' - offpeak_hours_3: '' - offpeak_hours_4: '' - offpeak_hours_5: '' - offpeak_hours_6: '' + offpeak_hours_0: "" + offpeak_hours_1: "" + offpeak_hours_2: "" + offpeak_hours_3: "" + offpeak_hours_4: "" + offpeak_hours_5: "" + offpeak_hours_6: "" plan: BASE - production: 'true' - production_detail: 'true' - production_price: '0.10' + production: "true" + production_detail: "true" + production_price: "0.10" production_max_date: "2021-06-01" production_detail_max_date: "2021-06-01" - refresh_addresse: 'false' - refresh_contract: 'false' + refresh_addresse: "false" + refresh_contract: "false" From 5699ae113d3ca5ae7208fb8c71ef34361d665565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20VALENTIN?= Date: Tue, 27 Feb 2024 22:27:48 +0100 Subject: [PATCH 2/5] feat: update myelectricaldata_dev to 0.13.0-rc.1 --- enedisgateway2mqtt_dev/CHANGELOG.md | 48 +++++++++++++++++++++++++++++ enedisgateway2mqtt_dev/config.json | 16 +++------- enedisgateway2mqtt_dev/updater.json | 4 +-- 3 files changed, 54 insertions(+), 14 deletions(-) diff --git a/enedisgateway2mqtt_dev/CHANGELOG.md b/enedisgateway2mqtt_dev/CHANGELOG.md index 74de1cfe4..652db3ba4 100644 --- a/enedisgateway2mqtt_dev/CHANGELOG.md +++ b/enedisgateway2mqtt_dev/CHANGELOG.md @@ -1,124 +1,172 @@ +## 0.13.0-rc.1 (27-02-2024) + +- Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.12.0 (24-02-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.11.0 (17-02-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.11.0rc3 (14-02-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.11.0rc1 (10-02-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.10.0rc22 (03-02-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.10.0rc19 (27-01-2024) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.4b3 (30-12-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.4b1 (23-12-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.3 (16-12-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata + ### 0.9.3b1-6 (24-11-2023) + - Minor bugs fixed + ### 0.9.3b1-5 (23-11-2023) + - Minor bugs fixed + ### 0.9.3b1-4 (23-11-2023) + - Minor bugs fixed ## 0.9.3b1 (04-11-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2 (23-09-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2b9 (16-09-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2b6 (09-09-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2b5 (02-09-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2b2 (26-08-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.2b1 (26-08-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.1b13 (19-08-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata + ### 0.9.1b12-2 (06-08-2023) + - Minor bugs fixed ## 0.9.1b12 (05-08-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.1b11 (29-07-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.1b7 (22-07-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.1b6 (22-07-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.0b4 (15-07-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.0b2 (19-05-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.9.0b1 (21-04-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.15 (15-04-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata - Implemented healthcheck ## 0.8.14b3 (11-02-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.14b2 (04-02-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.14b1 (28-01-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata - Ingress addition ## 0.8.13 (22-01-2023) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.8-dev (25-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.11-beta1 (17-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata - Export 5000 port ## 0.8.10 (13-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.8 (10-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.7 (03-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.8-dev (03-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.6-dev (02-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata ## 0.8.3-dev (01-12-2022) + - Update to latest version from m4dm4rtig4n/myelectricaldata - Migration to MyElectricalData - WARNING : update to supervisor 2022.11 before installing diff --git a/enedisgateway2mqtt_dev/config.json b/enedisgateway2mqtt_dev/config.json index 054fa7d0c..fd65707a2 100644 --- a/enedisgateway2mqtt_dev/config.json +++ b/enedisgateway2mqtt_dev/config.json @@ -1,9 +1,5 @@ { - "arch": [ - "aarch64", - "amd64", - "armv7" - ], + "arch": ["aarch64", "amd64", "armv7"], "codenotary": "alexandrep.github@gmail.com", "description": "Use Enedis Gateway API to send data in your MQTT Broker (dev channel)", "devices": [ @@ -67,9 +63,7 @@ ], "image": "ghcr.io/alexbelgium/myelectricaldata_dev-{arch}", "ingress": true, - "map": [ - "config:rw" - ], + "map": ["config:rw"], "name": "MyElectricalData Dev", "options": { "CONFIG_LOCATION": "/config/myelectricaldata_dev/config.yaml", @@ -90,11 +84,9 @@ "mqtt_autodiscover": "bool", "verbose": "bool" }, - "services": [ - "mqtt:want" - ], + "services": ["mqtt:want"], "slug": "enedisgateway2mqtt_dev", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "0.12.0" + "version": "0.13.0-rc.1" } diff --git a/enedisgateway2mqtt_dev/updater.json b/enedisgateway2mqtt_dev/updater.json index 05d9cd654..c243c4a99 100644 --- a/enedisgateway2mqtt_dev/updater.json +++ b/enedisgateway2mqtt_dev/updater.json @@ -1,9 +1,9 @@ { "github_beta": "true", - "last_update": "24-02-2024", + "last_update": "27-02-2024", "repository": "alexbelgium/hassio-addons", "slug": "enedisgateway2mqtt", "source": "github", "upstream_repo": "m4dm4rtig4n/myelectricaldata", - "upstream_version": "0.12.0" + "upstream_version": "0.13.0-rc.1" } From 76d6a2cb78d9591faebf39eedc7917fbf224330b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:34:19 +0100 Subject: [PATCH 3/5] Create build.json --- enedisgateway2mqtt/build.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 enedisgateway2mqtt/build.json diff --git a/enedisgateway2mqtt/build.json b/enedisgateway2mqtt/build.json new file mode 100644 index 000000000..05394dfb4 --- /dev/null +++ b/enedisgateway2mqtt/build.json @@ -0,0 +1,10 @@ +{ + "build_from": { + "aarch64": "m4dm4rtig4n/myelectricaldata:latest", + "amd64": "m4dm4rtig4n/myelectricaldata:latest", + "armv7": "m4dm4rtig4n/myelectricaldata:latest" + }, + "codenotary": { + "signer": "alexandrep.github@gmail.com" + } +} From 9061238f47d920d67da15a2691429bdbabaea11d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:39:00 +0100 Subject: [PATCH 4/5] Create build.json --- enedisgateway2mqtt_dev/build.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 enedisgateway2mqtt_dev/build.json diff --git a/enedisgateway2mqtt_dev/build.json b/enedisgateway2mqtt_dev/build.json new file mode 100644 index 000000000..8920f6f19 --- /dev/null +++ b/enedisgateway2mqtt_dev/build.json @@ -0,0 +1,10 @@ +{ + "build_from": { + "aarch64": "m4dm4rtig4n/myelectricaldata:latest-dev", + "amd64": "m4dm4rtig4n/myelectricaldata:latest-dev", + "armv7": "m4dm4rtig4n/myelectricaldata:latest-dev" + }, + "codenotary": { + "signer": "alexandrep.github@gmail.com" + } +}