MyElectricalData - Vos données Linky chez vous :)

bonjour,je suis passe sur myelectricaldata sur le port :5000 j’ai bien les infos (sauf les jours de la semaine vide) et je n’ai pas de sensors myelectricaldata ?? j’ai toujours les anciens sensor endisgateway mais qui ne fionctionne plus depuis debut fevrier.
si vous avez des pistes je suis preneur. je suis un peu perdu. version Home Assistant 2023.2.3 Supervisor 2023.01.1 Operating System 9.5 et myelectricaldata en : 0.8.13-11

Hello

Et oui , je vois que tu as connu cela :joy: :joy:

@advance711700

Y’a plus qu’a lire les precedents post !!! , sujet evoqué dèja plusieurs fois …

merci mais j’ai lu et rien trouve sur l’absence des sensors ? je ne suis pas un expert de HA et je ne maitrise pas bien toute la config.
j’avais de l’espoir en voyant remonté les infos dans :5000 ( je me suis c’est bon mais peine perdu)
le pb viendrait de mon fichier de config.yaml ?
j’ai juste le sensor myelectricaldata update.

reboot total de HA !!!

Mqtt broker est bien installé sur ton HA ??

oui mqtt ok
j’ai se message dans les logs de myelectricaldata:
c’est bon signe ?

CONFIG_LOCATION='/config/myelectricaldata/config.yaml'
TZ='Europe/Paris'
mqtt_autodiscover='true'
verbose='true'
/etc/cont-init.d/01-custom_script.sh: executing
[18:11:28] INFO: Execute /config/addons_autoscripts/enedisgateway2mqtt.sh if existing
[18:11:28] INFO: ... no script found
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[18:11:29] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[18:11:29] INFO: ... MQTT service found, fetching server detail (you can enter those manually in your config file) ...
MQTT_HOST=core-mosquitto
MQTT_PORT=1883
MQTT_SSL=false

et j’ai ça:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-02-26 18:12:38.724 -     INFO :   => Finish
2023-02-26 18:12:38.749 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-02-26 18:12:38.749 -     INFO :  [1998XXXXXXXX] EXPORTATION DE DONNÉES DANS MQTT.
2023-02-26 18:12:38.749 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

il récupere des données qui ne sont pas encore arrivé? du 28 fevrier ??

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-02-26 18:12:26.029 -     INFO :  Récupération des données : 2021-11-05 => 2023-02-28
2023-02-26 18:12:28.904 -     INFO :   => Chargement des données depuis MyElectricalData 2021-11-05 => 2023-02-28
2023-02-26 18:12:38.654 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ 

et j’ai cette erreur en fin:

2023-02-26 18:12:38.802 -     INFO :   => Finish
2023-02-26 18:12:38.825 -     INFO :  Génération des données annuelles
Traceback (most recent call last):
  File "/app/models/jobs.py", line 126, in job_import_data
    ExportMqtt(self.usage_point_id, "consumption").daily_annual(
  File "/app/models/export_mqtt.py", line 107, in daily_annual
    get_daily_year = self.stat.get_year(year=year)
  File "/app/models/stat.py", line 415, in get_year
    end = datetime.combine(self.now_date.replace(year=year).replace(day=last_day_of_month).replace(month=12),
ValueError: day is out of range for month
2023-02-26 18:12:39.054 -    ERROR : ═══════════════════════════════════════════════•°• :ERREUR: •°•════════════════════════════════════════════════
2023-02-26 18:12:39.054 -    ERROR : 
2023-02-26 18:12:39.055 -    ERROR :  Erreur lors de l'exportation des données dans MQTT
2023-02-26 18:12:39.055 -    ERROR :  day is out of range for month
2023-02-26 18:12:39.055 -    ERROR : 
2023-02-26 18:12:39.056 -    ERROR : ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
2023-02-26 18:12:39.056 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-02-26 18:12:39.056 -     INFO :  EXPORTATION HOME ASSISTANT

et pour finir j’ai bien des infos dans myelectricaldata :5000

et comment on passe en 100% MED ( comment on supprime les sensor enedis ??)

Petit bug dans l’import MQTT:

Traceback (most recent call last):
  File "/app/models/jobs.py", line 126, in job_import_data
    ExportMqtt(self.usage_point_id, "consumption").daily_annual(
  File "/app/models/export_mqtt.py", line 107, in daily_annual
    get_daily_year = self.stat.get_year(year=year)
  File "/app/models/stat.py", line 415, in get_year
    end = datetime.combine(self.now_date.replace(year=year).replace(day=last_day_of_month).replace(month=12),
ValueError: day is out of range for month

Certains l’ont déjà eu ?

  • Oui c’est un bug connu de la 0.8.13.
    • Un fix sur la beta 0.8.14 existe pour corriger ce souci
1 « J'aime »

Merci. L’appli ne se met pas à jour toute seule, semble-t-il !
Je vais la recharger.

Bonjour à tous,
j’ai lu un peu tout mais cela ne m’a pas aidé pour moi, je m’explique:

  • consentement enedis ok
  • j’arrive sur la page myelectricaldata et là, j’ai « status ok »
  • mon PDL est toujours le même par contre mon token non donc je le modifie dans mon fichier config.yaml
  • je démarre l’api myelectricaldata et j’ai cette erreur:
Starting...
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
 Add-on: MyElectricalData
 Use Enedis Gateway API to send data in your MQTT Broker (latest channel)
-----------------------------------------------------------
 Add-on version: 0.8.13-11
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (aarch64 / raspberrypi3-64)
 Home Assistant Core: 2023.2.5
 Home Assistant Supervisor: 2023.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
 https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
CONFIG_LOCATION='/config/myelectricaldata/config.yaml'
TZ='Europe/Paris'
mqtt_autodiscover='true'
verbose='true'
/etc/cont-init.d/01-custom_script.sh: executing
[16:39:01] INFO: Execute /config/addons_autoscripts/enedisgateway2mqtt.sh if existing
[16:39:01] INFO: ... no script found
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[16:39:03] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[16:39:04] INFO: ... MQTT service found, fetching server detail (you can enter those manually in your config file) ...
MQTT_HOST=core-mosquitto
MQTT_PORT=1883
MQTT_SSL=false
MQTT_USERNAME=*******
MQTT_PASSWORD=**************
/etc/cont-init.d/99-run.sh: executing
creating symlink
[16:39:08] INFO: Using database file found in /config/myelectricaldata
[16:39:08] INFO: Using config file found in /config/myelectricaldata/config.yaml
/config/myelectricaldata/config.yaml
  1:19      error    wrong new line character: expected \n  (new-lines)
  15:81     warning  line too long (113 > 80 characters)  (line-length)
  16:81     warning  line too long (105 > 80 characters)  (line-length)
  17:81     warning  line too long (82 > 80 characters)  (line-length)
  19:81     warning  line too long (91 > 80 characters)  (line-length)
  36:81     warning  line too long (105 > 80 characters)  (line-length)
  94:30     error    no new line character at the end of file  (new-line-at-end-of-file)
[16:39:10] FATAL: Config file has an invalid yaml format. Please check the file in /config/myelectricaldata/config.yaml. Errors list above. You can check yaml validity with the online tool yamllint.com
/etc/cont-init.d/99-run.sh: exiting 1
  • quand j’esaye d’aller sur => IP de mon HA:5000, j’ai une erreur " Désolé, impossible d’accéder à cette page."

mon fichier config.yaml:

cycle: 14400  # 4H
debug: true
wipe_influxdb: false
home_assistant:
  enable: true
  discovery: true
  discovery_prefix: homeassistant
influxdb:
  enable: false
  hostname: influxdb
  port: 8086
  token: myelectricaldata
  org: myelectricaldata
  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
  # batching_options permet uniquement de configurer la methode `batching`.
  # Pour plus d'information : https://github.com/influxdata/influxdb-client-python#batching
  batching_options:
    batch_size: 1000
    flush_interval: 1000
    jitter_interval: 0
    retry_interval: 5000
    max_retry_time: 180_000
    max_retries: 5
    max_retry_delay: 125_000
    exponential_base: 2
mqtt:
  enable: true
  hostname: 192.168.0.34
  port: 1883
  username: mqtt
  password: mqtt
  prefix: myelectricaldata
  client_id: myelectricaldata     # DOIT ETRE UNIQUE SUR LA TOTALITE DES CLIENTS CONNECTE AU SERVEUR MQTT
  retain: true
  qos: 0
myelectricaldata:
  mon PDL:
    enable: 'true'
    token: mon token
    name: "Maison"
    addresses: 'true'
    cache: 'true'
    consumption: 'true'
    consumption_detail: 'true'
    consumption_price_base: '0.0'
    consumption_price_hc: '0.1470'
    consumption_price_hp: '0.1841'
    consumption_max_date: ''
    consumption_detail_max_date: ''
    offpeak_hours_0: 22H54-6H54               # LUNDI
    offpeak_hours_1: 22H54-6H54               # MARDI
    offpeak_hours_2: 22H54-6H54               # MERCREDI
    offpeak_hours_3: 22H54-6H54              # JEUDI
    offpeak_hours_4: 22H54-6H54               # VENDREDI
    offpeak_hours_5: 22H54-6H54               # SAMEDI
    offpeak_hours_6: 22H54-6H54                # DIMANCHE
    plan: HC/HP
    production: 'false'
    production_detail: 'false'
    production_price: '0.0'
    production_max_date: ''
    production_detail_max_date: ''
    refresh_addresse: 'true'
    refresh_contract: 'true'
  "MON_PDL_2_AVEC_PRODUCTION":
    enable: 'false'
    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'
    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: ''
    plan: BASE
    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'

Donc voilà voilou où j’en suis, merci d’avance.

Re,

@Benoit1304

avec la recherche

Bonjour ClassicRed,
merci pour le tuyau :wink:

il me reste une erreur que je n’arrive pas à enlever:

1:18 error wrong new line character: expected \n (new-lines)

tu as certainement un espace en debut ou fin de ligne invisible

supprime cela dans ta config

influxdb:
  enable: false
  hostname: influxdb
  port: 8086
  token: myelectricaldata
  org: myelectricaldata
  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
  # batching_options permet uniquement de configurer la methode `batching`.
  # Pour plus d'information : https://github.com/influxdata/influxdb-client-python#batching
  batching_options:
    batch_size: 1000
    flush_interval: 1000
    jitter_interval: 0
    retry_interval: 5000
    max_retry_time: 180_000
    max_retries: 5
    max_retry_delay: 125_000
    exponential_base: 2

A mon avis ton erreur est là

je l’ai supprimé et j’ai toujours la même erreur

bon j’ai repris un ancien config.yaml et là je n’ai plus d’erreur.

Tu dois avoir un ^M
Le swap entre linux et windows fout toujours la grouille.

J’ai dézippé la nouvelle version, redémarré HA, mais la version MED est toujours la 0.8.13-11 !
Euh, j’ai oublié quelque chose ?

soit t’es sur add-on et tu doit maj l’add-on
soit t’es sur docker et tu doit re-installer l’image
si t’as liée /app…il faut copier le tout dans app

La mise à jour ne se fait pas = je suis passé par myelectricaldata-dev
image

Maintenant, j’ai les deux :slight_smile: