diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index bcdc9044d..3171e6082 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -25,3 +25,4 @@ For more details go to [emsesp.org](https://emsesp.org/). - network fallback to AP only after start [#3090](https://github.com/emsesp/EMS-ESP32/issues/3090) - replaced Web async-validator with custom validator and toast with native snackbar to reduce bundle size - Dewtemperature for Easycontrol calculated by ems-esp [3135](https://github.com/emsesp/EMS-ESP32/issues/3135) +- Gateway and Connect devices are not shown in the Devices page [3126](https://github.com/emsesp/EMS-ESP32/discussions/3126) diff --git a/interface/package.json b/interface/package.json index 14781a828..669262286 100644 --- a/interface/package.json +++ b/interface/package.json @@ -49,7 +49,7 @@ "@types/react": "^19.2.17", "@types/react-dom": "^19.2.3", "concurrently": "^10.0.3", - "eslint": "^10.6.0", + "eslint": "^10.7.0", "eslint-config-prettier": "^10.1.8", "prettier": "^3.9.5", "rollup-plugin-visualizer": "^7.0.1", @@ -58,5 +58,5 @@ "vite": "^8.1.4", "vite-plugin-imagemin": "^0.6.1" }, - "packageManager": "pnpm@11.11.0+sha512.4463f65fd80ed80d69bc1d4bf163ee94f605c7380fc318bb5b2ebe15f8cd12d49c51a4d59e951b401e764d3b6ca751cbf51bc50ed7001a6bcb4935e684c34882" + "packageManager": "pnpm@11.12.0+sha512.820a6fbd0d9f04c226638002aead1e45340a9139dd5dc077c1d83ef44aa2481c8eb6637b4c9aa696a3c7e35ba818e49cf27213e5f2b91138d09b7a3e26e898ba" } diff --git a/interface/pnpm-lock.yaml b/interface/pnpm-lock.yaml index acced9bd3..d19583c72 100644 --- a/interface/pnpm-lock.yaml +++ b/interface/pnpm-lock.yaml @@ -65,7 +65,7 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.1 - version: 10.0.1(eslint@10.6.0) + version: 10.0.1(eslint@10.7.0) '@preact/preset-vite': specifier: ^2.10.5 version: 2.10.5(@babel/core@7.29.7)(preact@10.29.7)(vite@8.1.4(@types/node@26.1.1)(terser@5.49.0)) @@ -85,11 +85,11 @@ importers: specifier: ^10.0.3 version: 10.0.3 eslint: - specifier: ^10.6.0 - version: 10.6.0 + specifier: ^10.7.0 + version: 10.7.0 eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.6.0) + version: 10.1.8(eslint@10.7.0) prettier: specifier: ^3.9.5 version: 3.9.5 @@ -101,7 +101,7 @@ importers: version: 5.49.0 typescript-eslint: specifier: ^8.63.0 - version: 8.63.0(eslint@10.6.0)(typescript@6.0.3) + version: 8.63.0(eslint@10.7.0)(typescript@6.0.3) vite: specifier: ^8.1.4 version: 8.1.4(@types/node@26.1.1)(terser@5.49.0) @@ -1367,8 +1367,8 @@ packages: resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@10.6.0: - resolution: {integrity: sha512-6lVbcqSodALYo+4ELD0heG6lFiFxnLMuLkiMi2qV8LMp54N8tE8FT1GMH+ev4Ti00nFjNze2+Su6DsV5OQW3Dg==} + eslint@10.7.0: + resolution: {integrity: sha512-GVTD7s1vdIl6UYvAfriOPeY1Df8LIZjfofLvHwde+erDHGGuHyuM6xoxRxmHiebhYuD2p1vN4wWh0XzPARSGDQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: @@ -1709,8 +1709,8 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.5: - resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + ignore@7.0.6: + resolution: {integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==} engines: {node: '>= 4'} imagemin-gifsicle@7.0.0: @@ -2366,8 +2366,8 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss@8.5.16: - resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + postcss@8.5.17: + resolution: {integrity: sha512-J7EF+8X+CzRPaJPOv9Ck2wNWJvGnnl3PcNPAdGg6GTLjyVpyQ0yATMSXRFRV01BviT/9Gwuc3rjEyJbDJG9a4w==} engines: {node: ^10 || ^12 || >=14} powershell-utils@0.1.0: @@ -2741,8 +2741,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svgo@2.8.2: - resolution: {integrity: sha512-TyzE4NVGLUFy+H/Uy4N6c3G0HEeprsVfge6Lmq+0FdQQ/zqoVYB62IsBZORsiL+o96s6ff/V6/3UQo/C0cgCAA==} + svgo@2.8.3: + resolution: {integrity: sha512-5EZD0pafXX6PphdwOGCiVLDSaV1xyuQao2blHajHLsPxr07q4mmEjdtXEWgG07ae2mIz8Ex2CDXNCTiXhy3Khw==} engines: {node: '>=10.13.0'} hasBin: true @@ -3237,9 +3237,9 @@ snapshots: '@esbuild/linux-loong64@0.14.54': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@10.6.0)': + '@eslint-community/eslint-utils@4.9.1(eslint@10.7.0)': dependencies: - eslint: 10.6.0 + eslint: 10.7.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} @@ -3260,9 +3260,9 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/js@10.0.1(eslint@10.6.0)': + '@eslint/js@10.0.1(eslint@10.7.0)': optionalDependencies: - eslint: 10.6.0 + eslint: 10.7.0 '@eslint/object-schema@3.0.5': {} @@ -3632,30 +3632,30 @@ snapshots: dependencies: '@types/node': 26.1.1 - '@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@10.6.0)(typescript@6.0.3))(eslint@10.6.0)(typescript@6.0.3)': + '@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@10.7.0)(typescript@6.0.3))(eslint@10.7.0)(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.63.0(eslint@10.6.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.63.0(eslint@10.7.0)(typescript@6.0.3) '@typescript-eslint/scope-manager': 8.63.0 - '@typescript-eslint/type-utils': 8.63.0(eslint@10.6.0)(typescript@6.0.3) - '@typescript-eslint/utils': 8.63.0(eslint@10.6.0)(typescript@6.0.3) + '@typescript-eslint/type-utils': 8.63.0(eslint@10.7.0)(typescript@6.0.3) + '@typescript-eslint/utils': 8.63.0(eslint@10.7.0)(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.63.0 - eslint: 10.6.0 - ignore: 7.0.5 + eslint: 10.7.0 + ignore: 7.0.6 natural-compare: 1.4.0 ts-api-utils: 2.5.0(typescript@6.0.3) typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.63.0(eslint@10.6.0)(typescript@6.0.3)': + '@typescript-eslint/parser@8.63.0(eslint@10.7.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/scope-manager': 8.63.0 '@typescript-eslint/types': 8.63.0 '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.63.0 debug: 4.4.3 - eslint: 10.6.0 + eslint: 10.7.0 typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -3678,13 +3678,13 @@ snapshots: dependencies: typescript: 6.0.3 - '@typescript-eslint/type-utils@8.63.0(eslint@10.6.0)(typescript@6.0.3)': + '@typescript-eslint/type-utils@8.63.0(eslint@10.7.0)(typescript@6.0.3)': dependencies: '@typescript-eslint/types': 8.63.0 '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) - '@typescript-eslint/utils': 8.63.0(eslint@10.6.0)(typescript@6.0.3) + '@typescript-eslint/utils': 8.63.0(eslint@10.7.0)(typescript@6.0.3) debug: 4.4.3 - eslint: 10.6.0 + eslint: 10.7.0 ts-api-utils: 2.5.0(typescript@6.0.3) typescript: 6.0.3 transitivePeerDependencies: @@ -3707,13 +3707,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.63.0(eslint@10.6.0)(typescript@6.0.3)': + '@typescript-eslint/utils@8.63.0(eslint@10.7.0)(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.6.0) + '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0) '@typescript-eslint/scope-manager': 8.63.0 '@typescript-eslint/types': 8.63.0 '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) - eslint: 10.6.0 + eslint: 10.7.0 typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -4315,9 +4315,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.1.8(eslint@10.6.0): + eslint-config-prettier@10.1.8(eslint@10.7.0): dependencies: - eslint: 10.6.0 + eslint: 10.7.0 eslint-scope@9.1.2: dependencies: @@ -4330,9 +4330,9 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@10.6.0: + eslint@10.7.0: dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.6.0) + '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.23.5 '@eslint/config-helpers': 0.6.0 @@ -4741,7 +4741,7 @@ snapshots: ignore@5.3.2: {} - ignore@7.0.5: {} + ignore@7.0.6: {} imagemin-gifsicle@7.0.0: dependencies: @@ -4778,7 +4778,7 @@ snapshots: imagemin-svgo@9.0.0: dependencies: is-svg: 4.4.0 - svgo: 2.8.2 + svgo: 2.8.3 imagemin-webp@6.1.0: dependencies: @@ -5323,7 +5323,7 @@ snapshots: possible-typed-array-names@1.1.0: {} - postcss@8.5.16: + postcss@8.5.17: dependencies: nanoid: 3.3.15 picocolors: 1.1.1 @@ -5662,7 +5662,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svgo@2.8.2: + svgo@2.8.3: dependencies: commander: 7.2.0 css-select: 4.3.0 @@ -5749,13 +5749,13 @@ snapshots: dependencies: typescript: 6.0.3 - typescript-eslint@8.63.0(eslint@10.6.0)(typescript@6.0.3): + typescript-eslint@8.63.0(eslint@10.7.0)(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.63.0(@typescript-eslint/parser@8.63.0(eslint@10.6.0)(typescript@6.0.3))(eslint@10.6.0)(typescript@6.0.3) - '@typescript-eslint/parser': 8.63.0(eslint@10.6.0)(typescript@6.0.3) + '@typescript-eslint/eslint-plugin': 8.63.0(@typescript-eslint/parser@8.63.0(eslint@10.7.0)(typescript@6.0.3))(eslint@10.7.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.63.0(eslint@10.7.0)(typescript@6.0.3) '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) - '@typescript-eslint/utils': 8.63.0(eslint@10.6.0)(typescript@6.0.3) - eslint: 10.6.0 + '@typescript-eslint/utils': 8.63.0(eslint@10.7.0)(typescript@6.0.3) + eslint: 10.7.0 typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -5843,7 +5843,7 @@ snapshots: dependencies: lightningcss: 1.32.0 picomatch: 4.0.5 - postcss: 8.5.16 + postcss: 8.5.17 rolldown: 1.1.5 tinyglobby: 0.2.17 optionalDependencies: diff --git a/mock-api/package.json b/mock-api/package.json index af4021420..30d961857 100644 --- a/mock-api/package.json +++ b/mock-api/package.json @@ -15,5 +15,5 @@ "itty-router": "^5.0.24", "prettier": "^3.9.5" }, - "packageManager": "pnpm@11.11.0+sha512.4463f65fd80ed80d69bc1d4bf163ee94f605c7380fc318bb5b2ebe15f8cd12d49c51a4d59e951b401e764d3b6ca751cbf51bc50ed7001a6bcb4935e684c34882" + "packageManager": "pnpm@11.12.0+sha512.820a6fbd0d9f04c226638002aead1e45340a9139dd5dc077c1d83ef44aa2481c8eb6637b4c9aa696a3c7e35ba818e49cf27213e5f2b91138d09b7a3e26e898ba" } diff --git a/mock-api/restServer.ts b/mock-api/restServer.ts index 7c726ed0c..b2676ac9c 100644 --- a/mock-api/restServer.ts +++ b/mock-api/restServer.ts @@ -923,7 +923,7 @@ const emsesp_coredata = { devices: [ { id: 7, - t: 5, + t: 6, tn: 'Boiler', b: 'Nefit', n: 'Nefit Trendline HRC30/Generic Heatronic 3', @@ -935,7 +935,7 @@ const emsesp_coredata = { }, { id: 3, - t: 5, + t: 6, tn: 'Boiler', b: 'Buderus', n: 'Buderus GB125', @@ -947,7 +947,7 @@ const emsesp_coredata = { }, { id: 1, - t: 6, + t: 7, tn: 'Thermostat', b: 'Buderus', n: 'RC35', @@ -959,7 +959,7 @@ const emsesp_coredata = { }, { id: 2, - t: 6, + t: 7, tn: 'Thermostat', b: '', n: 'RC20', @@ -971,7 +971,7 @@ const emsesp_coredata = { }, { id: 4, - t: 6, + t: 7, tn: 'Thermostat', b: 'Nefit', n: 'Moduline 1000', @@ -983,7 +983,7 @@ const emsesp_coredata = { }, { id: 5, - t: 7, + t: 8, tn: 'Mixer Module', b: 'Buderus', n: 'MM10', @@ -994,7 +994,7 @@ const emsesp_coredata = { }, { id: 6, - t: 8, + t: 9, tn: 'Solar Module', b: 'Buderus', n: 'SM10', @@ -1007,7 +1007,7 @@ const emsesp_coredata = { { id: 8, tn: 'Boiler/HP', - t: 5, + t: 10, b: '', n: 'Bosch Compress 7000i AW Heat Pump', d: 8, @@ -1019,7 +1019,7 @@ const emsesp_coredata = { { id: 9, tn: 'Thermostat', - t: 6, + t: 7, b: '', n: 'RC100H', d: 56, @@ -1031,7 +1031,7 @@ const emsesp_coredata = { { id: 10, tn: 'Thermostat', - t: 6, + t: 7, b: '', n: 'RC310', d: 16, @@ -1043,7 +1043,7 @@ const emsesp_coredata = { { id: 11, tn: 'Ventilation', - t: 18, + t: 19, b: '', n: 'Vent4000CC', d: 81, @@ -1051,6 +1051,18 @@ const emsesp_coredata = { v: '53.02', e: 10, url: 'ventilation' + }, + { + id: 12, + tn: 'Gateway', + t: 11, + b: '', + n: 'KM300', + d: 72, + p: 231, + v: '01.20', + e: 0, + url: 'gateway' } ] }; @@ -4703,6 +4715,10 @@ router // Device Data .get(EMSESP_CORE_DATA_ENDPOINT, () => { + // remove gateway and connect devices + emsesp_coredata.devices = emsesp_coredata.devices.filter( + (item) => item.t !== 11 && item.t !== 12 + ); // sort by type, like its done in the C++ code let sorted_devices = [...emsesp_coredata.devices].sort((a, b) => a.t - b.t); // append emsesp_coredata to sorted_devices so Custom is always at the end of the list diff --git a/scripts/update_all.sh b/scripts/update_all.sh index 9bb491ac5..c91396f1b 100644 --- a/scripts/update_all.sh +++ b/scripts/update_all.sh @@ -26,7 +26,10 @@ cd .. npx cspell "**" # build files that go into docs folder + +# platformio run -e build_modbus -t clean # platformio run -e build_modbus +# platformio run -e build_standalone -t clean # platformio run -e build_standalone # run tests diff --git a/src/core/emsesp.h b/src/core/emsesp.h index c75c0fa12..2e1b37401 100644 --- a/src/core/emsesp.h +++ b/src/core/emsesp.h @@ -88,12 +88,13 @@ class Module {}; // forward declaration // // MAKE_PF_CB(member) produces a non-capturing trampoline that decays to a // plain function pointer (EMSdevice::process_function_p). The outer IILE -// (immediately-invoked lambda expression) captures `this` purely to deduce -// the derived-class type via decltype; the inner lambda is non-capturing and -// therefore convertible to a function pointer via the unary `+` operator. +// (immediately-invoked lambda expression) uses `decltype(this)` in an +// unevaluated context to deduce the derived-class type without capturing +// `this`; the inner lambda is non-capturing and therefore convertible to a +// function pointer via the unary `+` operator. // Result: zero heap (no std::function control block) and direct dispatch. #define MAKE_PF_CB(__f) \ - ([this]() { \ + ([]() { \ using SelfT = std::remove_pointer_t; \ return +[](emsesp::EMSdevice * dev, const std::shared_ptr & t) { static_cast(dev)->__f(t); }; \ }()) diff --git a/src/web/WebDataService.cpp b/src/web/WebDataService.cpp index e2f5c4469..e9db9702d 100644 --- a/src/web/WebDataService.cpp +++ b/src/web/WebDataService.cpp @@ -64,8 +64,8 @@ void WebDataService::core_data(AsyncWebServerRequest * request) { // list is already sorted by device type JsonArray devices = root["devices"].to(); for (const auto & emsdevice : EMSESP::emsdevices) { - // ignore controller - if (emsdevice && (emsdevice->device_type() != EMSdevice::DeviceType::CONTROLLER || emsdevice->count_entities() > 0)) { + // ignore controller and gateway + if (emsdevice && (emsdevice->device_type() != EMSdevice::DeviceType::CONTROLLER && emsdevice->device_type() != EMSdevice::DeviceType::GATEWAY && emsdevice->count_entities() > 0)) { JsonObject obj = devices.add(); obj["id"] = emsdevice->unique_id(); // a unique id obj["tn"] = emsdevice->device_type_2_device_name_translated(); // translated device type name