Merge pull request #1783 from MichaelDvP/dev

dev12, fixes #1774 (change timeout #1680 to 24h) and #1779
This commit is contained in:
Proddy
2024-05-30 22:04:17 +02:00
committed by GitHub
4 changed files with 30 additions and 12 deletions

View File

@@ -19,6 +19,8 @@
- HP input states [#1723](https://github.com/emsesp/EMS-ESP32/discussions/1723)
- holiday settings for rego 3000 [#1735](https://github.com/emsesp/EMS-ESP32/issues/1735)
- Added scripts for OTA (scripts/upload.py and upload_cli.py) [#1738](https://github.com/emsesp/EMS-ESP32/issues/1738)
- timeout for remote thermostat emulation [#1680](https://github.com/emsesp/EMS-ESP32/discussions/1680), [#1774](https://github.com/emsesp/EMS-ESP32/issues/1774)
- seltemp/mode for CR120 [#1779](https://github.com/emsesp/EMS-ESP32/discussions/1779)
## Fixed

View File

@@ -1093,8 +1093,13 @@ void Thermostat::process_RC300Set(std::shared_ptr<const Telegram> telegram) {
// has_update(telegram, hc->selTemp, 8, 1); // single byte conversion, value is * 2 - auto?
// has_update(telegram, hc->selTemp, 10, 1); // single byte conversion, value is * 2 - manual
has_update(telegram, hc->mode_new, 21); // for BC400
has_bitupdate(telegram, hc->mode, 0, 0); // RC300, RC100
has_update(telegram, hc->mode_new, 21); // for BC400
// set mode for CR120, https://github.com/emsesp/EMS-ESP32/discussions/1779
if (Helpers::hasValue(hc->mode_new)) {
has_update(hc->mode, hc->mode_new == 2 ? 1 : 0);
} else {
has_bitupdate(telegram, hc->mode, 0, 0); // RC300, RC100
}
/*
telegram->read_value(hc->mode_new, 21); // 0-off, 1-manual, 2-auto
if (Helpers::hasValue(hc->mode_new)) {
@@ -2815,8 +2820,14 @@ bool Thermostat::set_mode_n(const uint8_t mode, const int8_t id) {
case EMSdevice::EMS_DEVICE_FLAG_RC300:
case EMSdevice::EMS_DEVICE_FLAG_RC100:
case EMSdevice::EMS_DEVICE_FLAG_R3000:
offset = EMS_OFFSET_RCPLUSSet_mode;
set_mode_value = set_mode_value == 2 ? 0xFF : 0;
// CR120, https://github.com/emsesp/EMS-ESP32/discussions/1779
if (Helpers::hasValue(hc->mode_new)) {
offset = EMS_OFFSET_RCPLUSSet_mode_new;
set_mode_value = set_mode_value == 2 ? 2 : 1;
} else {
offset = EMS_OFFSET_RCPLUSSet_mode;
set_mode_value = set_mode_value == 2 ? 0xFF : 0;
}
break;
case EMSdevice::EMS_DEVICE_FLAG_JUNKERS:
if (has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
@@ -3546,7 +3557,11 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
factor = 1;
break;
case HeatingCircuit::Mode::MANUAL:
offset = 0x0A; // manual offset
if (Helpers::hasValue(hc->mode_new)) {
offset = 22; // manual offset CR120
} else {
offset = 10; // manual offset
}
break;
case HeatingCircuit::Mode::TEMPAUTO:
offset = 0x08; // auto offset
@@ -3617,13 +3632,14 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
offset = 9;
factor = 1;
break;
default:
// HeatingCircuit::Mode::AUTO:
default: // seltemp
uint8_t mode_ = hc->get_mode();
if (mode_ == HeatingCircuit::Mode::MANUAL) {
offset = 0x0A; // manual offset
if (Helpers::hasValue(hc->mode_new) && mode_ == HeatingCircuit::Mode::MANUAL) {
offset = 22; // manual offset CR120
} else if (mode_ == HeatingCircuit::Mode::MANUAL) {
offset = 10; // manual offset
} else {
offset = 0x08; // auto offset
offset = 8; // auto offset
// special case to reactivate auto temperature, see #737, #746
if (temperature == -1) {
factor = 1;

View File

@@ -37,7 +37,7 @@ class Roomctrl {
private:
static constexpr uint32_t SEND_INTERVAL = 15000; // 15 sec
static constexpr uint32_t TIMEOUT = 10800000; // 3 hour
static constexpr uint32_t TIMEOUT = 86400000; // 24 hour
static constexpr uint8_t HCS = 4; // max 4 heating circuits
enum SendType : uint8_t { TEMP, HUMI };

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.7.0-dev.11"
#define EMSESP_APP_VERSION "3.7.0-dev.12"