pvCooling, pvEnable, fix #878

This commit is contained in:
MichaelDvP
2023-01-02 21:40:50 +01:00
parent 04b17a15bb
commit 71043963e7
5 changed files with 21 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_telegram_type(0x48F, "HpTemperatures", false, MAKE_PF_CB(process_HpTemperatures));
register_telegram_type(0x48A, "HpPool", true, MAKE_PF_CB(process_HpPool));
register_telegram_type(0x4A2, "HpInput", true, MAKE_PF_CB(process_HpInput));
register_telegram_type(0x485, "HpCooling", true, MAKE_PF_CB(process_HpCooling));
register_telegram_type(0x486, "HpInConfig", true, MAKE_PF_CB(process_HpInConfig));
register_telegram_type(0x492, "HpHeaterConfig", true, MAKE_PF_CB(process_HpHeaterConfig));

View File

@@ -887,6 +887,7 @@ void Thermostat::process_HybridSettings(std::shared_ptr<const Telegram> telegram
// 0x23E PV settings
void Thermostat::process_PVSettings(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, pvRaiseHeat_, 0);
has_update(telegram, pvEnable_, 3);
has_update(telegram, pvLowerCool_, 5);
}
@@ -1510,6 +1511,15 @@ bool Thermostat::set_tempDiffBoiler(const char * value, const int8_t id) {
return true;
}
bool Thermostat::set_pvEnable(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
write_command(0x23E, 3, v ? 0xFF : 0, 0x23E);
return true;
}
return false;
}
bool Thermostat::set_pvRaiseHeat(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
@@ -3561,6 +3571,12 @@ void Thermostat::register_device_values() {
MAKE_CF_CB(set_tempDiffBoiler),
1,
99);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&pvEnable_,
DeviceValueType::BOOL,
FL_(pvEnable),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_pvEnable));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&pvRaiseHeat_,
DeviceValueType::INT,

View File

@@ -237,6 +237,7 @@ class Thermostat : public EMSdevice {
uint8_t tempDiffBoiler_; // relative temperature degrees
// PV
uint8_t pvEnable_;
uint8_t pvRaiseHeat_;
uint8_t pvLowerCool_;
@@ -497,6 +498,7 @@ class Thermostat : public EMSdevice {
bool set_tempDiffBoiler(const char * value, const int8_t id);
bool set_roomsensor(const char * value, const int8_t id);
bool set_pvEnable(const char * value, const int8_t id);
bool set_pvRaiseHeat(const char * value, const int8_t id);
bool set_pvLowerCool(const char * value, const int8_t id);