diff --git a/.github/workflows/dev_release.yml b/.github/workflows/dev_release.yml index 0eb0f329c..3c3dcf7ea 100644 --- a/.github/workflows/dev_release.yml +++ b/.github/workflows/dev_release.yml @@ -28,7 +28,7 @@ jobs: node-version: 24 - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Enable Corepack run: corepack enable pnpm @@ -62,13 +62,13 @@ jobs: platformio run - name: Commit the generated files - uses: stefanzweifel/git-auto-commit-action@v5 + uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: "chore: update generated files for v${{steps.build_info.outputs.VERSION}}" - name: Create GitHub Release id: 'automatic_releases' - uses: emsesp/action-automatic-releases@v1.0.0 + uses: emsesp/action-automatic-releases@v1.0.1 with: repo_token: '${{ secrets.GITHUB_TOKEN }}' title: Development Build v${{steps.build_info.outputs.VERSION}} diff --git a/.github/workflows/github-releases-to-discord.yml b/.github/workflows/github-releases-to-discord.yml index 4c559d8f9..aca7fd49c 100644 --- a/.github/workflows/github-releases-to-discord.yml +++ b/.github/workflows/github-releases-to-discord.yml @@ -11,7 +11,7 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: GitHub Releases To Discord uses: SethCohen/github-releases-to-discord@v1.13.1 diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 1b35c830b..8f668d31d 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install python 3.13 uses: actions/setup-python@v6 diff --git a/.github/workflows/sonar_check.yml b/.github/workflows/sonar_check.yml index 2b3af4291..3a476fb5b 100644 --- a/.github/workflows/sonar_check.yml +++ b/.github/workflows/sonar_check.yml @@ -19,7 +19,7 @@ jobs: BUILD_WRAPPER_OUT_DIR: bw-output steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Install Build Wrapper diff --git a/.github/workflows/stable_release.yml b/.github/workflows/stable_release.yml index bf834352b..76fb12038 100644 --- a/.github/workflows/stable_release.yml +++ b/.github/workflows/stable_release.yml @@ -26,7 +26,7 @@ jobs: node-version: 24 - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Enable Corepack run: corepack enable pnpm @@ -54,7 +54,7 @@ jobs: platformio run - name: Create GitHub Release - uses: emsesp/action-automatic-releases@v1.0.0 + uses: emsesp/action-automatic-releases@v1.0.1 with: repo_token: '${{ secrets.GITHUB_TOKEN }}' prerelease: false diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index 63d160048..a9da6a564 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -28,7 +28,7 @@ jobs: node-version: 24 - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Enable Corepack run: corepack enable pnpm @@ -63,7 +63,7 @@ jobs: - name: Create GitHub Release id: 'automatic_releases' - uses: emsesp/action-automatic-releases@v1.0.0 + uses: emsesp/action-automatic-releases@v1.0.1 with: repo_token: '${{ secrets.GITHUB_TOKEN }}' title: Test Build v${{steps.build_info.outputs.VERSION}} diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 8d071734e..ff1dccb29 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -13,6 +13,7 @@ For more details go to [emsesp.org](https://emsesp.org/). - boiler pumpkick [#2965](https://github.com/emsesp/EMS-ESP32/discussions/2965) - heatpump reset [#2933](https://github.com/emsesp/EMS-ESP32/issues/2933) - 2.nd freshwater module (dhw4, dhw5) [#2991](https://github.com/emsesp/EMS-ESP32/issues/2991) +- full system backup and restore ## Fixed diff --git a/Makefile b/Makefile index ba1d304d8..0728ef0f6 100644 --- a/Makefile +++ b/Makefile @@ -52,13 +52,13 @@ INCLUDES := src/core src/devices src/web src/test lib_standalone lib/* lib/semv LIBRARIES := CPPCHECK = cppcheck -CHECKFLAGS = -q --force --std=gnu++17 +CHECKFLAGS = -q --force --std=gnu++20 #---------------------------------------------------------------------- # Languages Standard #---------------------------------------------------------------------- -C_STANDARD := -std=c17 -CXX_STANDARD := -std=gnu++17 +C_STANDARD := -std=c20 +CXX_STANDARD := -std=gnu++20 #---------------------------------------------------------------------- # Defined Symbols diff --git a/interface/package.json b/interface/package.json index 5776d6d2d..e12e80a2a 100644 --- a/interface/package.json +++ b/interface/package.json @@ -44,7 +44,7 @@ "react-router": "^7.14.1", "react-toastify": "^11.0.5", "typesafe-i18n": "^5.27.1", - "typescript": "^6.0.2" + "typescript": "^6.0.3" }, "devDependencies": { "@babel/core": "^7.29.0", diff --git a/interface/pnpm-lock.yaml b/interface/pnpm-lock.yaml index 81cbc74c8..6d40af9a9 100644 --- a/interface/pnpm-lock.yaml +++ b/interface/pnpm-lock.yaml @@ -70,10 +70,10 @@ importers: version: 11.0.5(react-dom@19.2.5(react@19.2.5))(react@19.2.5) typesafe-i18n: specifier: ^5.27.1 - version: 5.27.1(typescript@6.0.2) + version: 5.27.1(typescript@6.0.3) typescript: - specifier: ^6.0.2 - version: 6.0.2 + specifier: ^6.0.3 + version: 6.0.3 devDependencies: '@babel/core': specifier: ^7.29.0 @@ -119,7 +119,7 @@ importers: version: 5.46.1 typescript-eslint: specifier: ^8.58.2 - version: 8.58.2(eslint@10.2.0)(typescript@6.0.2) + version: 8.58.2(eslint@10.2.0)(typescript@6.0.3) vite: specifier: ^8.0.8 version: 8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1) @@ -128,7 +128,7 @@ importers: version: 0.6.1(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1)) vite-tsconfig-paths: specifier: ^6.1.1 - version: 6.1.1(typescript@6.0.2)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1)) + version: 6.1.1(typescript@6.0.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1)) packages: @@ -1519,8 +1519,8 @@ packages: duplexer3@0.1.5: resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} - electron-to-chromium@1.5.338: - resolution: {integrity: sha512-KVQQ3xko9/coDX3qXLUEEbqkKT8L+1DyAovrtu0Khtrt9wjSZ+7CZV4GVzxFy9Oe1NbrIU1oVXCwHJruIA1PNg==} + electron-to-chromium@1.5.340: + resolution: {integrity: sha512-908qahOGocRMinT2nM3ajCEM99H4iPdv84eagPP3FfZy/1ZGeOy2CZYzjhms81ckOPCXPlW7LkY4XpxD8r1DrA==} emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -3213,8 +3213,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@6.0.2: - resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true @@ -4187,40 +4187,40 @@ snapshots: dependencies: '@types/node': 25.6.0 - '@typescript-eslint/eslint-plugin@8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.2))(eslint@10.2.0)(typescript@6.0.2)': + '@typescript-eslint/eslint-plugin@8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.3))(eslint@10.2.0)(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.58.2(eslint@10.2.0)(typescript@6.0.2) + '@typescript-eslint/parser': 8.58.2(eslint@10.2.0)(typescript@6.0.3) '@typescript-eslint/scope-manager': 8.58.2 - '@typescript-eslint/type-utils': 8.58.2(eslint@10.2.0)(typescript@6.0.2) - '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.2) + '@typescript-eslint/type-utils': 8.58.2(eslint@10.2.0)(typescript@6.0.3) + '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.58.2 eslint: 10.2.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@6.0.2) - typescript: 6.0.2 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.2)': + '@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/scope-manager': 8.58.2 '@typescript-eslint/types': 8.58.2 - '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.58.2 debug: 4.4.3 eslint: 10.2.0 - typescript: 6.0.2 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.58.2(typescript@6.0.2)': + '@typescript-eslint/project-service@8.58.2(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.3) '@typescript-eslint/types': 8.58.2 debug: 4.4.3 - typescript: 6.0.2 + typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -4229,47 +4229,47 @@ snapshots: '@typescript-eslint/types': 8.58.2 '@typescript-eslint/visitor-keys': 8.58.2 - '@typescript-eslint/tsconfig-utils@8.58.2(typescript@6.0.2)': + '@typescript-eslint/tsconfig-utils@8.58.2(typescript@6.0.3)': dependencies: - typescript: 6.0.2 + typescript: 6.0.3 - '@typescript-eslint/type-utils@8.58.2(eslint@10.2.0)(typescript@6.0.2)': + '@typescript-eslint/type-utils@8.58.2(eslint@10.2.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/types': 8.58.2 - '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) - '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3) + '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.3) debug: 4.4.3 eslint: 10.2.0 - ts-api-utils: 2.5.0(typescript@6.0.2) - typescript: 6.0.2 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.58.2': {} - '@typescript-eslint/typescript-estree@8.58.2(typescript@6.0.2)': + '@typescript-eslint/typescript-estree@8.58.2(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.58.2(typescript@6.0.2) - '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.2) + '@typescript-eslint/project-service': 8.58.2(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.58.2(typescript@6.0.3) '@typescript-eslint/types': 8.58.2 '@typescript-eslint/visitor-keys': 8.58.2 debug: 4.4.3 minimatch: 10.2.5 semver: 7.7.4 tinyglobby: 0.2.16 - ts-api-utils: 2.5.0(typescript@6.0.2) - typescript: 6.0.2 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.58.2(eslint@10.2.0)(typescript@6.0.2)': + '@typescript-eslint/utils@8.58.2(eslint@10.2.0)(typescript@6.0.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.2.0) '@typescript-eslint/scope-manager': 8.58.2 '@typescript-eslint/types': 8.58.2 - '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3) eslint: 10.2.0 - typescript: 6.0.2 + typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -4409,7 +4409,7 @@ snapshots: dependencies: baseline-browser-mapping: 2.10.19 caniuse-lite: 1.0.30001788 - electron-to-chromium: 1.5.338 + electron-to-chromium: 1.5.340 node-releases: 2.0.37 update-browserslist-db: 1.2.3(browserslist@4.28.2) @@ -4773,7 +4773,7 @@ snapshots: duplexer3@0.1.5: {} - electron-to-chromium@1.5.338: {} + electron-to-chromium@1.5.340: {} emoji-regex@10.6.0: {} @@ -6387,13 +6387,13 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - ts-api-utils@2.5.0(typescript@6.0.2): + ts-api-utils@2.5.0(typescript@6.0.3): dependencies: - typescript: 6.0.2 + typescript: 6.0.3 - tsconfck@3.1.6(typescript@6.0.2): + tsconfck@3.1.6(typescript@6.0.3): optionalDependencies: - typescript: 6.0.2 + typescript: 6.0.3 tslib@2.8.1: {} @@ -6413,22 +6413,22 @@ snapshots: es-errors: 1.3.0 is-typed-array: 1.1.15 - typesafe-i18n@5.27.1(typescript@6.0.2): + typesafe-i18n@5.27.1(typescript@6.0.3): dependencies: - typescript: 6.0.2 + typescript: 6.0.3 - typescript-eslint@8.58.2(eslint@10.2.0)(typescript@6.0.2): + typescript-eslint@8.58.2(eslint@10.2.0)(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.2))(eslint@10.2.0)(typescript@6.0.2) - '@typescript-eslint/parser': 8.58.2(eslint@10.2.0)(typescript@6.0.2) - '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.2) - '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.2) + '@typescript-eslint/eslint-plugin': 8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.2.0)(typescript@6.0.3))(eslint@10.2.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.58.2(eslint@10.2.0)(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.58.2(typescript@6.0.3) + '@typescript-eslint/utils': 8.58.2(eslint@10.2.0)(typescript@6.0.3) eslint: 10.2.0 - typescript: 6.0.2 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - typescript@6.0.2: {} + typescript@6.0.3: {} unbzip2-stream@1.4.3: dependencies: @@ -6507,11 +6507,11 @@ snapshots: stack-trace: 1.0.0-pre2 vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1) - vite-tsconfig-paths@6.1.1(typescript@6.0.2)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1)): + vite-tsconfig-paths@6.1.1(typescript@6.0.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1)): dependencies: debug: 4.4.3 globrex: 0.1.2 - tsconfck: 3.1.6(typescript@6.0.2) + tsconfck: 3.1.6(typescript@6.0.3) vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.4)(terser@5.46.1) transitivePeerDependencies: - supports-color diff --git a/src/core/common.h b/src/core/common.h deleted file mode 100644 index a9ca215f5..000000000 --- a/src/core/common.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2025 emsesp.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef EMSESP_COMMON_H -#define EMSESP_COMMON_H - -#include - -using uuid::log::Level; - -#if defined(EMSESP_DEBUG) -#define LOG_DEBUG(...) logger_.debug(__VA_ARGS__) -#else -#define LOG_DEBUG(...) -#endif - -#define LOG_INFO(...) logger_.info(__VA_ARGS__) -#define LOG_TRACE(...) logger_.trace(__VA_ARGS__) -#define LOG_NOTICE(...) logger_.notice(__VA_ARGS__) -#define LOG_WARNING(...) logger_.warning(__VA_ARGS__) -#define LOG_ERROR(...) logger_.err(__VA_ARGS__) - -// flash strings -using uuid::string_vector; -using string_vector = std::vector; - -#ifdef FPSTR -#undef FPSTR -#endif - -// clang-format off - - #define FPSTR(pstr_pointer) pstr_pointer - #define MAKE_WORD_CUSTOM(string_name, string_literal) static const char __pstr__##string_name[] = string_literal; - #define MAKE_WORD(string_name) MAKE_WORD_CUSTOM(string_name, #string_name) - - #define F_(string_name) (__pstr__##string_name) - #define FL_(list_name) (__pstr__L_##list_name) - - // Translation counter - capture baseline before any MAKE_TRANSLATION calls - enum { EMSESP_TRANSLATION_COUNT_START = __COUNTER__ }; - - // The language settings below must match system.cpp - #if defined(EMSESP_EN_ONLY) - // EN only - #define MAKE_WORD_TRANSLATION(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr}; - #define MAKE_TRANSLATION(list_name, shortname, en, ...) static constexpr int __translation_counter_##list_name = __COUNTER__; static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr}; - #elif defined(EMSESP_TEST) || defined(EMSESP_DE_ONLY) - // EN + DE (Test mode uses two languages to save flash memory) - #define MAKE_WORD_TRANSLATION(list_name, en, de, ...) static const char * const __pstr__L_##list_name[] = {en, de, nullptr}; - #define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static constexpr int __translation_counter_##list_name = __COUNTER__; static const char * const __pstr__L_##list_name[] = {shortname, en, de, nullptr}; - #else - // All languages - #define MAKE_WORD_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr}; - #define MAKE_TRANSLATION(list_name, ...) static constexpr int __translation_counter_##list_name = __COUNTER__; static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr}; - #endif - - #define MAKE_NOTRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr}; - - // fixed strings, no translations - #define MAKE_ENUM_FIXED(enum_name, ...) static const char * const __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr}; - - // with translations - #define MAKE_ENUM(enum_name, ...) static const char * const * __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr}; - -// clang-format on - -// load translations -#include "locale_translations.h" -#include "locale_common.h" - -// Translation count - dynamically calculated at compile-time -enum { EMSESP_TRANSLATION_COUNT_END = __COUNTER__ }; -static constexpr uint16_t EMSESP_TRANSLATION_COUNT = EMSESP_TRANSLATION_COUNT_END - EMSESP_TRANSLATION_COUNT_START - 1; - -#endif