GAZPAR_2_MQTT: vos consos de gaz depuis GRDF

Sujet renouvellé … l’ancienne est archivé et se trouve ICI
Intégration pour télécharger vos consos gaz depuis GRDF
GAZPAR_2_MQTT sur github

Bonjour

Tout nouvel utilisateur de HA, c’est ma première question sur ce forum.

J’ai installé le composant Mosquito Broker et l’addon Gazpar, mais lorsque je démarre, j’ai ça dans les logs.

J’en déduis que mes identifiant GRDF sont ok, mais que j’ai un soucis avec MQTT

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Copying config
 does not follow the correct structure. Please check your yaml file.
2025-03-18 08:54:58,411 INFO -----------------------------------------------------------
2025-03-18 08:54:58,411 INFO #               Welcome to gazpar2mqtt                    #
2025-03-18 08:54:58,411 INFO -----------------------------------------------------------
2025-03-18 08:54:58,411 INFO Program version : 0.8.9
2025-03-18 08:54:58,412 INFO Database version : 0.4.0
2025-03-18 08:54:58,412 INFO Influxdb version : 0.1.0
2025-03-18 08:54:58,412 INFO Please note that the the tool is under development, various functions may disappear or be modified.
2025-03-18 08:54:58,412 INFO -----------------------------------------------------------
2025-03-18 08:54:58,412 INFO #                Program parameters                       #
2025-03-18 08:54:58,412 INFO -----------------------------------------------------------
2025-03-18 08:54:58,412 INFO MQTT broker config : host = 192.168.x.y, port = 1883, clientId = gazpar_client_haos, qos = 1, topic = gazpar_haos, retain = True, ssl = False
2025-03-18 08:54:58,412 INFO Standlone mode : Enable = False
2025-03-18 08:54:58,413 INFO Home Assistant discovery : Enable = True, Topic prefix = homeassistant, Device name = gazpar
2025-03-18 08:54:58,413 INFO Threshold options : Warning percentage = 80
2025-03-18 08:54:58,413 INFO Database options : Force reinitialization = False, Path = /data
2025-03-18 08:54:58,413 INFO Debug mode : Enable = False
2025-03-18 08:54:58,413 INFO Check parameters...
2025-03-18 08:54:58,413 INFO Parameters are ok !
2025-03-18 08:54:58,413 INFO -----------------------------------------------------------
2025-03-18 08:54:58,413 INFO #        Connection to SQLite database                     #
2025-03-18 08:54:58,413 INFO -----------------------------------------------------------
2025-03-18 08:54:58,414 INFO Connection to SQLite database...
2025-03-18 08:54:58,414 INFO SQLite database connected !
2025-03-18 08:54:58,415 INFO Last execution date 2025-03-18 07:43:19.107378, program was in version 0.8.9.
2025-03-18 08:54:58,415 INFO Checking database version...
2025-03-18 08:54:58,415 INFO Your database is already up to date : version 0.4.0.
2025-03-18 08:54:58,415 INFO Retrieve database statistics...
2025-03-18 08:54:58,417 INFO 857 informatives measures stored
2025-03-18 08:54:58,417 INFO 1 PCE(s)
2025-03-18 08:54:58,417 INFO First measure : 2022-11-08
2025-03-18 08:54:58,418 INFO Last measure : 2025-03-15
2025-03-18 08:54:58,418 INFO -----------------------------------------------------------
2025-03-18 08:54:58,418 INFO #              Connection to Mqtt broker                   #
2025-03-18 08:54:58,418 INFO -----------------------------------------------------------
2025-03-18 08:54:58,418 INFO Connect to Mqtt broker...
2025-03-18 08:54:58,426 ERROR Unable to connect to Mqtt broker. Please check that broker is running, or check broker configuration.
2025-03-18 08:54:58,427 INFO -----------------------------------------------------------
2025-03-18 08:54:58,427 INFO #                    Load prices                          #
2025-03-18 08:54:58,427 INFO -----------------------------------------------------------
2025-03-18 08:54:58,427 INFO Loading prices from file prices.csv of directory /data
2025-03-18 08:54:58,428 WARNING Unable to find price file prices.csv in directory /data
2025-03-18 08:54:58,428 INFO -----------------------------------------------------------
2025-03-18 08:54:58,428 INFO #                    Write prices                         #
2025-03-18 08:54:58,428 INFO -----------------------------------------------------------
Traceback (most recent call last):
  File "//app/gazpar2mqtt.py", line 1191, in <module>
    run(myParams)
  File "//app/gazpar2mqtt.py", line 719, in run
    if myGrdf.isConnected \
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'isConnected'

Pour info, voici le contenu de mon fichier /root/config/gazpar_2_mqtt/config.yaml

GRDF_USERNAME=*******
GRDF_PASSWORD=*********
MQTT_TOPIC=gazpar_haos
MQTT_CLIENTID=gazpar_client_haos
HASS_DISCOVERY=True
HASS_PREFIX=homeassistant
HASS_DEVICE_NAME=gazpar
SCHEDULE_TIME=06:30

t’as installé MQTT sur HAOS?

Bonjour @vingerha

J’ai le module complémentaire Mosquitto broker et l’intégration MQTT qui tournent

t’as changé autodiscover vers ‹ off › ? ça doit 6etre on si t’utilise le Mosquitto locale

Oui, c’est bien « off »

Je tente toujours.

Dans le config.yaml j’ai rajouté le facultatif :

MQTT_HOST=192.168.1.127

Ça semble faire avancer, car maintenant dans les logs j’ai

--------------------------------------
2025-03-19 22:17:18,805 INFO Connect to Mqtt broker...
2025-03-19 22:17:20,810 ERROR Mqtt on_connect callback : connexion failed
2025-03-19 22:17:20,811 ERROR Mqtt on_disconnect callback : broker has been disconnected unexpectly
2025-03-19 22:17:21,815 ERROR Mqtt on_connect callback : connexion failed
2025-03-19 22:17:21,816 ERROR Mqtt on_disconnect callback : broker has been disconnected unexpectly

Et côté Mosquito

2025-03-19 22:17:18: New connection from 172.30.32.1:48052 on port 1883.
2025-03-19 22:17:18: Sending CONNACK to gazpar_client_haos (0, 5)
2025-03-19 22:17:18: Client gazpar_client_haos disconnected, not authorised.

Des nouvelles

Vu, le message d’erreur « not authorized », j’ai cherché du coté des ACL. j’ai donc créé un utilisateur pour Mosquitto (je ne l’avais pas fait car la doc précise que c’est facultatif)

j’avance donc, car maintenant j’ai ceci dans les logs:

2025-03-20 06:21:06,360 INFO -----------------------------------------------------------
2025-03-20 06:21:06,360 INFO #               Welcome to gazpar2mqtt                    #
2025-03-20 06:21:06,361 INFO -----------------------------------------------------------
2025-03-20 06:21:06,361 INFO Program version : 0.8.9
2025-03-20 06:21:06,361 INFO Database version : 0.4.0
2025-03-20 06:21:06,362 INFO Influxdb version : 0.1.0
2025-03-20 06:21:06,363 INFO Please note that the the tool is under development, various functions may disappear or be modified.
2025-03-20 06:21:06,363 INFO -----------------------------------------------------------
2025-03-20 06:21:06,363 INFO #                Program parameters                       #
2025-03-20 06:21:06,364 INFO -----------------------------------------------------------
2025-03-20 06:21:06,364 INFO MQTT broker config : host = 192.168.1.127, port = 1883, clientId = gazpar_client_haos, qos = 1, topic = gazpar_haos, retain = True, ssl = False
2025-03-20 06:21:06,364 INFO Standlone mode : Enable = False
2025-03-20 06:21:06,364 INFO Home Assistant discovery : Enable = True, Topic prefix = homeassistant, Device name = gazpar
2025-03-20 06:21:06,364 INFO Threshold options : Warning percentage = 80
2025-03-20 06:21:06,364 INFO Database options : Force reinitialization = False, Path = /data
2025-03-20 06:21:06,365 INFO Debug mode : Enable = False
2025-03-20 06:21:06,365 INFO Check parameters...
2025-03-20 06:21:06,365 INFO Parameters are ok !
2025-03-20 06:21:06,365 INFO -----------------------------------------------------------
2025-03-20 06:21:06,365 INFO #        Connection to SQLite database                     #
2025-03-20 06:21:06,367 INFO -----------------------------------------------------------
2025-03-20 06:21:06,367 INFO Connection to SQLite database...
2025-03-20 06:21:06,368 INFO SQLite database connected !
2025-03-20 06:21:06,369 INFO Last execution date 2025-03-18 07:43:19.107378, program was in version 0.8.9.
2025-03-20 06:21:06,370 INFO Checking database version...
2025-03-20 06:21:06,370 INFO Your database is already up to date : version 0.4.0.
2025-03-20 06:21:06,370 INFO Retrieve database statistics...
2025-03-20 06:21:06,373 INFO 859 informatives measures stored
2025-03-20 06:21:06,373 INFO 1 PCE(s)
2025-03-20 06:21:06,373 INFO First measure : 2022-11-08
2025-03-20 06:21:06,373 INFO Last measure : 2025-03-17
2025-03-20 06:21:06,374 INFO -----------------------------------------------------------
2025-03-20 06:21:06,374 INFO #              Connection to Mqtt broker                   #
2025-03-20 06:21:06,374 INFO -----------------------------------------------------------
2025-03-20 06:21:06,374 INFO Connect to Mqtt broker...
2025-03-20 06:21:10,379 INFO Mqtt broker connected !
2025-03-20 06:21:10,379 INFO -----------------------------------------------------------
2025-03-20 06:21:10,379 INFO #            Get data from GRDF website                   #
2025-03-20 06:21:10,379 INFO -----------------------------------------------------------
2025-03-20 06:21:11,586 INFO GRDF connected !
2025-03-20 06:21:11,587 INFO Retrieve account informations
2025-03-20 06:21:11,924 INFO account: {'id': ********, 'first_name': 'Bastien', 'last_name': 'Ho', 'email': '*******@****.**', 'sofit_id': '*****************************', 'profile': 'externe', 'espace': {'id': ************, 'activation_date': '2022-08-10T17:07:47+02:00', 'last_login_date': '2025-03-20T06:21:11+01:00', 'first_login_date': None, 'notification_info_coupure_sms': False, 'notification_info_coupure_email': False, 'created_at': None, 'updated_at': '2025-03-20T06:21:11+01:00'}, 'rev': None, 'status': None, 'accept_be_contacted': 'ARenseigner', 'accept_collect_info': 'ARenseigner', 'accept_be_contacted_updated_at': '2023-05-31T13:13:02+02:00', 'accept_collect_info_updated_at': '2023-05-31T13:13:02+02:00', 'accept_cgu': True, 'mobile_phone_expiration_date': None, 'validated_mobile_phone': None, 'home_phone': None, 'mobile_phone': None, 'adresse': {'departement': **, 'id': *******, 'rue': None, 'code_postal': '******', 'ville': '********', 'numero': None, 'pays': None}, 'updated_password': True, 'roles': [], 'created_at': '2022-08-10T17:07:37+02:00', 'updated_at': '2023-05-31T13:13:02+02:00', 'type': 'particulier'}
2025-03-20 06:21:11,925 INFO MyAccount: <gazpar.Account object at 0x7f2b51e8add0>
2025-03-20 06:21:11,941 INFO Retrieve list of PCEs...
2025-03-20 06:21:12,702 INFO 1 PCE found !
2025-03-20 06:21:12,715 INFO ---------------------------------
2025-03-20 06:21:12,715 INFO Get measures of PCE **************** alias None
2025-03-20 06:21:12,717 INFO Range period : from 2022-03-20 (3 years ago) to 2025-03-20 (today) ...
2025-03-20 06:21:12,717 INFO Range period : from 2022-03-20 (self defined) to 2025-03-20 (today) ...
2025-03-20 06:21:12,717 INFO ---------------
2025-03-20 06:21:12,718 INFO Retrieve informative measures...
2025-03-20 06:21:13,551 INFO Informative measures found !
2025-03-20 06:21:13,552 INFO Analysis of informative measures provided by GRDF...
2025-03-20 06:21:13,552 INFO 862 informative measures provided by Grdf
2025-03-20 06:21:13,553 INFO 859 informative measures are ok
2025-03-20 06:21:13,553 INFO Accuracy is 100 percent
2025-03-20 06:21:13,554 INFO Last valid informative measure provided by GRDF : 
2025-03-20 06:21:13,554 INFO Date = 2025-03-17
2025-03-20 06:21:13,554 INFO Start index = 1177, End index = 1180
2025-03-20 06:21:13,554 INFO Volume = 3 m3, Energy = 33 kWh, Factor = 11.05
2025-03-20 06:21:13,554 WARNING Inconsistencies detected on the measure : 
2025-03-20 06:21:13,554 WARNING Volume provided by Grdf (None m3) has been replaced by the volume between start index and end index (3 m3)
2025-03-20 06:21:13,554 INFO ---------------
2025-03-20 06:21:13,554 INFO Retrieve published measures...
2025-03-20 06:21:14,117 INFO Published measures found !
2025-03-20 06:21:14,117 INFO Analysis of published measures provided by GRDF...
2025-03-20 06:21:14,117 INFO 58 published measures provided by Grdf
2025-03-20 06:21:14,117 INFO 55 published measures are ok
2025-03-20 06:21:14,118 INFO Accuracy is 95 percent
2025-03-20 06:21:14,118 INFO Last valid published measure provided by GRDF : 
2025-03-20 06:21:14,118 INFO Start date = 2025-02-01 06:00:00, End date = 2025-02-19 06:00:00
2025-03-20 06:21:14,120 INFO Start index = 1072, End index = 1125
2025-03-20 06:21:14,120 INFO Volume = 53 m3, Energy = 584 kWh, Factor = 11.01
2025-03-20 06:21:14,120 WARNING Inconsistencies detected on the measure : 
2025-03-20 06:21:14,120 WARNING Volume provided by Grdf (None m3) has been replaced by the volume between start index and end index (53 m3)
2025-03-20 06:21:14,120 INFO ---------------
2025-03-20 06:21:14,121 INFO Update of database with retrieved measures...
2025-03-20 06:21:14,209 INFO Database updated !
2025-03-20 06:21:14,209 INFO ---------------
2025-03-20 06:21:14,209 INFO Retrieve PCE's thresholds from GRDF...
2025-03-20 06:21:14,209 WARNING Error to get PCE's thresholds, verify if you have setup thresholds for your PCE/account
2025-03-20 06:21:14,218 INFO -----------------------------------------------------------
2025-03-20 06:21:14,219 INFO #           Home assistant publication mode               #
2025-03-20 06:21:14,219 INFO -----------------------------------------------------------
2025-03-20 06:21:14,219 INFO Publishing values of PCE ***************** alias None...
2025-03-20 06:21:14,219 INFO ---------------------------------
2025-03-20 06:21:14,219 ERROR Home Assistant discovery mode : unable to publish value to mqtt broker
2025-03-20 06:21:14,220 INFO -----------------------------------------------------------
2025-03-20 06:21:14,220 INFO #                    Load prices                          #
2025-03-20 06:21:14,220 INFO -----------------------------------------------------------
2025-03-20 06:21:14,220 INFO Loading prices from file prices.csv of directory /data
2025-03-20 06:21:14,220 WARNING Unable to find price file prices.csv in directory /data
2025-03-20 06:21:14,220 INFO -----------------------------------------------------------
2025-03-20 06:21:14,221 INFO #                    Write prices                         #
2025-03-20 06:21:14,221 INFO -----------------------------------------------------------
2025-03-20 06:21:14,221 WARNING No prices file found, using the default price (0.07 €/kWh and 0.9 €/day).
2025-03-20 06:21:15,776 INFO -----------------------------------------------------------
2025-03-20 06:21:15,776 INFO #               Disconnection from MQTT                    #
2025-03-20 06:21:15,776 INFO -----------------------------------------------------------
2025-03-20 06:21:16,419 INFO Mqtt broker disconnected
2025-03-20 06:21:16,420 INFO -----------------------------------------------------------
2025-03-20 06:21:16,420 INFO #          Disconnection from SQLite database              #
2025-03-20 06:21:16,420 INFO -----------------------------------------------------------
2025-03-20 06:21:16,421 INFO SQLite database disconnected
2025-03-20 06:21:16,422 INFO -----------------------------------------------------------
2025-03-20 06:21:16,423 INFO #                Next run                                 #
2025-03-20 06:21:16,423 INFO -----------------------------------------------------------
2025-03-20 06:21:16,423 INFO gazpar2mqtt next run scheduled at 06:30
2025-03-20 06:21:16,424 INFO -----------------------------------------------------------
2025-03-20 06:21:16,424 INFO #                  End of program                         #
2025-03-20 06:21:16,424 INFO -----------------------------------------------------------

et coté Mosquitto

2025-03-20 06:20:18: Received SUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:18: 	gazpar_haos (QoS 0)
time="2025-03-20T06:20:18+01:00" level=debug msg="checking acl cache for homeassistant"
time="2025-03-20T06:20:18+01:00" level=debug msg="to auth record: [97 99 108 45 104 111 109 101 97 115 115 105 115 116 97 110 116 45 103 97 122 112 97 114 95 104 97 111 115 45 52 51 55 113 118 71 103 111 89 75 66 77 56 119 97 82 77 49 111 74 84 80 45 52 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2025-03-20T06:20:18+01:00" level=debug msg="Superuser check with backend Files"
time="2025-03-20T06:20:18+01:00" level=debug msg="Superuser check with backend HTTP"
time="2025-03-20T06:20:18+01:00" level=debug msg="http request approved for homeassistant"
time="2025-03-20T06:20:18+01:00" level=debug msg="superuser homeassistant acl authenticated with backend HTTP"
time="2025-03-20T06:20:18+01:00" level=debug msg="setting acl cache (granted = true) for homeassistant"
time="2025-03-20T06:20:18+01:00" level=debug msg="to auth record: [97 99 108 45 104 111 109 101 97 115 115 105 115 116 97 110 116 45 103 97 122 112 97 114 95 104 97 111 115 45 52 51 55 113 118 71 103 111 89 75 66 77 56 119 97 82 77 49 111 74 84 80 45 52 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
2025-03-20 06:20:18: 437qvGgoYKBM8waRM1oJTP 0 gazpar_haos
2025-03-20 06:20:18: Sending SUBACK to 437qvGgoYKBM8waRM1oJTP
time="2025-03-20T06:20:18+01:00" level=debug msg="Acl is true for user homeassistant"
2025-03-20 06:20:23: Received UNSUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:23: 	gazpar_haos
2025-03-20 06:20:23: 437qvGgoYKBM8waRM1oJTP gazpar_haos
2025-03-20 06:20:23: Sending UNSUBACK to 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:24: Received SUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:24: 	gazpar_haos (QoS 0)
2025-03-20 06:20:24: 437qvGgoYKBM8waRM1oJTP 0 gazpar_haos
2025-03-20 06:20:24: Sending SUBACK to 437qvGgoYKBM8waRM1oJTP
time="2025-03-20T06:20:24+01:00" level=debug msg="checking acl cache for homeassistant"
time="2025-03-20T06:20:24+01:00" level=debug msg="to auth record: [97 99 108 45 104 111 109 101 97 115 115 105 115 116 97 110 116 45 103 97 122 112 97 114 95 104 97 111 115 45 52 51 55 113 118 71 103 111 89 75 66 77 56 119 97 82 77 49 111 74 84 80 45 52 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2025-03-20T06:20:24+01:00" level=debug msg="found in cache: homeassistant"
2025-03-20 06:20:26: Received UNSUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:26: 	gazpar_haos
2025-03-20 06:20:26: 437qvGgoYKBM8waRM1oJTP gazpar_haos
2025-03-20 06:20:26: Sending UNSUBACK to 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:28: New connection from 172.30.32.2:40516 on port 1883.
2025-03-20 06:20:28: Client <unknown> closed its connection.
2025-03-20 06:20:32: Received SUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:32: 	gazpar_haos (QoS 0)
2025-03-20 06:20:32: 437qvGgoYKBM8waRM1oJTP 0 gazpar_haos
2025-03-20 06:20:32: Sending SUBACK to 437qvGgoYKBM8waRM1oJTP
time="2025-03-20T06:20:32+01:00" level=debug msg="checking acl cache for homeassistant"
time="2025-03-20T06:20:32+01:00" level=debug msg="to auth record: [97 99 108 45 104 111 109 101 97 115 115 105 115 116 97 110 116 45 103 97 122 112 97 114 95 104 97 111 115 45 52 51 55 113 118 71 103 111 89 75 66 77 56 119 97 82 77 49 111 74 84 80 45 52 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2025-03-20T06:20:32+01:00" level=debug msg="found in cache: homeassistant"
2025-03-20 06:20:39: Received UNSUBSCRIBE from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:39: 	gazpar_haos
2025-03-20 06:20:39: 437qvGgoYKBM8waRM1oJTP gazpar_haos
2025-03-20 06:20:39: Sending UNSUBACK to 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:44: Received PINGREQ from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:20:44: Sending PINGRESP to 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:21:06: New connection from 172.30.32.1:48456 on port 1883.
time="2025-03-20T06:21:06+01:00" level=debug msg="checking auth cache for mosquito"
time="2025-03-20T06:21:06+01:00" level=debug msg="to auth record: [97 117 116 104 45 109 111 115 113 117 105 116 111 45 116 56 112 52 98 98 105 111 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2025-03-20T06:21:06+01:00" level=debug msg="checking user mosquito with backend Files"
time="2025-03-20T06:21:06+01:00" level=debug msg="user mosquito authenticated with backend Files"
time="2025-03-20T06:21:06+01:00" level=debug msg="setting auth cache for mosquito"
time="2025-03-20T06:21:06+01:00" level=debug msg="to auth record: [97 117 116 104 45 109 111 115 113 117 105 116 111 45 116 56 112 52 98 98 105 111 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
2025-03-20 06:21:06: New client connected from 172.30.32.1:48456 as gazpar_client_haos (p2, c1, k60, u'mosquito').
2025-03-20 06:21:06: No will message specified.
2025-03-20 06:21:06: Sending CONNACK to gazpar_client_haos (0, 0)
2025-03-20 06:21:44: Received PINGREQ from 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:21:44: Sending PINGRESP to 437qvGgoYKBM8waRM1oJTP
2025-03-20 06:21:55: Saving in-memory database to /data//mosquitto.db.
2025-03-20 06:22:28: New connection from 172.30.32.2:56592 on port 1883.
2025-03-20 06:22:28: Client <unknown> closed its connection.
2025-03-20 06:22:40: Client gazpar_client_haos has exceeded timeout, disconnecting.

Questions:

  1. est-ce que le léger décallage d’horodatage est normal ?
  2. J’imagine que mon problème vient de Client gazpar_client_haos has exceeded timeout, disconnecting, alors comment le contourner ?

Merci !

Bonjour,
Je viens de tester l’installation de Gazpar2mqtt. Cela à l’air d’être fonctionnel, j’arrive à avoir ce retour d’information dans mqtt :

Par contre je ne comprends pas comment ajouter ces données dans l’onglet « energie » de Home Assistant pour avoir un historique de la consommation jour par jour.

Pourriez vous m’éclairer ?
Merci

Juste pour repeter… si mqtt est local (le HAOS add-on), ça doit être ON

C’est dans les doc, je ne le vais pas repeter ici

J’ai déjà lu cette réponse plus haut, mais je ne comprends pas ce que cela veut dire. D’où ma question.

J’ai aussi lu que pour avoir des données journalières il était nécessaire d’avoir :« long term statistics ».
Et apparemment pour utiliser long term statistics il faut utiliser ceci :

HASS_LTS=True
HASS_LTS_HOST=« http://homeassistant.local:8123 »
HASS_LTS_TOKEN=98724kjhawelkj…etc. (use the Long Term Access token, generated for the LTS_HOST below)

Mais je ne sais pas ou mettre ça, ni comment générer le token

Enfin je ne comprends pas grand chose, même en lisant la doc :sweat_smile:

Arf oui, désolé, j’ai lu tellement de doc, que je me suis emmêlé les confs.

Cependant, avec mqtt_autodiscover en ON, j’ai ceci dans les logs

2025-03-21 19:00:44,667 ERROR Home Assistant discovery mode : unable to publish value to mqtt broker

J’ai donc passé

HASS_DISCOVER=False

Coté gazpar_2_mqtt ça a l’air bon, mais j’ai toujours un timeout coté MQTT

2025-03-21 19:03:30: New client connected from 172.30.33.4:41857 as gazpar_client_haos (p2, c1, k60, u'addons').
2025-03-21 19:03:30: No will message specified.
2025-03-21 19:03:30: Sending CONNACK to gazpar_client_haos (0, 0)
2025-03-21 19:03:44: Received UNSUBSCRIBE from 4P1zS6IUY7fNgxCqPawopo
2025-03-21 19:03:44: 	gazpar_haos
2025-03-21 19:03:44: 4P1zS6IUY7fNgxCqPawopo gazpar_haos
2025-03-21 19:03:44: Sending UNSUBACK to 4P1zS6IUY7fNgxCqPawopo
2025-03-21 19:04:26: Received PINGREQ from 4P1zS6IUY7fNgxCqPawopo
2025-03-21 19:04:26: Sending PINGRESP to 4P1zS6IUY7fNgxCqPawopo
2025-03-21 19:04:52: New connection from 172.30.32.2:47476 on port 1883.
2025-03-21 19:04:52: Client <unknown> closed its connection.
2025-03-21 19:05:02: Client gazpar_client_haos has exceeded timeout, disconnecting.

Désolé, merci pour l’aide

Vraiment aucune idee, ça marche pour tant des gens et (voir ancien post) jamais vu ça. Utilise mtt local, sans ip etc.

Il faut chercher HA comment génerer des tokens longe terme… ca n’a rien a faire avec mon intégration. M’excuser ma brièveté mais j’ai pas le temps d’expliquer tout, c’est surtout pas personnel

J’ai relu toute la doc et le forum.

Je me sens très très bête, mais je ne comprends pas où est censé apparaître l’appareil décrit.

J’ai :

  • le module complémentaire Mosquitto broker
  • Le module gazpar_2_mqtt
  • les deux tournent et semblent fonctionner
  • dans intégrations, j’ai juste MQTT, que j’installe et desinstalle sans aucun changement
  • côté appareils, j’ai gazpar 2 MQTT, mais qui n’a comme entité que : processeur, mémoire, update…

Je dois oublier un truc essentiel, mais quoi ?