SzczepanLeon / esphome-components

112 stars 40 forks source link

multical21 driver only decodes some of the received telegrams #93

Open hanzoh opened 2 months ago

hanzoh commented 2 months ago

Hi,

you did an awesome job on this component, thank you!

I am getting the correct values from my Multical21 meter, but I noticed in the VERY_VERBOSE log, that it also receives telegrams in between which it cannot decode. Is this expected behavior?

sensor:
  - platform: wmbus
    meter_id: 0x63354060
    type: multical21
    key: "AA038FAFD5C2B2468C24B0F1308CCAA5"
    add_prefix: false
    mode: C1
    lqi:
      name: "LQI"
    rssi:
      name: "RSSI"
    total_water_m3:
      name: "Verbrauch"
[15:12:23][V][rxLoop:167]: Have 40 bytes from CC1101 Rx, RSSI: -56 dBm LQI: 128
[15:12:23][D][mbus:023]: Processing C1 B frame
[15:12:24][V][mbus:027]: Frame: 25442D2C604035631B168D20A100470421A0B0189DD57F6BD3B7AB8F6138097C3C00E8B6B8AD (38) [with CRC]
[15:12:24][V][mbus:165]: Validating CRC for Block1 + Block2
[15:12:24][V][crc:031]:     calculated: 0xB8AD, read: 0xB8AD
[15:12:24][V][mbus:062]: Frame: 23442D2C604035631B168D20A100470421A0B0189DD57F6BD3B7AB8F6138097C3C00E8B6 (36) [without CRC]
[15:12:24][VV][wmbus:061]: Have data from CC1101 ...
[15:12:24][D][wmbus:097]: Using driver 'multical21' for ID [0x63354060] RSSI: -56 dBm LQI: 128 Frame: C1 B T: 23442D2C604035631B168D20A100470421A0B0189DD57F6BD3B7AB8F6138097C3C00E8B6 (36)
[15:12:24][VV][wmbus:099]: Key defined, trying to decrypt telegram ...
[15:12:24][VV][utils:109]: (ELL)  CI: 8D  offset: 17
[15:12:24][VV][utils:112]: (ELL)  IV: 2D2C604035631B162000470421000000
[15:12:24][VV][utils:115]: (ELL) KEY: AA038FAFD5C2B2468C24B0F1308CCAA5 (16)
[15:12:24][VV][utils:124]: (ELL) AES_CTR decrypting: A0B0189DD57F6BD3B7AB8F6138097C3C00E8B6 (19)
[15:12:24][VV][utils:152]: (ELL) AES_CTR  decrypted: 767779EDA864F10000AA270200A51B0200080C (19)
[15:12:24][V][wmbus:283]: Validating CRC for ELL payload
[15:12:24][V][crc:046]:     calculated: 0x7776, read: 0x7776
[15:12:24][D][wmbus:104]: Decrypted T : 23442D2C604035631B168D20A100470421767779EDA864F10000AA270200A51B0200080C (36)
[15:12:24][D][wmbus:161]: Can't get value(s) from telegram for ID [0x63354060]
[15:12:24][W][component:232]: Component wmbus took a long time for an operation (138 ms).
[15:12:24][W][component:233]: Components should block for at most 30 ms.
[15:12:39][V][rxLoop:167]: Have 40 bytes from CC1101 Rx, RSSI: -56 dBm LQI: 128
[15:12:39][D][mbus:023]: Processing C1 B frame
[15:12:39][V][mbus:027]: Frame: 25442D2C604035631B168D20A20147042183D81007A4A9C0D89331B7D26BD13CE4F09555D772 (38) [with CRC]
[15:12:39][V][mbus:165]: Validating CRC for Block1 + Block2
[15:12:39][V][crc:031]:     calculated: 0xD772, read: 0xD772
[15:12:39][V][mbus:062]: Frame: 23442D2C604035631B168D20A20147042183D81007A4A9C0D89331B7D26BD13CE4F09555 (36) [without CRC]
[15:12:39][VV][wmbus:061]: Have data from CC1101 ...
[15:12:39][D][wmbus:097]: Using driver 'multical21' for ID [0x63354060] RSSI: -56 dBm LQI: 128 Frame: C1 B T: 23442D2C604035631B168D20A20147042183D81007A4A9C0D89331B7D26BD13CE4F09555 (36)
[15:12:39][VV][wmbus:099]: Key defined, trying to decrypt telegram ...
[15:12:39][VV][utils:109]: (ELL)  CI: 8D  offset: 17
[15:12:39][VV][utils:112]: (ELL)  IV: 2D2C604035631B162001470421000000
[15:12:39][VV][utils:115]: (ELL) KEY: AA038FAFD5C2B2468C24B0F1308CCAA5 (16)
[15:12:39][VV][utils:124]: (ELL) AES_CTR decrypting: 83D81007A4A9C0D89331B7D26BD13CE4F09555 (19)
[15:12:39][VV][utils:152]: (ELL) AES_CTR  decrypted: 767779EDA864F10000AA270200A51B0200080C (19)
[15:12:39][V][wmbus:283]: Validating CRC for ELL payload
[15:12:39][V][crc:046]:     calculated: 0x7776, read: 0x7776
[15:12:39][D][wmbus:104]: Decrypted T : 23442D2C604035631B168D20A201470421767779EDA864F10000AA270200A51B0200080C (36)
[15:12:39][D][wmbus:161]: Can't get value(s) from telegram for ID [0x63354060]
[15:12:39][W][component:232]: Component wmbus took a long time for an operation (137 ms).
[15:12:39][W][component:233]: Components should block for at most 30 ms.
[15:12:50][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294948421 (now=41125)
[15:12:55][V][rxLoop:167]: Have 40 bytes from CC1101 Rx, RSSI: -56 dBm LQI: 128
[15:12:55][D][mbus:023]: Processing C1 B frame
[15:12:55][V][mbus:027]: Frame: 25442D2C604035631B168D20A302470421BEF0766C3A060A7E3BC56CC482175F92DF53A9CC74 (38) [with CRC]
[15:12:55][V][mbus:165]: Validating CRC for Block1 + Block2
[15:12:55][V][crc:031]:     calculated: 0xCC74, read: 0xCC74
[15:12:55][V][mbus:062]: Frame: 23442D2C604035631B168D20A302470421BEF0766C3A060A7E3BC56CC482175F92DF53A9 (36) [without CRC]
[15:12:55][VV][wmbus:061]: Have data from CC1101 ...
[15:12:55][D][wmbus:097]: Using driver 'multical21' for ID [0x63354060] RSSI: -56 dBm LQI: 128 Frame: C1 B T: 23442D2C604035631B168D20A302470421BEF0766C3A060A7E3BC56CC482175F92DF53A9 (36)
[15:12:55][VV][wmbus:099]: Key defined, trying to decrypt telegram ...
[15:12:55][VV][utils:109]: (ELL)  CI: 8D  offset: 17
[15:12:55][VV][utils:112]: (ELL)  IV: 2D2C604035631B162002470421000000
[15:12:55][VV][utils:115]: (ELL) KEY: AA038FAFD5C2B2468C24B0F1308CCAA5 (16)
[15:12:55][VV][utils:124]: (ELL) AES_CTR decrypting: BEF0766C3A060A7E3BC56CC482175F92DF53A9 (19)
[15:12:55][VV][utils:152]: (ELL) AES_CTR  decrypted: 767779EDA864F10000AA270200A51B0200080C (19)
[15:12:55][V][wmbus:283]: Validating CRC for ELL payload
[15:12:55][V][crc:046]:     calculated: 0x7776, read: 0x7776
[15:12:55][D][wmbus:104]: Decrypted T : 23442D2C604035631B168D20A302470421767779EDA864F10000AA270200A51B0200080C (36)
[15:12:55][D][wmbus:161]: Can't get value(s) from telegram for ID [0x63354060]
[15:12:55][W][component:232]: Component wmbus took a long time for an operation (129 ms).
[15:12:55][W][component:233]: Components should block for at most 30 ms.
[15:12:58][VV][api.service:576]: on_ping_request: PingRequest {}
[15:12:58][VV][api.service:043]: send_ping_response: PingResponse {}
[15:13:11][V][rxLoop:167]: Have 47 bytes from CC1101 Rx, RSSI: -56 dBm LQI: 128
[15:13:11][D][mbus:023]: Processing C1 B frame
[15:13:11][V][mbus:027]: Frame: 2C442D2C604035631B168D20A403470421A3A6070B3B4AF77A635AC38DCF45AB92D1550A75EE57356B724C9179 (45) [with CRC]
[15:13:11][V][mbus:165]: Validating CRC for Block1 + Block2
[15:13:11][V][crc:031]:     calculated: 0x9179, read: 0x9179
[15:13:11][V][mbus:062]: Frame: 2A442D2C604035631B168D20A403470421A3A6070B3B4AF77A635AC38DCF45AB92D1550A75EE57356B724C (43) [without CRC]
[15:13:11][VV][wmbus:061]: Have data from CC1101 ...
[15:13:11][D][wmbus:097]: Using driver 'multical21' for ID [0x63354060] RSSI: -56 dBm LQI: 128 Frame: C1 B T: 2A442D2C604035631B168D20A403470421A3A6070B3B4AF77A635AC38DCF45AB92D1550A75EE57356B724C (43)
[15:13:11][VV][wmbus:099]: Key defined, trying to decrypt telegram ...
[15:13:11][VV][utils:109]: (ELL)  CI: 8D  offset: 17
[15:13:11][VV][utils:112]: (ELL)  IV: 2D2C604035631B162003470421000000
[15:13:11][VV][utils:115]: (ELL) KEY: AA038FAFD5C2B2468C24B0F1308CCAA5 (16)
[15:13:11][VV][utils:124]: (ELL) AES_CTR decrypting: A3A6070B3B4AF77A635AC38DCF45AB92D1550A75EE57356B724C (26)
[15:13:11][VV][utils:152]: (ELL) AES_CTR  decrypted: 592B7802FF2000000413AA2702004413A51B0200615B0861670C (26)
[15:13:11][V][wmbus:283]: Validating CRC for ELL payload
[15:13:11][V][crc:046]:     calculated: 0x2B59, read: 0x2B59
[15:13:11][D][wmbus:104]: Decrypted T : 2A442D2C604035631B168D20A403470421592B7802FF2000000413AA2702004413A51B0200615B0861670C (43)
[15:13:11][VV][drivers:253]: Found register '0413' with '141226'->'141.226000'
[15:13:11][VV][drivers:035]: Value added to map
[15:13:11][VV][drivers:273]: Found register '4413' with '138149'->'138.149000'
[15:13:11][VV][drivers:035]: Value added to map
[15:13:11][V][sensor:043]: 'LQI': Received new state 128.000000
[15:13:11][D][sensor:094]: 'LQI': Sending state 128.00000  with 0 decimals of accuracy
[15:13:11][VV][api.service:140]: send_sensor_state_response: SensorStateResponse {
  key: 847368321
  state: 128
  missing_state: NO
}
[15:13:11][V][sensor:043]: 'RSSI': Received new state -56.000000
[15:13:11][D][sensor:094]: 'RSSI': Sending state -56.00000 dBm with 0 decimals of accuracy
[15:13:11][VV][api.service:140]: send_sensor_state_response: SensorStateResponse {
  key: 2543775268
  state: -56
  missing_state: NO
}
[15:13:11][V][wmbus:121]: Publishing 'total_water_m3' = 141.2260
[15:13:11][V][sensor:043]: 'Verbrauch': Received new state 141.225998
[15:13:11][D][sensor:094]: 'Verbrauch': Sending state 141.22600 m³ with 3 decimals of accuracy
[15:13:11][VV][api.service:140]: send_sensor_state_response: SensorStateResponse {
  key: 3237939087
  state: 141.226
  missing_state: NO
}
[15:13:11][W][component:232]: Component wmbus took a long time for an operation (244 ms).
[15:13:11][W][component:233]: Components should block for at most 30 ms.
[15:13:20][VV][api.connection:132]: Sending keepalive PING...
[15:13:20][VV][api.service:037]: send_ping_request: PingRequest {}
[15:13:20][VV][api.service:585]: on_ping_response: PingResponse {}
[15:13:38][VV][api.service:576]: on_ping_request: PingRequest {}
[15:13:38][VV][api.service:043]: send_ping_response: PingResponse {}
[15:13:50][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=41125 (now=101126)
[15:13:58][V][rxLoop:167]: Have 40 bytes from CC1101 Rx, RSSI: -56 dBm LQI: 128
[15:13:58][D][mbus:023]: Processing C1 B frame
[15:13:58][V][mbus:027]: Frame: 25442D2C604035631B168D20A712470421DE8DAA22047273C3283B43D9B505D051B2BC1E90CF (38) [with CRC]
[15:13:58][V][mbus:165]: Validating CRC for Block1 + Block2
[15:13:58][V][crc:031]:     calculated: 0x90CF, read: 0x90CF
[15:13:58][V][mbus:062]: Frame: 23442D2C604035631B168D20A712470421DE8DAA22047273C3283B43D9B505D051B2BC1E (36) [without CRC]
[15:13:58][VV][wmbus:061]: Have data from CC1101 ...
[15:13:58][D][wmbus:097]: Using driver 'multical21' for ID [0x63354060] RSSI: -56 dBm LQI: 128 Frame: C1 B T: 23442D2C604035631B168D20A712470421DE8DAA22047273C3283B43D9B505D051B2BC1E (36)
[15:13:58][VV][wmbus:099]: Key defined, trying to decrypt telegram ...
[15:13:58][VV][utils:109]: (ELL)  CI: 8D  offset: 17
[15:13:58][VV][utils:112]: (ELL)  IV: 2D2C604035631B162012470421000000
[15:13:58][VV][utils:115]: (ELL) KEY: AA038FAFD5C2B2468C24B0F1308CCAA5 (16)
[15:13:58][VV][utils:124]: (ELL) AES_CTR decrypting: DE8DAA22047273C3283B43D9B505D051B2BC1E (19)
[15:13:58][VV][utils:152]: (ELL) AES_CTR  decrypted: 767779EDA864F10000AA270200A51B0200080C (19)
[15:13:58][V][wmbus:283]: Validating CRC for ELL payload
[15:13:58][V][crc:046]:     calculated: 0x7776, read: 0x7776
[15:13:58][D][wmbus:104]: Decrypted T : 23442D2C604035631B168D20A712470421767779EDA864F10000AA270200A51B0200080C (36)
[15:13:58][D][wmbus:161]: Can't get value(s) from telegram for ID [0x63354060]
[15:13:58][W][component:232]: Component wmbus took a long time for an operation (131 ms).
[15:13:58][W][component:233]: Components should block for at most 30 ms.
mortenx commented 2 months ago

Same problem ...Can't get value it seems like only some telegrams are working what does the number in Decrypted T between the brackets indicate (34), (37) ? if there is 37 then there is a reading and if there is 34 then there is no

[12:38:30][D][wmbus:161]: Can't get value(s) from telegram for ID [0x76395254] [12:39:30][D][mbus:023]: Processing C1 B frame [12:39:31][D][wmbus:097]: Using driver 'multical21' for ID [0x76395254] RSSI: -21 dBm LQI: 131 Frame: C1 B T: 21442D2C545239761B168D2842A834C920EFEDEA96378B469C14120C3F060D192DA7 (34) [12:39:31][D][wmbus:104]: Decrypted T : 21442D2C545239761B168D2842A834C9203AB97934DD82AF71000600000002000000 (34) [12:39:31][D][wmbus:161]: Can't get value(s) from telegram for ID [0x76395254] [12:41:06][D][mbus:023]: Processing C1 B frame [12:41:06][D][wmbus:097]: Using driver 'multical21' for ID [0x76395254] RSSI: -21 dBm LQI: 133 Frame: C1 B T: 21442D2C545239761B168D2843CC34C920FDCC3FE957E7371B7218B032D4DEFEEFA5 (34) [12:41:06][D][wmbus:104]: Decrypted T : 21442D2C545239761B168D2843CC34C9203AB97934DD82AF71000600000002000000 (34) [12:41:06][D][wmbus:161]: Can't get value(s) from telegram for ID [0x76395254] [12:43:02][D][sntp:080]: Synchronized time: 2024-04-21 12:43:02 [12:44:17][D][mbus:023]: Processing C1 B frame [12:44:17][D][wmbus:097]: Using driver 'multical21' for ID [0x76395254] RSSI: -21 dBm LQI: 130 Frame: C1 B T: 24442D2C545239761B168D2845F434C9206EBB51997CF5C0C272E1CF4D6A660546F675EE69 (37) [12:44:17][D][wmbus:104]: Decrypted T : 24442D2C545239761B168D2845F434C92072AF7802FF207100041306000000441302000000 (37) [12:44:17][D][sensor:094]: 'multical21_LQI': Sending state 130.00000 with 0 decimals of accuracy [12:44:17][D][sensor:094]: 'multical21_rssi': Sending state -21.00000 dBm with 0 decimals of accuracy [12:44:17][D][sensor:094]: 'multical21_m3': Sending state 0.00600 m³ with 3 decimals of accuracy