Mise à jour d'entités depuis un broker MQTT

Bonjour à tous,

J’ai plusieurs entités qui sont remonté depuis un broker MQTT mais le soucis c’est que ces entités ne se mettent pas à jour tout seul sans une intervention manuel de ma part.

Avez-vous une solution afin de récupérer les états en cours sur le broker, j’ai pu voir que nous pouvons passer par node red pour envoyer les états à Ha mais je n’ai pas trouvé ce que je dois mettre après « mqtt In »

image

Autre question:
Comment peut-on faire une automatisation pour gérer l’état d’une entité mqtt ?

Merci d’avance,
Bonne journée,

Salut,

Quelle intervention ?
En principe, une nouvelle publication sur le topic déclenche la mise à jour de l’entité, automatiquement.
Que disent les logs ?

Salut,

Désolé je n’avais pas vu ta réponse, par contre pourrais-tu me dire comment récupérer les logs ? J’ai mis les journaux de debugs en actif.

Voici ce que j’ai sans intervention de ma part:

Et après avoir appuyé manuellement:

J’ai en parallèle la même chose sur Jeedom et ils se mettent bien à jour.

Merci d’avance,

Via le bouton tout en bas « journaux complets » dans paramètres => système => journaux

Regarde aussi les messages MQTT via des outils comme MQTT Explorer

Quand je serais chez moi je regarderais pour MQTT explore

Tu aurais besoin de quoi ici (souligné en rouge):

Celui là c’est le bon,
On voit d’ailleurs des deco de MQTT

2023-06-08 09:59:13.584 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:13.588 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration spotcast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:13.590 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dreame_vacuum which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:13.592 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration mqtt_discoverystream which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:13.595 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:13.598 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration prix_carburant which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-06-08 09:59:20.731 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400)
2023-06-08 09:59:59.020 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.spa_ferrandiz_rssi (<class 'homeassistant.components.ondilo_ico.sensor.OndiloICO'>) is using native unit of measurement '%' which is not a valid unit for the device class ('signal_strength') it is using; expected one of ['dBm', 'dB']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+ondilo_ico%22
2023-06-08 09:59:59.981 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Naspetitcoeur' for synology_dsm integration not ready yet: ClientConnectorError = ConnectionKey(host='192.168.1.171', port=5000, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-3283899822571163101); Retrying in background
2023-06-08 10:00:50.159 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: dreame_vacuum
2023-06-08 10:00:51.603 WARNING (MainThread) [homeassistant.components.freebox.router] Home access is not granted
2023-06-08 10:49:47.701 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from localhost (127.0.0.1). Requested URL: '/auth/login_flow/26de5575069ba5d3edd8c3d07a0653b1'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36)
2023-06-08 11:20:45.093 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-08 11:20:45.155 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-08 11:32:55.780 ERROR (Thread-847) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 11:32:55.798 WARNING (Thread-847) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 12:04:31.076 ERROR (Thread-993) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 12:04:31.079 WARNING (Thread-993) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 12:09:31.962 ERROR (Thread-1037) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 12:09:31.964 WARNING (Thread-1037) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 12:24:16.366 WARNING (Thread-1117) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: https://de.api.io.mi.com/app/user/get_user_device_data HTTPSConnectionPool(host='de.api.io.mi.com', port=443): Read timed out. (read timeout=3)
2023-06-08 12:24:16.376 WARNING (Thread-1117) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2023-06-08 12:36:14.200 ERROR (Thread-1164) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 12:36:14.202 WARNING (Thread-1164) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 13:04:30.740 ERROR (Thread-1299) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 13:04:30.742 WARNING (Thread-1299) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 13:29:50.571 ERROR (Thread-1423) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 13:29:50.574 WARNING (Thread-1423) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 13:34:39.629 ERROR (Thread-1463) [miio.miioprotocol] Got error when receiving: timed out
2023-06-08 13:34:39.631 WARNING (Thread-1463) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: No response from the device
2023-06-08 14:09:50.400 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:09:56.811 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:10:00.249 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:10:02.921 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:10:03.943 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:10:04.679 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.freebox_player_pop_2 or it is/they are currently not available
2023-06-08 14:44:52.539 WARNING (Thread-1764) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: Unable to discover the device 192.168.1.79
2023-06-08 15:10:20.188 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-08 15:10:20.243 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-08 15:25:28.867 WARNING (Thread-2079) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: Unable to discover the device 192.168.1.79
2023-06-08 17:18:21.390 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-08 17:18:21.407 WARNING (Thread-3 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.35:1883 (16)
2023-06-09 04:42:20.927 WARNING (Thread-8245) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: Unable to discover the device 192.168.1.79
2023-06-09 04:42:30.936 WARNING (Thread-8247) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 2: Unable to discover the device 192.168.1.79
2023-06-09 04:42:40.945 WARNING (Thread-8248) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 3: Unable to discover the device 192.168.1.79
2023-06-09 11:19:14.374 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on zigbee2mqtt/Eclairage salon (qos=0): b'{"brightness":110,"current":0.02,"device":{"applicationVersion":0,"dateCode":"NULL","friendlyName":"Eclairage salon","hardwareVersion":1,"ieeeAddr":"0x60a423fffe037577","manufacturerID":4644,"manufacturerName":"Sunricher","model":"SR

J’ai mis les premières lignes en rouge, le fichier est grand !

image

Sur MQTT explorer, j’ai le même symptôme, je n’avais rien sans appuyer en manuel !

Je pense que tu t’es embrouillé dans la config. Tu as sans arrêt des ‹ disconnect › donc ça explique sans doute pourquoi ça n’existe fonctionne pas: c’est coupé avant la réception des infos dans les topics.
Comme c’est pas une erreur de user/password alors tu dois avoir 2 clients avec une même valeur id au brocker. Comme il doit être unique le premier se fait éjecter à l’arrivée du second et inversement.

Salut @Pulpy-Luke merci pour ton message j’ai essayé ces derniers jours de refaire ma configuration je dois avoir des conflits entre le brokers qui est sur jeedom avec zigbee2mqtt et mqtt brokers et zigbee2mqtt sur ha. Je continue de regarder un peu partout si je trouve une solution.
Par contre est-il possible que Ha garde en mémoire soit une ancienne configuration ou des équipements mals configurés ?

Pour info j’ai eu une mise à jour du code que tu avais indiqué obsolète sur un autre poste :wink:

1 « J'aime »

Vire l’add z2m de HA. Efface le répertoire /config/zigbee2mqtt et tu repartira à 0

1 « J'aime »