kopia lustrzana https://github.com/weetmuts/wmbusmeters
Added more guessing for the apator162.
rodzic
baa88b8270
commit
edd523a64b
|
@ -0,0 +1,50 @@
|
|||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 23 (0x83)
|
||||
|
||||
telegram=|6E4401062020202005077A9A006085|2F2F0F0A734393CC0000435B0183001A54E06F630291342510030F00007B013E0B00003E0B00003E0B00003E0B00003E0B00003E0B00003E0B0000650000003D0000003D0000003D00000000000000A0910CB003FFFFFFFFFFFFFFFFFFFFA62B|
|
||||
{"media":"water","meter":"apator162","name":"Wasser","id":"20202020","total_m3":3.843,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|Wasser;20202020;3.843000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 12 (0x10)
|
||||
|
||||
telegram=|4E4401062020202105077A13004085|2F2F0F6D4C389300020043840210|351F040075012C0B040048D603003E630300CD2C03001EF402000ACE0200A098A39603FFFFFFFFFFFFFFFFFFFFFFFFFF1977|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatera","id":"21202020","total_m3":270.133,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatera;21202020;270.133000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 20 (0x4b)
|
||||
|
||||
telegram=|4E4401062020202205077A4B004085|2F2F0FE566B99390000087C0B24B732679FF75350010FCFB00004155594265086A0043B4017301DFF600006AE70000BFD5000051BC0000A0F56C2602FFFF1B1B|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterb","id":"22202020","total_m3":64.508,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterb;22202020;64.508000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 9 (0x01)
|
||||
|
||||
telegram=|4E4401062020202305077A9D004085|2F2F0F81902C9300000010B82F010041555942BD2882004319027301BC2601005C180100CB0A0100DFF60000A0F56C2602FFFFFFFFFFFFFFFFFFFFFFFFFF5B7C|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterc","id":"23202020","total_m3":77.752,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterc;23202020;77.752000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 20 (0x81)
|
||||
|
||||
telegram=|4E4401062020202405077A6C0040852F2F|0F73B3E19410000084E15381E553810101000010FA41010041555942BF4E8A00433B027301AD380100BC2601005C180100CB0A0100A0F56C2602FFFFD0D7|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterd","id":"24202020","total_m3":82.426,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterd;24202020;82.426000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 23 (0x84)
|
||||
|
||||
telegram=|4E4401062020202505077AEF0040852F2F|0F07112294100200436103848B745953486C0910000010819202007501F1800200E5640200534A02003431020080150200D9000200A0DC939703FFFFA434|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatere","id":"25202020","total_m3":168.577,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatere;25202020;168.577000;1111-11-11 11:11.11
|
||||
|
||||
# More apators...
|
||||
|
||||
telegram=|6E4401062020202605077AAC0060852F2F|0F0C4442941A000043B50283000A549B4159029C290F10AB4400007B012C440000BE3E00008838000072340000493000009B2C00001D2C0000822B00007428000010250000B7200000261C0000A0A4D9A103FFFFFFFFFFFFFFFFFFFF7823|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatere","id":"26202020","total_m3":17.579,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatere;26202020;17.579000;1111-11-11 11:11.11
|
||||
|
||||
telegram=|6E4401062020202605077AAD0060852F2F|0F0E4442941A000043B502844265594C65590101000010AB4400007B012C440000BE3E00008838000072340000493000009B2C00001D2C0000822B00007428000010250000B7200000261C0000A0A4D9A103FFFFFFFFFFFFFFFFFFFF6C1B|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatere","id":"26202020","total_m3":17.579,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatere;26202020;17.579000;1111-11-11 11:11.11
|
||||
|
||||
telegram=|6E4401062020202605077AAE0060852F2F|0F0F4442941A000043B50281D87F57D87F570101000010AB4400007B012C440000BE3E00008838000072340000493000009B2C00001D2C0000822B00007428000010250000B7200000261C0000A0A4D9A103FFFFFFFFFFFFFFFFFFFF5F22|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatere","id":"26202020","total_m3":17.579,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatere;26202020;17.579000;1111-11-11 11:11.11
|
|
@ -20,42 +20,6 @@ telegram=|1844AE4C4455223368077A55000000|041389E20100023B0000|
|
|||
{"media":"water","meter":"iperl","name":"WaterWater","id":"33225544","total_m3":123.529,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|WaterWater;33225544;123.529000;0.000000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 23 (0x83)
|
||||
|
||||
telegram=|6E4401062020202005077A9A006085|2F2F0F0A734393CC0000435B0183001A54E06F630291342510030F00007B013E0B00003E0B00003E0B00003E0B00003E0B00003E0B00003E0B0000650000003D0000003D0000003D00000000000000A0910CB003FFFFFFFFFFFFFFFFFFFFA62B|
|
||||
{"media":"water","meter":"apator162","name":"Wasser","id":"20202020","total_m3":3.843,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|Wasser;20202020;3.843000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 12 (0x10)
|
||||
|
||||
telegram=|4E4401062020202105077A13004085|2F2F0F6D4C389300020043840210|351F040075012C0B040048D603003E630300CD2C03001EF402000ACE0200A098A39603FFFFFFFFFFFFFFFFFFFFFFFFFF1977|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatera","id":"21202020","total_m3":270.133,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatera;21202020;270.133000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 20 (0x4b)
|
||||
|
||||
telegram=|4E4401062020202205077A4B004085|2F2F0FE566B99390000087C0B24B732679FF75350010FCFB00004155594265086A0043B4017301DFF600006AE70000BFD5000051BC0000A0F56C2602FFFF1B1B|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterb","id":"22202020","total_m3":64.508,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterb;22202020;64.508000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 9 (0x01)
|
||||
|
||||
telegram=|4E4401062020202305077A9D004085|2F2F0F81902C9300000010B82F010041555942BD2882004319027301BC2601005C180100CB0A0100DFF60000A0F56C2602FFFFFFFFFFFFFFFFFFFFFFFFFF5B7C|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterc","id":"23202020","total_m3":77.752,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterc;23202020;77.752000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 20 (0x81)
|
||||
|
||||
telegram=|4E4401062020202405077A6C0040852F2F|0F73B3E19410000084E15381E553810101000010FA41010041555942BF4E8A00433B027301AD380100BC2601005C180100CB0A0100A0F56C2602FFFFD0D7|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWaterd","id":"24202020","total_m3":82.426,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWaterd;24202020;82.426000;1111-11-11 11:11.11
|
||||
|
||||
# Test at-wmbus-16-2 T1 telegram with offset 23 (0x84)
|
||||
|
||||
telegram=|4E4401062020202505077AEF0040852F2F|0F07112294100200436103848B745953486C0910000010819202007501F1800200E5640200534A02003431020080150200D9000200A0DC939703FFFFA434|
|
||||
{"media":"water","meter":"apator162","name":"MyTapWatere","id":"25202020","total_m3":168.577,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|MyTapWatere;25202020;168.577000;1111-11-11 11:11.11
|
||||
|
||||
# Test amiplus/apator electricity meter
|
||||
|
||||
telegram=|4E4401061010101002027A00004005|2F2F0E035040691500000B2B300300066D00790C7423400C78371204860BABC8FC100000000E833C8074000000000BAB3C0000000AFDC9FC0136022F2F2F2F2F|
|
||||
|
|
|
@ -87,44 +87,53 @@ void MeterApator162::processContent(Telegram *t)
|
|||
// Current assumption of this proprietary protocol is that byte 13 tells
|
||||
// us where the current total water consumption is located.
|
||||
int o = 0;
|
||||
uchar guess = content[11];
|
||||
if ((guess & 0x84) == 0x84)
|
||||
uchar guess10 = content[10];
|
||||
uchar guess11 = content[11];
|
||||
uchar guess12 = content[12];
|
||||
if ((guess11 & 0x84) == 0x84)
|
||||
{
|
||||
o = 23;
|
||||
}
|
||||
else
|
||||
if ((guess & 0x83) == 0x83)
|
||||
if ((guess11 & 0x83) == 0x83)
|
||||
{
|
||||
o = 23;
|
||||
}
|
||||
else
|
||||
if ((guess & 0x81) == 0x81)
|
||||
if ((guess11 & 0x81) == 0x81)
|
||||
{
|
||||
if (guess10 == 02)
|
||||
{
|
||||
o = 23;
|
||||
}
|
||||
else
|
||||
{
|
||||
o = 20;
|
||||
}
|
||||
}
|
||||
else
|
||||
if ((guess11 & 0x40) == 0x40)
|
||||
{
|
||||
o = 20;
|
||||
}
|
||||
else
|
||||
if ((guess & 0x40) == 0x40)
|
||||
{
|
||||
o = 20;
|
||||
}
|
||||
else
|
||||
if ((guess & 0x10) == 0x10)
|
||||
if ((guess11 & 0x10) == 0x10)
|
||||
{
|
||||
o = 12;
|
||||
}
|
||||
else
|
||||
if ((guess & 0x01) == 0x01)
|
||||
if ((guess11 & 0x01) == 0x01)
|
||||
{
|
||||
o = 9;
|
||||
}
|
||||
else
|
||||
{
|
||||
warning("(apator162) Unknown value in proprietary(unknown) apator162 protocol. Ignoring telegram. Found 0x%02x expected bit 0x01, 0x10, 0x40 or 0x80 to be set.\n", guess);
|
||||
warning("(apator162) Unknown value in proprietary(unknown) apator162 protocol. Ignoring telegram. Found 0x%02x expected bit 0x01, 0x10, 0x40 or 0x80 to be set.\n", guess11);
|
||||
return;
|
||||
}
|
||||
|
||||
strprintf(total, "%02x%02x%02x%02x", content[o], content[o+1], content[o+2], content[o+3]);
|
||||
debug("(apator162) Guessing offset to be %d from byte 0x%02x: total %s\n", o, guess, total.c_str());
|
||||
debug("\n(apator162) Guessing offset to be %d from byte >10=%02x 11=%02x 12=%02x<: total %s\n\n", o, guess10, guess11, guess12, total.c_str());
|
||||
|
||||
vendor_values["0413"] = { 25, DVEntry(MeasurementType::Instantaneous, 0x13, 0, 0, 0, total) };
|
||||
int offset;
|
||||
|
|
3
test.sh
3
test.sh
|
@ -15,6 +15,9 @@ if [ "$?" != "0" ]; then RC="1"; fi
|
|||
tests/test_t1_meters.sh $PROG
|
||||
if [ "$?" != "0" ]; then RC="1"; fi
|
||||
|
||||
tests/test_apas.sh $PROG
|
||||
if [ "$?" != "0" ]; then RC="1"; fi
|
||||
|
||||
tests/test_aes.sh $PROG
|
||||
if [ "$?" != "0" ]; then RC="1"; fi
|
||||
|
||||
|
|
|
@ -33,24 +33,6 @@ Received telegram from: 12345699
|
|||
Received telegram from: 33225544
|
||||
manufacturer: (SEN) Sensus Metering Systems, Germany
|
||||
device type: Water meter
|
||||
Received telegram from: 20202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 21202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 22202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 23202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 24202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 25202020
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Water meter
|
||||
Received telegram from: 10101010
|
||||
manufacturer: (APA) Apator, Poland
|
||||
device type: Electricity meter
|
||||
|
|
|
@ -12,12 +12,6 @@ METERS="MyWarmWater supercom587 12345678 NOKEY
|
|||
MyColdWater supercom587 11111111 NOKEY
|
||||
MoreWater iperl 12345699 NOKEY
|
||||
WaterWater iperl 33225544 NOKEY
|
||||
Wasser apator162 20202020 NOKEY
|
||||
MyTapWatera apator162 21202020 NOKEY
|
||||
MyTapWaterb apator162 22202020 NOKEY
|
||||
MyTapWaterc apator162 23202020 NOKEY
|
||||
MyTapWaterd apator162 24202020 NOKEY
|
||||
MyTapWatere apator162 25202020 NOKEY
|
||||
MyElectricity1 amiplus 10101010 NOKEY
|
||||
Duschen mkradio3 34333231 NOKEY
|
||||
HeatMeter vario451 58234965 NOKEY
|
||||
|
|
Ładowanie…
Reference in New Issue