From b7b3cb177fb024d303c602f9ed18e31230b85d2a Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 8 Sep 2023 10:35:39 +0200 Subject: [PATCH 1/7] show wifi-quality in network selector --- CHANGELOG_LATEST.md | 2 +- .../framework/network/WiFiNetworkSelector.tsx | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index a2ca151d1..cfb39924f 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -8,7 +8,7 @@ ## Added -- show WiFi rssi in Network Status Page +- show WiFi rssi in Network Status Page, show quality as color ## Fixed diff --git a/interface/src/framework/network/WiFiNetworkSelector.tsx b/interface/src/framework/network/WiFiNetworkSelector.tsx index 9b3593ac4..865db65ab 100644 --- a/interface/src/framework/network/WiFiNetworkSelector.tsx +++ b/interface/src/framework/network/WiFiNetworkSelector.tsx @@ -1,10 +1,11 @@ import LockIcon from '@mui/icons-material/Lock'; import LockOpenIcon from '@mui/icons-material/LockOpen'; import WifiIcon from '@mui/icons-material/Wifi'; -import { Avatar, Badge, List, ListItem, ListItemAvatar, ListItemIcon, ListItemText } from '@mui/material'; +import { Avatar, Badge, List, ListItem, ListItemAvatar, ListItemIcon, ListItemText, useTheme } from '@mui/material'; import { useContext } from 'react'; import { WiFiConnectionContext } from './WiFiConnectionContext'; +import type { Theme } from '@mui/material'; import type { FC } from 'react'; import type { WiFiNetwork, WiFiNetworkList } from 'types'; import { MessageBox } from 'components'; @@ -42,8 +43,18 @@ export const networkSecurityMode = ({ encryption_type }: WiFiNetwork) => { } }; +const networkQualityHighlight = ({ rssi }: WiFiNetwork, theme: Theme) => { + if (rssi <= -85) { + return theme.palette.error.main; + } else if (rssi <= -75) { + return theme.palette.warning.main; + } + return theme.palette.success.main; +}; + const WiFiNetworkSelector: FC = ({ networkList }) => { const { LL } = useI18nContext(); + const theme = useTheme(); const wifiConnectionContext = useContext(WiFiConnectionContext); @@ -57,8 +68,8 @@ const WiFiNetworkSelector: FC = ({ networkList }) => { secondary={'Security: ' + networkSecurityMode(network) + ', Ch: ' + network.channel} /> - - + + From f462afb54719118349e3eaab3f365e1c4edb24b1 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 9 Sep 2023 10:25:05 +0200 Subject: [PATCH 2/7] update pacakges --- interface/package.json | 6 +-- interface/yarn.lock | 104 ++++++++++++++++++++++++++++------------- 2 files changed, 74 insertions(+), 36 deletions(-) diff --git a/interface/package.json b/interface/package.json index 13a43fbda..334fd10f1 100644 --- a/interface/package.json +++ b/interface/package.json @@ -28,7 +28,7 @@ "@prefresh/vite": "^2.4.1", "@table-library/react-table-library": "4.1.7", "@types/lodash-es": "^4.17.9", - "@types/node": "^20.5.9", + "@types/node": "^20.6.0", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", "@types/react-router-dom": "^5.3.3", @@ -50,12 +50,12 @@ "typescript": "^5.2.2" }, "devDependencies": { - "@babel/core": "^7.22.15", + "@babel/core": "^7.22.17", "@preact/preset-vite": "^2.5.0", "@types/babel__core": "^7", "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", - "eslint": "^8.48.0", + "eslint": "^8.49.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-prettier": "^9.0.0", diff --git a/interface/yarn.lock b/interface/yarn.lock index 702b5a5c4..1d71c4e79 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -79,26 +79,26 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/core@npm:7.22.15" +"@babel/core@npm:^7.22.17": + version: 7.22.17 + resolution: "@babel/core@npm:7.22.17" dependencies: "@ampproject/remapping": ^2.2.0 "@babel/code-frame": ^7.22.13 "@babel/generator": ^7.22.15 "@babel/helper-compilation-targets": ^7.22.15 - "@babel/helper-module-transforms": ^7.22.15 + "@babel/helper-module-transforms": ^7.22.17 "@babel/helpers": ^7.22.15 - "@babel/parser": ^7.22.15 + "@babel/parser": ^7.22.16 "@babel/template": ^7.22.15 - "@babel/traverse": ^7.22.15 - "@babel/types": ^7.22.15 + "@babel/traverse": ^7.22.17 + "@babel/types": ^7.22.17 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.3 semver: ^6.3.1 - checksum: fe7457d3b08c478c04003c8b35f23d1718c36152a4524b61b94cd4830d7a5c50c36d3d1155ce258a9fafc37790953b6c7e35a51ddb1079c47890750f1d3db46b + checksum: 9ffd2cb1b860a0651f01927d9e84246860cef2e794bc7181e53770ebf80305e6b5ba5050786d8b44be0dc9832106b4e9c7749c4c05c7f711d7508a5fef9034ce languageName: node linkType: hard @@ -205,9 +205,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-module-transforms@npm:7.22.15" +"@babel/helper-module-transforms@npm:^7.22.17": + version: 7.22.17 + resolution: "@babel/helper-module-transforms@npm:7.22.17" dependencies: "@babel/helper-environment-visitor": ^7.22.5 "@babel/helper-module-imports": ^7.22.15 @@ -216,7 +216,7 @@ __metadata: "@babel/helper-validator-identifier": ^7.22.15 peerDependencies: "@babel/core": ^7.0.0 - checksum: a72c7faca63ce6dc21328f4c05857df142aef4dfe47890d9c83baeca464b2aba01a21ac5473cfd3ebe361dc95fde72e56f6a3d838a566376b962f28bd6707ac2 + checksum: 54d14e092bb15e0e95155890e4c2352e5cb97370e9669aa1066a6a066194f6da01d801516f219a66455add7d10c1b6345d7c2ecfce1b8e69213eb2cc4ba94e75 languageName: node linkType: hard @@ -357,6 +357,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.22.16": + version: 7.22.16 + resolution: "@babel/parser@npm:7.22.16" + bin: + parser: ./bin/babel-parser.js + checksum: e7b6a7d65e27a08a8be361021c332aa72b989b845c4124e0e2c3ec5810956f8c96baf0f54657d1e1200ee5ec6298b895392d2ff73f9de61418e56c0d2d6f574c + languageName: node + linkType: hard + "@babel/plugin-syntax-jsx@npm:^7.22.5": version: 7.22.5 resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" @@ -461,6 +470,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.22.17": + version: 7.22.17 + resolution: "@babel/traverse@npm:7.22.17" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/generator": ^7.22.15 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.22.16 + "@babel/types": ^7.22.17 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: c9bfa6d20caf50e529ac9359db4cd4a5c23f28536bf17e2d493135631ab68be456efda94ba71bf568be34c6d8e762b23cfd9f43fd52b09756cb0397446643d17 + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.11, @babel/types@npm:^7.22.5, @babel/types@npm:^7.8.3": version: 7.22.11 resolution: "@babel/types@npm:7.22.11" @@ -483,6 +510,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.22.17": + version: 7.22.17 + resolution: "@babel/types@npm:7.22.17" + dependencies: + "@babel/helper-string-parser": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.15 + to-fast-properties: ^2.0.0 + checksum: ca26bd1df1aa2707af058f70fb52898d31b209a8a5372330013870150182697e5ab45d6d661d433259e52b4e25396ad41d0b428158d5b856a030dc111d000359 + languageName: node + linkType: hard + "@emotion/babel-plugin@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/babel-plugin@npm:11.11.0" @@ -818,10 +856,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.48.0": - version: 8.48.0 - resolution: "@eslint/js@npm:8.48.0" - checksum: c8ac8952f37cccd41b4adc4399a7a3a6a0b4c52d67bc55b412be5b3ffb476343b3463a4df2c1d7b633dbb6e0d5fb277eeaf3ba0de0dcdf6d0ed97fcdd416ba94 +"@eslint/js@npm:8.49.0": + version: 8.49.0 + resolution: "@eslint/js@npm:8.49.0" + checksum: 40b4255866161e16b09eae1830c8ff7379276659ee7ce039e4708bcf3c5a5fd8b95418d32c355294e6c738f23ab42f3e3a55100dffb389edd5d5233ca47c01b3 languageName: node linkType: hard @@ -863,14 +901,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.10": - version: 0.11.10 - resolution: "@humanwhocodes/config-array@npm:0.11.10" +"@humanwhocodes/config-array@npm:^0.11.11": + version: 0.11.11 + resolution: "@humanwhocodes/config-array@npm:0.11.11" dependencies: "@humanwhocodes/object-schema": ^1.2.1 debug: ^4.1.1 minimatch: ^3.0.5 - checksum: 9e307a49a5baa28beb243d2c14c145f288fccd6885f4c92a9055707057ec40980242256b2a07c976cfa6c75f7081da111a40a9844d1ca8daeff2302f8b640e76 + checksum: 4195f68e485f7d1a7c95cf0f126cc41f7223eeda2f1b46b893123c99b35bb76145c37d25e2ba452d54815ed69bb656c0ce9e343ffa984470c08afa6e82a4713f languageName: node linkType: hard @@ -1522,10 +1560,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.5.9": - version: 20.5.9 - resolution: "@types/node@npm:20.5.9" - checksum: a071a19019b4045ba65cbacb3a24fcdf1ef41474fd15fb160a082a4c7aba7643b69c5d681637d2b0ce081f2127ce4332ea4d8bf007595efe8e82ba795872c7d0 +"@types/node@npm:^20.6.0": + version: 20.6.0 + resolution: "@types/node@npm:20.6.0" + checksum: 0979a218f1862a80ddb7a8ba70498798a72e4861394244657c47bd64ed0c87baa4e0c8ce693bab23e58ec272913438b341de98768dc737491c58e6faff19d955 languageName: node linkType: hard @@ -1743,7 +1781,7 @@ __metadata: resolution: "EMS-ESP@workspace:." dependencies: "@alova/adapter-xhr": ^1.0.1 - "@babel/core": ^7.22.15 + "@babel/core": ^7.22.17 "@emotion/react": ^11.11.1 "@emotion/styled": ^11.11.0 "@mui/icons-material": ^5.14.8 @@ -1754,7 +1792,7 @@ __metadata: "@table-library/react-table-library": 4.1.7 "@types/babel__core": ^7 "@types/lodash-es": ^4.17.9 - "@types/node": ^20.5.9 + "@types/node": ^20.6.0 "@types/react": ^18.2.21 "@types/react-dom": ^18.2.7 "@types/react-router-dom": ^5.3.3 @@ -1762,7 +1800,7 @@ __metadata: "@typescript-eslint/parser": ^6.6.0 alova: ^2.11.1 async-validator: ^4.2.5 - eslint: ^8.48.0 + eslint: ^8.49.0 eslint-config-airbnb: ^19.0.4 eslint-config-airbnb-typescript: ^17.1.0 eslint-config-prettier: ^9.0.0 @@ -3090,15 +3128,15 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.48.0": - version: 8.48.0 - resolution: "eslint@npm:8.48.0" +"eslint@npm:^8.49.0": + version: 8.49.0 + resolution: "eslint@npm:8.49.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@eslint-community/regexpp": ^4.6.1 "@eslint/eslintrc": ^2.1.2 - "@eslint/js": 8.48.0 - "@humanwhocodes/config-array": ^0.11.10 + "@eslint/js": 8.49.0 + "@humanwhocodes/config-array": ^0.11.11 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 ajv: ^6.12.4 @@ -3133,7 +3171,7 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: 93517576a212282383bb10647a8d9e502e12d0aa8c781f2d2585c6651b570349a6e4a768f32eb1e2cd948cff0e0e1c519651aa99c9d1a0dc70f1a3eba0512ba2 + checksum: 8d6985a8d60379ea714ad35d7a3d8762ac8c37b986c615e9a7c245794faddf68f61f997ba6f5f903d440e92065a56a4f7832a45adc2d4fc6e977026782f25835 languageName: node linkType: hard From 09ff892b910ee109b7b5e6def57a07069427a025 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 9 Sep 2023 10:25:14 +0200 Subject: [PATCH 3/7] fix for MQTT enum index option leads to error in HA #1280 --- src/mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 1205dd030..c62abd989 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -918,7 +918,7 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) { // use index numbers for (uint8_t i = 0; i < options_size; i++) { - option_list.add(i); + option_list.add(Helpers::itoa(i)); // as a string } snprintf(sample_val, sizeof(sample_val), "0"); } else { From 4bec32ea56374b03536cfadf29ef0fa9dbe3acf0 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 9 Sep 2023 12:11:30 +0200 Subject: [PATCH 4/7] HA register all values from custom and scheduler --- src/web/WebEntityService.cpp | 9 +++++---- src/web/WebEntityService.h | 3 +++ src/web/WebSchedulerService.cpp | 13 +++++++++++-- src/web/WebSchedulerService.h | 4 ++++ 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/web/WebEntityService.cpp b/src/web/WebEntityService.cpp index 15708c8a1..1919c5eb3 100644 --- a/src/web/WebEntityService.cpp +++ b/src/web/WebEntityService.cpp @@ -61,6 +61,7 @@ StateUpdateResult WebEntity::update(JsonObject & root, WebEntity & webEntity) { Command::erase_command(EMSdevice::DeviceType::CUSTOM, entityItem.name.c_str()); } webEntity.entityItems.clear(); + EMSESP::webEntityService.ha_reset(); if (root["entities"].is()) { for (const JsonObject ei : root["entities"].as()) { @@ -319,7 +320,8 @@ void WebEntityService::publish(const bool force) { } DynamicJsonDocument doc(EMSESP_JSON_SIZE_XLARGE); - JsonObject output = doc.to(); + JsonObject output = doc.to(); + bool ha_created = ha_registered_; for (const EntityItem & entityItem : *entityItems) { render_value(output, entityItem); // create HA config @@ -383,11 +385,10 @@ void WebEntityService::publish(const bool force) { // add "availability" section Mqtt::add_avty_to_doc(stat_t, config.as(), val_cond); - if (Mqtt::queue_ha(topic, config.as())) { - ha_registered_ = true; - } + ha_created |= Mqtt::queue_ha(topic, config.as()); } } + ha_registered_ = ha_created; if (output.size() > 0) { Mqtt::queue_publish("custom_data", output); } diff --git a/src/web/WebEntityService.h b/src/web/WebEntityService.h index e58a7cb39..7df9c4243 100644 --- a/src/web/WebEntityService.h +++ b/src/web/WebEntityService.h @@ -63,6 +63,9 @@ class WebEntityService : public StatefulService { uint8_t count_entities(); uint8_t has_commands(); void generate_value_web(JsonObject & output); + void ha_reset() { + ha_registered_ = false; + } private: diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 2402281b1..b7b166a26 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -71,6 +71,7 @@ StateUpdateResult WebScheduler::update(JsonObject & root, WebScheduler & webSche Command::erase_command(EMSdevice::DeviceType::SCHEDULER, scheduleItem.name.c_str()); } webScheduler.scheduleItems.clear(); + EMSESP::webSchedulerService.ha_reset(); if (root["schedule"].is()) { for (const JsonObject schedule : root["schedule"].as()) { @@ -219,6 +220,12 @@ void WebSchedulerService::publish_single(const char * name, const bool state) { // publish to Mqtt void WebSchedulerService::publish(const bool force) { + if (force) { + ha_registered_ = false; + } + if (!Mqtt::enabled()) { + return; + } EMSESP::webSchedulerService.read([&](WebScheduler & webScheduler) { scheduleItems = &webScheduler.scheduleItems; }); if (scheduleItems->size() == 0) { return; @@ -230,6 +237,7 @@ void WebSchedulerService::publish(const bool force) { } DynamicJsonDocument doc(EMSESP_JSON_SIZE_XLARGE); + bool ha_created = ha_registered_; for (const ScheduleItem & scheduleItem : *scheduleItems) { if (!scheduleItem.name.empty() && !doc.containsKey(scheduleItem.name)) { if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) { @@ -242,7 +250,7 @@ void WebSchedulerService::publish(const bool force) { } // create HA config - if (Mqtt::ha_enabled() && force) { + if (Mqtt::ha_enabled() && !ha_registered_) { StaticJsonDocument config; char stat_t[50]; snprintf(stat_t, sizeof(stat_t), "%s/scheduler_data", Mqtt::basename().c_str()); @@ -284,10 +292,11 @@ void WebSchedulerService::publish(const bool force) { // add "availability" section Mqtt::add_avty_to_doc(stat_t, config.as(), val_cond); - Mqtt::queue_ha(topic, config.as()); + ha_created |= Mqtt::queue_ha(topic, config.as()); } } } + ha_registered_ = ha_created; if (doc.size() > 0) { Mqtt::queue_publish("scheduler_data", doc.as()); } diff --git a/src/web/WebSchedulerService.h b/src/web/WebSchedulerService.h index 43501d66b..ef012fc5a 100644 --- a/src/web/WebSchedulerService.h +++ b/src/web/WebSchedulerService.h @@ -58,6 +58,9 @@ class WebSchedulerService : public StatefulService { bool has_commands(); bool command_setvalue(const char * value, const std::string name); bool get_value_info(JsonObject & output, const char * cmd); + void ha_reset() { + ha_registered_ = false; + } // make all functions public so we can test in the debug and standalone mode #ifndef EMSESP_STANDALONE @@ -69,6 +72,7 @@ class WebSchedulerService : public StatefulService { FSPersistence _fsPersistence; std::list * scheduleItems; // pointer to the list of schedule events + bool ha_registered_ = false; }; } // namespace emsesp From 2f5b7cd0aa504d883df747b2bdcf3a3e3dcdeff5 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 9 Sep 2023 12:25:18 +0200 Subject: [PATCH 5/7] add back process dest, fixes #1275 --- src/emsdevice.cpp | 5 +++++ src/emsesp.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 9520499fc..2cc94fd22 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1767,6 +1767,11 @@ const char * EMSdevice::telegram_type_name(std::shared_ptr teleg bool EMSdevice::handle_telegram(std::shared_ptr telegram) { for (auto & tf : telegram_functions_) { if (tf.telegram_type_id_ == telegram->type_id) { + // for telegram desitnation only read telegram + if (telegram->dest == device_id_ && telegram->message_length > 0) { + tf.process_function_(telegram); + return true; + } // if the data block is empty and we have not received data before, assume that this telegram // is not recognized by the bus master. So remove it from the automatic fetch list if (telegram->message_length == 0 && telegram->offset == 0 && !tf.received_) { diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 314a94599..67a591d11 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -939,6 +939,8 @@ bool EMSESP::process_telegram(std::shared_ptr telegram) { emsdevice->add_handlers_ignored(telegram->type_id); } break; + } else if (emsdevice->is_device_id(telegram->dest)) { + emsdevice->handle_telegram(telegram); } } From aad9c12a7ec8b31caefa545c800d8831bee4d945 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 9 Sep 2023 13:42:28 +0200 Subject: [PATCH 6/7] fixes MQTT enum index option leads to error in HA #1280 --- src/mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index c62abd989..dcb9744b7 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -920,7 +920,7 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev for (uint8_t i = 0; i < options_size; i++) { option_list.add(Helpers::itoa(i)); // as a string } - snprintf(sample_val, sizeof(sample_val), "0"); + snprintf(sample_val, sizeof(sample_val), "'0'"); } else { // use strings for (uint8_t i = 0; i < options_size; i++) { From 3c84a1ced1677d5534e24a81f5d05bf021cb40c0 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 9 Sep 2023 15:00:09 +0200 Subject: [PATCH 7/7] preparing 3.7.0 --- CHANGELOG.md | 21 +++++++++++++++++++++ CHANGELOG_LATEST.md | 11 ----------- platformio.ini | 35 ++++++++++++++++++----------------- src/version.h | 2 +- 4 files changed, 40 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51c2b2e25..0bbe366b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.6.1] September 9 2023 + +## **IMPORTANT! BREAKING CHANGES** + +- `shower_data` MQTT topic shows duration is seconds (was previously a full english sentence) + +## Added + +- show WiFi rssi in Network Status Page, show quality as color + +## Fixed + +- Issue in espMqttClient causing a memory leak when MQTT broker is disconnected due to network unavailability [#1264](https://github.com/emsesp/EMS-ESP32/issues/1264) +- Using MQTT enum values correctly formatted in MQTT Discovery [#1280](https://github.com/emsesp/EMS-ESP32/issues/1280) + +## Changed + +- mqtt free mem check set to 60 kb +- small cosmetic changes to Searching in Customization web page +- updated to espressif32@6.4.0 + # [3.6.0] August 13 2023 ## **IMPORTANT! BREAKING CHANGES** diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index cfb39924f..8ee694d5f 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -4,19 +4,8 @@ ## **IMPORTANT! BREAKING CHANGES** -- `shower_data` MQTT topic shows duration is seconds (was previously a full english sentence) - ## Added -- show WiFi rssi in Network Status Page, show quality as color - ## Fixed -- Issue in espMqttClient causing a memory leak when MQTT broker is disconnected due to network unavailability [#1264](https://github.com/emsesp/EMS-ESP32/issues/1264) -- Using MQTT enum values correctly formatted in MQTT Discovery [#1280](https://github.com/emsesp/EMS-ESP32/issues/1280) - ## Changed - -- mqtt free mem check set to 60 kb -- small cosmetic changes to Searching in Customization web page -- updated to espressif32@6.4.0 diff --git a/platformio.ini b/platformio.ini index 3ba1c8891..7dcdc3c7e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,10 +17,10 @@ core_build_flags = -D NDEBUG -D ARDUINO_ARCH_ESP32=1 -D ESP32=1 - ; -std=gnu++17 + -std=gnu++17 -; core_unbuild_flags = -std=gnu++11 -core_unbuild_flags = +core_unbuild_flags = -std=gnu++11 +; core_unbuild_flags = ; my_build_flags is set in pio_local.ini my_build_flags = @@ -39,7 +39,17 @@ unbuild_flags = ${common.core_unbuild_flags} [espressi32_base] -platform = espressif32 +platform = espressif32@6.4.0 +framework = arduino +build_flags = ${common.build_flags} +build_unflags = ${common.unbuild_flags} +extra_scripts = + pre:scripts/build_interface.py + scripts/rename_fw.py + +[espressi32_base_tasmota] + ; use Tasmota's 2.0.11 core based libary from https://github.com/tasmota/platform-espressif32 which removes some libs (like mbedtsl) and increases available heap +platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.08.01/platform-espressif32.zip framework = arduino build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} @@ -64,9 +74,7 @@ check_flags = ; build for GitHub Actions CI ; the Web interface is built seperately [env:ci] -extends = espressi32_base -; stay on platform 6.3.2 until heap issue is solved -platform = espressif32@6.3.2 +extends = espressi32_base_tasmota extra_scripts = scripts/rename_fw.py board = esp32dev board_build.partitions = esp32_partition_4M.csv @@ -74,7 +82,6 @@ board_build.filesystem = littlefs build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} -; for github Actions actually standard platform is buggy, use dev-platform [env:ci_s3] extends = espressi32_base extra_scripts = scripts/rename_fw.py @@ -86,27 +93,21 @@ build_flags = ${common.build_flags} -O2 build_unflags = ${common.unbuild_flags} [env:esp32_4M] -extends = espressi32_base -; stay on platform 6.3.2 until heap issue is solved -platform = espressif32@6.3.2 +extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_partition_4M.csv build_flags = ${common.build_flags} -Os [env:esp32_4Mplus] -extends = espressi32_base -; stay on platform 6.3.2 until heap issue is solved -platform = espressif32@6.3.2 +extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv build_flags = ${common.build_flags} [env:esp32_16M] -extends = espressi32_base -; stay on platform 6.3.2 until heap issue is solved -platform = espressif32@6.3.2 +extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv diff --git a/src/version.h b/src/version.h index 62f37d1be..915467bd0 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.1-dev.2" +#define EMSESP_APP_VERSION "3.7.0-dev.0"