From 9c8677acb9d30f9970d50e5ecfeea3fd31a3efc2 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 18 Nov 2023 13:19:02 +0100 Subject: [PATCH 1/9] prepare for 3.6.3 release --- Makefile | 2 +- interface/package.json | 2 +- interface/src/api/unpack.ts | 4 ++-- interface/yarn.lock | 20 ++++++++++---------- mock-api/server.js | 4 ++-- platformio.ini | 2 +- sonar-project.properties | 2 +- src/system.cpp | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 78ee75e0a..64e4b61b5 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DAR DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ -DEMC_RX_BUFFER_SIZE=1500 DEFINES += $(ARGS) -DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" +DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.3-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" #---------------------------------------------------------------------- # Sources & Files diff --git a/interface/package.json b/interface/package.json index 476c95afc..86deac40e 100644 --- a/interface/package.json +++ b/interface/package.json @@ -55,7 +55,7 @@ "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "concurrently": "^8.2.2", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-prettier": "^9.0.0", diff --git a/interface/src/api/unpack.ts b/interface/src/api/unpack.ts index a25078d5d..17773f583 100644 --- a/interface/src/api/unpack.ts +++ b/interface/src/api/unpack.ts @@ -498,8 +498,8 @@ function createStructureReader(structure, firstId) { key === '__proto__' ? '__proto_:r()' : validName.test(key) - ? key + ':r()' - : '[' + JSON.stringify(key) + ']:r()' + ? key + ':r()' + : '[' + JSON.stringify(key) + ']:r()' ) .join(',') + '})}' diff --git a/interface/yarn.lock b/interface/yarn.lock index 9ea60f6f2..a4b1ada55 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -746,10 +746,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.53.0": - version: 8.53.0 - resolution: "@eslint/js@npm:8.53.0" - checksum: a372d55aa2bbe0d9399acc8de3c892dcfe507fd914d29fde6826ae54a13452619be626aa7eb70b1ec4d4da5302b6ed8e8ac9bf1f830003f15c0ad56c30b4f520 +"@eslint/js@npm:8.54.0": + version: 8.54.0 + resolution: "@eslint/js@npm:8.54.0" + checksum: 4d491ff234cd94b54499428cb3435623270ff8cc59950e13e6e1ac2fa350ec60502dac7bfd4f486523fee65ad7a358034570fe776b81b14dbfe5525d1e26e1d8 languageName: node linkType: hard @@ -1754,7 +1754,7 @@ __metadata: alova: "npm:^2.13.1" async-validator: "npm:^4.2.5" concurrently: "npm:^8.2.2" - eslint: "npm:^8.53.0" + eslint: "npm:^8.54.0" eslint-config-airbnb: "npm:^19.0.4" eslint-config-airbnb-typescript: "npm:^17.1.0" eslint-config-prettier: "npm:^9.0.0" @@ -3842,14 +3842,14 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.53.0": - version: 8.53.0 - resolution: "eslint@npm:8.53.0" +"eslint@npm:^8.54.0": + version: 8.54.0 + resolution: "eslint@npm:8.54.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" "@eslint/eslintrc": "npm:^2.1.3" - "@eslint/js": "npm:8.53.0" + "@eslint/js": "npm:8.54.0" "@humanwhocodes/config-array": "npm:^0.11.13" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" @@ -3886,7 +3886,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: e305a71ce2b9a8631b293266fe53e346c76f28bc8d004af33f10e537cf133db1fb87af3599376e70ed6e0f89a78be10c4f08ddd0c1c9c0c497cd143b4a270420 + checksum: 379827964fd7885a4d48611a5237cf5c534eff0ad3d0c1a1d6a14d52ac6758f4efdccd924c9bb3a9aa4dc80a3446d48dc49f61733cd5bd5f74419d0240970e7b languageName: node linkType: hard diff --git a/mock-api/server.js b/mock-api/server.js index 48fb34dfb..c278ba300 100644 --- a/mock-api/server.js +++ b/mock-api/server.js @@ -324,7 +324,7 @@ security_settings = { ] }; const features = { - version: 'v3.6.0-demo', + version: 'v3.6.3-demo', // platform: 'ESP32' platform: 'ESP32-S3' }; @@ -2640,7 +2640,7 @@ rest_server.get(EMSESP_BOARDPROFILE_ENDPOINT, (req, res) => { // EMS-ESP API specific const emsesp_info = { System: { - version: '3.6.2', + version: '3.6.3', uptime: '001+06:40:34.018', 'uptime (seconds)': 110434, freemem: 131, diff --git a/platformio.ini b/platformio.ini index 9a9b4e7de..61fd86963 100644 --- a/platformio.ini +++ b/platformio.ini @@ -171,7 +171,7 @@ platform = native build_flags = -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ - -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" + -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.3-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" -lpthread -std=gnu++11 -Og -ggdb build_src_flags = diff --git a/sonar-project.properties b/sonar-project.properties index 6fad33dee..877b44ec4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.organization=emsesp sonar.projectKey=emsesp_EMS-ESP32 sonar.projectName=EMS-ESP32 -sonar.projectVersion=3.6.0 +sonar.projectVersion=3.6.3 sonar.sources=./src sonar.cfamily.build-wrapper-output=bw-output sonar.sourceEncoding=UTF-8 diff --git a/src/system.cpp b/src/system.cpp index 398efccaf..f1d5b013f 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -1096,7 +1096,7 @@ bool System::check_upgrade(bool factory_settings) { missing_version = (settingsVersion.empty() || (settingsVersion.length() < 5)); if (missing_version) { LOG_WARNING("No version information found (%s)", settingsVersion.c_str()); - settingsVersion = "3.6.2"; // this was the last stable version + settingsVersion = "3.6.3"; // this was the last stable version } } From 9e405c5a5a5c4ddf126da237b551362e96394cb0 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 18 Nov 2023 13:37:55 +0100 Subject: [PATCH 2/9] 3.6.4-dev-0 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index eee9ca808..29351a9ae 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.3-dev.10" +#define EMSESP_APP_VERSION "3.6.4-dev.0" From 7962af08723eb077dfc3bee941790e9b8c963680 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 18 Nov 2023 13:42:50 +0100 Subject: [PATCH 3/9] update changelog --- CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++++ CHANGELOG_LATEST.md | 29 +---------------------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 841f9bb9d..2659884db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,43 @@ 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.3] November 18 2023 + +## **IMPORTANT! BREAKING CHANGES** + +Writeable Text entities have moved from type `sensor` to `text` in Home Assistant to make them also editable within an HA dashboard. Examples are `datetime`, `holidays`, `switchtime`, `vacations`, `maintenancedate`... You will need to manually remove any old discovery topics from your MQTT broker using an application like MQTT Explorer. + +## Added + +- humidity for ventilation devices +- telegrams for RC100H, hc2, etc. (seen on discord, not tested) +- names for BC400, GB192i.2, read temperatures for low loss header and heatblock [#1317](https://github.com/emsesp/EMS-ESP32/discussions/1317) +- option for `forceheatingoff` [#1262](https://github.com/emsesp/EMS-ESP32/issues/1262) +- remote thermostat emulation RC100H for RC3xx [#1278](https://github.com/emsesp/EMS-ESP32/discussions/1278) +- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329) +- HA discovery for writeable text entities [#1337](https://github.com/emsesp/EMS-ESP32/pull/1377) +- autodetect board_profile, store in nvs, add telnet command option, add E32V2 +- heat pump high res energy counters [#1348, #1349. #1350](https://github.com/emsesp/EMS-ESP32/issues/1348) +- optional bssid in network settings +- extension module EM100 [#1315](https://github.com/emsesp/EMS-ESP32/discussions/1315) +- digital_out with new options for polarity and startup state +- added 'system allvalues' command that dumps all the EMS device values, plus sensors and any custom entities + +## Fixed + +- remove command `remoteseltemp`, thermostat accept it only from remote thermostat +- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329) +- fixed helper text in Web Device Entity dialog box for numerical ranges +- MQTT base with paths not working in HA [#1393](https://github.com/emsesp/EMS-ESP32/issues/1393) + +## Changed + +- update to platform 6.4.0, arduino 2.0.14 / idf 4.4.6 +- small changes for arduino 3.0.0 / idf 5.1 compatibility (not backward compatible to platform 6.3.2 and before) +- AP start after 10 sec, stay until station/eth connected +- tested wifi-all-channel-scan (3.6.3-dev4 a-e), removed again because of connect issues +- mqtt disconnect stops queue + ## [3.6.2] October 1 2023 ## **IMPORTANT! BREAKING CHANGES** diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 5545c8dc0..fa7f75968 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -1,38 +1,11 @@ # Changelog -## [3.6.3] +## [3.6.4] ## **IMPORTANT! BREAKING CHANGES** -Writeable Text entities have moved from type `sensor` to `text` in Home Assistant to make them also editable within an HA dashboard. Examples are `datetime`, `holidays`, `switchtime`, `vacations`, `maintenancedate`... You will need to manually remove any old discovery topics from your MQTT broker using an application like MQTT Explorer. - ## Added -- humidity for ventilation devices -- telegrams for RC100H, hc2, etc. (seen on discord, not tested) -- names for BC400, GB192i.2, read temperatures for low loss header and heatblock [#1317](https://github.com/emsesp/EMS-ESP32/discussions/1317) -- option for `forceheatingoff` [#1262](https://github.com/emsesp/EMS-ESP32/issues/1262) -- remote thermostat emulation RC100H for RC3xx [#1278](https://github.com/emsesp/EMS-ESP32/discussions/1278) -- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329) -- HA discovery for writeable text entities [#1337](https://github.com/emsesp/EMS-ESP32/pull/1377) -- autodetect board_profile, store in nvs, add telnet command option, add E32V2 -- heat pump high res energy counters [#1348, #1349. #1350](https://github.com/emsesp/EMS-ESP32/issues/1348) -- optional bssid in network settings -- extension module EM100 [#1315](https://github.com/emsesp/EMS-ESP32/discussions/1315) -- digital_out with new options for polarity and startup state -- added 'system allvalues' command that dumps all the EMS device values, plus sensors and any custom entities - ## Fixed -- remove command `remoteseltemp`, thermostat accept it only from remote thermostat -- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329) -- fixed helper text in Web Device Entity dialog box for numerical ranges -- MQTT base with paths not working in HA [#1393](https://github.com/emsesp/EMS-ESP32/issues/1393) - ## Changed - -- update to platform 6.4.0, arduino 2.0.14 / idf 4.4.6 -- small changes for arduino 3.0.0 / idf 5.1 compatibility (not backward compatible to platform 6.3.2 and before) -- AP start after 10 sec, stay until station/eth connected -- tested wifi-all-channel-scan (3.6.3-dev4 a-e), removed again because of connect issues -- mqtt disconnect stops queue From 8fcfb3d8f7a7534b95d0d7cf02475193d1493890 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 18 Nov 2023 13:55:28 +0100 Subject: [PATCH 4/9] fix crash on wrong thermostat mode command (if not using HA) --- src/devices/thermostat.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 93a141fa0..2bbdeee1e 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -2455,8 +2455,9 @@ bool Thermostat::set_mode(const char * value, const int8_t id) { // check for the mode being a full string name or single digit if (!Helpers::value2enum(value, enum_index, mode_list)) { mode_list = FL_(enum_mode_ha); - if (Mqtt::ha_enabled() && !Helpers::value2enum(value, enum_index, mode_list)) { - LOG_WARNING("wrong mode: %s", value); + if (!Mqtt::ha_enabled() || !Helpers::value2enum(value, enum_index, mode_list)) { + // We have logging on fail in command.cpp + // LOG_WARNING("wrong mode: %s", value); return false; // not found } } From b300181d33282c8ef83f9fd10be2914621fbb3e6 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 19 Nov 2023 21:17:36 +0100 Subject: [PATCH 5/9] add hosted target --- interface/vite.config.ts | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/interface/vite.config.ts b/interface/vite.config.ts index 32a86cd5c..bb76b59ab 100644 --- a/interface/vite.config.ts +++ b/interface/vite.config.ts @@ -5,7 +5,6 @@ import viteImagemin from 'vite-plugin-imagemin'; import { visualizer } from 'rollup-plugin-visualizer'; export default defineConfig(({ command, mode }) => { - // standalone build for development - runs the server if (command === 'serve') { console.log('Preparing for standalone build with server, mode=' + mode); return { @@ -30,9 +29,17 @@ export default defineConfig(({ command, mode }) => { }; } + if (command === 'build' && mode === 'hosted') { + return { + plugins: [preact(), viteTsconfigPaths()], + build: { + chunkSizeWarningLimit: 1024 + } + }; + } + // production build, both for hosted and building the firmware if (command === 'build') { - console.log('Preparing for production build, mode is ' + mode); return { plugins: [ preact(), @@ -79,11 +86,7 @@ export default defineConfig(({ command, mode }) => { build: { // target: 'es2022', - outDir: 'dist', - reportCompressedSize: false, chunkSizeWarningLimit: 1024, - sourcemap: false, - manifest: false, minify: 'terser', terserOptions: { compress: { @@ -109,16 +112,6 @@ export default defineConfig(({ command, mode }) => { nameCache: null, safari10: false, toplevel: false - }, - - rollupOptions: { - // Ignore "use client" waning since we are not using SSR - onwarn(warning, warn) { - if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes(`"use client"`)) { - return; - } - warn(warning); - } } } }; From b503e2bb90fb74426d14316a30a99f23688ca0f4 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 19 Nov 2023 21:17:43 +0100 Subject: [PATCH 6/9] package update --- interface/package.json | 2 +- interface/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/package.json b/interface/package.json index 86deac40e..b0d378263 100644 --- a/interface/package.json +++ b/interface/package.json @@ -29,7 +29,7 @@ "@table-library/react-table-library": "4.1.7", "@types/imagemin": "^8.0.4", "@types/lodash-es": "^4.17.11", - "@types/node": "^20.9.1", + "@types/node": "^20.9.2", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", "@types/react-router-dom": "^5.3.3", diff --git a/interface/yarn.lock b/interface/yarn.lock index a4b1ada55..e980015d4 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1478,12 +1478,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.9.1": - version: 20.9.1 - resolution: "@types/node@npm:20.9.1" +"@types/node@npm:^20.9.2": + version: 20.9.2 + resolution: "@types/node@npm:20.9.2" dependencies: undici-types: "npm:~5.26.4" - checksum: b2b3f9ee31db63ccd3d48e5597d359c3385879679f37a749e473b47068aae181d0e280f39f153d75ce704640b3ec09d029aecd2a686e5658fb866254dc7e781b + checksum: 8bab2870bfc02efc988c53dfb0149634f8feb824132cc7f20b36f3d55d89ef893e3a43d545524a5cb3a284f4ce68ae4181d75a4a39cee6b79c586d719e6b7461 languageName: node linkType: hard @@ -1745,7 +1745,7 @@ __metadata: "@table-library/react-table-library": "npm:4.1.7" "@types/imagemin": "npm:^8.0.4" "@types/lodash-es": "npm:^4.17.11" - "@types/node": "npm:^20.9.1" + "@types/node": "npm:^20.9.2" "@types/react": "npm:^18.2.37" "@types/react-dom": "npm:^18.2.15" "@types/react-router-dom": "npm:^5.3.3" From 049f9561315eb2f28b41776acf5e9f02a07b6a31 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 19 Nov 2023 21:17:54 +0100 Subject: [PATCH 7/9] minor cleanup --- mock-api/server.js | 95 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/mock-api/server.js b/mock-api/server.js index c278ba300..2dc90b50d 100644 --- a/mock-api/server.js +++ b/mock-api/server.js @@ -353,6 +353,54 @@ const EMSESP_RESET_CUSTOMIZATIONS_ENDPOINT = REST_ENDPOINT_ROOT + 'resetCustomiz const EMSESP_WRITE_SCHEDULE_ENDPOINT = REST_ENDPOINT_ROOT + 'schedule'; const EMSESP_WRITE_ENTITIES_ENDPOINT = REST_ENDPOINT_ROOT + 'entities'; +const emsesp_info = { + System: { + version: '3.6.3', + uptime: '001+06:40:34.018', + 'uptime (seconds)': 110434, + freemem: 131, + 'reset reason': 'Software reset CPU / Software reset CPU', + 'Sensor sensors': 3 + }, + Network: { + connection: 'Ethernet', + hostname: 'ems-esp', + MAC: 'A8:03:2A:62:64:CF', + 'IPv4 address': '192.168.1.134/255.255.255.0', + 'IPv4 gateway': '192.168.1.1', + 'IPv4 nameserver': '192.168.1.1' + }, + Status: { + 'bus status': 'connected', + 'bus protocol': 'Buderus', + 'telegrams received': 84986, + 'read requests sent': 14748, + 'write requests sent': 3, + 'incomplete telegrams': 8, + 'tx fails': 0, + 'rx line quality': 100, + 'tx line quality': 100, + MQTT: 'connected', + 'MQTT publishes': 46336, + 'MQTT publish fails': 0, + 'Sensor reads': 22086, + 'Sensor fails': 0 + }, + Devices: [ + { + type: 'Boiler', + name: 'Nefit GBx72/Trendline/Cerapur/Greenstar Si/27i (DeviceID:0x08 ProductID:123, Version:06.01)', + handlers: + '0x10 0x11 0xC2 0x14 0x15 0x1C 0x18 0x19 0x1A 0x35 0x16 0x33 0x34 0x26 0x2A 0xD1 0xE3 0xE4 0xE5 0xE6 0xE9 0xEA' + }, + { + type: 'Thermostat', + name: 'RC20/Moduline 300 (DeviceID:0x17, ProductID:77, Version:03.03)', + handlers: '0xA3 0x06 0xA2 0x12 0x91 0xA8' + } + ] +}; + settings = { locale: 'en', tx_mode: 4, @@ -2638,53 +2686,6 @@ rest_server.get(EMSESP_BOARDPROFILE_ENDPOINT, (req, res) => { }); // EMS-ESP API specific -const emsesp_info = { - System: { - version: '3.6.3', - uptime: '001+06:40:34.018', - 'uptime (seconds)': 110434, - freemem: 131, - 'reset reason': 'Software reset CPU / Software reset CPU', - 'Sensor sensors': 3 - }, - Network: { - connection: 'Ethernet', - hostname: 'ems-esp', - MAC: 'A8:03:2A:62:64:CF', - 'IPv4 address': '192.168.1.134/255.255.255.0', - 'IPv4 gateway': '192.168.1.1', - 'IPv4 nameserver': '192.168.1.1' - }, - Status: { - 'bus status': 'connected', - 'bus protocol': 'Buderus', - 'telegrams received': 84986, - 'read requests sent': 14748, - 'write requests sent': 3, - 'incomplete telegrams': 8, - 'tx fails': 0, - 'rx line quality': 100, - 'tx line quality': 100, - MQTT: 'connected', - 'MQTT publishes': 46336, - 'MQTT publish fails': 0, - 'Sensor reads': 22086, - 'Sensor fails': 0 - }, - Devices: [ - { - type: 'Boiler', - name: 'Nefit GBx72/Trendline/Cerapur/Greenstar Si/27i (DeviceID:0x08 ProductID:123, Version:06.01)', - handlers: - '0x10 0x11 0xC2 0x14 0x15 0x1C 0x18 0x19 0x1A 0x35 0x16 0x33 0x34 0x26 0x2A 0xD1 0xE3 0xE4 0xE5 0xE6 0xE9 0xEA' - }, - { - type: 'Thermostat', - name: 'RC20/Moduline 300 (DeviceID:0x17, ProductID:77, Version:03.03)', - handlers: '0xA3 0x06 0xA2 0x12 0x91 0xA8' - } - ] -}; rest_server.post(API_ENDPOINT_ROOT, (req, res) => { console.log('Generic API POST'); From dfd9fe4d01c8212ce22f30404064831b8957c4c0 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 19 Nov 2023 21:18:15 +0100 Subject: [PATCH 8/9] add EMSESP_DEFAULT_BOARD_PROFILE to CI builds --- platformio.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 61fd86963..2fe2a578d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -83,8 +83,8 @@ extra_scripts = scripts/rename_fw.py board = esp32dev board_build.partitions = esp32_partition_4M.csv board_build.extra_flags = -DBOARD_HAS_PSRAM -build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} +build_flags = ${common.build_flags} [env:ci_s3] extends = espressi32_base @@ -93,10 +93,11 @@ board = lolin_s3 board_build.f_cpu = 240000000L board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv +build_unflags = ${common.unbuild_flags} build_flags = ${common.build_flags} -O2 -build_unflags = ${common.unbuild_flags} + '-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"' [env:esp32_4M] extends = espressi32_base_tasmota From aed45968db1f92c2af756fdd239f7c4c61907e15 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 20 Nov 2023 07:47:01 +0100 Subject: [PATCH 9/9] set/read thermostat mode for RC100-RC300, fix #1440 --- src/devices/thermostat.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 2bbdeee1e..7faac02e2 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1023,13 +1023,12 @@ void Thermostat::process_RC300Set(std::shared_ptr telegram) { // has_update(telegram, hc->selTemp, 10, 1); // single byte conversion, value is * 2 - manual telegram->read_value(hc->mode_new, 21); // 0-off, 1-manual, 2-auto - if (hc->mode_new <= 2) { + if (Helpers::hasValue(hc->mode_new)) { has_update(hc->mode, hc->mode_new); } else { uint8_t mode = hc->mode == 2 ? 0xFF : 0; // auto : manual - if (telegram->read_value(mode, 0)) { - has_update(hc->mode, mode == 0xFF ? 2 : 1); - } + telegram->read_value(mode, 0); + has_update(hc->mode, mode == 0xFF ? 2 : 1); } has_update(telegram, hc->daytemp, 2); // is * 2 has_update(telegram, hc->nighttemp, 4); // is * 2 @@ -2598,7 +2597,7 @@ bool Thermostat::set_mode_n(const uint8_t mode, const uint8_t hc_num) { if (model_ == EMSdevice::EMS_DEVICE_FLAG_RC10) { hc->mode = set_mode_value >> 1; } else if (model_ == EMSdevice::EMS_DEVICE_FLAG_RC300 || model_ == EMSdevice::EMS_DEVICE_FLAG_RC100) { - hc->mode = set_mode_value ? 1 : 0; + hc->mode = Helpers::hasValue(hc->mode_new) ? set_mode_value : set_mode_value == 0xFF ? 2 : 1; } else if (model_ == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { hc->mode = set_mode_value - 1; } else {