diff --git a/interface/package.json b/interface/package.json index 56ea316c8..944d9b55d 100644 --- a/interface/package.json +++ b/interface/package.json @@ -7,13 +7,13 @@ "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", "@msgpack/msgpack": "^2.8.0", - "@mui/icons-material": "^5.10.9", - "@mui/material": "^5.10.13", + "@mui/icons-material": "^5.10.14", + "@mui/material": "^5.10.14", "@table-library/react-table-library": "4.0.23", - "@types/lodash": "^4.14.188", + "@types/lodash": "^4.14.189", "@types/node": "^18.11.9", "@types/react": "^18.0.25", - "@types/react-dom": "^18.0.8", + "@types/react-dom": "^18.0.9", "@types/react-router-dom": "^5.3.3", "async-validator": "^4.2.5", "axios": "^1.1.3", @@ -31,7 +31,7 @@ "react-scripts": "5.0.1", "sockette": "^2.0.6", "typesafe-i18n": "^5.16.3", - "typescript": "^4.8.4" + "typescript": "^4.9.3" }, "scripts": { "start": "react-app-rewired start", diff --git a/lib/framework/SystemStatus.cpp b/lib/framework/SystemStatus.cpp index 08e604f1a..b8323a04f 100644 --- a/lib/framework/SystemStatus.cpp +++ b/lib/framework/SystemStatus.cpp @@ -1,4 +1,5 @@ #include +#include #include "../../src/emsesp_stub.hpp" // proddy added @@ -31,6 +32,8 @@ void SystemStatus::systemStatus(AsyncWebServerRequest * request) { root["psram_size"] = emsesp::EMSESP::system_.PSram(); root["free_psram"] = ESP.getFreePsram() / 1024; } + const esp_partition_t * factory_partition = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_FACTORY, NULL); + root["has_loader"] = factory_partition != NULL; response->setLength(); request->send(response); diff --git a/src/device_library.h b/src/device_library.h index 3a68a6c3a..8b04cafa3 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -44,7 +44,7 @@ {195, DeviceType::BOILER, "Condens 5000i/Greenstar 8000", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {203, DeviceType::BOILER, "Logamax U122/Cerapur", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {206, DeviceType::BOILER, "Ecomline Excellent", DeviceFlags::EMS_DEVICE_FLAG_NONE}, -{208, DeviceType::BOILER, "Logamax Plus/GB192/Condens GC9000", DeviceFlags::EMS_DEVICE_FLAG_NONE}, +{208, DeviceType::BOILER, "Logamax Plus/GB192/Condens GC9000/Greenstar ErP", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {210, DeviceType::BOILER, "Cascade MC400", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {211, DeviceType::BOILER, "EasyControl Adapter", DeviceFlags::EMS_DEVICE_FLAG_NONE}, {228, DeviceType::BOILER, "Alternative Heatsource", DeviceFlags::EMS_DEVICE_FLAG_AM200}, diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index fc9431971..dd000c709 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -930,7 +930,8 @@ void Thermostat::process_RC300Monitor(std::shared_ptr telegram) // has_bitupdate(telegram, hc->summermode, 2, 4); // summermode is bit 4 for boilers and bit 6 for heatpumps: 0:winter, 1:summer telegram->read_value(hc->statusbyte, 2); - if (hc->statusbyte & 1) { + // use summertemp or hpoperatingstate, https://github.com/emsesp/EMS-ESP32/issues/747, #550, #503 + if ((hc->statusbyte & 1) || !is_fetch(summer2_typeids[hc->hc()])) { has_update(hc->summermode, hc->statusbyte & 0x50 ? 1 : 0); has_update(hc->hpoperatingstate, EMS_VALUE_UINT_NOTSET); } else { diff --git a/src/locale_common.h b/src/locale_common.h index 3165001e0..a70e51c6f 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -305,7 +305,7 @@ MAKE_PSTR_ENUM(enum_hybridStrategy1, FL_(cost_optimized), FL_(co2_optimized), FL MAKE_PSTR_ENUM(enum_lowNoiseMode, FL_(off), FL_(reduced_output), FL_(switchoff), FL_(perm)) // heat pump -MAKE_PSTR_ENUM(enum_hpactivity, FL_(none), FL_(heating), FL_(cooling), FL_(hot_water), FL_(pool)) +MAKE_PSTR_ENUM(enum_hpactivity, FL_(none), FL_(heating), FL_(cooling), FL_(hot_water), FL_(pool), FL_(unknown), FL_(defrost)) // solar MAKE_PSTR_ENUM(enum_solarmode, FL_(constant), FL_(pwm), FL_(analog)) diff --git a/src/locale_translations.h b/src/locale_translations.h index 4e011d2ae..ec1d0a6c7 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -210,6 +210,7 @@ MAKE_PSTR_LIST(constant, "constant", "konstant", "constant", "Konstant", "stały MAKE_PSTR_LIST(simple, "simple", "einfach", "simpel", "enkel", "prosty", "enkel") MAKE_PSTR_LIST(optimized, "optimized", "optimiert", "geoptimaliseerd", "optimerad", "zoptymalizowany", "optimalisert") MAKE_PSTR_LIST(nofrost, "nofrost", "Frostschutz", "Vorstbescherming", "Frostskydd", "ochrona przed zamarzaniem", "frostsikring") +MAKE_PSTR_LIST(defrost, "defrost", "Abtauen", "ontdooien", "avfrostning", "rozmrażać", "tine") MAKE_PSTR_LIST(comfort, "comfort", "Komfort", "Comfort", "Komfort", "komfort", "komfort") MAKE_PSTR_LIST(night, "night", "Nacht", "Nacht", "Natt", "noc", "natt") MAKE_PSTR_LIST(day, "day", "Tag", "Dag", "Dag", "dzień", "dag") diff --git a/src/web/WebLogService.cpp b/src/web/WebLogService.cpp index 357ae03f3..f4d26a28f 100644 --- a/src/web/WebLogService.cpp +++ b/src/web/WebLogService.cpp @@ -110,6 +110,10 @@ WebLogService::QueuedLogMessage::QueuedLogMessage(unsigned long id, std::shared_ } void WebLogService::operator<<(std::shared_ptr message) { + if (ESP.getMaxAllocHeap() < 20480) { + maximum_log_messages(maximum_log_messages_ > 25 ? maximum_log_messages_ - 25 : 10); + // EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_); + } if (log_messages_.size() >= maximum_log_messages_) { log_messages_.pop_front(); } diff --git a/src/web/WebLogService.h b/src/web/WebLogService.h index 55ca039f7..1a8b4bd8c 100644 --- a/src/web/WebLogService.h +++ b/src/web/WebLogService.h @@ -68,13 +68,13 @@ class WebLogService : public uuid::log::Handler { AsyncCallbackJsonWebHandler setValues_; // for POSTs - uint64_t last_transmit_ = 0; // Last transmit time - size_t maximum_log_messages_ = MAX_LOG_MESSAGES; // Maximum number of log messages to buffer before they are output - unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages - unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch - std::list log_messages_; // Queued log messages, in the order they were received - time_t time_offset_ = 0; - bool compact_ = true; + uint64_t last_transmit_ = 0; // Last transmit time + size_t maximum_log_messages_ = MAX_LOG_MESSAGES; // Maximum number of log messages to buffer before they are output + unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages + unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch + std::deque log_messages_; // Queued log messages, in the order they were received + time_t time_offset_ = 0; + bool compact_ = true; }; } // namespace emsesp