mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
pvCooling, pvEnable, fix #878
This commit is contained in:
@@ -20,7 +20,7 @@ const DeviceIcon: FC<DeviceIconProps> = ({ type }) => {
|
||||
switch (type) {
|
||||
case 'Boiler':
|
||||
case 'Heatsource':
|
||||
return <CgSmartHomeBoiler />;
|
||||
return <CgSmartHomeBoiler />;
|
||||
case 'Sensor':
|
||||
return <MdOutlineSensors />;
|
||||
case 'Solar':
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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", "", "", "", "", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user