kopia lustrzana https://github.com/weetmuts/wmbusmeters
Added Axioma W1 water meter.
rodzic
0f209edc97
commit
bbe12e517b
3
CHANGES
3
CHANGES
|
@ -1,4 +1,7 @@
|
|||
|
||||
Added telegram content sent by Axioma W1 meter to driver q400,
|
||||
since Axioma identifies itself as a q400 meter.
|
||||
|
||||
You can now add constant fields using --field_extra_info=floor54 and
|
||||
--selectfields=....,extra_info,.... to print constant values into
|
||||
the fields format. --field_xxx=yyy is the new name for --json_xxx=yyy.
|
||||
|
|
|
@ -313,6 +313,7 @@ Apator at-wmbus-08 (apator08) (non-standard protocol)
|
|||
Apator at-wmbus-16-2 (apator162) (non-standard protocol, spurious decoding errors)
|
||||
Apator Ultrimis (ultrimis)
|
||||
Aquametro/Integra Topas Es Kr (topaseskr)
|
||||
Axioma W1 (q400)
|
||||
Bmeters Hydrodigit (hydrodigit) (partly non-standard protocol)
|
||||
Diehl/Sappel IZAR RC 868 I R4 PL (izar) (non-standard protocol)
|
||||
Diehl HYDRUS (hydrus)
|
||||
|
|
|
@ -136,9 +136,14 @@ telegram=|3044B4090123456713067A190020052F2F|0C1315000000046D0136A7270F050B00000
|
|||
|
||||
# Test Q400 water telegram (encrypted)
|
||||
telegram=|2E4409077272727210077AD7102005CC2FF08D057E306D8C3078AE44AD6E3D37F8515B92FB068347783DFBB25C3C28|
|
||||
{"media":"water","meter":"q400","name":"Q400Water","id":"72727272","total_m3":0,"set_date":"2019-12-01","consumption_at_set_date_m3":0,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
{"media":"water","meter":"q400","name":"Q400Water","id":"72727272","total_m3":0,"set_date":"2019-12-01","consumption_at_set_date_m3":0,"meter_datetime":"","flow_m3h":0,"forward_flow_m3h":0,"backward_flow_m3h":0,"flow_temperature_c":0,"set_forward_flow_m3h":0,"set_backward_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|Q400Water;72727272;0.000000;1111-11-11 11:11.11
|
||||
|
||||
# Test Axioma W1 telegram with additional fields compared to the older q400 meter.
|
||||
telegram=|5E4409077372727210077A710050052F2F|046D0110A92704130000000004933B0000000004933C00000000023B000002592A0A446D0000A12744130000000044933B0000000044933C0000000001FD74622F2F2F2F2F2F2F2F2F2F2F2F2F2F|
|
||||
{"media":"water","meter":"q400","name":"AxiomaWater","id":"72727273","total_m3":0,"set_date":"2021-07-01","consumption_at_set_date_m3":0,"meter_datetime":"2021-07-09","flow_m3h":0,"forward_flow_m3h":0,"backward_flow_m3h":0,"flow_temperature_c":26.02,"set_forward_flow_m3h":0,"set_backward_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}
|
||||
|AxiomaWater;72727273;0.000000;1111-11-11 11:11.11
|
||||
|
||||
# Test electricity meter with eBZ wMB E01.
|
||||
telegram=|5B445A149922992202378C20F6900F002C25BC9E0000BF48954821BC508D72992299225A140102F6003007102F2F040330F92A0004A9FF01FF24000004A9FF026A29000004A9FF03460600000DFD11063132333435362F2F2F2F2F2F|
|
||||
{"media":"electricity","meter":"ebzwmbe","name":"Elen1","id":"22992299","total_energy_consumption_kwh":2816.304,"current_power_consumption_kw":0.21679,"current_power_consumption_phase1_kw":0.09471,"current_power_consumption_phase2_kw":0.10602,"current_power_consumption_phase3_kw":0.01606,"customer":"123456","timestamp":"1111-11-11T11:11:11Z"}
|
||||
|
|
|
@ -556,7 +556,7 @@ void handleSelectedFields(Configuration *c, string s)
|
|||
{
|
||||
if (c->selected_fields.size() > 0)
|
||||
{
|
||||
warning("(warning) selectfields already used! Ignoring selectfields %s", s);
|
||||
warning("(warning) selectfields already used! Ignoring selectfields %s", s.c_str());
|
||||
return;
|
||||
}
|
||||
char buf[s.length()+1];
|
||||
|
|
|
@ -71,6 +71,8 @@ bool parseDV(Telegram *t,
|
|||
// in combination with the storagenr. (Later I will add tariff/subunit)
|
||||
bool findKey(MeasurementType mt, ValueInformation vi, int storagenr, int tariffnr,
|
||||
std::string *key, std::map<std::string,std::pair<int,DVEntry>> *values);
|
||||
bool findKeyVife(MeasurementType mt, ValueInformation vi, int storagenr, int tariffnr,
|
||||
std::string *key, std::map<std::string,std::pair<int,DVEntry>> *values);
|
||||
|
||||
#define ANY_STORAGENR -1
|
||||
#define ANY_TARIFFNR -1
|
||||
|
|
|
@ -37,9 +37,20 @@ struct MeterQ400 : public virtual WaterMeter, public virtual MeterCommonImplemen
|
|||
private:
|
||||
void processContent(Telegram *t);
|
||||
|
||||
string meter_datetime_;
|
||||
double total_water_consumption_m3_ {};
|
||||
string set_date_;
|
||||
double consumption_at_set_date_m3_ {};
|
||||
|
||||
double flow_m3h_ {};
|
||||
// What is flow really? The sum of forward and backward flow? Or the same as forward flow?
|
||||
double forward_flow_m3h_ {};
|
||||
double backward_flow_m3h_ {};
|
||||
double flow_temperature_c_ {};
|
||||
|
||||
// Historical flow, perhaps over the last month?
|
||||
double set_forward_flow_m3h_ {};
|
||||
double set_backward_flow_m3h_ {};
|
||||
};
|
||||
|
||||
shared_ptr<WaterMeter> createQ400(MeterInfo &mi)
|
||||
|
@ -68,11 +79,49 @@ MeterQ400::MeterQ400(MeterInfo &mi) :
|
|||
[&](Unit u){ return consumptionAtSetDate(u); },
|
||||
"The total water consumption at the most recent billing period date.",
|
||||
false, true);
|
||||
|
||||
addPrint("meter_datetime", Quantity::Text,
|
||||
[&](){ return meter_datetime_; },
|
||||
"Meter timestamp for measurement.",
|
||||
false, true);
|
||||
|
||||
addPrint("flow", Quantity::Flow,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Flow); return convert(flow_m3h_, Unit::M3H, u); },
|
||||
"Water flow?",
|
||||
false, true);
|
||||
|
||||
addPrint("forward_flow", Quantity::Flow,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Flow); return convert(forward_flow_m3h_, Unit::M3H, u); },
|
||||
"Forward flow.",
|
||||
false, true);
|
||||
|
||||
addPrint("backward_flow", Quantity::Flow,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Flow); return convert(backward_flow_m3h_, Unit::M3H, u); },
|
||||
"Backward flow.",
|
||||
false, true);
|
||||
|
||||
addPrint("flow_temperature", Quantity::Temperature,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Temperature); return convert(flow_temperature_c_, Unit::C, u); },
|
||||
"The water temperature.",
|
||||
false, true);
|
||||
|
||||
addPrint("set_forward_flow", Quantity::Flow,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Flow); return convert(set_forward_flow_m3h_, Unit::M3H, u); },
|
||||
"Historical forward flow.",
|
||||
false, true);
|
||||
|
||||
addPrint("set_backward_flow", Quantity::Flow,
|
||||
[&](Unit u){ assertQuantity(u, Quantity::Flow); return convert(set_backward_flow_m3h_, Unit::M3H, u); },
|
||||
"Historical backward flow.",
|
||||
false, true);
|
||||
|
||||
}
|
||||
|
||||
void MeterQ400::processContent(Telegram *t)
|
||||
{
|
||||
/*
|
||||
This is the first q400 meter telegram content:
|
||||
|
||||
(q400) 0f: 2f2f decrypt check bytes
|
||||
(q400) 11: 04 dif (32 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 12: 6D vif (Date and time type)
|
||||
|
@ -93,9 +142,71 @@ void MeterQ400::processContent(Telegram *t)
|
|||
(q400) 2d: 2F skip
|
||||
(q400) 2e: 2F skip
|
||||
*/
|
||||
|
||||
/* And here is the Axioma W1 meter which reports identical
|
||||
version and type and manufacturer as the old q400 meter.
|
||||
But it contains a lot more data.....silly,
|
||||
they should have a different meter type.
|
||||
|
||||
(q400) 0f: 2f2f decrypt check bytes
|
||||
(q400) 11: 04 dif (32 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 12: 6D vif (Date and time type)
|
||||
(q400) 13: 0110A927
|
||||
(q400) 17: 04 dif (32 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 18: 13 vif (Volume l)
|
||||
(q400) 19: * 00000000 total consumption (0.000000 m3)
|
||||
(q400) 1d: 04 dif (32 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 1e: 93 vif (Volume l)
|
||||
(q400) 1f: 3B vife (forward flow)
|
||||
(q400) 20: 00000000
|
||||
(q400) 24: 04 dif (32 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 25: 93 vif (Volume l)
|
||||
(q400) 26: 3C vife (backward flow)
|
||||
(q400) 27: 00000000
|
||||
(q400) 2b: 02 dif (16 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 2c: 3B vif (Volume flow l/h)
|
||||
(q400) 2d: 0000
|
||||
(q400) 2f: 02 dif (16 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 30: 59 vif (Flow temperature 10⁻² °C)
|
||||
(q400) 31: 2A0A
|
||||
(q400) 33: 44 dif (32 Bit Integer/Binary Instantaneous value storagenr=1)
|
||||
(q400) 34: 6D vif (Date and time type)
|
||||
(q400) 35: * 0000A127 set date (2021-07-01)
|
||||
(q400) 39: 44 dif (32 Bit Integer/Binary Instantaneous value storagenr=1)
|
||||
(q400) 3a: 13 vif (Volume l)
|
||||
(q400) 3b: * 00000000 consumption at set date (0.000000 m3)
|
||||
(q400) 3f: 44 dif (32 Bit Integer/Binary Instantaneous value storagenr=1)
|
||||
(q400) 40: 93 vif (Volume l)
|
||||
(q400) 41: 3B vife (forward flow)
|
||||
(q400) 42: 00000000
|
||||
(q400) 46: 44 dif (32 Bit Integer/Binary Instantaneous value storagenr=1)
|
||||
(q400) 47: 93 vif (Volume l)
|
||||
(q400) 48: 3C vife (backward flow)
|
||||
(q400) 49: 00000000
|
||||
(q400) 4d: 01 dif (8 Bit Integer/Binary Instantaneous value)
|
||||
(q400) 4e: FD vif (Second extension FD of VIF-codes)
|
||||
(q400) 4f: 74 vife (Reserved)
|
||||
(q400) 50: 62
|
||||
(q400) 51: 2F skip
|
||||
(q400) 52: 2F skip
|
||||
(q400) 53: 2F skip
|
||||
(q400) 54: 2F skip
|
||||
(q400) 55: 2F skip
|
||||
(q400) 56: 2F skip
|
||||
(q400) 57: 2F skip
|
||||
(q400) 58: 2F skip
|
||||
(q400) 59: 2F skip
|
||||
(q400) 5a: 2F skip
|
||||
(q400) 5b: 2F skip
|
||||
(q400) 5c: 2F skip
|
||||
(q400) 5d: 2F skip
|
||||
(q400) 5e: 2F skip
|
||||
*/
|
||||
int offset;
|
||||
string key;
|
||||
|
||||
// Find keys common to both q400 and axioma.
|
||||
|
||||
if(findKey(MeasurementType::Unknown, ValueInformation::Volume, 0, 0, &key, &t->values)) {
|
||||
extractDVdouble(&t->values, key, &offset, &total_water_consumption_m3_);
|
||||
t->addMoreExplanation(offset, " total consumption (%f m3)", total_water_consumption_m3_);
|
||||
|
@ -112,6 +223,38 @@ void MeterQ400::processContent(Telegram *t)
|
|||
set_date_ = strdate(&date);
|
||||
t->addMoreExplanation(offset, " set date (%s)", set_date_.c_str());
|
||||
}
|
||||
|
||||
// Now the axioma values:
|
||||
if (findKey(MeasurementType::Instantaneous, ValueInformation::DateTime, 0, 0, &key, &t->values))
|
||||
{
|
||||
struct tm date;
|
||||
extractDVdate(&t->values, key, &offset, &date);
|
||||
meter_datetime_ = strdate(&date);
|
||||
t->addMoreExplanation(offset, " meter datetime (%s)", meter_datetime_.c_str());
|
||||
}
|
||||
|
||||
extractDVdouble(&t->values, "04933B", &offset, &forward_flow_m3h_);
|
||||
t->addMoreExplanation(offset, " forward flow (%f m3/h)", forward_flow_m3h_);
|
||||
|
||||
extractDVdouble(&t->values, "04933C", &offset, &backward_flow_m3h_);
|
||||
t->addMoreExplanation(offset, " backward flow (%f m3/h)", backward_flow_m3h_);
|
||||
|
||||
// Why does the meter send both forward flow and flow? Aren't they the same?
|
||||
if(findKey(MeasurementType::Instantaneous, ValueInformation::VolumeFlow, 0, 0, &key, &t->values)) {
|
||||
extractDVdouble(&t->values, key, &offset, &flow_m3h_);
|
||||
t->addMoreExplanation(offset, " flow (%f m3/h)", flow_m3h_);
|
||||
}
|
||||
|
||||
if(findKey(MeasurementType::Instantaneous, ValueInformation::FlowTemperature, 0, 0, &key, &t->values)) {
|
||||
extractDVdouble(&t->values, key, &offset, &flow_temperature_c_);
|
||||
t->addMoreExplanation(offset, " flow temperature (%f °C)", flow_temperature_c_);
|
||||
}
|
||||
|
||||
extractDVdouble(&t->values, "44933B", &offset, &set_forward_flow_m3h_);
|
||||
t->addMoreExplanation(offset, " set forward flow (%f m3/h)", set_forward_flow_m3h_);
|
||||
|
||||
extractDVdouble(&t->values, "44933C", &offset, &set_backward_flow_m3h_);
|
||||
t->addMoreExplanation(offset, " set backward flow (%f m3/h)", set_backward_flow_m3h_);
|
||||
}
|
||||
|
||||
double MeterQ400::totalWaterConsumption(Unit u)
|
||||
|
|
|
@ -158,6 +158,11 @@ Received telegram from: 72727272
|
|||
type: Water meter (0x07)
|
||||
ver: 0x10
|
||||
driver: q400
|
||||
Received telegram from: 72727273
|
||||
manufacturer: (AXI) UAB Axis Industries, Lithuania (0x709)
|
||||
type: Water meter (0x07)
|
||||
ver: 0x10
|
||||
driver: q400
|
||||
Received telegram from: 22992299
|
||||
manufacturer: (EBZ) eBZ, Germany (0x145a)
|
||||
type: Radio converter (meter side) (0x37)
|
||||
|
|
|
@ -38,6 +38,7 @@ METERS="MyWarmWater supercom587 12345678 NOKEY
|
|||
HydrodigitWater hydrodigit 86868686 NOKEY
|
||||
HydrodigitWater2 hydrodigit 67452301 NOKEY
|
||||
Q400Water q400 72727272 AAA896100FED12DD614DD5D46369ACDD
|
||||
AxiomaWater q400 72727273 NOKEY
|
||||
Elen1 ebzwmbe 22992299 NOKEY
|
||||
Elen2 esyswm 77997799 NOKEY
|
||||
Elen3 ehzp 55995599 NOKEY
|
||||
|
|
Ładowanie…
Reference in New Issue