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
, mais en HT:
en te remerciant par avance de l’aide que tu pourras m’apporter,