mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add RC100H remoteseltemp and temp correction
This commit is contained in:
@@ -32,6 +32,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
||||
if (device_id >= 0x38 && device_id <= 0x3F) { // RC100H remote
|
||||
register_telegram_type(0x042B, F("RemoteTemp"), false, MAKE_PF_CB(process_RemoteTemp));
|
||||
register_telegram_type(0x047B, F("RemoteHumidity"), false, MAKE_PF_CB(process_RemoteHumidity));
|
||||
register_telegram_type(0x0273, F("RemoteCorrection"), true, MAKE_PF_CB(process_RemoteCorrection));
|
||||
return; // no values to add
|
||||
}
|
||||
// common telegram handlers
|
||||
@@ -693,6 +694,7 @@ void Thermostat::process_RC20Remote(std::shared_ptr<const Telegram> telegram) {
|
||||
}
|
||||
has_update(telegram, hc->remotetemp, 0);
|
||||
}
|
||||
|
||||
// 0x42B - for reading the roomtemperature from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||
// e.g. "38 10 FF 00 03 2B 00 D1 08 2A 01"
|
||||
void Thermostat::process_RemoteTemp(std::shared_ptr<const Telegram> telegram) {
|
||||
@@ -701,7 +703,6 @@ void Thermostat::process_RC20Remote(std::shared_ptr<const Telegram> telegram) {
|
||||
return;
|
||||
}
|
||||
has_update(telegram, hc->remotetemp, 0);
|
||||
|
||||
}
|
||||
|
||||
// 0x47B - for reading humidity from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||
@@ -715,6 +716,11 @@ void Thermostat::process_RemoteHumidity(std::shared_ptr<const Telegram> telegram
|
||||
has_update(telegram, hc->humidity, 1);
|
||||
}
|
||||
|
||||
// 0x273 - for reading temperaturcorrection from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||
void Thermostat::process_RemoteCorrection(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, ibaCalIntTemperature_, 0);
|
||||
}
|
||||
|
||||
// type 0x0165, ff
|
||||
void Thermostat::process_JunkersSet(std::shared_ptr<const Telegram> telegram) {
|
||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||
@@ -1019,6 +1025,7 @@ void Thermostat::process_RC300Set(std::shared_ptr<const Telegram> telegram) {
|
||||
has_enumupdate(telegram, hc->reducemode, 5, 1); // 1-outdoor temp threshold, 2-room temp threshold, 3-reduced mode
|
||||
has_update(telegram, hc->reducetemp, 9);
|
||||
has_update(telegram, hc->noreducetemp, 12);
|
||||
has_update(telegram, hc->remoteseltemp, 17); // see https://github.com/emsesp/EMS-ESP32/issues/590
|
||||
}
|
||||
|
||||
// types 0x2AF ff
|
||||
@@ -1630,6 +1637,8 @@ bool Thermostat::set_calinttemp(const char * value, const int8_t id) {
|
||||
write_command(0xB0, 0, t, 0xB0);
|
||||
} else if (model() == EMS_DEVICE_FLAG_RC30) {
|
||||
write_command(EMS_TYPE_RC30Settings, 1, t, EMS_TYPE_RC30Settings);
|
||||
} else if (model() == EMS_DEVICE_FLAG_RC100H) {
|
||||
write_command(0x273, 0, t, 0x273);
|
||||
} else {
|
||||
write_command(EMS_TYPE_IBASettings, 2, t, EMS_TYPE_IBASettings);
|
||||
}
|
||||
@@ -2983,6 +2992,9 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
||||
factor = 1; // to write 0xFF
|
||||
}
|
||||
break;
|
||||
case HeatingCircuit::Mode::REMOTESELTEMP:
|
||||
offset = 0x11;
|
||||
break;
|
||||
case HeatingCircuit::Mode::COMFORT:
|
||||
offset = 0x02; // comfort offset level 2
|
||||
break;
|
||||
@@ -3367,6 +3379,10 @@ bool Thermostat::set_roominfluence(const char * value, const int8_t id) {
|
||||
return set_temperature_value(value, id, HeatingCircuit::Mode::ROOMINFLUENCE, true);
|
||||
}
|
||||
|
||||
bool Thermostat::set_remoteseltemp(const char * value, const int8_t id) {
|
||||
return set_temperature_value(value, id, HeatingCircuit::Mode::REMOTESELTEMP);
|
||||
}
|
||||
|
||||
// register main device values, top level for all thermostats (excluding heating circuits)
|
||||
// as these are done in void Thermostat::register_device_values_hc()
|
||||
void Thermostat::register_device_values() {
|
||||
@@ -3959,11 +3975,13 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
// heating circuit
|
||||
uint8_t tag = DeviceValueTAG::TAG_HC1 + hc->hc();
|
||||
|
||||
// RC300 remote with humidity
|
||||
// RC300 remote with humidity, this is also EMS_DEVICE_FLAG_RC100 for set_calinttemp
|
||||
if (device_id() >= 0x38 && device_id() <= 0x3F) {
|
||||
register_device_value(tag, &hc->remotetemp, DeviceValueType::SHORT, FL_(div10), FL_(remotetemp), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &hc->dewtemperature, DeviceValueType::INT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag, &hc->humidity, DeviceValueType::INT, nullptr, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
||||
register_device_value(
|
||||
tag, &ibaCalIntTemperature_, DeviceValueType::INT, FL_(div10), FL_(ibaCalIntTemperature), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_calinttemp));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4035,6 +4053,8 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
register_device_value(tag, &hc->program, DeviceValueType::ENUM, FL_(enum_progMode), FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program));
|
||||
register_device_value(
|
||||
tag, &hc->tempautotemp, DeviceValueType::INT, FL_(div2), FL_(tempautotemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_tempautotemp), -1, 30);
|
||||
register_device_value(
|
||||
tag, &hc->remoteseltemp, DeviceValueType::INT, FL_(div2), FL_(remoteseltemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_remoteseltemp), -1, 30);
|
||||
register_device_value(tag, &hc->fastHeatup, DeviceValueType::UINT, nullptr, FL_(fastheatup), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fastheatup));
|
||||
register_device_value(tag,
|
||||
&hc->switchonoptimization,
|
||||
|
||||
@@ -38,6 +38,7 @@ class Thermostat : public EMSdevice {
|
||||
int16_t roomTemp;
|
||||
int16_t remotetemp; // for readback
|
||||
uint8_t tempautotemp;
|
||||
int8_t remoteseltemp;
|
||||
uint8_t mode;
|
||||
uint8_t modetype;
|
||||
uint8_t summermode;
|
||||
@@ -135,6 +136,7 @@ class Thermostat : public EMSdevice {
|
||||
ON,
|
||||
DAYLOW,
|
||||
DAYMID,
|
||||
REMOTESELTEMP,
|
||||
UNKNOWN
|
||||
|
||||
};
|
||||
@@ -384,6 +386,7 @@ class Thermostat : public EMSdevice {
|
||||
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RemoteTemp(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RemoteHumidity(std::shared_ptr<const Telegram> telegram);
|
||||
void process_RemoteCorrection(std::shared_ptr<const Telegram> telegram);
|
||||
|
||||
// internal helper functions
|
||||
bool set_mode_n(const uint8_t mode, const uint8_t hc_num);
|
||||
@@ -437,6 +440,7 @@ class Thermostat : public EMSdevice {
|
||||
bool set_wwprio(const char * value, const int8_t id);
|
||||
bool set_fastheatup(const char * value, const int8_t id);
|
||||
bool set_switchonoptimization(const char * value, const int8_t id);
|
||||
bool set_remoteseltemp(const char * value, const int8_t id);
|
||||
|
||||
// set functions - these don't use the id/hc, the parameters are ignored
|
||||
bool set_wwmode(const char * value, const int8_t id);
|
||||
|
||||
@@ -677,6 +677,7 @@ MAKE_PSTR_LIST(nighttemp2, F("nighttemp"), F("night temperature T1"))
|
||||
MAKE_PSTR_LIST(ecotemp, F("ecotemp"), F("eco temperature"))
|
||||
MAKE_PSTR_LIST(manualtemp, F("manualtemp"), F("manual temperature"))
|
||||
MAKE_PSTR_LIST(tempautotemp, F("tempautotemp"), F("temporary set temperature automode"))
|
||||
MAKE_PSTR_LIST(remoteseltemp, F("remoteseltemp"), F("temporary set temperature from remote"))
|
||||
MAKE_PSTR_LIST(comforttemp, F("comforttemp"), F("comfort temperature"))
|
||||
MAKE_PSTR_LIST(summertemp, F("summertemp"), F("summer temperature"))
|
||||
MAKE_PSTR_LIST(designtemp, F("designtemp"), F("design temperature"))
|
||||
|
||||
Reference in New Issue
Block a user