mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
add Junkers thermostat wwCharge
This commit is contained in:
@@ -170,6 +170,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
register_telegram_type(0xBB, F("HybridSettings"), true, MAKE_PF_CB(process_JunkersHybridSettings));
|
register_telegram_type(0xBB, F("HybridSettings"), true, MAKE_PF_CB(process_JunkersHybridSettings));
|
||||||
register_telegram_type(0x23, F("JunkersSetMixer"), true, MAKE_PF_CB(process_JunkersSetMixer));
|
register_telegram_type(0x23, F("JunkersSetMixer"), true, MAKE_PF_CB(process_JunkersSetMixer));
|
||||||
register_telegram_type(0x123, F("JunkersRemote"), false, MAKE_PF_CB(process_JunkersRemoteMonitor));
|
register_telegram_type(0x123, F("JunkersRemote"), false, MAKE_PF_CB(process_JunkersRemoteMonitor));
|
||||||
|
register_telegram_type(0x1D3, F("JunkersDhw"), true, MAKE_PF_CB(process_JunkersWW));
|
||||||
}
|
}
|
||||||
|
|
||||||
// register device values for common values (not heating circuit)
|
// register device values for common values (not heating circuit)
|
||||||
@@ -890,6 +891,9 @@ void Thermostat::process_JunkersSetMixer(std::shared_ptr<const Telegram> telegra
|
|||||||
has_update(telegram, hc->targetflowtemp, 0);
|
has_update(telegram, hc->targetflowtemp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Thermostat::process_JunkersWW(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_bitupdate(telegram, wwCharge_, 0, 3);
|
||||||
|
}
|
||||||
|
|
||||||
// type 0x02A5 - data from Worchester CRF200
|
// type 0x02A5 - data from Worchester CRF200
|
||||||
void Thermostat::process_CRFMonitor(std::shared_ptr<const Telegram> telegram) {
|
void Thermostat::process_CRFMonitor(std::shared_ptr<const Telegram> telegram) {
|
||||||
@@ -1765,7 +1769,11 @@ bool Thermostat::set_wwcharge(const char * value, const int8_t id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
write_command(0x02F5, 11, b ? 0xFF : 0x00, 0x02F5);
|
if ((model() == EMS_DEVICE_FLAG_JUNKERS)) {
|
||||||
|
write_command(0x0115, 0, b ? 0xFF : 0x00, 0x01D3);
|
||||||
|
} else {
|
||||||
|
write_command(0x02F5, 11, b ? 0xFF : 0x00, 0x02F5);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2602,7 +2610,16 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
|
|||||||
if (strlen(s_time) == 5 && s_time[2] == ':') {
|
if (strlen(s_time) == 5 && s_time[2] == ':') {
|
||||||
time = 6 * ((s_time[0] - '0') * 10 + (s_time[1] - '0')) + (s_time[3] - '0');
|
time = 6 * ((s_time[0] - '0') * 10 + (s_time[1] - '0')) + (s_time[3] - '0');
|
||||||
}
|
}
|
||||||
} else {
|
} else if ((model() == EMS_DEVICE_FLAG_RC20) || (model() == EMS_DEVICE_FLAG_RC30)) {
|
||||||
|
if (s_mode[0] == 'T') {
|
||||||
|
on = s_mode[1] - '0';
|
||||||
|
} else {
|
||||||
|
on = s_mode[0] - '0';
|
||||||
|
}
|
||||||
|
if (strlen(s_time) == 5 && s_time[2] == ':') {
|
||||||
|
time = 6 * ((s_time[0] - '0') * 10 + (s_time[1] - '0')) + (s_time[3] - '0');
|
||||||
|
}
|
||||||
|
} else { // RC300
|
||||||
Helpers::value2enum(s_mode, on, FL_(enum_switchmode));
|
Helpers::value2enum(s_mode, on, FL_(enum_switchmode));
|
||||||
if (strlen(s_time) == 5 && s_time[2] == ':') {
|
if (strlen(s_time) == 5 && s_time[2] == ':') {
|
||||||
time = 4 * ((s_time[0] - '0') * 10 + (s_time[1] - '0')) + ((s_time[3] - '0') * 10 + (s_time[4] - '0')) / 15;
|
time = 4 * ((s_time[0] - '0') * 10 + (s_time[1] - '0')) + ((s_time[3] - '0') * 10 + (s_time[4] - '0')) / 15;
|
||||||
@@ -2676,7 +2693,7 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
|
|||||||
if (data[0] != 0xE7) {
|
if (data[0] != 0xE7) {
|
||||||
// we use EN settings for the day abbreviation
|
// we use EN settings for the day abbreviation
|
||||||
std::string sday = read_flash_string(FL_(enum_dayOfWeek)[day][0]);
|
std::string sday = read_flash_string(FL_(enum_dayOfWeek)[day][0]);
|
||||||
// s td::string sday = Helpers::translated_word(FL_(enum_dayOfWeek)[day]);
|
// std::string sday = Helpers::translated_word(FL_(enum_dayOfWeek)[day]);
|
||||||
if (model() == EMS_DEVICE_FLAG_RC35 || model() == EMS_DEVICE_FLAG_RC30_N) {
|
if (model() == EMS_DEVICE_FLAG_RC35 || model() == EMS_DEVICE_FLAG_RC30_N) {
|
||||||
snprintf(out, len, "%02d %s %02d:%02d %s", no, sday.c_str(), time / 6, 10 * (time % 6), on ? "on" : "off");
|
snprintf(out, len, "%02d %s %02d:%02d %s", no, sday.c_str(), time / 6, 10 * (time % 6), on ? "on" : "off");
|
||||||
} else if ((model() == EMS_DEVICE_FLAG_RC20) || (model() == EMS_DEVICE_FLAG_RC30)) {
|
} else if ((model() == EMS_DEVICE_FLAG_RC20) || (model() == EMS_DEVICE_FLAG_RC30)) {
|
||||||
@@ -3865,6 +3882,7 @@ 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_WW, &wwCharge_, DeviceValueType::BOOL, FL_(wwCharge), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwcharge));
|
||||||
break;
|
break;
|
||||||
case EMS_DEVICE_FLAG_EASY:
|
case EMS_DEVICE_FLAG_EASY:
|
||||||
// Easy TC100 have no date/time, see issue #100, not sure about CT200, so leave it.
|
// Easy TC100 have no date/time, see issue #100, not sure about CT200, so leave it.
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ class Thermostat : public EMSdevice {
|
|||||||
void process_JunkersRemoteMonitor(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersRemoteMonitor(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_JunkersWW(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_RemoteTemp(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_RemoteHumidity(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_RemoteCorrection(std::shared_ptr<const Telegram> telegram);
|
void process_RemoteCorrection(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|||||||
Reference in New Issue
Block a user