From 135b122cebf9821848f6a0d4f08a6a290a7cea62 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 1 Feb 2021 11:17:30 +0100 Subject: [PATCH 1/3] Force loglevel for watch --- src/console.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 253a6e83c..00a325f39 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -312,9 +312,9 @@ void EMSESPShell::add_console_commands() { watch_id = WATCH_ID_NONE; } else { watch_id = Helpers::hextoint(arguments[0].c_str()); - if ((emsesp::EMSESP::watch() == EMSESP::WATCH_OFF) && watch_id) { + if (watch_id && ((emsesp::EMSESP::watch() == EMSESP::WATCH_OFF) || (emsesp::EMSESP::watch() == EMSESP::WATCH_UNKNOWN))) { emsesp::EMSESP::watch(EMSESP::WATCH_ON); // on - } else if ((emsesp::EMSESP::watch() == EMSESP::WATCH_UNKNOWN) || !watch_id) { + } else if (!watch_id) { return; } } @@ -334,8 +334,9 @@ void EMSESPShell::add_console_commands() { } // if logging is off, the watch won't show anything, show force it back to NOTICE - if (!shell.logger().enabled(Level::NOTICE)) { + if (shell.log_level() < Level::NOTICE) { shell.log_level(Level::NOTICE); + shell.printfln(F("Force log level to notice")); } if (watch == EMSESP::WATCH_ON) { @@ -403,6 +404,7 @@ void EMSESPShell::add_console_commands() { } if (ok && json.size()) { + doc.shrinkToFit(); serializeJsonPretty(doc, shell); shell.println(); } From 4935c4c208b504464f3f330915ff47c88861d25c Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 1 Feb 2021 11:18:22 +0100 Subject: [PATCH 2/3] shrink API-json before sending --- src/WebAPIService.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WebAPIService.cpp b/src/WebAPIService.cpp index 4388681f5..638afe41a 100644 --- a/src/WebAPIService.cpp +++ b/src/WebAPIService.cpp @@ -85,6 +85,7 @@ void WebAPIService::webAPIService(AsyncWebServerRequest * request) { } if (ok && json.size()) { // send json output back to web + doc.shrinkToFit(); std::string buffer; serializeJsonPretty(doc, buffer); request->send(200, "text/plain", buffer.c_str()); From b4eeef268b8480743f8defcf9b17e73001e97666 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 1 Feb 2021 11:19:03 +0100 Subject: [PATCH 3/3] ES72/RC20 command set to RC20_2 --- CHANGELOG_LATEST.md | 2 ++ src/device_library.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 08ae4c2db..3053d5e4a 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -10,6 +10,8 @@ See https://github.com/proddy/EMS-ESP/issues/632 ### Fixed - telegrams matched to masterthermostat 0x18 - multiple roomcontrollers +- readback after write with delay (give ems-devices time to set the value) +- Thermostat ES72/RC20 device 66 to command-set RC20_2 ### Changed - split `show values` in smaller packages (edited) diff --git a/src/device_library.h b/src/device_library.h index e5b494d10..e6fea11ba 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -45,6 +45,7 @@ // Controllers - 0x09 / 0x10 / 0x50 { 68, DeviceType::CONTROLLER, F("BC10/RFM20"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 +{ 84, DeviceType::CONTROLLER, F("GB022"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, { 89, DeviceType::CONTROLLER, F("BC10 GB142"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 { 95, DeviceType::CONTROLLER, F("HT3"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {114, DeviceType::CONTROLLER, F("BC10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 @@ -53,13 +54,13 @@ {169, DeviceType::CONTROLLER, F("BC40"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {190, DeviceType::CONTROLLER, F("BC10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {194, DeviceType::CONTROLLER, F("BC10"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 +{206, DeviceType::CONTROLLER, F("Ecomline"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {207, DeviceType::CONTROLLER, F("Sense II/CS200"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x10 {209, DeviceType::CONTROLLER, F("ErP"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {218, DeviceType::CONTROLLER, F("M200/RFM200"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x50 {224, DeviceType::CONTROLLER, F("9000i"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {230, DeviceType::CONTROLLER, F("BC Base"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 {241, DeviceType::CONTROLLER, F("Condens 5000i"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 -{206, DeviceType::CONTROLLER, F("Ecomline"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x09 // Thermostat - not currently supporting write operations, like the Easy/100 types - 0x18 {202, DeviceType::THERMOSTAT, F("Logamatic TC100/Moduline Easy"), DeviceFlags::EMS_DEVICE_FLAG_EASY | DeviceFlags::EMS_DEVICE_FLAG_NO_WRITE}, // 0x18, cannot write @@ -80,7 +81,7 @@ {165, DeviceType::THERMOSTAT, F("RC100/Moduline 1000/1010"), DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18, 0x38 // Thermostat - Sieger - 0x10 / 0x17 -{ 66, DeviceType::THERMOSTAT, F("ES72"), DeviceFlags::EMS_DEVICE_FLAG_RC20}, // first seen as remote 0x19, could also be RC20_2? +{ 66, DeviceType::THERMOSTAT, F("ES72/RC20"), DeviceFlags::EMS_DEVICE_FLAG_RC20_2}, // 0x17 or remote { 76, DeviceType::THERMOSTAT, F("ES73"), DeviceFlags::EMS_DEVICE_FLAG_RC35}, // 0x10 {113, DeviceType::THERMOSTAT, F("ES72/RC20"), DeviceFlags::EMS_DEVICE_FLAG_RC20_2}, // 0x17