mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
@@ -494,12 +494,12 @@ uint8_t Thermostat::HeatingCircuit::get_mode() const {
|
||||
}
|
||||
|
||||
if (model == EMSdevice::EMS_DEVICE_FLAG_RC10) {
|
||||
if (mode == 1) {
|
||||
return HeatingCircuit::Mode::OFF;
|
||||
} else if (mode == 2) {
|
||||
if (mode == 2) {
|
||||
return HeatingCircuit::Mode::DAY;
|
||||
} else if (mode == 1) {
|
||||
return HeatingCircuit::Mode::NIGHT;
|
||||
} else if (mode == 4) {
|
||||
return HeatingCircuit::Mode::ON;
|
||||
} else if (mode == 0) {
|
||||
return HeatingCircuit::Mode::NOFROST;
|
||||
}
|
||||
} else if (model == EMSdevice::EMS_DEVICE_FLAG_RC20) {
|
||||
if (mode == 0) {
|
||||
@@ -648,6 +648,41 @@ std::string Thermostat::mode_tostring(uint8_t mode) {
|
||||
}
|
||||
}
|
||||
|
||||
// type 0xB1 - data from the RC10 thermostat (0x17)
|
||||
// set day (curr temp: 16deg, set temp 19deg)
|
||||
// Data: 04 23 00 BA 00 00 00 BA
|
||||
void Thermostat::process_RC10Monitor(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
if (hc == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t mode = hc->mode * 2;
|
||||
has_update(telegram->read_value(mode, 0)); // 1: nofrost, 2: night, 4: day
|
||||
hc->mode = mode / 2; // for enum 0, 1, 2
|
||||
has_update(telegram->read_value(hc->setpoint_roomTemp, 1, 1)); // is * 2, force as single byte
|
||||
has_update(telegram->read_value(hc->curr_roomTemp, 2)); // is * 10
|
||||
has_update(telegram->read_value(hc->reduceminutes, 5));
|
||||
hc->hamode = hc->mode == 2 ? 1 : 0; // set special HA mode
|
||||
}
|
||||
|
||||
// type 0xB0 - for reading the mode from the RC10 thermostat (0x17)
|
||||
// night (temp: 16deg, night temp 14deg, set return day 8h)
|
||||
// Data: 00 FF 00 1C 20 08 01
|
||||
void Thermostat::process_RC10Set(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
if (hc == nullptr) {
|
||||
return;
|
||||
}
|
||||
has_update(telegram->read_value(ibaClockOffset_, 0));
|
||||
has_update(telegram->read_value(backlight_, 1));
|
||||
has_update(telegram->read_value(wwMode_, 2));
|
||||
has_update(telegram->read_value(hc->nighttemp, 3));
|
||||
has_update(telegram->read_value(hc->daytemp, 4));
|
||||
has_update(telegram->read_value(hc->reducehours, 5));
|
||||
has_update(telegram->read_value(ibaBuildingType_ ,6));
|
||||
}
|
||||
|
||||
// 0xA8 - for reading the mode from the RC20 thermostat (0x17)
|
||||
void Thermostat::process_RC20Set(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
@@ -705,26 +740,6 @@ void Thermostat::process_RC20Remote(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(hc->curr_roomTemp, 0));
|
||||
}
|
||||
|
||||
// type 0xB1 - data from the RC10 thermostat (0x17)
|
||||
void Thermostat::process_RC10Monitor(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
if (hc == nullptr) {
|
||||
return;
|
||||
}
|
||||
has_update(telegram->read_value(hc->mode, 0));
|
||||
hc->hamode = hc->mode == 4 ? 1 : 0; // set special HA mode: off, on, auto
|
||||
has_update(telegram->read_value(hc->setpoint_roomTemp, 1, 1)); // is * 2, force as single byte
|
||||
has_update(telegram->read_value(hc->curr_roomTemp, 2)); // is * 10
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
// type 0xB0 - for reading the mode from the RC10 thermostat (0x17)
|
||||
void Thermostat::process_RC10Set(std::shared_ptr<const Telegram> telegram) {
|
||||
// mode not implemented yet
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// type 0x0165, ff
|
||||
void Thermostat::process_JunkersSet(std::shared_ptr<const Telegram> telegram) {
|
||||
@@ -981,8 +996,8 @@ void Thermostat::process_RC300WWmode(std::shared_ptr<const Telegram> telegram) {
|
||||
void Thermostat::process_RC300WWmode2(std::shared_ptr<const Telegram> telegram) {
|
||||
// 0x31D for WW system 1, 0x31E for WW system 2
|
||||
// pos 1 = holiday mode
|
||||
// pos 2 = current status of DHW setpoint
|
||||
// pos 3 = current status of DHW circulation pump
|
||||
// pos 2 = current status of ww setpoint
|
||||
// pos 3 = current status of ww circulation pump
|
||||
if (telegram->type_id == 0x031D) {
|
||||
has_update(telegram->read_value(wwExtra1_, 0)); // 0=no, 1=yes
|
||||
} else {
|
||||
@@ -1107,6 +1122,28 @@ void Thermostat::process_RC35Timer(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(hc->program, 84)); // 0 .. 10, 0-userprogram 1, 10-userprogram 2
|
||||
has_update(telegram->read_value(hc->pause, 85)); // time in hours
|
||||
has_update(telegram->read_value(hc->party, 86)); // time in hours
|
||||
if (telegram->message_length + telegram->offset >= 92 && telegram->offset <= 87) {
|
||||
snprintf(hc->vacation,
|
||||
sizeof(hc->vacation),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[87 - telegram->offset],
|
||||
telegram->message_data[88 - telegram->offset],
|
||||
telegram->message_data[89 - telegram->offset] + 2000,
|
||||
telegram->message_data[90 - telegram->offset],
|
||||
telegram->message_data[91 - telegram->offset],
|
||||
telegram->message_data[92 - telegram->offset] + 2000);
|
||||
}
|
||||
if (telegram->message_length + telegram->offset >= 98 && telegram->offset <= 93) {
|
||||
snprintf(hc->holiday,
|
||||
sizeof(hc->holiday),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[93 - telegram->offset],
|
||||
telegram->message_data[94 - telegram->offset],
|
||||
telegram->message_data[95 - telegram->offset] + 2000,
|
||||
telegram->message_data[96 - telegram->offset],
|
||||
telegram->message_data[97 - telegram->offset],
|
||||
telegram->message_data[98 - telegram->offset] + 2000);
|
||||
}
|
||||
}
|
||||
|
||||
// process_RCTime - type 0x06 - date and time from a thermostat - 14 bytes long
|
||||
@@ -1228,14 +1265,18 @@ bool Thermostat::set_clockoffset(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5 - Calibrate internal temperature
|
||||
bool Thermostat::set_calinttemp(const char * value, const int8_t id) {
|
||||
int ct = 0;
|
||||
if (!Helpers::value2number(value, ct)) {
|
||||
float ct = 0;
|
||||
if (!Helpers::value2float(value, ct)) {
|
||||
LOG_WARNING(F("Cal internal temperature: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG_INFO(F("Calibrating internal temperature to %d.%d C"), ct / 10, ct < 0 ? -ct % 10 : ct % 10);
|
||||
write_command(EMS_TYPE_IBASettings, 2, ct, EMS_TYPE_IBASettings);
|
||||
int8_t t = (int8_t)(ct * 10);
|
||||
LOG_INFO(F("Calibrating internal temperature to %d.%d C"), t / 10, t < 0 ? -t % 10 : t % 10);
|
||||
if (model() == EMS_DEVICE_FLAG_RC10) {
|
||||
write_command(0xB0, 0, t, 0xB0);
|
||||
} else {
|
||||
write_command(EMS_TYPE_IBASettings, 2, t, EMS_TYPE_IBASettings);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1280,22 +1321,20 @@ bool Thermostat::set_remotetemp(const char * value, const int8_t id) {
|
||||
// 0xA5 - Set the building settings
|
||||
bool Thermostat::set_building(const char * value, const int8_t id) {
|
||||
uint8_t bd = 0;
|
||||
if ((model() == EMS_DEVICE_FLAG_RC300) || (model() == EMS_DEVICE_FLAG_RC100)) {
|
||||
if (Helpers::value2enum(value, bd, FL_(enum_ibaBuildingType))) {
|
||||
LOG_INFO(F("Setting building to %s"), value);
|
||||
write_command(0x240, 9, bd + 1, 0x240);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (Helpers::value2enum(value, bd, FL_(enum_ibaBuildingType))) {
|
||||
LOG_INFO(F("Setting building to %s"), value);
|
||||
write_command(EMS_TYPE_IBASettings, 6, bd, EMS_TYPE_IBASettings);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!Helpers::value2enum(value, bd, FL_(enum_ibaBuildingType))) {
|
||||
LOG_WARNING(F("Set building: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
LOG_INFO(F("Setting building to %s"), value);
|
||||
if (model() == EMS_DEVICE_FLAG_RC10) {
|
||||
write_command(0xB0, 6, bd, 0xB0);
|
||||
} else if ((model() == EMS_DEVICE_FLAG_RC300) || (model() == EMS_DEVICE_FLAG_RC100)) {
|
||||
write_command(0x240, 9, bd + 1, 0x240);
|
||||
} else {
|
||||
write_command(EMS_TYPE_IBASettings, 6, bd, EMS_TYPE_IBASettings);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 0xA5 - Set the building settings
|
||||
bool Thermostat::set_damping(const char * value, const int8_t id) {
|
||||
@@ -1351,7 +1390,14 @@ bool Thermostat::set_control(const char * value, const int8_t id) {
|
||||
bool Thermostat::set_wwmode(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
|
||||
if ((model() == EMS_DEVICE_FLAG_RC300) || (model() == EMS_DEVICE_FLAG_RC100)) {
|
||||
if (model() == EMS_DEVICE_FLAG_RC10) {
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwMode3))) {
|
||||
LOG_WARNING(F("Set ww mode: Invalid mode"));
|
||||
return false;
|
||||
}
|
||||
LOG_INFO(F("Setting ww mode to %s"), value);
|
||||
write_command(0xB0, 2, set, 0xB0);
|
||||
} else if ((model() == EMS_DEVICE_FLAG_RC300) || (model() == EMS_DEVICE_FLAG_RC100)) {
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwMode))) {
|
||||
LOG_WARNING(F("Set ww mode: Invalid mode"));
|
||||
return false;
|
||||
@@ -1541,6 +1587,18 @@ bool Thermostat::set_wwOneTimeKey(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// only RC10, 0xB0
|
||||
bool Thermostat::set_backlight(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
LOG_WARNING(F("Set key backlight: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
LOG_INFO(F("Setting key key backlight to %s"), b ? "on" : "off");
|
||||
write_command(0xB0, 1, b ? 0xFF : 0x00, 0xB0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwProgMode(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwProgMode))) {
|
||||
@@ -1564,21 +1622,15 @@ bool Thermostat::set_wwCircProg(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
// set the holiday as string dd.mm.yyyy-dd.mm.yyyy
|
||||
bool Thermostat::set_holiday(const char * value, const int8_t id) {
|
||||
bool Thermostat::set_holiday(const char * value, const int8_t id, const bool vacation) {
|
||||
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
||||
if (hc == nullptr) {
|
||||
LOG_WARNING(F("Set holiday: Heating Circuit %d not found or activated for device ID 0x%02X"), hc_num, device_id());
|
||||
LOG_WARNING(F("Set vacation/holiday: Heating Circuit %d not found or activated for device ID 0x%02X"), hc_num, device_id());
|
||||
return false;
|
||||
}
|
||||
if (value == nullptr || value[0] == '-') {
|
||||
read_command(timer_typeids[hc->hc_num() - 1], 87, 6);
|
||||
return true;
|
||||
} else if (strlen(value) == 1 && value[0] == '+') {
|
||||
read_command(timer_typeids[hc->hc_num() - 1], 93, 6);
|
||||
return true;
|
||||
} else if (strlen(value) != 21) {
|
||||
LOG_WARNING(F("Set holiday: Invalid value"));
|
||||
if (strlen(value) != 21) {
|
||||
LOG_WARNING(F("Set vacation/holiday: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1590,15 +1642,17 @@ bool Thermostat::set_holiday(const char * value, const int8_t id) {
|
||||
data[4] = (value[14] - '0') * 10 + (value[15] - '0');
|
||||
data[5] = (value[18] - '0') * 100 + (value[19] - '0') * 10 + (value[20] - '0');
|
||||
|
||||
if (value[10] == '-') {
|
||||
LOG_INFO(F("Setting holiday away from home for hc %d"), hc->hc_num());
|
||||
write_command(timer_typeids[hc->hc_num() - 1], 87, data, 6, 0);
|
||||
} else if (value[10] == '+') {
|
||||
LOG_INFO(F("Setting holiday at home for hc %d"), hc->hc_num());
|
||||
if (data[0] > 31 || data[1] > 12 || data[3] > 31 || data[4] > 12) {
|
||||
LOG_WARNING(F("Set vacation/holiday: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!vacation || value[10] == '+') { // + for compatibility
|
||||
LOG_INFO(F("Setting holidays at home for hc %d"), hc->hc_num());
|
||||
write_command(timer_typeids[hc->hc_num() - 1], 93, data, 6, 0);
|
||||
} else {
|
||||
LOG_WARNING(F("Set holiday: Invalid value"));
|
||||
return false;
|
||||
LOG_INFO(F("Setting vacations away from home for hc %d"), hc->hc_num());
|
||||
write_command(timer_typeids[hc->hc_num() - 1], 87, data, 6, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1977,6 +2031,24 @@ bool Thermostat::set_controlmode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// sets the thermostat time for nightmode for RC10, telegrm 0xB0
|
||||
bool Thermostat::set_reducehours(const char * value, const int8_t id) {
|
||||
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
||||
if (hc == nullptr) {
|
||||
LOG_WARNING(F("Setting reducehours: Heating Circuit %d not found or activated"), hc_num);
|
||||
return false;
|
||||
}
|
||||
int v;
|
||||
if (Helpers::value2number(value, v)) {
|
||||
LOG_WARNING(F("Setting reducetime to %d hours"), v);
|
||||
write_command(set_typeids[hc->hc_num() - 1], 5, v, set_typeids[hc->hc_num() - 1]);
|
||||
return true;
|
||||
}
|
||||
LOG_WARNING(F("Setting reducehours: Invalid value"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// sets a single switchtime in the thermostat program for RC35
|
||||
// format "01:0,1,15:30" Number, day, on, time
|
||||
bool Thermostat::set_switchtime(const char * value, const int8_t id) {
|
||||
@@ -2087,7 +2159,21 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
||||
uint16_t set_typeid = set_typeids[hc->hc_num() - 1];
|
||||
|
||||
if (model == EMS_DEVICE_FLAG_RC10) {
|
||||
offset = EMS_OFFSET_RC10Set_temp;
|
||||
switch (mode) {
|
||||
case HeatingCircuit::Mode::NIGHT:
|
||||
offset = 3;
|
||||
break;
|
||||
case HeatingCircuit::Mode::DAY:
|
||||
offset = 4;
|
||||
break;
|
||||
case HeatingCircuit::Mode::AUTO:
|
||||
if (hc->get_mode() == HeatingCircuit::Mode::NIGHT) {
|
||||
offset = 3;
|
||||
} else {
|
||||
offset = 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
} else if (model == EMS_DEVICE_FLAG_RC20) {
|
||||
offset = EMS_OFFSET_RC20Set_temp;
|
||||
@@ -2518,6 +2604,25 @@ void Thermostat::register_device_values() {
|
||||
0,
|
||||
1431);
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_RC10:
|
||||
register_device_value(TAG_THERMOSTAT_DATA,
|
||||
&ibaCalIntTemperature_,
|
||||
DeviceValueType::INT,
|
||||
FL_(div10),
|
||||
FL_(ibaCalIntTemperature),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_calinttemp));
|
||||
register_device_value(TAG_DEVICE_DATA_WW, &wwMode_, DeviceValueType::ENUM, FL_(enum_wwMode3), FL_(wwMode), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwmode));
|
||||
register_device_value(
|
||||
TAG_DEVICE_DATA_WW, &backlight_, DeviceValueType::BOOL, nullptr, FL_(backlight), DeviceValueUOM::NONE, MAKE_CF_CB(set_backlight));
|
||||
register_device_value(TAG_THERMOSTAT_DATA,
|
||||
&ibaBuildingType_,
|
||||
DeviceValueType::ENUM,
|
||||
FL_(enum_ibaBuildingType),
|
||||
FL_(ibaBuildingType),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_building));
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_RC20_N:
|
||||
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
||||
register_device_value(TAG_THERMOSTAT_DATA,
|
||||
@@ -2544,7 +2649,7 @@ void Thermostat::register_device_values() {
|
||||
register_device_value(TAG_THERMOSTAT_DATA,
|
||||
&ibaCalIntTemperature_,
|
||||
DeviceValueType::INT,
|
||||
FL_(div2),
|
||||
FL_(div10),
|
||||
FL_(ibaCalIntTemperature),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_calinttemp));
|
||||
@@ -2596,7 +2701,7 @@ void Thermostat::register_device_values() {
|
||||
register_device_value(TAG_THERMOSTAT_DATA,
|
||||
&ibaCalIntTemperature_,
|
||||
DeviceValueType::INT,
|
||||
FL_(div2),
|
||||
FL_(div10),
|
||||
FL_(ibaCalIntTemperature),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_calinttemp));
|
||||
@@ -2724,6 +2829,13 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
}
|
||||
|
||||
switch (model) {
|
||||
case EMS_DEVICE_FLAG_RC10:
|
||||
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode6), FL_(mode), DeviceValueUOM::NONE);
|
||||
register_device_value(tag, &hc->daytemp, DeviceValueType::UINT, FL_(div2), FL_(daytemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_daytemp));
|
||||
register_device_value(tag, &hc->nighttemp, DeviceValueType::UINT, FL_(div2), FL_(nighttemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_nighttemp));
|
||||
register_device_value(tag, &hc->reducehours, DeviceValueType::UINT, nullptr, FL_(reducehours), DeviceValueUOM::HOURS, MAKE_CF_CB(set_reducehours));
|
||||
register_device_value(tag, &hc->reduceminutes, DeviceValueType::USHORT, nullptr, FL_(reduceminutes), DeviceValueUOM::MINUTES);
|
||||
break;
|
||||
case EMS_DEVICE_FLAG_RC100:
|
||||
case EMS_DEVICE_FLAG_RC300:
|
||||
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
|
||||
@@ -2785,7 +2897,7 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
register_device_value(tag, &hc->targetflowtemp, DeviceValueType::UINT, nullptr, FL_(targetflowtemp), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &hc->summertemp, DeviceValueType::UINT, nullptr, FL_(summertemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_summertemp));
|
||||
register_device_value(tag, &hc->summermode, DeviceValueType::BOOL, nullptr, FL_(summermode), DeviceValueUOM::NONE);
|
||||
register_device_value(tag, &hc->holidaymode, DeviceValueType::BOOL, nullptr, FL_(holidaymode), DeviceValueUOM::NONE, MAKE_CF_CB(set_holiday));
|
||||
register_device_value(tag, &hc->holidaymode, DeviceValueType::BOOL, nullptr, FL_(holidaymode), DeviceValueUOM::NONE);
|
||||
register_device_value(tag, &hc->nofrosttemp, DeviceValueType::INT, nullptr, FL_(nofrosttemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_nofrosttemp));
|
||||
register_device_value(tag, &hc->roominfluence, DeviceValueType::UINT, nullptr, FL_(roominfluence), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_roominfluence));
|
||||
register_device_value(tag, &hc->minflowtemp, DeviceValueType::UINT, nullptr, FL_(minflowtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_minflowtemp));
|
||||
@@ -2797,6 +2909,8 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
register_device_value(
|
||||
tag, &hc->controlmode, DeviceValueType::ENUM, FL_(enum_controlmode2), FL_(controlmode), DeviceValueUOM::NONE, MAKE_CF_CB(set_controlmode));
|
||||
register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control));
|
||||
register_device_value(tag, &hc->holiday, DeviceValueType::STRING, nullptr, FL_(holidays), DeviceValueUOM::NONE, MAKE_CF_CB(set_holiday));
|
||||
register_device_value(tag, &hc->vacation, DeviceValueType::STRING, nullptr, FL_(vacations), DeviceValueUOM::NONE, MAKE_CF_CB(set_vacation));
|
||||
register_device_value(tag, &hc->program, DeviceValueType::ENUM, FL_(enum_progMode2), FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program));
|
||||
register_device_value(tag, &hc->pause, DeviceValueType::UINT, nullptr, FL_(pause), DeviceValueUOM::HOURS, MAKE_CF_CB(set_pause));
|
||||
register_device_value(tag, &hc->party, DeviceValueType::UINT, nullptr, FL_(party), DeviceValueUOM::HOURS, MAKE_CF_CB(set_party));
|
||||
|
||||
@@ -68,6 +68,11 @@ class Thermostat : public EMSdevice {
|
||||
int8_t noreducetemp; // signed -20°C to +10°C
|
||||
uint8_t wwprio;
|
||||
uint8_t fastHeatup;
|
||||
char holiday[22];
|
||||
char vacation[22];
|
||||
// RC 10
|
||||
uint8_t reducehours; // night reduce duration
|
||||
uint16_t reduceminutes; // remaining minutes to night->day
|
||||
|
||||
uint8_t hc_num() const {
|
||||
return hc_num_;
|
||||
@@ -160,6 +165,7 @@ class Thermostat : public EMSdevice {
|
||||
uint8_t ibaBuildingType_; // building type: 0 = light, 1 = medium, 2 = heavy
|
||||
int8_t ibaClockOffset_; // offset (in sec) to clock, 0xff = -1 s, 0x02 = 2 s
|
||||
uint8_t ibaDamping_; // damping 0-off, 0xff-on
|
||||
uint8_t backlight_;
|
||||
|
||||
int8_t dampedoutdoortemp_;
|
||||
uint16_t tempsensor1_;
|
||||
@@ -318,7 +324,10 @@ class Thermostat : public EMSdevice {
|
||||
// set functions - these use the id/hc
|
||||
bool set_mode(const char * value, const int8_t id);
|
||||
bool set_control(const char * value, const int8_t id);
|
||||
bool set_holiday(const char * value, const int8_t id);
|
||||
bool set_holiday(const char * value, const int8_t id, const bool vacation = false);
|
||||
bool set_vacation(const char * value, const int8_t id) {
|
||||
return set_holiday(value, id, true);
|
||||
}
|
||||
bool set_pause(const char * value, const int8_t id);
|
||||
bool set_party(const char * value, const int8_t id);
|
||||
bool set_summermode(const char * value, const int8_t id);
|
||||
@@ -373,6 +382,8 @@ class Thermostat : public EMSdevice {
|
||||
bool set_damping(const char * value, const int8_t id);
|
||||
bool set_language(const char * value, const int8_t id);
|
||||
bool set_heatingtype(const char * value, const int8_t id);
|
||||
bool set_reducehours(const char * value, const int8_t id);
|
||||
bool set_backlight(const char * value, const int8_t id);
|
||||
};
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
@@ -329,6 +329,7 @@ MAKE_PSTR_LIST(enum_ibaBuildingType, F_(light), F_(medium), F_(heavy))
|
||||
MAKE_PSTR_LIST(enum_wwMode, F_(off), F_(low), F_(high), F_(auto), F_(own_prog))
|
||||
MAKE_PSTR_LIST(enum_wwCircMode, F_(off), F_(on), F_(auto), F_(own_prog))
|
||||
MAKE_PSTR_LIST(enum_wwMode2, F_(off), F_(on), F_(auto))
|
||||
MAKE_PSTR_LIST(enum_wwMode3, F_(on), F_(off), F_(auto))
|
||||
MAKE_PSTR_LIST(enum_heatingtype, F_(off), F_(radiator), F_(convector), F_(floor))
|
||||
MAKE_PSTR_LIST(enum_summermode, F_(summer), F_(auto), F_(winter))
|
||||
|
||||
@@ -337,6 +338,7 @@ MAKE_PSTR_LIST(enum_mode2, F_(off), F_(manual), F_(auto)) // RC20
|
||||
MAKE_PSTR_LIST(enum_mode3, F_(night), F_(day), F_(auto)) // RC35, RC30
|
||||
MAKE_PSTR_LIST(enum_mode4, F_(nofrost), F_(eco), F_(heat), F_(auto)) // JUNKERS
|
||||
MAKE_PSTR_LIST(enum_mode5, F_(auto), F_(off)) // CRF
|
||||
MAKE_PSTR_LIST(enum_mode6, F_(nofrost), F_(night), F_(day)) // RC10
|
||||
|
||||
MAKE_PSTR_LIST(enum_hamode, F_(off), F_(heat), F_(auto), F_(heat), F_(off), F_(heat), F_(auto), F_(auto), F_(auto), F_(auto))
|
||||
|
||||
@@ -541,6 +543,7 @@ MAKE_PSTR_LIST(ibaClockOffset, F("clockoffset"), F("clock offset"))
|
||||
MAKE_PSTR_LIST(ibaBuildingType, F("building"), F("building"))
|
||||
MAKE_PSTR_LIST(ibaCalIntTemperature, F("intoffset"), F("offset internal temperature"))
|
||||
MAKE_PSTR_LIST(ibaMinExtTemperature, F("minexttemp"), F("minimal external temperature"))
|
||||
MAKE_PSTR_LIST(backlight, F("backlight"), F("key backlight"))
|
||||
MAKE_PSTR_LIST(damping, F("damping"), F("damping outdoor temperature"))
|
||||
|
||||
MAKE_PSTR_LIST(tempsensor1, F("inttemp1"), F("temperature sensor 1"))
|
||||
@@ -579,6 +582,8 @@ MAKE_PSTR_LIST(heatingtype, F("heatingtype"), F("heating type"))
|
||||
MAKE_PSTR_LIST(summersetmode, F("summersetmode"), F("set summer mode"))
|
||||
MAKE_PSTR_LIST(controlmode, F("controlmode"), F("control mode"))
|
||||
MAKE_PSTR_LIST(control, F("control"), F("control device"))
|
||||
MAKE_PSTR_LIST(holidays, F("holidays"), F("holiday dates"))
|
||||
MAKE_PSTR_LIST(vacations, F("vacations"), F("vacation dates"))
|
||||
MAKE_PSTR_LIST(program, F("program"), F("program"))
|
||||
MAKE_PSTR_LIST(pause, F("pause"), F("pause time"))
|
||||
MAKE_PSTR_LIST(party, F("party"), F("party time"))
|
||||
@@ -591,6 +596,8 @@ MAKE_PSTR_LIST(flowtempoffset, F("flowtempoffset"), F("flow temperature offset")
|
||||
MAKE_PSTR_LIST(reducemode, F("reducemode"), F("reduce mode"))
|
||||
MAKE_PSTR_LIST(noreducetemp, F("noreducetemp"), F("no reduce below temperature"))
|
||||
MAKE_PSTR_LIST(remotetemp, F("remotetemp"), F("room temperature from remote"))
|
||||
MAKE_PSTR_LIST(reducehours, F("reducehours"), F("duration for nighttemp"))
|
||||
MAKE_PSTR_LIST(reduceminutes, F("reduceminutes"), F("remaining time for nightmode"))
|
||||
|
||||
// heatpump
|
||||
MAKE_PSTR_LIST(airHumidity, F("airhumidity"), F("relative air humidity"))
|
||||
|
||||
Reference in New Issue
Block a user