Merge branch 'master' into feature/Techem_CompactVe

pull/215/head
Fredrik Öhrström 2021-01-24 11:25:51 +01:00 zatwierdzone przez GitHub
commit 28b416dfd6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
8 zmienionych plików z 42 dodań i 17 usunięć

Wyświetl plik

@ -1,4 +1,7 @@
Marc Kolly improved the Waterstar meter and added better error codes
and another type/version detection combo! Thanks Marc!
Janus Bo Andersen fixed the omnipower driver! Thanks Janus!
Version 1.0.4: 2020-12-05

Wyświetl plik

@ -29,7 +29,7 @@ Availability of **wmbusmeters** for other Linux distributions can be checked on
# Run as a daemon
Remove the wmbus dongle (im871a,amb8465,cul,rc1180) or the generic rtlsdr dongle (RTL2838) from your computer.
Remove the wmbus dongle (im871a,amb8465,cul,rc1180) or the generic rtlsdr dongle (RTL2832U) from your computer.
`./configure; make; sudo make install` will install wmbusmeters as a daemon.
@ -285,9 +285,8 @@ Qundis Q caloric (qcaloric)
Sontex 868 (sontex868)
Techem FHKV data II/III (fhkvdataiii)
Supported heat meter:
Supported heat meters:
Heat meter Techem Compact V / Compact Ve (compact5) (non-standard protocol)
(compact5 is unfortunately not quite supported since we lack a test telegram to prevent regressions)
Heat meter Techem Vario 4 (vario451) (non-standard protocol)
Heat meter Kamstrup Multical 302 (multical302) (in C1 mode, please open issue for T1 mode)
Heat and Cooling meter Kamstrup Multical 403 (multical403) (in C1 mode)

Wyświetl plik

@ -213,3 +213,8 @@ telegram=|2E4492159293949511377ABE0020252F2F|04135515000004FD971D808000004413000
telegram=|294468506935639176F0A0|009F2782290060822900000401D6311AF93E1BF93E008DC3009ED4000FE500|
{"media":"smoke detector","meter":"tsd2","name":"Smokey","id":"91633569","status":"OK","timestamp":"1111-11-11T11:11:11Z"}
|Smokey;91633569;OK;1111-11-11 11:11.11
# Test Techem Compact V heat meter
telegram=|36446850626262624543A1|009F2777010060780000000A000000000000000000000000000000000000000000000000A0400000B4010000|
{"media":"heat","meter":"compact5","name":"Heating","id":"62626262","total_kwh":0.495,"current_kwh":0.12,"previous_kwh":0.375,"timestamp":"1111-11-11T11:11:11Z"}
|Heating;62626262;0.495000;0.120000;0.375000;1111-11-11 11:11.11

Wyświetl plik

@ -34,7 +34,6 @@ struct MeterWaterstarM : public virtual WaterMeter, public virtual MeterCommonIm
private:
void processContent(Telegram *t);
string status();
string meter_timestamp_;
double total_water_consumption_m3_ {};
@ -42,6 +41,9 @@ private:
double total_water_backwards_m3_ {};
string meter_version_ {};
string parameter_set_ {};
string status_;
map<int,string> error_codes_;
};
shared_ptr<WaterMeter> createWaterstarM(MeterInfo &mi)
@ -57,6 +59,18 @@ MeterWaterstarM::MeterWaterstarM(MeterInfo &mi) :
addLinkMode(LinkMode::T1);
addLinkMode(LinkMode::C1);
error_codes_ = {
{ 0x01, "SW_ERROR" },
{ 0x02, "CRC_ERROR" },
{ 0x04, "SENSOR_ERROR" },
{ 0x08, "MEASUREMENT_ERROR" },
{ 0x10, "BATTERY_VOLTAGE_ERROR" },
{ 0x20, "MANIPULATION" },
{ 0x40, "LEAKAGE_OR_NO_USAGE" },
{ 0x80, "REVERSE_FLOW" },
{ 0x100, "OVERLOAD" },
};
addPrint("meter_timestamp", Quantity::Text,
[&](){ return meter_timestamp_; },
"Date time for this reading.",
@ -73,8 +87,8 @@ MeterWaterstarM::MeterWaterstarM(MeterInfo &mi) :
true, true);
addPrint("current_status", Quantity::Text,
[&](){ return status(); },
"Status of meter.",
[&](){ return status_; },
"The status is OK or some error condition.",
true, true);
addPrint("meter_version", Quantity::Text,
@ -136,7 +150,8 @@ void MeterWaterstarM::processContent(Telegram *t)
}
extractDVuint16(&t->values, "02FD17", &offset, &info_codes_);
t->addMoreExplanation(offset, " info codes (%s)", status().c_str());
t->addMoreExplanation(offset, " info codes (%s)", status_);
status_ = decodeTPLStatusByte(info_codes_, error_codes_);
extractDVdouble(&t->values, "04933C", &offset, &total_water_backwards_m3_);
t->addMoreExplanation(offset, " total water backwards (%f m3)", total_water_backwards_m3_);
@ -168,12 +183,3 @@ bool MeterWaterstarM::hasTotalWaterConsumption()
{
return true;
}
string MeterWaterstarM::status()
{
if (info_codes_ == 0) return "OK";
string s;
// We would like to know what the bits mean, but currently we do not!
strprintf(s, "ERROR(%04x)", info_codes_);
return s;
}

Wyświetl plik

@ -100,6 +100,7 @@
X(COMPACT5, MANUFACTURER_TCH, 0x04, 0x45) \
X(COMPACT5, MANUFACTURER_TCH, 0xc3, 0x45) \
X(COMPACT5, MANUFACTURER_TCH, 0x43, 0x22) \
X(COMPACT5, MANUFACTURER_TCH, 0x43, 0x45) \
X(EBZWMBE, MANUFACTURER_EBZ, 0x37, 0x02) \
X(EURISII, MANUFACTURER_INE, 0x08, 0x55) \
X(EHZP, MANUFACTURER_EMH, 0x02, 0x02) \
@ -166,6 +167,7 @@
X(VARIO451, MANUFACTURER_TCH, 0x04, 0x27) \
X(VARIO451, MANUFACTURER_TCH, 0xc3, 0x27) \
X(WATERSTARM, MANUFACTURER_DWZ, 0x06, 0x02) \
X(WATERSTARM, MANUFACTURER_DWZ, 0x07, 0x02) \
X(WATERSTARM, MANUFACTURER_EFE, 0x07, 0x03) \
X(WHE46X, MANUFACTURER_LSE, 0x08, 0x18) \
X(SENSOSTAR, MANUFACTURER_EFE, 0x04, 0x00) \

Wyświetl plik

@ -474,6 +474,8 @@ string mediaType(int a_field_device_type, int m_field) {
case 0x80: return "Heat Cost Allocator"; // FHKV data ii/iii
// Techem Vario 4 Typ 4.5.1 manufacturer specific.
case 0xC3: return "Heat meter";
// Techem V manufacturer specific.
case 0x43: return "Heat meter";
case 0xf0: return "Smoke detector";
}
}
@ -553,6 +555,8 @@ string mediaTypeJSON(int a_field_device_type, int m_field)
case 0x80: return "heat cost allocator"; // FHKV data ii/iii
// Techem Vario 4 Typ 4.5.1 manufacturer specific.
case 0xC3: return "heat";
// Techem V manufacturer specific.
case 0x43: return "heat";
case 0xf0: return "smoke detector";
}
}

Wyświetl plik

@ -215,6 +215,11 @@ Received telegram from: 91633569
type: Smoke detector (0xf0)
ver: 0x76
driver: tsd2
Received telegram from: 62626262
manufacturer: (TCH) Techem Service (0x5068)
type: Heat meter (0x43)
ver: 0x45
driver: compact5
EOF
RES=$($PROG --logfile=$LOGFILE --t1 simulations/simulation_t1.txt 2>&1)

Wyświetl plik

@ -43,7 +43,8 @@ METERS="MyWarmWater supercom587 12345678 NOKEY
Heater sensostar 12345679 NOKEY
Voda ev200 99993030 NOKEY
Vodda emerlin868 95949392 NOKEY
Smokey tsd2 91633569 NOKEY"
Smokey tsd2 91633569 NOKEY
Heating compact5 62626262 NOKEY"
cat simulations/simulation_t1.txt | grep '^{' > $TEST/test_expected.txt