Cześć Wszystkim!
Jestem pod wrażeniem tej biblioteki : GitHub - SzczepanLeon/esphome-components
Gratulacja dla wszystkich którzy się przyczynili do jej powstania!
Zrobiłem pierwsze kilka kroków, bez problemu odczytuję licznik wody Apator
Kolejny krok to licznik ciepła od Kamstrupa, z tego co rozumiem nie ma on dedykowanego “dekodera” w sensie typu w wmbusmeters. Niestety jak ustawiam typ na “unknown” nic nie jest odbierane.
Pytanie do Was czy wskażecie drogę jak zmodyfikować komponent w biblitece SzczepanLeon, żeby sobie obsłużyć telegramy z mojego Kamstrupa?
Poniżej fragment logów z wmbusmeters:
Wrzucam fragment logów
(meter) MyKamstrup: yes for me
(meter) MyKamstrup(1) kamheat handling telegram from 62215006
(meter) MyKamstrup 62215006 "40442D2C0650216219048D2043840E14237AB934690314EF5FBB173F17E276E41EBA6D9BCC35CACA57F4CCF2CF6C3D8A0B93B4639013EB26F0AB7B619333F3B782"
(wmbus) parseDLL @0 65
(telegram) DLL L=40 C=44 (from meter SND_NR) M=2c2d (KAM) A=62215006 VER=19 TYPE=04 (Heat meter) (driver unknown!) DEV=rtlwmbus[00000001] RSSI=143
(wmbus) parseELL @10 55
(ELL) decrypting "7AB934690314EF5FBB173F17E276E41EBA6D9BCC35CACA57F4CCF2CF6C3D8A0B93B4639013EB26F0AB7B619333F3B782"
(ELL) IV 2D2C06502162190420840E1423000000
(ELL) block 0 block_size 16 offset 0
(ELL) decrypted "C83A78040F063F000004FF07D89F0D00"
(ELL) block 1 block_size 16 offset 16
(ELL) decrypted "04FF08DF060D000414852C140002FD17"
(ELL) block 2 block_size 16 offset 32
(ELL) decrypted "0000043B4B0000000259A319025DB418"
(ELL) decrypted "C83A78040F063F000004FF07D89F0D0004FF08DF060D000414852C140002FD170000043B4B0000000259A319025DB418"
(telegram) ELL CI=8d CC=20 (slow_resp sync) ACC=43 SN=840e1423 (AES_CTR session=4 time=3227880) CRC=c83a
(wmbus) parseNWL @19 46
(wmbus) parseAFL @19 46
(wmbus) parseTPL @19 46
(dvparser) found new format "040F04FF0704FF08041402FD17043B0259025D" with hash d7d6, remembering!
(telegram) TPL CI=78
telegram=|40442D2C0650216219048D2043840E1423C83A78_040F063F000004FF07D89F0D0004FF08DF060D000414852C140002FD170000043B4B0000000259A319025DB418|+347
(meters) trying field info on_time(Time)[0]...
(meters) trying field info status(Text)[1]...
(meters) trying field info total_energy_consumption(Energy)[2]...
(meters) using field info total_energy_consumption(Energy)[2] to extract 040F at offset 22
(meter) AnyEnergyVIF total_energy_consumption_kwh decoded mj default kwh value 161340 (scale 1)
(meters) trying field info total_volume(Volume)[3]...
(meters) using field info total_volume(Volume)[3] to extract 0414 at offset 42
(meter) Volume total_volume_m3 decoded m3 default m3 value 13221.2 (scale 1)
(meters) trying field info volume_flow(Flow)[4]...
(meters) using field info volume_flow(Flow)[4] to extract 043B at offset 53
(meter) VolumeFlow volume_flow_m3h decoded m3h default m3h value 0.075 (scale 1)
(meters) trying field info power(Power)[5]...
(meters) trying field info max_power(Power)[6]...
(meters) trying field info t1_temperature(Temperature)[7]...
(meters) using field info t1_temperature(Temperature)[7] to extract 0259 at offset 59
(meter) FlowTemperature t1_temperature_c decoded c default c value 65.63 (scale 1)
(meters) trying field info t2_temperature(Temperature)[8]...
(meters) using field info t2_temperature(Temperature)[8] to extract 025D at offset 63
(meter) ReturnTemperature t2_temperature_c decoded c default c value 63.24 (scale 1)
(meters) trying field info max_flow(Flow)[9]...
(meters) trying field info forward_energy(Energy)[10]...
(meters) using field info forward_energy(Energy)[10] to extract 04FF07 at offset 29
(meter) Any forward_energy_m3c decoded m3c default m3c value 892888 (scale 1)
(meters) trying field info return_energy(Energy)[11]...
(meters) using field info return_energy(Energy)[11] to extract 04FF08 at offset 36
(meter) Any return_energy_m3c decoded m3c default m3c value 853727 (scale 1)
(meters) trying field info meter_date(Text)[12]...
(meters) trying field info target_energy(Energy)[13]...
(meters) trying field info target_volume(Volume)[14]...
(meters) trying field info target_date(Text)[15]...
(meters) trying field info operating_time(Time)[16]...
(kamheat) 000 : 40 length (64 bytes)(OK)
(kamheat) 001 : 44 dll-c (from meter SND_NR)
(kamheat) 002 : 2d2c dll-mfct (KAM)
(kamheat) 004 : 06502162 dll-id (62215006)
(kamheat) 008 : 19 dll-version
(kamheat) 009 : 04 dll-type (Heat meter)
(kamheat) 010 : 8d ell-ci-field (ELL: Extended Link Layer II (8 Byte))
(kamheat) 011 : 20 ell-cc (slow_resp sync)
(kamheat) 012 : 43 ell-acc
(kamheat) 013 : 840e1423 sn (AES_CTR)
(kamheat) 017 : c83a payload crc (calculated c83a OK)
(kamheat) 019 : 78 tpl-ci-field (EN 13757-3 Application Layer (no tplh))
(kamheat) 020 : 04 dif (32 Bit Integer/Binary Instantaneous value)
(kamheat) 021 : 0F vif (Energy 10⁷ J)
(kamheat) 022 C!: 063F0000 ("total_energy_consumption_kwh":44816.666667)
(kamheat) 026 : 04 dif (32 Bit Integer/Binary Instantaneous value)
(kamheat) 027 : FF vif (Manufacturer specific)
(kamheat) 028 : 07 vife (?)
(kamheat) 029 C!: D89F0D00 ("forward_energy_m3c":892888)
(kamheat) 033 : 04 dif (32 Bit Integer/Binary Instantaneous value)
(kamheat) 034 : FF vif (Manufacturer specific)
(kamheat) 035 : 08 vife (?)
(kamheat) 036 C!: DF060D00 ("return_energy_m3c":853727)
(kamheat) 040 : 04 dif (32 Bit Integer/Binary Instantaneous value)
(kamheat) 041 : 14 vif (Volume 10⁻² m³)
(kamheat) 042 C!: 852C1400 ("total_volume_m3":13221.17)
(kamheat) 046 : 02 dif (16 Bit Integer/Binary Instantaneous value)
(kamheat) 047 : FD vif (Second extension FD of VIF-codes)
(kamheat) 048 : 17 vife (Error flags (binary))
(kamheat) 049 C?: 0000
(kamheat) 051 : 04 dif (32 Bit Integer/Binary Instantaneous value)
(kamheat) 052 : 3B vif (Volume flow l/h)
(kamheat) 053 C!: 4B000000 ("volume_flow_m3h":0.075)
(kamheat) 057 : 02 dif (16 Bit Integer/Binary Instantaneous value)
(kamheat) 058 : 59 vif (Flow temperature 10⁻² °C)
(kamheat) 059 C!: A319 ("t1_temperature_c":65.63)
(kamheat) 061 : 02 dif (16 Bit Integer/Binary Instantaneous value)
(kamheat) 062 : 5D vif (Return temperature 10⁻² °C)
(kamheat) 063 C!: B418 ("t2_temperature_c":63.24)
{"media":"heat","meter":"kamheat","name":"MyKamstrup","id":"62215006","forward_energy_m3c":892888,"return_energy_m3c":853727,"t1_temperature_c":65.63,"t2_temperature_c":63.24,"total_energy_consumption_kwh":44816.666667,"total_volume_m3":13221.17,"volume_flow_m3h":0.075,"status":"OK","timestamp":"2023-11-16T23:35:30Z","device":"rtlwmbus[00000001]","rssi_dbm":143}
oraz zrzut z dekodera wmbus:
telegram=|40442D2C0650216219048D202B140C1423633A78_040F063F000004FF07D59F0D0004FF08DC060D000414812C140002FD170000043B4400000002599819025DA318|
Auto driver : not found!
Best driver : kamheat 24/26
Using driver : kamheat 00/00
000 : 40 length (64 bytes)(OK)
001 : 44 dll-c (from meter SND_NR)
002 : 2d2c dll-mfct (KAM)
004 : 06502162 dll-id (62215006)
008 : 19 dll-version
009 : 04 dll-type (Heat meter)
010 : 8d ell-ci-field (ELL: Extended Link Layer II (8 Byte))
011 : 20 ell-cc (slow_resp sync)
012 : 2b ell-acc
013 : 140c1423 sn (AES_CTR)
017 : 633a payload crc (calculated 633a OK)
019 : 78 tpl-ci-field (EN 13757-3 Application Layer (no tplh))
020 : 04 dif (32 Bit Integer/Binary Instantaneous value)
021 : 0F vif (Energy 10⁷ J)
022 C!: 063F0000 ("total_energy_consumption_kwh":44816.666667)
026 : 04 dif (32 Bit Integer/Binary Instantaneous value)
027 : FF vif (Manufacturer specific)
028 : 07 vife (?)
029 C!: D59F0D00 ("forward_energy_m3c":892885)
033 : 04 dif (32 Bit Integer/Binary Instantaneous value)
034 : FF vif (Manufacturer specific)
035 : 08 vife (?)
036 C!: DC060D00 ("return_energy_m3c":853724)
040 : 04 dif (32 Bit Integer/Binary Instantaneous value)
041 : 14 vif (Volume 10⁻² m³)
042 C!: 812C1400 ("total_volume_m3":13221.13)
046 : 02 dif (16 Bit Integer/Binary Instantaneous value)
047 : FD vif (Second extension FD of VIF-codes)
048 : 17 vife (Error flags (binary))
049 C?: 0000
051 : 04 dif (32 Bit Integer/Binary Instantaneous value)
052 : 3B vif (Volume flow l/h)
053 C!: 44000000 ("volume_flow_m3h":0.068)
057 : 02 dif (16 Bit Integer/Binary Instantaneous value)
058 : 59 vif (Flow temperature 10⁻² °C)
059 C!: 9819 ("t1_temperature_c":65.52)
061 : 02 dif (16 Bit Integer/Binary Instantaneous value)
062 : 5D vif (Return temperature 10⁻² °C)
063 C!: A318 ("t2_temperature_c":63.07)
{
"media":"heat",
"meter":"kamheat",
"name":"",
"id":"62215006",
"forward_energy_m3c":892885,
"return_energy_m3c":853724,
"t1_temperature_c":65.52,
"t2_temperature_c":63.07,
"total_energy_consumption_kwh":44816.666667,
"total_volume_m3":13221.13,
"volume_flow_m3h":0.068,
"status":"OK",
"timestamp":"2023-11-16T23:27:41Z"
}
Using: wmbusmeters: 1.14.0-48-gc4b9f0d
c4b9f0d10477cb6bb2472e1f2de5eb08ba42e7c4