fmartinou / teleinfo2mqtt

Publish teleinfo to mqtt topics
https://fmartinou.github.io/teleinfo2mqtt
MIT License
67 stars 18 forks source link

Warnings en mode standard #29

Closed rdelville closed 2 years ago

rdelville commented 2 years ago

Bonjour,

Je viens de passer en mode standard sur mon compteur Linky. J'ai des warnings qui apparaissent dans les logs en mode info :

09:15:34.489  WARN teleinfo2mqtt: Invalid value received for label PJOURF+1 [00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE]
09:15:35.401  WARN teleinfo2mqtt: Invalid value received for label PJOURF+1 [00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE]
09:15:36.329  WARN teleinfo2mqtt: Invalid value received for label PJOURF+1 [00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE]
09:15:37.258  WARN teleinfo2mqtt: Invalid value received for label PJOURF+1 [00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE]

Infos

Test en ligne de commande

stty -F /dev/ttyAMA0 9600 sane evenp parenb cs7 -crtscts
cat /dev/ttyUSB0
ADSC    0XXXXXXXXXX J
VTIC    02  J
DATE    E220615092559       L
NGTF    H PLEINE/CREUSE     \
LTARF   INDEX INACTIF 2     3
EAST    018378744   9
EASF01  009094481   E
EASF02  009284263   E
EASF03  000000000   $
EASF04  000000000   %
EASF05  000000000   &
EASF06  000000000   '
EASF07  000000000   (
EASF08  000000000   )
EASF09  000000000   *
EASF10  000000000   "
EASD01  007311917   =
EASD02  007471779   K
EASD03  001782564   C
EASD04  001812484   ?
IRMS1   001 /
URMS1   233 B
PREF    06  E
PCOUP   06  _
SINSTS  00348   U
SMAXSN  E220615075131   01835   <
SMAXSN-1    E220614190610   03177   Z
CCASN   E220615090000   00262   ;
CCASN-1 E220615083000   00318   ]
UMOY1   E220615092000   233 .
STGE    003A4401    B
MSG1    PAS DE          MESSAGE             <
PRM 1XXXXXXXXXX J
RELAIS  000 B
NTARF   02  O
NJOURF  00  &
NJOURF+1    00  B
PJOURF+1    00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE  Z

mqtt2teleinfo en mode debug

]9:13:50.052 DEBUG teleinfo2mqtt: Split frame [ADSC,0XXXXXXXXXX,J
09:13:50.052 DEBUG teleinfo2mqtt: Value for label ADSC = 0XXXXXXXXXX
09:13:50.052 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
09:13:50.055 DEBUG teleinfo2mqtt: Ignoring MQTT emission because of emit interval (Emit interval : 10 - Last emit time : 1655277228198 - Current time : 1655277230055
]9:13:50.056 DEBUG teleinfo2mqtt: Raw frame [VTIC   02  J
]9:13:50.058 DEBUG teleinfo2mqtt: Split frame [VTIC,02,J
09:13:50.059 DEBUG teleinfo2mqtt: Value for label VTIC = 02
09:13:50.060 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.084 DEBUG teleinfo2mqtt: Raw frame [DATE   E220615091349       H
]9:13:50.084 DEBUG teleinfo2mqtt: Split frame [DATE,E220615091349,H
09:13:50.084 DEBUG teleinfo2mqtt: Value for label DATE = H
09:13:50.085 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.115 DEBUG teleinfo2mqtt: Raw frame [NGTF   H PLEINE/CREUSE     \
]9:13:50.115 DEBUG teleinfo2mqtt: Split frame [NGTF,H PLEINE/CREUSE ,\
09:13:50.116 DEBUG teleinfo2mqtt: Value for label NGTF = H PLEINE/CREUSE 
09:13:50.116 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.131 DEBUG teleinfo2mqtt: Raw frame [LTARF  INDEX INACTIF 2     3
]9:13:50.132 DEBUG teleinfo2mqtt: Split frame [LTARF,INDEX INACTIF 2 ,3
09:13:50.132 DEBUG teleinfo2mqtt: Value for label LTARF = INDEX INACTIF 2 
09:13:50.132 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.148 DEBUG teleinfo2mqtt: Raw frame [EAST   018378696   ?
]9:13:50.148 DEBUG teleinfo2mqtt: Split frame [EAST,018378696,?
09:13:50.148 DEBUG teleinfo2mqtt: Value for label EAST = 018378696
09:13:50.148 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.181 DEBUG teleinfo2mqtt: Raw frame [EASF01 009094481   E
]9:13:50.181 DEBUG teleinfo2mqtt: Split frame [EASF01,009094481,E
09:13:50.181 DEBUG teleinfo2mqtt: Value for label EASF01 = 009094481
09:13:50.181 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.195 DEBUG teleinfo2mqtt: Raw frame [EASF02 009284215   B
]9:13:50.196 DEBUG teleinfo2mqtt: Split frame [EASF02,009284215,B
09:13:50.196 DEBUG teleinfo2mqtt: Value for label EASF02 = 009284215
09:13:50.196 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.211 DEBUG teleinfo2mqtt: Raw frame [EASF03 000000000   $
]9:13:50.212 DEBUG teleinfo2mqtt: Split frame [EASF03,000000000,$
09:13:50.212 DEBUG teleinfo2mqtt: Value for label EASF03 = 000000000
09:13:50.212 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.244 DEBUG teleinfo2mqtt: Raw frame [EASF04 000000000   %
]9:13:50.244 DEBUG teleinfo2mqtt: Split frame [EASF04,000000000,%
09:13:50.244 DEBUG teleinfo2mqtt: Value for label EASF04 = 000000000
09:13:50.245 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.259 DEBUG teleinfo2mqtt: Raw frame [EASF05 000000000   &
]9:13:50.260 DEBUG teleinfo2mqtt: Split frame [EASF05,000000000,&
09:13:50.260 DEBUG teleinfo2mqtt: Value for label EASF05 = 000000000
09:13:50.260 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.276 DEBUG teleinfo2mqtt: Raw frame [EASF06 000000000   '
]9:13:50.276 DEBUG teleinfo2mqtt: Split frame [EASF06,000000000,'
09:13:50.276 DEBUG teleinfo2mqtt: Value for label EASF06 = 000000000
09:13:50.276 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.307 DEBUG teleinfo2mqtt: Raw frame [EASF07 000000000   (
]9:13:50.308 DEBUG teleinfo2mqtt: Split frame [EASF07,000000000,(
09:13:50.308 DEBUG teleinfo2mqtt: Value for label EASF07 = 000000000
09:13:50.308 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.324 DEBUG teleinfo2mqtt: Raw frame [EASF08 000000000   )
]9:13:50.324 DEBUG teleinfo2mqtt: Split frame [EASF08,000000000,)
09:13:50.324 DEBUG teleinfo2mqtt: Value for label EASF08 = 000000000
09:13:50.325 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.340 DEBUG teleinfo2mqtt: Raw frame [EASF09 000000000   *
]9:13:50.341 DEBUG teleinfo2mqtt: Split frame [EASF09,000000000,*
09:13:50.341 DEBUG teleinfo2mqtt: Value for label EASF09 = 000000000
09:13:50.341 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.355 DEBUG teleinfo2mqtt: Raw frame [EASF10 000000000   "
]9:13:50.356 DEBUG teleinfo2mqtt: Split frame [EASF10,000000000,"
09:13:50.356 DEBUG teleinfo2mqtt: Value for label EASF10 = 000000000
09:13:50.356 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.388 DEBUG teleinfo2mqtt: Raw frame [EASD01 007311917   =
]9:13:50.388 DEBUG teleinfo2mqtt: Split frame [EASD01,007311917,=
09:13:50.388 DEBUG teleinfo2mqtt: Value for label EASD01 = 007311917
09:13:50.389 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.403 DEBUG teleinfo2mqtt: Raw frame [EASD02 007471731   ?
]9:13:50.404 DEBUG teleinfo2mqtt: Split frame [EASD02,007471731,?
09:13:50.404 DEBUG teleinfo2mqtt: Value for label EASD02 = 007471731
09:13:50.404 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.420 DEBUG teleinfo2mqtt: Raw frame [EASD03 001782564   C
]9:13:50.420 DEBUG teleinfo2mqtt: Split frame [EASD03,001782564,C
09:13:50.420 DEBUG teleinfo2mqtt: Value for label EASD03 = 001782564
09:13:50.420 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.452 DEBUG teleinfo2mqtt: Raw frame [EASD04 001812484   ?
]9:13:50.452 DEBUG teleinfo2mqtt: Split frame [EASD04,001812484,?
09:13:50.452 DEBUG teleinfo2mqtt: Value for label EASD04 = 001812484
09:13:50.453 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.468 DEBUG teleinfo2mqtt: Raw frame [IRMS1  002 0
]9:13:50.469 DEBUG teleinfo2mqtt: Split frame [IRMS1,002,0
09:13:50.469 DEBUG teleinfo2mqtt: Value for label IRMS1 = 002
09:13:50.469 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.469 DEBUG teleinfo2mqtt: Raw frame [URMS1  233 B
]9:13:50.469 DEBUG teleinfo2mqtt: Split frame [URMS1,233,B
09:13:50.470 DEBUG teleinfo2mqtt: Value for label URMS1 = 233
09:13:50.470 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.483 DEBUG teleinfo2mqtt: Raw frame [PREF   06  E
]9:13:50.484 DEBUG teleinfo2mqtt: Split frame [PREF,06,E
09:13:50.484 DEBUG teleinfo2mqtt: Value for label PREF = 06
09:13:50.484 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.500 DEBUG teleinfo2mqtt: Raw frame [PCOUP  06  _
]9:13:50.500 DEBUG teleinfo2mqtt: Split frame [PCOUP,06,_
09:13:50.500 DEBUG teleinfo2mqtt: Value for label PCOUP = 06
09:13:50.501 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.516 DEBUG teleinfo2mqtt: Raw frame [SINSTS 00367   V
]9:13:50.516 DEBUG teleinfo2mqtt: Split frame [SINSTS,00367,V
09:13:50.518 DEBUG teleinfo2mqtt: Value for label SINSTS = 00367
09:13:50.519 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.548 DEBUG teleinfo2mqtt: Raw frame [SMAXSN E220615075131   01835   <
]9:13:50.548 DEBUG teleinfo2mqtt: Split frame [SMAXSN,E220615075131,01835,<
09:13:50.548 DEBUG teleinfo2mqtt: Value for label SMAXSN = 01835
09:13:50.549 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.579 DEBUG teleinfo2mqtt: Raw frame [SMAXSN-1   E220614190610   03177   Z
]9:13:50.580 DEBUG teleinfo2mqtt: Split frame [SMAXSN-1,E220614190610,03177,Z
09:13:50.580 DEBUG teleinfo2mqtt: Value for label SMAXSN-1 = 03177
09:13:50.580 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.611 DEBUG teleinfo2mqtt: Raw frame [CCASN  E220615090000   00262   ;
]9:13:50.612 DEBUG teleinfo2mqtt: Split frame [CCASN,E220615090000,00262,;
09:13:50.612 DEBUG teleinfo2mqtt: Value for label CCASN = 00262
09:13:50.612 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.644 DEBUG teleinfo2mqtt: Raw frame [CCASN-1    E220615083000   00318   ]
]9:13:50.644 DEBUG teleinfo2mqtt: Split frame [CCASN-1,E220615083000,00318,]
09:13:50.645 DEBUG teleinfo2mqtt: Value for label CCASN-1 = 00318
09:13:50.645 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.676 DEBUG teleinfo2mqtt: Raw frame [UMOY1  E220615091000   233 -
]9:13:50.676 DEBUG teleinfo2mqtt: Split frame [UMOY1,E220615091000,233,-
09:13:50.676 DEBUG teleinfo2mqtt: Value for label UMOY1 = 233
09:13:50.677 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.691 DEBUG teleinfo2mqtt: Raw frame [STGE   003A4401    B
]9:13:50.692 DEBUG teleinfo2mqtt: Split frame [STGE,003A4401,B
09:13:50.692 DEBUG teleinfo2mqtt: Value for label STGE = 003A4401
09:13:50.692 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.724 DEBUG teleinfo2mqtt: Raw frame [MSG1   PAS DE          MESSAGE             <
]9:13:50.724 DEBUG teleinfo2mqtt: Split frame [MSG1,PAS DE          MESSAGE         ,<
09:13:50.724 DEBUG teleinfo2mqtt: Value for label MSG1 = PAS DE          MESSAGE         
09:13:50.725 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.756 DEBUG teleinfo2mqtt: Raw frame [PRM    1XXXXXXXXXX J
]9:13:50.756 DEBUG teleinfo2mqtt: Split frame [PRM,1XXXXXXXXXX,J
09:13:50.756 DEBUG teleinfo2mqtt: Value for label PRM = 1XXXXXXXXXX
09:13:50.756 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.772 DEBUG teleinfo2mqtt: Raw frame [RELAIS 000 B
]9:13:50.772 DEBUG teleinfo2mqtt: Split frame [RELAIS,000,B
09:13:50.772 DEBUG teleinfo2mqtt: Value for label RELAIS = 000
09:13:50.772 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.787 DEBUG teleinfo2mqtt: Raw frame [NTARF  02  O
]9:13:50.788 DEBUG teleinfo2mqtt: Split frame [NTARF,02,O
09:13:50.788 DEBUG teleinfo2mqtt: Value for label NTARF = 02
09:13:50.788 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.788 DEBUG teleinfo2mqtt: Raw frame [NJOURF 00  &
]9:13:50.789 DEBUG teleinfo2mqtt: Split frame [NJOURF,00,&
09:13:50.789 DEBUG teleinfo2mqtt: Value for label NJOURF = 00
09:13:50.789 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.803 DEBUG teleinfo2mqtt: Raw frame [NJOURF+1   00  B
]9:13:50.804 DEBUG teleinfo2mqtt: Split frame [NJOURF+1,00,B
09:13:50.804 DEBUG teleinfo2mqtt: Value for label NJOURF+1 = 00
09:13:50.804 DEBUG teleinfo2mqtt: Frame parsed [[object Object]]
]9:13:50.948 DEBUG teleinfo2mqtt: Raw frame [PJOURF+1   00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE  Z
]9:13:50.949 DEBUG teleinfo2mqtt: Split frame [PJOURF+1,00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE,Z
09:13:50.949  WARN teleinfo2mqtt: Invalid value received for label PJOURF+1 [00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE]

Le champ DATE récupère le checksum et non la valeur. Pour PJOURF+1, je ne vois pas le souci.

Romain

PS: J"ai anonymisé quelques valeurs.

fmartinou commented 2 years ago

Bonjour Romain,

Pour PJOURF+1, je ne vois pas le souci.

Effectivement, le contrôle de la taille de la valeur est erroné. Il considère la valeur valide si elle fait 8 chars alors que la valeur correcte doit faire 98 chars. => Je vais corriger

Le champ DATE récupère le checksum et non la valeur Je n'ai pas compris où ? Dans la payload JSON envoyée par MQTT ? Pour toutes les étiquettes qui ont un HORODATAGE associé ?

rdelville commented 2 years ago

Dans le log de debug, on peut voir le traitement sur le champ DATE

]9:13:50.084 DEBUG teleinfo2mqtt: Raw frame [DATE   E220615091349       H
]9:13:50.084 DEBUG teleinfo2mqtt: Split frame [DATE,E220615091349,H
09:13:50.084 DEBUG teleinfo2mqtt: Value for label DATE = H

DATE prend la valeur H au lieu de E220615091349

fmartinou commented 2 years ago

Ah ok je vois. C'est une erreur du même type que l'autre. => Je vais fixer

fmartinou commented 2 years ago

Les 2 points devraient être résolus dans la dernière version 8.0.1. Concernant le label DATE, la value sera vide ; le contenu sera dans la propriété timestamp.

Exemple :

{
   "DATE":{
      "raw":"",
      "value":"",
      "timestamp":{
         "date":"2022-06-09T06:05:31.000Z",
         "dst":"summer"
      }
   }
}

C'est pour être cohérent par rapport au reste des données puisque cette étiquette est définie par ENEDIS comme ayant une valeur nulle et un horodatage : image

rdelville commented 2 years ago

Le label DATE est bien à vide.

1:01:34.510 DEBUG teleinfo2mqtt: Raw frame [DATE    E220615210133       8
]1:01:34.510 DEBUG teleinfo2mqtt: Split frame [DATE,E220615210133,8
21:01:34.511 DEBUG teleinfo2mqtt: Value for label DATE = 

Plus de warning pour le label PJOURF+1

]1:01:35.374 DEBUG teleinfo2mqtt: Raw frame [PJOURF+1   00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE  Z
]1:01:35.375 DEBUG teleinfo2mqtt: Split frame [PJOURF+1,00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE,Z
21:01:35.375 DEBUG teleinfo2mqtt: Value for label PJOURF+1 = 00008002 0050C001 06508002 1220C001 14208002 NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE NONUTILE

Merci pour le fix. :)

Romain