diff --git a/interface/src/project/DeviceIcon.tsx b/interface/src/project/DeviceIcon.tsx index 27d2cabe2..8db8a5ca3 100644 --- a/interface/src/project/DeviceIcon.tsx +++ b/interface/src/project/DeviceIcon.tsx @@ -20,7 +20,7 @@ const DeviceIcon: FC = ({ type }) => { switch (type) { case 'Boiler': case 'Heatsource': - return ; + return ; case 'Sensor': return ; case 'Solar': diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index d5f517d09..174c8fbcd 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -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)); diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index d706f3d3e..f1b38d10d 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -887,6 +887,7 @@ void Thermostat::process_HybridSettings(std::shared_ptr telegram // 0x23E PV settings void Thermostat::process_PVSettings(std::shared_ptr 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, diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index 9d33c2f93..1ad4d6a1d 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -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); diff --git a/src/locale_translations.h b/src/locale_translations.h index 16b20a240..4653bd31f 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -515,6 +515,7 @@ MAKE_PSTR_LIST(autodst, "autodst", "automatic change daylight saving time", "aut MAKE_PSTR_LIST(preheating, "preheating", "preheating in the clock program", "Vorheizen im Zeitprogramm", "Voorverwarming in het klokprogramma", "Förvärmning i tidsprogram", "podgrzewanie w programie czasowym", "forvarming i tidsprogram", "préchauffage dans programme horloge") MAKE_PSTR_LIST(offtemp, "offtemp", "temperature when mode is off", "Temperatur bei AUS", "Temperatuur bij UIT", "Temperatur Avslagen", "temperatura w trybie \"wył.\"", "temperatur avslått", "température lorsque mode désactivé") MAKE_PSTR_LIST(mixingvalves, "mixingvalves", "mixing valves", "Mischventile", "Mengkleppen", "Blandningsventiler", "zawory mieszające", "blandeventiler", "vannes mélange") +MAKE_PSTR_LIST(pvEnable, "pvenable", "enable PV", "aktiviere PV", "", "", "", "", "") MAKE_PSTR_LIST(pvRaiseHeat, "pvraiseheat", "raise heating with PV", "Heizanghebung mit PV", "", "", "", "", "") MAKE_PSTR_LIST(pvLowerCool, "pvlowercool", "lower cooling with PV", "Kühlabsenkung mit PV", "", "", "", "", "")