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

@@ -20,7 +20,7 @@ const DeviceIcon: FC<DeviceIconProps> = ({ type }) => {
switch (type) { switch (type) {
case 'Boiler': case 'Boiler':
case 'Heatsource': case 'Heatsource':
return <CgSmartHomeBoiler />; return <CgSmartHomeBoiler />;
case 'Sensor': case 'Sensor':
return <MdOutlineSensors />; return <MdOutlineSensors />;
case 'Solar': case 'Solar':

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(0x48F, "HpTemperatures", false, MAKE_PF_CB(process_HpTemperatures));
register_telegram_type(0x48A, "HpPool", true, MAKE_PF_CB(process_HpPool)); 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(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(0x486, "HpInConfig", true, MAKE_PF_CB(process_HpInConfig));
register_telegram_type(0x492, "HpHeaterConfig", true, MAKE_PF_CB(process_HpHeaterConfig)); 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 // 0x23E PV settings
void Thermostat::process_PVSettings(std::shared_ptr<const Telegram> telegram) { void Thermostat::process_PVSettings(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, pvRaiseHeat_, 0); has_update(telegram, pvRaiseHeat_, 0);
has_update(telegram, pvEnable_, 3);
has_update(telegram, pvLowerCool_, 5); has_update(telegram, pvLowerCool_, 5);
} }
@@ -1510,6 +1511,15 @@ bool Thermostat::set_tempDiffBoiler(const char * value, const int8_t id) {
return true; 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) { bool Thermostat::set_pvRaiseHeat(const char * value, const int8_t id) {
int v; int v;
if (Helpers::value2number(value, v)) { if (Helpers::value2number(value, v)) {
@@ -3561,6 +3571,12 @@ void Thermostat::register_device_values() {
MAKE_CF_CB(set_tempDiffBoiler), MAKE_CF_CB(set_tempDiffBoiler),
1, 1,
99); 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, register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&pvRaiseHeat_, &pvRaiseHeat_,
DeviceValueType::INT, DeviceValueType::INT,

View File

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

View File

@@ -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(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(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(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(pvRaiseHeat, "pvraiseheat", "raise heating with PV", "Heizanghebung mit PV", "", "", "", "", "")
MAKE_PSTR_LIST(pvLowerCool, "pvlowercool", "lower cooling with PV", "Kühlabsenkung mit PV", "", "", "", "", "") MAKE_PSTR_LIST(pvLowerCool, "pvlowercool", "lower cooling with PV", "Kühlabsenkung mit PV", "", "", "", "", "")