mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add start counters #2220
This commit is contained in:
@@ -35,6 +35,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_telegram_type(0x99C, "HPComp", false, MAKE_PF_CB(process_HPComp));
|
register_telegram_type(0x99C, "HPComp", false, MAKE_PF_CB(process_HPComp));
|
||||||
register_telegram_type(0x4AE, "HPEnergy", true, MAKE_PF_CB(process_HpEnergy));
|
register_telegram_type(0x4AE, "HPEnergy", true, MAKE_PF_CB(process_HpEnergy));
|
||||||
register_telegram_type(0x4AF, "HPMeters", true, MAKE_PF_CB(process_HpMeters));
|
register_telegram_type(0x4AF, "HPMeters", true, MAKE_PF_CB(process_HpMeters));
|
||||||
|
register_telegram_type(0x99A, "HPStarts", false, MAKE_PF_CB(process_HpStarts));
|
||||||
|
|
||||||
// device values
|
// device values
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT8, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT8, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
||||||
@@ -177,6 +178,8 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
FL_(meterHeat),
|
FL_(meterHeat),
|
||||||
DeviceValueUOM::KWH);
|
DeviceValueUOM::KWH);
|
||||||
register_device_value(DeviceValueTAG::TAG_DHW1, &meterWw_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterWw), DeviceValueUOM::KWH);
|
register_device_value(DeviceValueTAG::TAG_DHW1, &meterWw_, DeviceValueType::UINT24, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterWw), DeviceValueUOM::KWH);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatStartsHp_, DeviceValueType::UINT24, FL_(heatingStarts), DeviceValueUOM::NONE);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DHW1, &wwStartsHp_, DeviceValueType::UINT24, FL_(wwStartsHp), DeviceValueUOM::NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -271,6 +274,12 @@ void Heatpump::process_HpMeters(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, meterWw_, 32);
|
has_update(telegram, meterWw_, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Broadcast (0x099A), data: 05 00 00 00 00 00 00 37 00 00 1D 00 00 52 00 00 13 01 00 01 7C
|
||||||
|
void Heatpump::process_HpStarts(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, heatStartsHp_, 14, 3);
|
||||||
|
has_update(telegram, wwStartsHp_, 11,3 );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Broadcast (0x099A), data: 05 00 00 00 00 00 00 37 00 00 1D 00 00 52 00 00 13 01 00 01 7C
|
* Broadcast (0x099A), data: 05 00 00 00 00 00 00 37 00 00 1D 00 00 52 00 00 13 01 00 01 7C
|
||||||
* Broadcast (0x099B), data: 80 00 80 00 01 3C 01 38 80 00 80 00 80 00 01 37 00 00 00 00 64
|
* Broadcast (0x099B), data: 80 00 80 00 01 3C 01 38 80 00 80 00 80 00 01 37 00 00 00 00 64
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ class Heatpump : public EMSdevice {
|
|||||||
uint32_t meterHeat_;
|
uint32_t meterHeat_;
|
||||||
uint32_t meterWw_;
|
uint32_t meterWw_;
|
||||||
|
|
||||||
|
uint32_t heatStartsHp_;
|
||||||
|
uint32_t wwStartsHp_;
|
||||||
|
|
||||||
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HPMonitor2(std::shared_ptr<const Telegram> telegram);
|
void process_HPMonitor2(std::shared_ptr<const Telegram> telegram);
|
||||||
@@ -86,6 +88,7 @@ class Heatpump : public EMSdevice {
|
|||||||
void process_HPComp(std::shared_ptr<const Telegram> telegram);
|
void process_HPComp(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HpEnergy(std::shared_ptr<const Telegram> telegram);
|
void process_HpEnergy(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HpMeters(std::shared_ptr<const Telegram> telegram);
|
void process_HpMeters(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_HpStarts(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|
||||||
bool set_controlStrategy(const char * value, const int8_t id);
|
bool set_controlStrategy(const char * value, const int8_t id);
|
||||||
bool set_lowNoiseMode(const char * value, const int8_t id);
|
bool set_lowNoiseMode(const char * value, const int8_t id);
|
||||||
|
|||||||
Reference in New Issue
Block a user