Probléme démarrage MyElectricalData

Bonjour,

Je rencontre des problèmes avec MyElectricalData depuis quelque temps. En effet, le module ne veut plus démarrer et m’indique une erreur dans le log.
Les pistes déjà explorées:
Renouvellement du token MyElectricalData.
Renouvellement du consentement Enedis.
Renouvellement du jeton longue durée Home Assistant.
Désactivation et réactivation de InfluxDB.

Une copie du log et de l’erreur:

Add-on: MyElectricalData
 Use Enedis Gateway API to send data in your MQTT Broker (latest channel)
-----------------------------------------------------------
 Add-on version: 0.13.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.2  (amd64 / qemux86-64)
 Home Assistant Core: 2025.3.2
 Home Assistant Supervisor: 2025.03.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: 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-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/myelectricaldata/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/enedisgateway2mqtt/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
cycle='14400'
debug='false'
home_assistant_card_myenedis='true'
home_assistant_discovery_prefix='homeassistant'
home_assistant_enable='true'
influxdb_bucket='myelectricaldata/autogen'
influxdb_enable='true'
influxdb_hostname='a0d7b954-influxdb'
influxdb_method='synchronous'
influxdb_org='-'
influxdb_port='8086'
influxdb_token='myelectricaldata:myelectricaldata'
influxdb_batching_options_batch_size='1000'
influxdb_batching_options_flush_interval='1000'
influxdb_batching_options_jitter_interval='0'
influxdb_batching_options_retry_interval='5000'
influxdb_batching_options_max_retry_time='180_000'
influxdb_batching_options_max_retries='5'
influxdb_batching_options_max_retry_delay='125_000'
influxdb_batching_options_exponential_base='2'
mqtt_client_id='myelectricaldata'
mqtt_enable='true'
mqtt_hostname='192.168.0.4'
mqtt_port='1883'
mqtt_username='****'
mqtt_password='****'
mqtt_prefix='myelectricaldata'
mqtt_retain='true'
mqtt_qos='0'
home_assistant_ws_enable='true'
home_assistant_ws_ssl='false'
home_assistant_ws_token='****'
home_assistant_ws_url='192.168.0.3:8123'
home_assistant_ws_max_date='2025-01-21'
home_assistant_ws_purge='false'
myelectricaldata__activation_date_daily='2025-01-21'
myelectricaldata__activation_date_detail='2025-01-21'
myelectricaldata__cache='true'
myelectricaldata__consumption='true'
myelectricaldata__consumption_detail='true'
myelectricaldata__consumption_max_power='true'
myelectricaldata__consumption_detail_max_date='2025-01-21'
myelectricaldata__consumption_max_date='2025-01-21'
myelectricaldata__consumption_price_hc='0.1076'
myelectricaldata__consumption_price_hp='0.1502'
myelectricaldata__enable='true'
myelectricaldata__name='Maison'
myelectricaldata__offpeak_hours_0='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_1='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_2='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_3='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_4='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_5='00H00-07h00;23H00-23H59'
myelectricaldata__offpeak_hours_6='00H00-07h00;23H00-23H59'
myelectricaldata__plan='HC/HP'
myelectricaldata__production='false'
myelectricaldata__production_detail='false'
myelectricaldata__production_price='0'
myelectricaldata__refresh_addresse='true'
myelectricaldata__refresh_contract='true'
myelectricaldata__token='****'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/enedisgateway2mqtt/enedisgateway2mqtt.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[17:35:54] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[17:35:54] FATAL: No internal MQTT service found. Please install Mosquitto broker
Error : /etc/cont-init.d/91-mqtt_autodiscover.sh exiting 1
/etc/cont-init.d/99-run.sh: executing
creating symlink
[17:35:54] INFO: Using database file found in /config/myelectricaldata
[17:35:54] INFO: Using config file found in /config/myelectricaldata/config.yaml
Config file is a valid yaml
[17:35:54] INFO: Starting nginx
[17:35:54] INFO: Starting the app
2025-03-13 17:35:55.419 -     INFO : Display configuration :
2025-03-13 17:35:55.419 -     INFO :   cycle: 14400
2025-03-13 17:35:55.419 -     INFO :   debug: False
2025-03-13 17:35:55.419 -     INFO :   home_assistant:
2025-03-13 17:35:55.419 -     INFO :     card_myenedis: True
2025-03-13 17:35:55.420 -     INFO :     discovery_prefix: homeassistant
2025-03-13 17:35:55.420 -     INFO :     enable: True
2025-03-13 17:35:55.420 -     INFO :   influxdb:
2025-03-13 17:35:55.420 -     INFO :     bucket: myelectricaldata/autogen
2025-03-13 17:35:55.420 -     INFO :     enable: True
2025-03-13 17:35:55.420 -     INFO :     hostname: a0d7b954-influxdb
2025-03-13 17:35:55.420 -     INFO :     method: synchronous
2025-03-13 17:35:55.420 -     INFO :     org: -
2025-03-13 17:35:55.420 -     INFO :     port: 8086
2025-03-13 17:35:55.420 -     INFO :     token: ** hidden **
2025-03-13 17:35:55.420 -     INFO :     batching_options:
2025-03-13 17:35:55.420 -     INFO :       batch_size: 1000
2025-03-13 17:35:55.420 -     INFO :       flush_interval: 1000
2025-03-13 17:35:55.420 -     INFO :       jitter_interval: 0
2025-03-13 17:35:55.420 -     INFO :       retry_interval: 5000
2025-03-13 17:35:55.420 -     INFO :       max_retry_time: 180000
2025-03-13 17:35:55.420 -     INFO :       max_retries: 5
2025-03-13 17:35:55.420 -     INFO :       max_retry_delay: 125000
2025-03-13 17:35:55.420 -     INFO :       exponential_base: 2
2025-03-13 17:35:55.420 -     INFO :   mqtt:
2025-03-13 17:35:55.420 -     INFO :     client_id: myelectricaldata
2025-03-13 17:35:55.420 -     INFO :     enable: True
2025-03-13 17:35:55.420 -     INFO :     hostname: 192.168.0.4
2025-03-13 17:35:55.420 -     INFO :     port: 1883
2025-03-13 17:35:55.420 -     INFO :     username: root
2025-03-13 17:35:55.420 -     INFO :     password: ** hidden **
2025-03-13 17:35:55.420 -     INFO :     prefix: myelectricaldata
2025-03-13 17:35:55.420 -     INFO :     retain: True
2025-03-13 17:35:55.420 -     INFO :     qos: 0
2025-03-13 17:35:55.420 -     INFO :   home_assistant_ws:
2025-03-13 17:35:55.420 -     INFO :     enable: True
2025-03-13 17:35:55.421 -     INFO :     ssl: False
2025-03-13 17:35:55.421 -     INFO :     token: ** hidden **
2025-03-13 17:35:55.421 -     INFO :     url: 192.168.0.3:8123
2025-03-13 17:35:55.421 -     INFO :     max_date: 2025-01-21
2025-03-13 17:35:55.421 -     INFO :     purge: False
2025-03-13 17:35:55.421 -     INFO :   myelectricaldata:
2025-03-13 17:35:55.421 -     INFO :     16130101091619:
2025-03-13 17:35:55.421 -     INFO :       activation_date_daily: 2025-01-21
2025-03-13 17:35:55.421 -     INFO :       activation_date_detail: 2025-01-21
2025-03-13 17:35:55.421 -     INFO :       cache: True
2025-03-13 17:35:55.421 -     INFO :       consumption: True
2025-03-13 17:35:55.421 -     INFO :       consumption_detail: True
2025-03-13 17:35:55.421 -     INFO :       consumption_max_power: True
2025-03-13 17:35:55.421 -     INFO :       consumption_detail_max_date: 2025-01-21
2025-03-13 17:35:55.421 -     INFO :       consumption_max_date: 2025-01-21
2025-03-13 17:35:55.421 -     INFO :       consumption_price_base: 
2025-03-13 17:35:55.421 -     INFO :       consumption_price_hc: 0.1076
2025-03-13 17:35:55.421 -     INFO :       consumption_price_hp: 0.1502
2025-03-13 17:35:55.421 -     INFO :       enable: True
2025-03-13 17:35:55.421 -     INFO :       name: Maison
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_0: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_1: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_2: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_3: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_4: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_5: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       offpeak_hours_6: 00H00-07h00;23H00-23H59
2025-03-13 17:35:55.422 -     INFO :       plan: HC/HP
2025-03-13 17:35:55.422 -     INFO :       production: False
2025-03-13 17:35:55.422 -     INFO :       production_detail: False
2025-03-13 17:35:55.422 -     INFO :       production_detail_max_date: 
2025-03-13 17:35:55.422 -     INFO :       production_max_date: 
2025-03-13 17:35:55.422 -     INFO :       production_price: 0
2025-03-13 17:35:55.422 -     INFO :       refresh_addresse: True
2025-03-13 17:35:55.422 -     INFO :       refresh_contract: True
2025-03-13 17:35:55.422 -     INFO :       token: ** hidden **
2025-03-13 17:35:55.422 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.422 -     INFO : Check config.yaml :
2025-03-13 17:35:55.422 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.422 -     INFO : CONFIG VALID
2025-03-13 17:35:55.422 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2025-03-13 17:35:55.903 -     INFO : Configure Databases
2025-03-13 17:35:55.925 -     INFO :  => day
2025-03-13 17:35:55.928 -     INFO :  => call_number
2025-03-13 17:35:55.929 -     INFO :  => max_call
2025-03-13 17:35:55.931 -     INFO :  => version
2025-03-13 17:35:55.932 -     INFO :  => lock
2025-03-13 17:35:55.934 -     INFO :  => lastUpdate
2025-03-13 17:35:55.934 -     INFO :  Success
2025-03-13 17:35:55.934 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.934 -     INFO : Connect to InfluxDB a0d7b954-influxdb:8086
2025-03-13 17:35:55.946 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.946 -     INFO : CONNECTION SUCCESS
2025-03-13 17:35:55.947 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.947 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.947 -     INFO : MÉTHODE D'IMPORTATION : SYNCHRONOUS
2025-03-13 17:35:55.947 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.947 -  WARNING :  => Aucune durée de rétention de données détectée.
2025-03-13 17:35:55.947 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.947 -     INFO : Connect to MQTT broker 192.168.0.4:1883
2025-03-13 17:35:55.948 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:55.948 -     INFO : CONNECTION SUCCESS
2025-03-13 17:35:55.948 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/app/models/query_contract.py:40: SyntaxWarning: invalid escape sequence '\('
  offpeak_hours = re.search("HC \((.*)\)", contracts["offpeak_hours"]).group(1)
2025-03-13 17:35:56.196 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:56.196 -     INFO : RUN IN PRODUCTION MODE
2025-03-13 17:35:56.196 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:56.196 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:56.196 -     INFO : CHARGEMENT DU CONFIG.YAML...
2025-03-13 17:35:56.196 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:35:56.196 -     INFO : ****
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1078, in _init_compiled
    processors[key](compiled_params[key])
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/main.py", line 26, in <module>
    DB.set_usage_point(upi, upi_data)
  File "/app/models/database.py", line 616, in set_usage_point
    self.session.flush()
  File "<string>", line 2, in flush
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
    flush_context.execute()

Une copie de mon fichier config.yaml:

cycle: 14400
debug: false
home_assistant:
  card_myenedis: true
  discovery_prefix: homeassistant
  enable: true
influxdb:
  bucket: "myelectricaldata/autogen"
  enable: true
  hostname: a0d7b954-influxdb
  method: synchronous
  org: "-"
  port: 8086
  token: myelectricaldata:myelectricaldata
  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:
  client_id: myelectricaldata
  enable: true
  hostname: 192.168.0.4
  port: 1883
  username: "****"
  password: "****"
  prefix: myelectricaldata
  retain: true
  qos: 0
home_assistant_ws:
  enable: true
  ssl: false
  token: ****
  url: 192.168.0.3:8123
  max_date: "2025-01-21"
  purge: false
myelectricaldata:
  "****":
    activation_date_daily: "2025-01-21"
    activation_date_detail: "2025-01-21"
    cache: true
    consumption: true
    consumption_detail: true
    consumption_max_power: true
    consumption_detail_max_date: "2025-01-21"
    consumption_max_date: "2025-01-21"
    consumption_price_base: ""
    consumption_price_hc: "0.1076"
    consumption_price_hp: "0.1502"
    enable: true
    name: "Maison"
    offpeak_hours_0: "00H00-07h00;23H00-23H59"
    offpeak_hours_1: "00H00-07h00;23H00-23H59"
    offpeak_hours_2: "00H00-07h00;23H00-23H59"
    offpeak_hours_3: "00H00-07h00;23H00-23H59"
    offpeak_hours_4: "00H00-07h00;23H00-23H59"
    offpeak_hours_5: "00H00-07h00;23H00-23H59"
    offpeak_hours_6: "00H00-07h00;23H00-23H59"
    plan: HC/HP
    production: false
    production_detail: false
    production_detail_max_date: ""
    production_max_date: ""
    production_price: 0
    refresh_addresse: true
    refresh_contract: true
    token: ****

En espérant avoir donné toutes les informations nécessaire et en vous remerciant par avance de l’aide que vous pourriez m’apporter,

Ma configuration


[center]## System Information

version core-2025.3.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.2
os_name Linux
os_version 6.6.73-haos
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 1591
Downloaded Repositories 19
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.2
update_channel stable
supervisor_version supervisor-2025.03.2
agent_version 1.6.0
docker_version 27.2.0
disk_total 30.8 GB
disk_used 8.8 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (20.0.2), Cloudflared (5.2.10), Studio Code Server (5.18.3), File editor (5.8.0), Linky (1.5.0), MyElectricalData (0.13.2), InfluxDB (5.0.2)
Dashboards
dashboards 2
resources 12
views 15
mode storage
MercedesME 2020
api_endpoint_reachable ok
websocket_connection_state closed
cars_connected 1
version v0.23.1
Network Configuration
adapters lo (disabled), enp0s18 (enabled, default, auto), hassio (disabled), docker0 (disabled), veth7d8cdd9 (disabled), veth2bba8b0 (disabled), veth5581e3f (disabled), veth927ce46 (disabled), veth173bc3d (disabled), veth170d74d (disabled), vethfc99aac (disabled), vethae3eb9c (disabled), vethaa2872b (disabled), veth040c6ca (disabled), veth7ed3428 (disabled)
ipv4_addresses lo (127.0.0.1/8), enp0s18 (192.168.0.3/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), veth7d8cdd9 (), veth2bba8b0 (), veth5581e3f (), veth927ce46 (), veth173bc3d (), veth170d74d (), vethfc99aac (), vethae3eb9c (), vethaa2872b (), veth040c6ca (), veth7ed3428 ()
ipv6_addresses lo (::1/128), enp0s18 (fe80::561c:d96d:cc27:a8d7/64), hassio (fe80::42:cbff:fe53:ebab/64), docker0 (fe80::42:bbff:fe6b:66a2/64), veth7d8cdd9 (fe80::b803:55ff:fe4a:c8f7/64), veth2bba8b0 (fe80::9c67:9dff:fe68:411d/64), veth5581e3f (fe80::2c1a:beff:fe72:22e3/64), veth927ce46 (fe80::98d1:48ff:fe9b:7dda/64), veth173bc3d (fe80::d092:21ff:fea4:899b/64), veth170d74d (fe80::d055:49ff:feff:cfcb/64), vethfc99aac (fe80::d058:62ff:fe7d:6a5d/64), vethae3eb9c (fe80::ce1:56ff:fe19:ba3e/64), vethaa2872b (fe80::24ab:baff:fe21:e1db/64), veth040c6ca (fe80::c454:aff:fec4:14f7/64), veth7ed3428 (fe80::409a:62ff:fe27:cc5e/64)
announce_addresses 192.168.0.3, fe80::561c:d96d:cc27:a8d7
Recorder
oldest_recorder_run 2 mars 2025 à 15:06
current_recorder_run 13 mars 2025 à 14:13
estimated_db_size 117.22 MiB
database_engine sqlite
database_version 3.48.0
[/center]

Bonjour,
chez moi, c’est configuré comme telle :

    offpeak_hours_0: '23H02-7H02'
    offpeak_hours_1: '23H02-7H02'
    offpeak_hours_2: '23H02-7H02'
    offpeak_hours_3: '23H02-7H02'
    offpeak_hours_4: '23H02-7H02'
    offpeak_hours_5: '23H02-7H02'
    offpeak_hours_6: '23H02-7H02'
myelectricaldata:
  "xxxxxxxxxxxxxxx":
    enable: 'true'
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    name: 'Maison'
    addresses: 'true'
    cache: 'true'
    consumption: 'true'
    consumption_detail: 'true'
    consumption_price_base: '0.2016'
    consumption_price_hc: '0.1608'
    consumption_price_hp: '0.2028'
    consumption_max_date: '2025-01-05'
    consumption_detail_max_date: '2025-01-05'
    offpeak_hours_0: '23H02-7H02'
    offpeak_hours_1: '23H02-7H02'
    offpeak_hours_2: '23H02-7H02'
    offpeak_hours_3: '23H02-7H02'
    offpeak_hours_4: '23H02-7H02'
    offpeak_hours_5: '23H02-7H02'
    offpeak_hours_6: '23H02-7H02'
    plan: HC/HP

c’est quoi ces tarifs ?

    consumption_price_hc: "0.1076"
    consumption_price_hp: "0.1502"

des tarifs de plusieurs années en arrière :sweat_smile:

Bonjour WarCOzes,

Tout d’abord, merci pour ton aide,
J’ai modifié les infos que tu m’as signalé et j’ai redémarré Home Assistant.
Cependant, j’ai toujours le même problème.

-----------------------------------------------------------
 Add-on: MyElectricalData
 Use Enedis Gateway API to send data in your MQTT Broker (latest channel)
-----------------------------------------------------------
 Add-on version: 0.13.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.2  (amd64 / qemux86-64)
 Home Assistant Core: 2025.3.2
 Home Assistant Supervisor: 2025.03.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: 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-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/myelectricaldata/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/enedisgateway2mqtt/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
cycle='14400'
debug='false'
home_assistant_card_myenedis='true'
home_assistant_discovery_prefix='homeassistant'
home_assistant_enable='true'
influxdb_bucket='myelectricaldata/autogen'
influxdb_enable='true'
influxdb_hostname='a0d7b954-influxdb'
influxdb_method='synchronous'
influxdb_org='-'
influxdb_port='8086'
influxdb_token='myelectricaldata:myelectricaldata'
influxdb_batching_options_batch_size='1000'
influxdb_batching_options_flush_interval='1000'
influxdb_batching_options_jitter_interval='0'
influxdb_batching_options_retry_interval='5000'
influxdb_batching_options_max_retry_time='180_000'
influxdb_batching_options_max_retries='5'
influxdb_batching_options_max_retry_delay='125_000'
influxdb_batching_options_exponential_base='2'
mqtt_client_id='myelectricaldata'
mqtt_enable='true'
mqtt_hostname='192.168.0.4'
mqtt_port='1883'
mqtt_username='***t'
mqtt_password='***'
mqtt_prefix='myelectricaldata'
mqtt_retain='true'
mqtt_qos='0'
home_assistant_ws_enable='true'
home_assistant_ws_ssl='false'
home_assistant_ws_token='****'
home_assistant_ws_url='192.168.0.3:8123'
home_assistant_ws_max_date='2025-01-21'
home_assistant_ws_purge='false'
myelectricaldata__activation_date_daily='2025-01-21'
myelectricaldata__activation_date_detail='2025-01-21'
myelectricaldata__cache='true'
myelectricaldata__consumption='true'
myelectricaldata__consumption_detail='true'
myelectricaldata__consumption_max_power='true'
myelectricaldata__consumption_detail_max_date='2025-01-21'
myelectricaldata__consumption_max_date='2025-01-21'
myelectricaldata__consumption_price_hc='0.1076'
myelectricaldata__consumption_price_hp='0.1502'
myelectricaldata__enable='true'
myelectricaldata__name='Maison'
myelectricaldata__offpeak_hours_0='23h02-07h02'
myelectricaldata__offpeak_hours_1='23h02-07h02'
myelectricaldata__offpeak_hours_2='23h02-07h02'
myelectricaldata__offpeak_hours_3='23h02-07h02'
myelectricaldata__offpeak_hours_4='23h02-07h02'
myelectricaldata__offpeak_hours_5='23h02-07h02'
myelectricaldata__offpeak_hours_6='23h02-07h02'
myelectricaldata__plan='HC/HP'
myelectricaldata__production='false'
myelectricaldata__production_detail='false'
myelectricaldata__production_price='0'
myelectricaldata__refresh_addresse='true'
myelectricaldata__refresh_contract='true'
myelectricaldata__token='****'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/enedisgateway2mqtt/enedisgateway2mqtt.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[17:54:42] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[17:54:43] FATAL: No internal MQTT service found. Please install Mosquitto broker
Error : /etc/cont-init.d/91-mqtt_autodiscover.sh exiting 1
/etc/cont-init.d/99-run.sh: executing
creating symlink
[17:54:43] INFO: Using database file found in /config/myelectricaldata
[17:54:43] INFO: Using config file found in /config/myelectricaldata/config.yaml
Config file is a valid yaml
[17:54:43] INFO: Starting nginx
[17:54:43] INFO: Starting the app
2025-03-13 17:54:43.846 -     INFO : Display configuration :
2025-03-13 17:54:43.846 -     INFO :   cycle: 14400
2025-03-13 17:54:43.846 -     INFO :   debug: False
2025-03-13 17:54:43.846 -     INFO :   home_assistant:
2025-03-13 17:54:43.847 -     INFO :     card_myenedis: True
2025-03-13 17:54:43.847 -     INFO :     discovery_prefix: homeassistant
2025-03-13 17:54:43.847 -     INFO :     enable: True
2025-03-13 17:54:43.847 -     INFO :   influxdb:
2025-03-13 17:54:43.847 -     INFO :     bucket: myelectricaldata/autogen
2025-03-13 17:54:43.847 -     INFO :     enable: True
2025-03-13 17:54:43.847 -     INFO :     hostname: a0d7b954-influxdb
2025-03-13 17:54:43.847 -     INFO :     method: synchronous
2025-03-13 17:54:43.847 -     INFO :     org: -
2025-03-13 17:54:43.847 -     INFO :     port: 8086
2025-03-13 17:54:43.847 -     INFO :     token: ** hidden **
2025-03-13 17:54:43.847 -     INFO :     batching_options:
2025-03-13 17:54:43.847 -     INFO :       batch_size: 1000
2025-03-13 17:54:43.847 -     INFO :       flush_interval: 1000
2025-03-13 17:54:43.847 -     INFO :       jitter_interval: 0
2025-03-13 17:54:43.847 -     INFO :       retry_interval: 5000
2025-03-13 17:54:43.847 -     INFO :       max_retry_time: 180000
2025-03-13 17:54:43.847 -     INFO :       max_retries: 5
2025-03-13 17:54:43.847 -     INFO :       max_retry_delay: 125000
2025-03-13 17:54:43.847 -     INFO :       exponential_base: 2
2025-03-13 17:54:43.847 -     INFO :   mqtt:
2025-03-13 17:54:43.847 -     INFO :     client_id: myelectricaldata
2025-03-13 17:54:43.848 -     INFO :     enable: True
2025-03-13 17:54:43.848 -     INFO :     hostname: 192.168.0.4
2025-03-13 17:54:43.848 -     INFO :     port: 1883
2025-03-13 17:54:43.848 -     INFO :     username: root
2025-03-13 17:54:43.848 -     INFO :     password: ** hidden **
2025-03-13 17:54:43.848 -     INFO :     prefix: myelectricaldata
2025-03-13 17:54:43.848 -     INFO :     retain: True
2025-03-13 17:54:43.848 -     INFO :     qos: 0
2025-03-13 17:54:43.848 -     INFO :   home_assistant_ws:
2025-03-13 17:54:43.848 -     INFO :     enable: True
2025-03-13 17:54:43.848 -     INFO :     ssl: False
2025-03-13 17:54:43.848 -     INFO :     token: ** hidden **
2025-03-13 17:54:43.848 -     INFO :     url: 192.168.0.3:8123
2025-03-13 17:54:43.848 -     INFO :     max_date: 2025-01-21
2025-03-13 17:54:43.848 -     INFO :     purge: False
2025-03-13 17:54:43.848 -     INFO :   myelectricaldata:
2025-03-13 17:54:43.848 -     INFO :     16130101091619:
2025-03-13 17:54:43.848 -     INFO :       activation_date_daily: 2025-01-21
2025-03-13 17:54:43.849 -     INFO :       activation_date_detail: 2025-01-21
2025-03-13 17:54:43.849 -     INFO :       cache: True
2025-03-13 17:54:43.849 -     INFO :       consumption: True
2025-03-13 17:54:43.849 -     INFO :       consumption_detail: True
2025-03-13 17:54:43.849 -     INFO :       consumption_max_power: True
2025-03-13 17:54:43.849 -     INFO :       consumption_detail_max_date: 2025-01-21
2025-03-13 17:54:43.849 -     INFO :       consumption_max_date: 2025-01-21
2025-03-13 17:54:43.849 -     INFO :       consumption_price_base: 
2025-03-13 17:54:43.849 -     INFO :       consumption_price_hc: 0.1076
2025-03-13 17:54:43.849 -     INFO :       consumption_price_hp: 0.1502
2025-03-13 17:54:43.849 -     INFO :       enable: True
2025-03-13 17:54:43.849 -     INFO :       name: Maison
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_0: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_1: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_2: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_3: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_4: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_5: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       offpeak_hours_6: 23h02-07h02
2025-03-13 17:54:43.849 -     INFO :       plan: HC/HP
2025-03-13 17:54:43.849 -     INFO :       production: False
2025-03-13 17:54:43.849 -     INFO :       production_detail: False
2025-03-13 17:54:43.850 -     INFO :       production_detail_max_date: 
2025-03-13 17:54:43.850 -     INFO :       production_max_date: 
2025-03-13 17:54:43.850 -     INFO :       production_price: 0
2025-03-13 17:54:43.850 -     INFO :       refresh_addresse: True
2025-03-13 17:54:43.850 -     INFO :       refresh_contract: True
2025-03-13 17:54:43.850 -     INFO :       token: ** hidden **
2025-03-13 17:54:43.850 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:43.850 -     INFO : Check config.yaml :
2025-03-13 17:54:43.850 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:43.850 -     INFO : CONFIG VALID
2025-03-13 17:54:43.850 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2025-03-13 17:54:44.244 -     INFO : Configure Databases
2025-03-13 17:54:44.263 -     INFO :  => day
2025-03-13 17:54:44.265 -     INFO :  => call_number
2025-03-13 17:54:44.267 -     INFO :  => max_call
2025-03-13 17:54:44.269 -     INFO :  => version
2025-03-13 17:54:44.270 -     INFO :  => lock
2025-03-13 17:54:44.272 -     INFO :  => lastUpdate
2025-03-13 17:54:44.272 -     INFO :  Success
2025-03-13 17:54:44.272 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.272 -     INFO : Connect to InfluxDB a0d7b954-influxdb:8086
2025-03-13 17:54:44.283 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.283 -     INFO : CONNECTION SUCCESS
2025-03-13 17:54:44.283 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.283 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.284 -     INFO : MÉTHODE D'IMPORTATION : SYNCHRONOUS
2025-03-13 17:54:44.284 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.284 -  WARNING :  => Aucune durée de rétention de données détectée.
2025-03-13 17:54:44.284 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.284 -     INFO : Connect to MQTT broker 192.168.0.4:1883
2025-03-13 17:54:44.285 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.285 -     INFO : CONNECTION SUCCESS
2025-03-13 17:54:44.285 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/app/models/query_contract.py:40: SyntaxWarning: invalid escape sequence '\('
  offpeak_hours = re.search("HC \((.*)\)", contracts["offpeak_hours"]).group(1)
2025-03-13 17:54:44.474 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.474 -     INFO : RUN IN PRODUCTION MODE
2025-03-13 17:54:44.474 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.474 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.474 -     INFO : CHARGEMENT DU CONFIG.YAML...
2025-03-13 17:54:44.474 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 17:54:44.474 -     INFO : ****
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1078, in _init_compiled
    processors[key](compiled_params[key])
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/main.py", line 26, in <module>
    DB.set_usage_point(upi, upi_data)
  File "/app/models/database.py", line 616, in set_usage_point
    self.session.flush()
  File "<string>", line 2, in flush
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
    util.preloaded.orm_persistence.save_obj(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 237, in save_obj
    _emit_update_statements(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 1001, in _emit_update_statements
    c = connection._execute_20(
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1816, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1078, in _init_compiled
    processors[key](compiled_params[key])
sqlalchemy.exc.StatementError: (builtins.ValueError) could not convert string to float: ''
[SQL: UPDATE usage_points SET consumption_price_base=?, consumption_price_hc=?, consumption_price_hp=?, offpeak_hours_0=?, offpeak_hours_1=?, offpeak_hours_2=?, offpeak_hours_3=?, offpeak_hours_4=?, offpeak_hours_5=?, offpeak_hours_6=?, refresh_contract=?, token=? WHERE usage_points.usage_point_id = ?]

Concernant les tarifs, je confirme, ce sont les bons :grinning:, mais en HT:

en te remerciant par avance de l’aide que tu pourras m’apporter,

tu as cette erreur, tu as bien installé mosquitto broker en module complémentaire ?

c’est pas 23h00-7h00 chez toi ?
ta mis mes horaires :sweat_smile:

Ah c’est du HT , OK !
c’est pas mieux de mettre le prix TTC ?

Après je ne sais pas si MyElectricalData gère les abonnements HP/HC avec des heures super creuse

Je pense que oui. Peux-tu me confirmer que je ne me trompe pas?

Oui, tu as raison, mais c’était déjà pour voir si la syntaxe dans le fichier config corrigeait le problème.

Idem, j’ai rentré les prix HT pour ma phase de test.
Concernant les heures super creuses, je ne pense pas que MyElectricalData les gère.
J’avais posé précédemment la question dans un autre post:

Ca c’est l’intégration MQTT, pas le module complémentaire mosquitto broker.

Effectivement, je viens de le réinstaller:

J’ai du faire une mauvaise manipulation et le désinstaller par inadvertance.

Par contre après réinstallation, cela ne démarre toujours pas:

-----------------------------------------------------------
 Add-on: MyElectricalData
 Use Enedis Gateway API to send data in your MQTT Broker (latest channel)
-----------------------------------------------------------
 Add-on version: 0.13.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.2  (amd64 / qemux86-64)
 Home Assistant Core: 2025.3.2
 Home Assistant Supervisor: 2025.03.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: 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-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/myelectricaldata/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/enedisgateway2mqtt/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
cycle='14400'
debug='false'
home_assistant_card_myenedis='true'
home_assistant_discovery_prefix='homeassistant'
home_assistant_enable='true'
influxdb_bucket='myelectricaldata/autogen'
influxdb_enable='true'
influxdb_hostname='a0d7b954-influxdb'
influxdb_method='synchronous'
influxdb_org='-'
influxdb_port='8086'
influxdb_token='myelectricaldata:myelectricaldata'
influxdb_batching_options_batch_size='1000'
influxdb_batching_options_flush_interval='1000'
influxdb_batching_options_jitter_interval='0'
influxdb_batching_options_retry_interval='5000'
influxdb_batching_options_max_retry_time='180_000'
influxdb_batching_options_max_retries='5'
influxdb_batching_options_max_retry_delay='125_000'
influxdb_batching_options_exponential_base='2'
mqtt_client_id='myelectricaldata'
mqtt_enable='true'
mqtt_hostname='192.168.0.4'
mqtt_port='1883'
mqtt_username='****'
mqtt_password='****'
mqtt_prefix='myelectricaldata'
mqtt_retain='true'
mqtt_qos='0'
home_assistant_ws_enable='true'
home_assistant_ws_ssl='false'
home_assistant_ws_token='****'
home_assistant_ws_url='192.168.0.3:8123'
home_assistant_ws_max_date='2025-01-21'
home_assistant_ws_purge='false'
myelectricaldata__activation_date_daily='2025-01-21'
myelectricaldata__activation_date_detail='2025-01-21'
myelectricaldata__cache='true'
myelectricaldata__consumption='true'
myelectricaldata__consumption_detail='true'
myelectricaldata__consumption_max_power='true'
myelectricaldata__consumption_detail_max_date='2025-01-21'
myelectricaldata__consumption_max_date='2025-01-21'
myelectricaldata__consumption_price_hc='0.1076'
myelectricaldata__consumption_price_hp='0.1502'
myelectricaldata__enable='true'
myelectricaldata__name='Maison'
myelectricaldata__offpeak_hours_0='23h02-07h02'
myelectricaldata__offpeak_hours_1='23h02-07h02'
myelectricaldata__offpeak_hours_2='23h02-07h02'
myelectricaldata__offpeak_hours_3='23h02-07h02'
myelectricaldata__offpeak_hours_4='23h02-07h02'
myelectricaldata__offpeak_hours_5='23h02-07h02'
myelectricaldata__offpeak_hours_6='23h02-07h02'
myelectricaldata__plan='HC/HP'
myelectricaldata__production='false'
myelectricaldata__production_detail='false'
myelectricaldata__production_price='0'
myelectricaldata__refresh_addresse='true'
myelectricaldata__refresh_contract='true'
myelectricaldata__token='****'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/enedisgateway2mqtt/enedisgateway2mqtt.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[19:14:28] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[19:14:28] 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=addons
MQTT_PASSWORD=noo3fahng0iephu5feziangahQui3Ohshemah4eefahsh3aicah8xoutoh6Iepho
/etc/cont-init.d/99-run.sh: executing
creating symlink
[19:14:28] INFO: Using database file found in /config/myelectricaldata
[19:14:29] INFO: Using config file found in /config/myelectricaldata/config.yaml
Config file is a valid yaml
[19:14:29] INFO: Starting nginx
[19:14:29] INFO: Starting the app
2025-03-13 19:14:29.801 -     INFO : Display configuration :
2025-03-13 19:14:29.801 -     INFO :   cycle: 14400
2025-03-13 19:14:29.801 -     INFO :   debug: False
2025-03-13 19:14:29.801 -     INFO :   home_assistant:
2025-03-13 19:14:29.801 -     INFO :     card_myenedis: True
2025-03-13 19:14:29.801 -     INFO :     discovery_prefix: homeassistant
2025-03-13 19:14:29.801 -     INFO :     enable: True
2025-03-13 19:14:29.802 -     INFO :   influxdb:
2025-03-13 19:14:29.802 -     INFO :     bucket: myelectricaldata/autogen
2025-03-13 19:14:29.802 -     INFO :     enable: True
2025-03-13 19:14:29.802 -     INFO :     hostname: a0d7b954-influxdb
2025-03-13 19:14:29.802 -     INFO :     method: synchronous
2025-03-13 19:14:29.802 -     INFO :     org: -
2025-03-13 19:14:29.802 -     INFO :     port: 8086
2025-03-13 19:14:29.802 -     INFO :     token: ** hidden **
2025-03-13 19:14:29.802 -     INFO :     batching_options:
2025-03-13 19:14:29.802 -     INFO :       batch_size: 1000
2025-03-13 19:14:29.802 -     INFO :       flush_interval: 1000
2025-03-13 19:14:29.802 -     INFO :       jitter_interval: 0
2025-03-13 19:14:29.802 -     INFO :       retry_interval: 5000
2025-03-13 19:14:29.802 -     INFO :       max_retry_time: 180000
2025-03-13 19:14:29.802 -     INFO :       max_retries: 5
2025-03-13 19:14:29.802 -     INFO :       max_retry_delay: 125000
2025-03-13 19:14:29.802 -     INFO :       exponential_base: 2
2025-03-13 19:14:29.802 -     INFO :   mqtt:
2025-03-13 19:14:29.802 -     INFO :     client_id: myelectricaldata
2025-03-13 19:14:29.802 -     INFO :     enable: True
2025-03-13 19:14:29.803 -     INFO :     hostname: 192.168.0.4
2025-03-13 19:14:29.803 -     INFO :     port: 1883
2025-03-13 19:14:29.803 -     INFO :     username: root
2025-03-13 19:14:29.803 -     INFO :     password: ** hidden **
2025-03-13 19:14:29.803 -     INFO :     prefix: myelectricaldata
2025-03-13 19:14:29.803 -     INFO :     retain: True
2025-03-13 19:14:29.803 -     INFO :     qos: 0
2025-03-13 19:14:29.803 -     INFO :   home_assistant_ws:
2025-03-13 19:14:29.803 -     INFO :     enable: True
2025-03-13 19:14:29.803 -     INFO :     ssl: False
2025-03-13 19:14:29.803 -     INFO :     token: ** hidden **
2025-03-13 19:14:29.803 -     INFO :     url: 192.168.0.3:8123
2025-03-13 19:14:29.803 -     INFO :     max_date: 2025-01-21
2025-03-13 19:14:29.803 -     INFO :     purge: False
2025-03-13 19:14:29.803 -     INFO :   myelectricaldata:
2025-03-13 19:14:29.803 -     INFO :     16130101091619:
2025-03-13 19:14:29.803 -     INFO :       activation_date_daily: 2025-01-21
2025-03-13 19:14:29.803 -     INFO :       activation_date_detail: 2025-01-21
2025-03-13 19:14:29.803 -     INFO :       cache: True
2025-03-13 19:14:29.803 -     INFO :       consumption: True
2025-03-13 19:14:29.804 -     INFO :       consumption_detail: True
2025-03-13 19:14:29.804 -     INFO :       consumption_max_power: True
2025-03-13 19:14:29.804 -     INFO :       consumption_detail_max_date: 2025-01-21
2025-03-13 19:14:29.804 -     INFO :       consumption_max_date: 2025-01-21
2025-03-13 19:14:29.804 -     INFO :       consumption_price_base: 
2025-03-13 19:14:29.804 -     INFO :       consumption_price_hc: 0.1076
2025-03-13 19:14:29.804 -     INFO :       consumption_price_hp: 0.1502
2025-03-13 19:14:29.804 -     INFO :       enable: True
2025-03-13 19:14:29.804 -     INFO :       name: Maison
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_0: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_1: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_2: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_3: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_4: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_5: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       offpeak_hours_6: 23h02-07h02
2025-03-13 19:14:29.804 -     INFO :       plan: HC/HP
2025-03-13 19:14:29.804 -     INFO :       production: False
2025-03-13 19:14:29.804 -     INFO :       production_detail: False
2025-03-13 19:14:29.804 -     INFO :       production_detail_max_date: 
2025-03-13 19:14:29.805 -     INFO :       production_max_date: 
2025-03-13 19:14:29.805 -     INFO :       production_price: 0
2025-03-13 19:14:29.805 -     INFO :       refresh_addresse: True
2025-03-13 19:14:29.805 -     INFO :       refresh_contract: True
2025-03-13 19:14:29.805 -     INFO :       token: ** hidden **
2025-03-13 19:14:29.805 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:29.805 -     INFO : Check config.yaml :
2025-03-13 19:14:29.805 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:29.805 -     INFO : CONFIG VALID
2025-03-13 19:14:29.805 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2025-03-13 19:14:30.312 -     INFO : Configure Databases
2025-03-13 19:14:30.334 -     INFO :  => day
2025-03-13 19:14:30.336 -     INFO :  => call_number
2025-03-13 19:14:30.338 -     INFO :  => max_call
2025-03-13 19:14:30.339 -     INFO :  => version
2025-03-13 19:14:30.341 -     INFO :  => lock
2025-03-13 19:14:30.342 -     INFO :  => lastUpdate
2025-03-13 19:14:30.342 -     INFO :  Success
2025-03-13 19:14:30.343 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.343 -     INFO : Connect to InfluxDB a0d7b954-influxdb:8086
2025-03-13 19:14:30.355 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.355 -     INFO : CONNECTION SUCCESS
2025-03-13 19:14:30.355 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.355 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.355 -     INFO : MÉTHODE D'IMPORTATION : SYNCHRONOUS
2025-03-13 19:14:30.355 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.356 -  WARNING :  => Aucune durée de rétention de données détectée.
2025-03-13 19:14:30.356 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.356 -     INFO : Connect to MQTT broker 192.168.0.4:1883
2025-03-13 19:14:30.357 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.357 -     INFO : CONNECTION SUCCESS
2025-03-13 19:14:30.357 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/app/models/query_contract.py:40: SyntaxWarning: invalid escape sequence '\('
  offpeak_hours = re.search("HC \((.*)\)", contracts["offpeak_hours"]).group(1)
2025-03-13 19:14:30.579 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.579 -     INFO : RUN IN PRODUCTION MODE
2025-03-13 19:14:30.579 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.579 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.579 -     INFO : CHARGEMENT DU CONFIG.YAML...
2025-03-13 19:14:30.579 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2025-03-13 19:14:30.579 -     INFO : ****
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1078, in _init_compiled
    processors[key](compiled_params[key])
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/main.py", line 26, in <module>
    DB.set_usage_point(upi, upi_data)
  File "/app/models/database.py", line 616, in set_usage_point
    self.session.flush()
  File "<string>", line 2, in flush
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
    flush_context.execute()

J’imagine que qu’une configuration de mosquitto broker est nécessaire ?

Si je peux encore abuser de ta patience pour m’aider au parametrage ?

Mosquitto broker n’est pas le problème, ca fonctionne.

C’est ce message plutot:

2025-03-13 19:14:30.356 -  WARNING :  => Aucune durée de rétention de données détectée.

sur enedis, tu as bien des données ?
arf en maintenance:

regarde les options disponible pour la partie myelectricaldata:

je ne sais pas d’où tu sors activation_date_daily: "2025-01-21" et activation_date_detail: "2025-01-21", je ne vois pas ces option disponible.

J’ai essayé en les enlevant, même problème au lancement.

J’ai fait une mauvaise manipulation mais je n’arrive pas à me rappeler l’erreur que j’ai faite.

C’est rageant car il fonctionnait parfaitement avant.


je ne me rappelle pas si j’avais ajouté un utilisateur pour mosquitto broker.

C’est pas obligatoire:
Une liste d’utilisateurs locaux sera créée avec un nom d’utilisateur et un mot de passe. Cette étape est inutile, car vous pouvez également utiliser les utilisateurs Home Assistant sans aucune configuration. Vous pouvez également spécifier « password_pre_hashed: true » pour utiliser un mot de passe préhaché issu de la sortie de la commande « pw » (présente dans le conteneur).

tu peux créer des utilisateurs sur HA et les utiliser pour te connecter au broker.

c’est ce que j’utilise pour MyElectricalData, j’ai créer un utiliateur et me sers de c’est identifiant pour me connecter au broker pour MED.

Tu as bien des données sur le site enedis et les collectes d’activé ?

Après vérifications, concernant le broker, je n’avais pas d’utilisateur spécifique car je l’aurai retrouvé dans les utilisateurs.

Concernant les données, oui j’ai revérifié:

j’avais revérifié ce matin quand j’ai refais les consentements.

Je sèche complètement.

ta pas de date d’activation
image
le service n’est pas encore en place. il faut attendre 24/48h. C’est pour ca que MED fonctionne pas.

oui, je suis d’accord avec toi. Mais je n’ai même pas la page myelectricaldata.

Je ne pense pas que ce soit un problème de données à l’heure actuelle. J’imagine que c’est la c****rie que j’ai du faire qui empêche le module de se lancer.
Impossible de me rappeler le lien du support qui m’avait permis ma première installation.

Tu parles du wiki de MED ?
Sur le github, ta le lien du wiki:

Oui le wiki je l’ai trouvé et épluché. Mais ca ne parle pas de mosquitto broker.
Si je l’avais installé sur la première version qui fonctionnait, c’est que j’avais dû trouvé un fil qui en parlait et qui devait expliquer la procédure d’installation complète.

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1810, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 1078, in _init_compiled
    processors[key](compiled_params[key])
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/main.py", line 26, in <module>
    DB.set_usage_point(upi, upi_data)
  File "/app/models/database.py", line 616, in set_usage_point
    self.session.flush()
  File "<string>", line 2, in flush
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
    flush_context.execute()

j’ai fait des recherches sur ces lignes mais je ne trouve pas plus d’indication.

Bon, après une bonne prise de tête, j’ai enfin réussi à remettre le module en route.
J’ai tout désinstallé, supprimer le fichier config de MED, réinstaller mosquitto broker et MyElectricalData.

J’ai relancé MED sans fichier config pour qu’un fichier config vierge soit créé et j’ai remis mes infos dans le nouveau en faisant des relances successives pour voir la ligne de commande qui faisait planter le lancement.

Apparement, c’est la ligne

   consumption_price_base: ""

qui faisait planter le module. Du coup, en la modifiant sous cette forme là:

   consumption_price_base: "0.0"

Ca a fonctionné.

j’ai remis en route influxdb et tout refonctionne normalement,

En tout cas, merci beaucoup pour ta patience et tes conseils.

La prochaine fois, je ferai plus attention à ce que je modifie.

1 « J'aime »

Ce sujet a été automatiquement fermé après 2 jours. Aucune réponse n’est permise dorénavant.