Skip to content

Commit

Permalink
add hpSetDiffPressure emsesp#1563
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 20, 2024
1 parent 9260db3 commit cd8921e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Show network hostname in Web UI under Network Status
- Improved HA Discovery so each section (EMS device, Scheduler, Analog, Temperature, Custom, Shower) have their own section
- boiler Bosch C1200W, id 12, [#1536](https://github.com/emsesp/EMS-ESP32/issues/1536)
- mixer MM100 telegram 0x2CC [#1554](https://github.com/emsesp/EMS-ESP32/issues/1554)
- boiler hpSetDiffPressure [#1563](https://github.com/emsesp/EMS-ESP32/issues/1563)

## Fixed

Expand All @@ -29,4 +31,4 @@
## Changed

- HA don't set entity_category to Diagnostic/Configuration for EMS entities [#1459](https://github.com/emsesp/EMS-ESP32/discussions/1459)
- upgraded ArduinoJson to 7.0.0 #1538 and then 7.0.1
- upgraded ArduinoJson to 7.0.0 #1538 and then 7.0.2
6 changes: 4 additions & 2 deletions interface/src/project/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export enum DeviceValueUOM {
L,
KMIN,
K,
VOLTS
VOLTS,
MBAR
}

export const DeviceValueUOM_s = [
Expand All @@ -204,7 +205,8 @@ export const DeviceValueUOM_s = [
'l',
'K*min',
'K',
'V'
'V',
'mbar'
];

export enum AnalogType {
Expand Down
20 changes: 20 additions & 0 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,13 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(hpMaxPower),
DeviceValueUOM::PERCENT,
MAKE_CF_CB(set_hpMaxPower));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hpSetDiffPress_,
DeviceValueType::UINT,
DeviceValueNumOp::DV_NUMOP_MUL50,
FL_(hpSetDiffPress),
DeviceValueUOM::MBAR,
MAKE_CF_CB(set_hpDiffPress));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpCompOn_, DeviceValueType::BOOL, FL_(hpCompOn), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::NONE);
// register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpHeatingOn_, DeviceValueType::BOOL, FL_(hpHeatingOn), DeviceValueUOM::NONE);
Expand Down Expand Up @@ -1935,6 +1942,10 @@ void Boiler::process_HpMeters(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, meterHeat_, 24);
}

void Boiler::process_HpPressure(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, hpSetDiffPress_, 9);
}

// HIU unit

// boiler(0x08) -B-> All(0x00), ?(0x0779), data: 06 05 01 01 AD 02 EF FF FF 00 00 7F FF
Expand Down Expand Up @@ -2939,6 +2950,15 @@ bool Boiler::set_hpMaxPower(const char * value, const int8_t id) {
return false;
}

bool Boiler::set_hpDiffPress(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
write_command(0x2CC, 9, (uint8_t)(v / 50), 0x2CC);
return true;
}
return false;
}

bool Boiler::set_vp_cooling(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
Expand Down
3 changes: 3 additions & 0 deletions src/devices/boiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class Boiler : public EMSdevice {
uint32_t meterHeat_;
uint8_t hpEA0_;
uint8_t hpPumpMode_;
uint8_t hpSetDiffPress_;

// Pool unit
int8_t poolSetTemp_;
Expand Down Expand Up @@ -334,6 +335,7 @@ class Boiler : public EMSdevice {
void process_HpPool(std::shared_ptr<const Telegram> telegram);
void process_HpInput(std::shared_ptr<const Telegram> telegram);
void process_HpInConfig(std::shared_ptr<const Telegram> telegram);
void process_HpPressure(std::shared_ptr<const Telegram> telegram);
void process_HpCooling(std::shared_ptr<const Telegram> telegram);
void process_HpHeaterConfig(std::shared_ptr<const Telegram> telegram);
void process_HybridHp(std::shared_ptr<const Telegram> telegram);
Expand Down Expand Up @@ -437,6 +439,7 @@ class Boiler : public EMSdevice {
bool set_hpCircPumpWw(const char * value, const int8_t id);
bool set_hpPumpMode(const char * value, const int8_t id);
bool set_hpMaxPower(const char * value, const int8_t id);
bool set_hpDiffPress(const char * value, const int8_t id);

bool set_auxLimit(const char * value, const int8_t id);
inline bool set_auxMaxLimit(const char * value, const int8_t id) {
Expand Down
2 changes: 1 addition & 1 deletion src/emsdevicevalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const char * DeviceValue::DeviceValueUOM_s[] = {
F_(uom_blank), // 0
F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], FL_(minutes)[0], F_(uom_ua),
F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm),
F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_k), F_(uom_volts), F_(uom_blank)
F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_k), F_(uom_volts), F_(uom_mbar), F_(uom_blank)

};

Expand Down
6 changes: 4 additions & 2 deletions src/emsdevicevalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class DeviceValue {
KMIN, // 21 - K*min
K, // 22 - K
VOLTS, // 23 - V
CONNECTIVITY // 24 - used in HA
MBAR, // 24 - mbar
CONNECTIVITY // 25 - used in HA
};

// TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp
Expand Down Expand Up @@ -143,7 +144,8 @@ class DeviceValue {
DV_NUMOP_DIV100 = 100,
DV_NUMOP_MUL5 = -5,
DV_NUMOP_MUL10 = -10,
DV_NUMOP_MUL15 = -15
DV_NUMOP_MUL15 = -15,
DV_NUMOP_MUL50 = -50
};

uint8_t device_type; // EMSdevice::DeviceType
Expand Down
1 change: 1 addition & 0 deletions src/locale_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ MAKE_WORD_CUSTOM(uom_l, "l")
MAKE_WORD_CUSTOM(uom_kmin, "K*min")
MAKE_WORD_CUSTOM(uom_k, "K")
MAKE_WORD_CUSTOM(uom_volts, "V")
MAKE_WORD_CUSTOM(uom_mbar, "mbar")

// MQTT topics and prefixes
MAKE_WORD_CUSTOM(heating_active, "heating_active")
Expand Down
1 change: 1 addition & 0 deletions src/locale_translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ MAKE_TRANSLATION(hpPumpMode, "hppumpmode", "primary heatpump mode", "Modus Haupt
MAKE_TRANSLATION(instantstart, "instantstart", "instant start", "Sofortstart", "", "", "natychmiastowy start", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(heatondelay, "heatondelay", "heat-on delay", "Einschaltverzögerung Heizen", "", "", "opóźnienie włączania ogrzewania", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(heatoffdelay, "heatoffdelay", "heat-off delay", "Ausschaltverzögerung Heizen", "", "", "opóźnienie włączania ogrzewania", "", "", "", "", "") // TODO translate
MAKE_TRANSLATION(hpSetDiffPress, "hpsetdiffpress", "set differental pressure", "Pumpensolldruck", "", "", "", "", "", "", "", "") // TODO translate

// hybrid heatpump
MAKE_TRANSLATION(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride", "hibrit kontrol stratejisi", "strategia comtrollo ibrido", "hybridná stratégia riadenia")
Expand Down

0 comments on commit cd8921e

Please sign in to comment.