My electrical data est hs

Bonjour ,

Mon problème

alors que tout aller bien , après 1 mois environs d’utilisation fonctionnelle ( donc la config est bonne) , crash du system med , et je vois pas de ou ca vient …

Ma configuration

Version core-2023.8.2
Type d’installation Home Assistant OS
Développement false
Supervisor true
Docker true
Utilisateur root
Environnement virtuel false
Version de Python 3.11.4
Famille du système d’exploitation Linux
Version du système d’exploitation 6.1.39
Architecture du processeur x86_64
Fuseau horaire Europe/Paris
Répertoire de configuration /config

Home Assistant Supervisor

Système d’exploitation hôte Home Assistant OS 10.4
Mise à jour stable
Version du Supervisor supervisor-2023.08.1
Version de l’agent 1.5.1
Version de Docker 23.0.6
Taille total du disque 109.3 GB
Taille du disque utilisé 12.6 GB
Sain true
Prise en charge true
Tableau de bord generic-x86-64
API du Supervisor ok
Version API ok
Modules complémentaires installés File editor (5.6.0), Advanced SSH & Web Terminal (15.0.6), Studio Code Server (5.10.0), ESPHome (2023.7.1), Mosquitto broker (6.2.1), Terminal & SSH (9.7.1), Zigbee2MQTT (1.32.2-1), Grafana (9.0.3), InfluxDB (4.7.0), Samba share (10.0.2), MQTT Explorer (browser-1.0.1), MyElectricalData (0.9.0)

le fichier du journal de démarrage de med

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.9.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.4  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.8.2
 Home Assistant Supervisor: 2023.08.1
-----------------------------------------------------------
 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-custom_script.sh: executing
[19:04:27] INFO: Execute /config/addons_autoscripts/enedisgateway2mqtt.sh if existing
[19:04:27] INFO: ... no script found
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/91-mqtt_autodiscover.sh: executing
[19:04:28] INFO: mqtt_autodiscover is defined in options, attempting autodiscovery...
[19:04: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=us2eebeeL6XaeW9Qui4yaekiphiengohPhang8ziaKahw1IeK7aiphee9ophae0i
/etc/cont-init.d/99-run.sh: executing
creating symlink
[19:04:28] INFO: Using database file found in /config/myelectricaldata
[19:04:28] INFO: Using config file found in /config/myelectricaldata/config.yaml
Config file is a valid yaml
 
[19:04:28] INFO: Starting nginx
 
[19:04:28] INFO: Starting the app
2023-08-12 19:05:13.762 -     INFO :       production: False
2023-08-12 19:05:13.762 -     INFO :       production_detail: False
2023-08-12 19:05:13.763 -     INFO :       production_detail_max_date: 
2023-08-12 19:05:13.763 -     INFO :       production_max_date: 
2023-08-12 19:05:13.763 -     INFO :       production_price: 0
2023-08-12 19:05:13.763 -     INFO :       refresh_addresse: True
2023-08-12 19:05:13.763 -     INFO :       refresh_contract: True
2023-08-12 19:05:13.763 -     INFO :       token: ** hidden **
2023-08-12 19:05:13.763 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:13.763 -     INFO : Check config.yaml :
2023-08-12 19:05:13.763 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:13.763 -     INFO :   CONFIG VALID
2023-08-12 19:05:13.763 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2023-08-12 19:05:14.271 -     INFO : Configure Databases
2023-08-12 19:05:14.294 -     INFO :  => day
2023-08-12 19:05:14.297 -     INFO :  => call_number
2023-08-12 19:05:14.298 -     INFO :  => max_call
2023-08-12 19:05:14.300 -     INFO :  => version
2023-08-12 19:05:14.302 -     INFO :  => lock
2023-08-12 19:05:14.304 -     INFO :  => lastUpdate
2023-08-12 19:05:14.304 -     INFO :  Success
2023-08-12 19:05:14.304 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.304 -     INFO : Connect to MQTT broker core-mosquitto:1883
2023-08-12 19:05:14.308 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.308 -     INFO :   CONNECTION SUCCESS
2023-08-12 19:05:14.308 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.476 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.476 -     INFO :   RUN IN PRODUCTION MODE
2023-08-12 19:05:14.476 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.476 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.476 -     INFO :   CHARGEMENT DU CONFIG.YAML...
2023-08-12 19:05:14.476 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◦ ❖ ◦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-08-12 19:05:14.476 -     INFO : 041XXXXXX262
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1800, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 1076, in _init_compiled
    param = [
            ^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 1077, in <listcomp>
    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 30, in <module>
    DB.set_usage_point(upi, upi_data)
  File "/app/models/database.py", line 576, in set_usage_point
    self.session.flush()
  File "<string>", line 2, in flush
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3386, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3525, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
    raise exception
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3486, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
    util.preloaded.orm_persistence.save_obj(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 237, in save_obj
    _emit_update_statements(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 1001, in _emit_update_statements
    c = connection._execute_20(
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1806, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
    raise exception
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1800, in _execute_context
    context = constructor(
              ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 1076, in _init_compiled
    param = [
            ^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 1077, in <listcomp>
    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=? WHERE usage_points.usage_point_id = ?]
[parameters: [{'consumption_price_hp': '0.2460', 'consumption_price_hc': '0.1828', 'consumption_price_base': '', 'usage_points_usage_point_id': '04174XXXXXXX62'}]]
[19:05:14] FATAL: The app has crashed. Are you sure you entered the correct config options?
 

pour ceux qui auront le même problème …
me demander pas pourquoi mais du jour au lendemain , peut être suite a une mise a jour , Med a refusé les apostrophes ( ’ ) sur les heures :

    offpeak_hours_0: 23H30-7H30
    offpeak_hours_1: 23H30-7H30
    offpeak_hours_2: 23H30-7H30
    offpeak_hours_3: 23H30-7H30
    offpeak_hours_4: 23H30-7H30
    offpeak_hours_5: 23H30-7H30
    offpeak_hours_6: 23H30-7H30

depuis 2 mois ca tourné avec

    offpeak_hours_0: '23H30-7H30'
    offpeak_hours_1: '23H30-7H30'
    offpeak_hours_2: '23H30-7H30'
    offpeak_hours_3: '23H30-7H30'
    offpeak_hours_4: '23H30-7H30'
    offpeak_hours_5: '23H30-7H30'
    offpeak_hours_6: '23H30-7H30'

mais plus maintenant …