Closed spamoi33 closed 1 year ago
Hello :) Personne n'a ce problème ?
Hello @fmartinou , je ne sais pas si tu as vu cette issue :)
Voici une cap écran de mes logs :
N'hésites pas si tu as besoin de plus d'informations. Bonne soirée !
Salut @spamoi33 ,
C'est comme si les valeurs dpm1
et fpm1
n'étaient plus présentes dans les messages envoyés 🤔
Peux-tu donner le contenu des derniers messages présents sur les topics mqtt suivants, stp :
merci
Bonjour @fmartinou deja merci je n ai pas eu l occasion de te remercier pour ce plugin :) il fait son taff et c est le principal ... un grand MERCI
je rencontre la meme erreur , a savoir les messages DPM/FPM
voici ce que j ai dans mon MQTT
(j ai remplacé mon numero de compteur par id )
DPM1 :
{"unique_id":"teleinfo_id_DPM1","name":"Teleinfo id DPM1","state_topic":"teleinfo/id","value_template":"{{ value_json.DPM1.value }}","device":{"identifiers":["id"],"manufacturer":"Enedis","model":"linky_id","name":"Linky id"}}
FPM1:
{"unique_id":"teleinfo_id_FPM1","name":"Teleinfo id FPM1","state_topic":"teleinfo/id","value_template":"{{ value_json.FPM1.value }}","device":{"identifiers":["id"],"manufacturer":"Enedis","model":"linky_id","name":"Linky id"}}
teleinfo/id
{"ADSC":{"raw":"id","value":id},"VTIC":{"raw":"02","value":2},"DATE":{"raw":"","value":"","timestamp":{"dst":"summer","date":"2023-07-06T09:07:41.000Z"}},"NGTF":{"raw":" TEMPO ","value":" TEMPO "},"LTARF":{"raw":" HP BLEU ","value":" HP BLEU "},"EAST":{"raw":"023374835","value":23374835},"EASF01":{"raw":"013909841","value":13909841},"EASF02":{"raw":"006505412","value":6505412},"EASF03":{"raw":"002059460","value":2059460},"EASF04":{"raw":"000246378","value":246378},"EASF05":{"raw":"000537213","value":537213},"EASF06":{"raw":"000116531","value":116531},"EASF07":{"raw":"000000000","value":0},"EASF08":{"raw":"000000000","value":0},"EASF09":{"raw":"000000000","value":0},"EASF10":{"raw":"000000000","value":0},"EASD01":{"raw":"011603335","value":11603335},"EASD02":{"raw":"005805698","value":5805698},"EASD03":{"raw":"004400736","value":4400736},"EASD04":{"raw":"001565066","value":1565066},"IRMS1":{"raw":"002","value":2},"URMS1":{"raw":"239","value":239},"PREF":{"raw":"09","value":9},"PCOUP":{"raw":"09","value":9},"SINSTS":{"raw":"00369","value":369},"SMAXSN":{"raw":"06303","value":6303,"timestamp":{"dst":"summer","date":"2023-07-06T00:22:12.000Z"}},"SMAXSN-1":{"raw":"05162","value":5162,"timestamp":{"dst":"summer","date":"2023-07-05T23:53:58.000Z"}},"CCASN":{"raw":"00084","value":84,"timestamp":{"dst":"summer","date":"2023-07-06T09:00:00.000Z"}},"CCASN-1":{"raw":"00188","value":188,"timestamp":{"dst":"summer","date":"2023-07-06T08:30:00.000Z"}},"UMOY1":{"raw":"241","value":241,"timestamp":{"dst":"summer","date":"2023-07-06T09:00:00.000Z"}},"STGE":{"raw":"013A4401","value":"013A4401"},"MSG1":{"raw":"PAS DE MESSAGE ","value":"PAS DE MESSAGE "},"PRM":{"raw":"19467293685817","value":19467293685817},"RELAIS":{"raw":"000","value":0},"NTARF":{"raw":"02","value":2},"NJOURF":{"raw":"00","value":0},"NJOURF+1":{"raw":"00","value":0},"PJOURF+1":{"raw":"00004001 06004002 22004001 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE","value":4001}}
si cela peut t aider :)
Hello,
J'ai ça de mon côté, je n'arrive pas à remettre la main sur les logs comme @zekje :|
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.teleinfo_xxxx_dpm1",
"icon": null,
"original_device_class": null,
"original_icon": null,
"state": {
"entity_id": "sensor.teleinfo_xxxx_dpm1",
"state": "unknown",
"attributes": {
"friendly_name": "Teleinfo xxxx DPM1"
},
"last_changed": "2023-07-06T12:56:08.023036+00:00",
"last_updated": "2023-07-06T12:56:08.023036+00:00"
},
"unit_of_measurement": null
},
{
"device_class": null,
"disabled_by": null,
"disabled": false,
"entity_category": null,
"entity_id": "sensor.teleinfo_xxxx_fpm1",
"icon": null,
"original_device_class": null,
"original_icon": null,
"state": {
"entity_id": "sensor.teleinfo_xxxx_fpm1",
"state": "unknown",
"attributes": {
"friendly_name": "Teleinfo xxxx FPM1"
},
"last_changed": "2023-07-06T12:56:08.025665+00:00",
"last_updated": "2023-07-06T12:56:08.025665+00:00"
},
"unit_of_measurement": null
}
{ "payload": "{"ADSC":{"raw":"xxxx","value":xxxx},"VTIC":{"raw":"02","value":2},"DATE":{"raw":"","value":"","timestamp":{"dst":"summer","date":"2023-07-06T15:13:16.000Z"}},"NGTF":{"raw":" TEMPO ","value":" TEMPO "},"LTARF":{"raw":" HP BLEU ","value":" HP BLEU "},"EAST":{"raw":"029947043","value":29947043},"EASF01":{"raw":"016963522","value":16963522},"EASF02":{"raw":"010957816","value":10957816},"EASF03":{"raw":"000956904","value":956904},"EASF04":{"raw":"000364685","value":364685},"EASF05":{"raw":"000552757","value":552757},"EASF06":{"raw":"000151359","value":151359},"EASF07":{"raw":"000000000","value":0},"EASF08":{"raw":"000000000","value":0},"EASF09":{"raw":"000000000","value":0},"EASF10":{"raw":"000000000","value":0},"EASD01":{"raw":"015538639","value":15538639},"EASD02":{"raw":"009444196","value":9444196},"EASD03":{"raw":"002934544","value":2934544},"EASD04":{"raw":"002029664","value":2029664},"IRMS1":{"raw":"001","value":1},"URMS1":{"raw":"235","value":235},"PREF":{"raw":"09","value":9},"PCOUP":{"raw":"09","value":9},"SINSTS":{"raw":"00000","value":0},"SMAXSN":{"raw":"04370","value":4370,"timestamp":{"dst":"summer","date":"2023-07-06T00:07:24.000Z"}},"SMAXSN-1":{"raw":"03360","value":3360,"timestamp":{"dst":"summer","date":"2023-06-30T20:16:12.000Z"}},"CCASN":{"raw":"00014","value":14,"timestamp":{"dst":"summer","date":"2023-07-06T15:00:00.000Z"}},"CCASN-1":{"raw":"00052","value":52,"timestamp":{"dst":"summer","date":"2023-07-06T14:30:00.000Z"}},"UMOY1":{"raw":"232","value":232,"timestamp":{"dst":"summer","date":"2023-07-06T15:10:00.000Z"}},"STGE":{"raw":"013A4601","value":"013A4601"},"MSG1":{"raw":" PAS DE MESSAGE ","value":" PAS DE MESSAGE "},"PRM":{"raw":"16129811674078","value":16129811674078},"RELAIS":{"raw":"000","value":0},"NTARF":{"raw":"02","value":2},"NJOURF":{"raw":"00","value":0},"NJOURF+1":{"raw":"00","value":0},"PJOURF+1":{"raw":"00004001 06004002 16004001 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE","value":4001}}", "qos": 0, "retain": 0, "time": "2023-07-06T13:13:19.149925+00:00", "topic": "teleinfo/xxxx" }
Merci également pour ce super plugin !!
@spamoi33 ( t'est sur que c'est pas toi ? :p )
j'ai extrait par MQTT explorer , c'est une appli bien utile dés que tu utilise MQTT :)
Ah oui effectivement c'est plus simple :) je ne connaissais pas, merci !
C'est donc bien ça ; les étiquettes DPM1
et FPM1
ne sont pas présentes dans vos trames.
Après, si un sensor Home-Assistant a été créé, c'est bien que cette étiquette a été présente 1 fois au moins :thinking: .
Peut-être que cette étiquette n'est pas envoyée systématiquement ?
Vous n'avez pas de warn côté teleinfo2mqtt` ?
Sinon le fix que je peux envisager, c'est de modifier la template homeassistant actuelle "value_template":"{{ value_json.DPM1.value }}"
pour prendre en compte la situation où il n'y a pas la donnée.
J'ai un contrat Tempo, il y a peut-être un rapport ? En fonction de la couleur des jours, l'info "existe" ou pas :
(Je n'ai pas trouvé d'historique dans mes logs pour pouvoir comparer avec la couleur des jours). @zekje tu as quoi comme contrat ?
J'ai modifié les templates poussées à HA pour gérer les cas d'absence des données.
Exemple :
("value_template":"{% if 'DPM1' in value_json %}{{ value_json.DPM1.value }}{% else %}''{% endif %}"
)
Releasé en tant que version 8.3.2
.
Vous me direz si ça corrige ;)
Hello, j'ai effectué la maj, mais l'erreur semble encore présente :
Logger: homeassistant.helpers.template Source: helpers/template.py:735 First occurred: 10:55:22 (728 occurrences) Last logged: 11:59:12
Template variable error: 'dict object' has no attribute 'DPM1' when rendering '{{ value_json.DPM1.value }}' Template variable error: 'dict object' has no attribute 'FPM1' when rendering '{{ value_json.FPM1.value }}'
Il faudrait au préalable supprimer tous les topics sous homeassistant/sensor/teleinfo
puis redémarrer teleinfo2mqtt
pour repartir propre.
(parce que là on voit bien que l'erreur reste provoquée par l'ancienne template, pas la nouvelle)
@fmartinou , je suis en tempo aussi
je tente la maj et la suppression des topic sous MQTT ca risque pas de repartir a 0 ?
@zekje
Tu peux supprimer uniquement les 2 topics homeassistant/sensor/teleinfo/...fpm1 et homeassistant/sensor/teleinfo/...dpm1 par précaution
De mon côté j'ai supprimé les 2 topics et relancé les 2 services, et je n'ai plus d'erreurs dans les logs :) A suivre !
Hello,
J'ai des milliers de ligne comme ça dans home-assistant.log, est-ce qu'il y a qq chose à faire de mon côté ? Merci !!
v. 8.3.0 sur Home Assistant 2023.4.2 Supervisor 2023.04.0 Operating System 9.5 Frontend 20230406.1 - latest
2023-04-11 20:37:13.048 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'DPM1' when rendering '{{ value_json.DPM1.value }}' 2023-04-11 20:37:13.050 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'dict object' has no attribute 'FPM1' when rendering '{{ value_json.FPM1.value }}'