HM200 temperatures, fix hybridStrategie #500

This commit is contained in:
MichaelDvP
2022-11-14 10:03:12 +01:00
parent 9865c84df5
commit b12729a874
3 changed files with 62 additions and 4 deletions

View File

@@ -30,15 +30,32 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
register_telegram_type(0x998, "HPSettings", true, MAKE_PF_CB(process_HPSettings));
register_telegram_type(0x999, "HPFunctionTest", true, MAKE_PF_CB(process_HPFunctionTest));
register_telegram_type(0x9A0, "HPTemperature", false, MAKE_PF_CB(process_HPTemperature));
register_telegram_type(0x99B, "HPFlowTemp", false, MAKE_PF_CB(process_HPFlowTemp));
// device values
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, FL_(airHumidity), DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dewTemperature_, DeviceValueType::UINT, FL_(dewTemperature), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &flowTemp_, DeviceValueType::UINT, FL_(curFlowTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &retTemp_, DeviceValueType::UINT, FL_(retTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &sysRetTemp_, DeviceValueType::UINT, FL_(sysRetTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTa4_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTa4), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr1_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr1), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr3_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr3), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr3_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr3), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr4_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr4), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr5_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr5), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTr6_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTr6), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpTl2_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpTl2), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr0_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPl1), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr1_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPh1), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&controlStrategy_,
DeviceValueType::ENUM,
FL_(enum_hybridStrategy),
FL_(enum_hybridStrategy1),
FL_(hybridStrategy),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_controlStrategy));
@@ -138,6 +155,31 @@ void Heatpump::process_HPMonitor1(std::shared_ptr<const Telegram> telegram) {
// still to implement
}
#pragma GCC diagnostic pop
// 0x09A0
// Heatpump(0x53) -> All(0x00), ?(0x09A0), data: 02 23 01 3E 01 39 00 5D 01 DE 01 38 00 40 00 5E 00 58 00 3F 01 34 00 02
void Heatpump::process_HPTemperature(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, hpTc3_, 2); // condenser temp.
has_update(telegram, hpTr1_, 8); // compressor temp.
has_update(telegram, hpTr3_, 10); // cond. temp. heating
has_update(telegram, hpTr4_, 12); // cond. temp. clg
has_update(telegram, hpTr5_, 14); // suction line temp.
has_update(telegram, hpTr6_, 0); // hot gas temp.
has_update(telegram, hpTl2_, 6); // inlet air temperature
has_update(telegram, hpTa4_, 16); // drain pan temp.
has_update(telegram, hpJr0_, 18); // low pressure sensor
has_update(telegram, hpJr1_, 20); // high pressure sensor
}
// 0x099B
// Heatpump(0x53) -> All(0x00), ?(0x099B), data: 80 00 80 00 01 3C 01 38 80 00 80 00 80 00 01 37 00 00 00 00 64
void Heatpump::process_HPFlowTemp(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, flowTemp_, 4);
has_update(telegram, retTemp_, 6);
has_update(telegram, sysRetTemp_, 14);
}
// 0x0998 HPSettings
// [emsesp] Heatpump(0x53) -> Me(0x0B), ?(0x0998), data: 00 00 0B 00 00 1F 01 00 01 01 16 06 00 04 02 FF 00 01 7C 01
void Heatpump::process_HPSettings(std::shared_ptr<const Telegram> telegram) {
@@ -185,7 +227,6 @@ void Heatpump::process_HPFunctionTest(std::shared_ptr<const Telegram> telegram)
* Broadcast (0x04AA), data: 00 00
*/
#pragma GCC diagnostic pop
bool Heatpump::set_controlStrategy(const char * value, const int8_t id) {
uint8_t v;

View File

@@ -50,11 +50,27 @@ class Heatpump : public EMSdevice {
uint8_t heatDrainPan_;
uint8_t heatCable_;
// HM200 temperature
int16_t flowTemp_;
int16_t retTemp_;
int16_t sysRetTemp_;
int16_t hpTc3_; // condenser temp.
int16_t hpTr1_; // compressor temp.
int16_t hpTr3_; // cond. temp. heating
int16_t hpTr4_; // cond. temp. clg
int16_t hpTr5_; // suction line temp.
int16_t hpTr6_; // hot gas temp.
int16_t hpTl2_; // inlet air temperature
int16_t hpTa4_; // drain pan temp.
int16_t hpJr0_; // low pressure sensor
int16_t hpJr1_; // high pressure sensor
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
void process_HPMonitor2(std::shared_ptr<const Telegram> telegram);
void process_HPSettings(std::shared_ptr<const Telegram> telegram);
void process_HPFunctionTest(std::shared_ptr<const Telegram> telegram);
void process_HPTemperature(std::shared_ptr<const Telegram> telegram);
void process_HPFlowTemp(std::shared_ptr<const Telegram> telegram);
bool set_controlStrategy(const char * value, const int8_t id);
bool set_lowNoiseMode(const char * value, const int8_t id);
bool set_lowNoiseStart(const char * value, const int8_t id);