Skip to content

Commit

Permalink
add meters for gasboiler
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Apr 24, 2024
1 parent 355ff56 commit 5ec68b8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x4A5, "HPFan", true, MAKE_PF_CB(process_HpFan));
}

// some gas boilers, see #1701
if (model() != EMSdevice::EMS_DEVICE_FLAG_HEATPUMP) {
register_telegram_type(0x2E, "Meters", false, MAKE_PF_CB(process_Meters));
register_telegram_type(0x3B, "Energy", false, MAKE_PF_CB(process_Energy));
}

if (model() == EMSdevice::EMS_DEVICE_FLAG_HIU) {
register_telegram_type(0x772, "HIUSettings", false, MAKE_PF_CB(process_HIUSettings));
register_telegram_type(0x779, "HIUMonitor", false, MAKE_PF_CB(process_HIUMonitor));
Expand Down Expand Up @@ -389,6 +395,29 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
99);
}
*/
if (model() != EMSdevice::EMS_DEVICE_FLAG_HEATPUMP) {
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&meterHeat_,
DeviceValueType::UINT24,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(meterHeat),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DHW1, &meterWw_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(meterWw), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&gasMeterHeat_,
DeviceValueType::UINT24,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(gasMeterHeat),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DHW1, &gasMeterWw_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(gasMeterWw), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&nrgHeat2_,
DeviceValueType::UINT24,
DeviceValueNumOp::DV_NUMOP_DIV10,
FL_(nrgHeat2),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DHW1, &nrgWw2_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(nrgWw2), DeviceValueUOM::KWH);
}

// heatpump info
if (model() == EMSdevice::EMS_DEVICE_FLAG_HEATPUMP) {
Expand Down Expand Up @@ -1949,6 +1978,20 @@ void Boiler::process_HpFan(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, fan_, 9);
}

// Boiler(0x08) -B-> All(0x00), ?(0x2E), data: 00 00 1C CE 00 00 05 E8 00 00 00 18 00 00 00 02
void Boiler::process_Meters(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, gasMeterHeat_, 0);
has_update(telegram, gasMeterWw_, 4);
has_update(telegram, meterHeat_, 8);
has_update(telegram, meterWw_, 12);
}

// boiler(0x08) -B-> All(0x00), ?(0x3B), data: 00 00 1B D1 00 00 05 7F
void Boiler::process_Energy(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, nrgHeat2_, 0);
has_update(telegram, nrgWw2_, 4);
}

// HIU unit

// boiler(0x08) -B-> All(0x00), ?(0x0779), data: 06 05 01 01 AD 02 EF FF FF 00 00 7F FF
Expand Down
8 changes: 8 additions & 0 deletions src/devices/boiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,15 @@ class Boiler : public EMSdevice {
uint32_t nrgTotal_;
uint32_t nrgWw_;
uint32_t nrgHeat_;
uint32_t nrgWw2_;
uint32_t nrgHeat2_;
uint32_t meterTotal_;
uint32_t meterComp_;
uint32_t meterEHeat_;
uint32_t meterHeat_;
uint32_t meterWw_;
uint32_t gasMeterHeat_;
uint32_t gasMeterWw_;
uint8_t hpEA0_;
uint8_t hpPumpMode_;
uint8_t hpSetDiffPress_;
Expand Down Expand Up @@ -367,6 +371,10 @@ class Boiler : public EMSdevice {
void process_HpMeters(std::shared_ptr<const Telegram> telegram);
void process_WeatherComp(std::shared_ptr<const Telegram> telegram);
void process_HpFan(std::shared_ptr<const Telegram> telegram);

void process_Meters(std::shared_ptr<const Telegram> telegram);
void process_Energy(std::shared_ptr<const Telegram> telegram);

// HIU
void process_HIUSettings(std::shared_ptr<const Telegram> telegram);
void process_HIUMonitor(std::shared_ptr<const Telegram> telegram);
Expand Down
4 changes: 4 additions & 0 deletions src/locale_translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,16 @@ MAKE_TRANSLATION(releaseWait, "releasewait", "boiler release wait time", "Wartez
MAKE_TRANSLATION(nrgTotal, "nrgtotal", "total energy", "Energie gesamt", "", "", "całkowita energia", "", "", "", "", "celková energia") // TODO translate
MAKE_TRANSLATION(nrgHeat, "nrgheat", "energy heating", "Energie Heizen", "", "", "energia na ogrzewanie", "", "", "ısıtma enerjisi", "", "energetické vykurovanie") // TODO translate
MAKE_TRANSLATION(nrgWw, "nrgdhw", "energy", "Energie", "", "", "energia", "", "", "sıcak kullanım suyu enerjisi", "", "energia") // TODO translate
MAKE_TRANSLATION(nrgHeat2, "nrgheat2", "energy heating 2", "Energie Heizen 2", "", "", "energia na ogrzewanie 2", "", "", "ısıtma enerjisi 2", "", "energetické vykurovanie") // TODO translate
MAKE_TRANSLATION(nrgWw2, "nrgdhw2", "energy 2", "Energie 2", "", "", "energia 2", "", "", "sıcak kullanım suyu enerjisi 2", "", "energia 2") // TODO translate
MAKE_TRANSLATION(nomPower, "nompower", "nominal Power", "Brennerleistung", "", "", "moc nominalna", "", "", "nominal güç", "", "nominálny výkon") // TODO translate
MAKE_TRANSLATION(meterTotal, "metertotal", "meter total", "Messung gesamt", "", "", "licznik całkowity", "", "", "", "", "meter celkom") // TODO translate
MAKE_TRANSLATION(meterComp, "metercomp", "meter compressor", "Messung Kompressor", "", "", "licznik sprężarki", "", "", "", "", "meter kompresor") // TODO translate
MAKE_TRANSLATION(meterEHeat, "metereheat", "meter e-heater", "Messung E-Heizer", "", "", "licznik dogrzewacza", "", "", "", "", "elektrický ohrievač") // TODO translate
MAKE_TRANSLATION(meterHeat, "meterheat", "meter heating", "Messung Heizen", "", "", "licznik ogrzewania", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(meterWw, "meterdhw", "meter", "Messung", "", "", "licznik", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(gasMeterHeat, "gasmeterheat", "gas meter heating", "Gas Messung Heizen", "", "", "", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(gasMeterWw, "gasmeterdhw", "gas meter", "Gas Messung", "", "", "", "", "", "", "", "") // TODO translate

// HIU
MAKE_TRANSLATION(netFlowTemp, "netflowtemp", "heat network flow temp", "System Vorlauftemperatur", "Netto aanvoertemperatuur", "", "temp. zasilania sieci cieplnej", "", "", "ısıtma şebekesi akış derecesi", "temperatura di mandata della rete di riscaldamento", "teplota prívodu tepelnej siete") // TODO translate
Expand Down

0 comments on commit 5ec68b8

Please sign in to comment.