From 7d6bb6b9c821688e29a1ba1cdcfe6efc9dba2bf1 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 26 Nov 2023 10:34:39 +0100 Subject: [PATCH] add meter heating 0x4AF, offset 24 --- src/devices/boiler.cpp | 7 +++++++ src/devices/boiler.h | 1 + src/devices/heatpump.cpp | 7 +++++++ src/devices/heatpump.h | 1 + src/locale_translations.h | 1 + src/version.h | 2 +- 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index b0b500dca..049c4ac08 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -399,6 +399,12 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterEHeat), DeviceValueUOM::KWH); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &meterHeat_, + DeviceValueType::ULONG, + DeviceValueNumOp::DV_NUMOP_DIV100, + FL_(meterHeat), + DeviceValueUOM::KWH); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &upTimeTotal_, DeviceValueType::TIME, @@ -1884,6 +1890,7 @@ void Boiler::process_HpMeters(std::shared_ptr telegram) { has_update(telegram, meterTotal_, 0); has_update(telegram, meterComp_, 4); has_update(telegram, meterEHeat_, 8); + has_update(telegram, meterHeat_, 24); } // HIU unit diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 4ad48e2ee..13fe3b18c 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -218,6 +218,7 @@ class Boiler : public EMSdevice { uint32_t meterTotal_; uint32_t meterComp_; uint32_t meterEHeat_; + uint32_t meterHeat_; uint8_t hpEA0_; uint8_t hpPumpMode_; diff --git a/src/devices/heatpump.cpp b/src/devices/heatpump.cpp index e9f74e672..8a1c214b6 100644 --- a/src/devices/heatpump.cpp +++ b/src/devices/heatpump.cpp @@ -169,6 +169,12 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterEHeat), DeviceValueUOM::KWH); + register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, + &meterHeat_, + DeviceValueType::ULONG, + DeviceValueNumOp::DV_NUMOP_DIV100, + FL_(meterHeat), + DeviceValueUOM::KWH); } /* @@ -264,6 +270,7 @@ void Heatpump::process_HpMeters(std::shared_ptr telegram) { has_update(telegram, meterTotal_, 0); has_update(telegram, meterComp_, 4); has_update(telegram, meterEHeat_, 8); + has_update(telegram, meterHeat_, 24); } /* diff --git a/src/devices/heatpump.h b/src/devices/heatpump.h index e99748836..cb0fbcab1 100644 --- a/src/devices/heatpump.h +++ b/src/devices/heatpump.h @@ -73,6 +73,7 @@ class Heatpump : public EMSdevice { uint32_t meterTotal_; uint32_t meterComp_; uint32_t meterEHeat_; + uint32_t meterHeat_; void process_HPMonitor1(std::shared_ptr telegram); diff --git a/src/locale_translations.h b/src/locale_translations.h index 328368676..62d5cb055 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -529,6 +529,7 @@ MAKE_TRANSLATION(nomPower, "nompower", "nominal Power", "Brennerleistung", "", " MAKE_TRANSLATION(meterTotal, "metertotal", "meter total", "Messung gesamt", "", "", "licznik całkowity", "", "", "", "") // TODO translate MAKE_TRANSLATION(meterComp, "metercomp", "meter compressor", "Messung Kompressor", "", "", "licznik sprężarki", "", "", "", "") // TODO translate MAKE_TRANSLATION(meterEHeat, "metereheat", "meter e-heater", "Messung E-Heizer", "", "", "licznik e-heater", "", "", "", "") // TODO translate +MAKE_TRANSLATION(meterHeat, "meterheat", "meter heating", "Messung Heizen", "", "", "licznik grzania", "", "", "", "") // 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") // TODO translate diff --git a/src/version.h b/src/version.h index f7792c02d..bf32d726a 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.5-test.0a" +#define EMSESP_APP_VERSION "3.6.5-test.0b"