diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 548d02dd5..d7bda3316 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -32,4 +32,5 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/). - show operation in pretty telegram between src and dst [#2263](https://github.com/emsesp/EMS-ESP32/discussions/2263) - update eModbus to 1.7.2 [#2254](https://github.com/emsesp/EMS-ESP32/issues/2254) - modbus timeout default to 300 sec, change setting from ms to sec [#2254](https://github.com/emsesp/EMS-ESP32/issues/2254) -- update AsyncTCP to v3.2.14 +- update AsyncTCP and ESPAsyncWebServer to latest versions +- update Arduino pio platform to 3.10.0 and optimize flash diff --git a/Makefile b/Makefile index 090085a82..c51370f15 100644 --- a/Makefile +++ b/Makefile @@ -96,14 +96,18 @@ CXX := /usr/bin/g++ # LDFLAGS Linker Flags #---------------------------------------------------------------------- CPPFLAGS += $(DEFINES) $(DEFAULTS) $(INCLUDE) -CPPFLAGS += -ggdb -CPPFLAGS += -g3 -CPPFLAGS += -Os +CPPFLAGS += -ggdb -g3 -O3 +CPPFLAGS += -MMD +CPPFLAGS += -flto=auto -fno-lto +CPPFLAGS += -Wall -Wextra -Werror +CPPFLAGS += -Wswitch-enum +CPPFLAGS += -Wno-unused-parameter +CPPFLAGS += -Wno-missing-braces +CPPFLAGS += -Wno-tautological-constant-out-of-range-compare CFLAGS += $(CPPFLAGS) -CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -CFLAGS += -Wno-unused-parameter -Wno-missing-braces -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -CXXFLAGS += $(CFLAGS) -MMD +CXXFLAGS += $(CPPFLAGS) +LDFLAGS = #---------------------------------------------------------------------- # Compiler & Linker Commands diff --git a/docs/Modbus-Entity-Registers.md b/docs/Modbus-Entity-Registers.md index 51383bb9a..15061651d 100644 --- a/docs/Modbus-Entity-Registers.md +++ b/docs/Modbus-Entity-Registers.md @@ -2254,7 +2254,6 @@ | netflowtemp | heat network flow temp | uint16 (>=0<=3199) | C | false | DEVICE_DATA | -1 | 1 | 1/10 | | heatvalve | heating valve | uint8 (>=0<=100) | % | false | DEVICE_DATA | -1 | 1 | 1 | | dhwvalve | valve | uint8 (>=0<=100) | % | false | DHW | -1 | 1 | 1 | -| curflow | current tap water flow | uint8 (>=0<=25) | l/min | false | DHW | -1 | 1 | 1/10 | | keepwarmtemp | keep warm temperature | uint8 (>=0<=254) | C | true | DEVICE_DATA | -1 | 1 | 1 | | setreturntemp | set temp return | uint8 (>=0<=254) | C | true | DEVICE_DATA | -1 | 1 | 1 | | heating | heating | boolean | | false | DEVICE_DATA | -1 | 1 | 1 | diff --git a/docs/dump_entities.csv b/docs/dump_entities.csv index 3832b239c..6ed5c29b4 100644 --- a/docs/dump_entities.csv +++ b/docs/dump_entities.csv @@ -3153,7 +3153,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "Greenstar HIU, Logamax kompakt WS170",boiler,219,netflowtemp,heat network flow temp,uint16 (>=0<=3199),C,false,sensor.boiler_heat_network_flow_temp,sensor.boiler_netflowtemp,5,0,1/10,271,1 "Greenstar HIU, Logamax kompakt WS170",boiler,219,heatvalve,heating valve,uint8 (>=0<=100),%,false,sensor.boiler_heating_valve,sensor.boiler_heatvalve,5,0,1,272,1 "Greenstar HIU, Logamax kompakt WS170",boiler,219,dhw.dhwvalve,valve,uint8 (>=0<=100),%,false,sensor.boiler_dhw_valve,sensor.boiler_dhw_dhwvalve,5,9,1,73,1 -"Greenstar HIU, Logamax kompakt WS170",boiler,219,dhw.curflow,current tap water flow,uint8 (>=0<=25),l/min,false,sensor.boiler_dhw_current_tap_water_flow,sensor.boiler_dhw_curflow,5,9,1/10,52,1 "Greenstar HIU, Logamax kompakt WS170",boiler,219,keepwarmtemp,keep warm temperature,uint8 (>=0<=254),C,true,number.boiler_keep_warm_temperature,number.boiler_keepwarmtemp,5,0,1,273,1 "Greenstar HIU, Logamax kompakt WS170",boiler,219,setreturntemp,set temp return,uint8 (>=0<=254),C,true,number.boiler_set_temp_return,number.boiler_setreturntemp,5,0,1,274,1 "Greenstar HIU, Logamax kompakt WS170",boiler,219,heating,heating,boolean, ,false,binary_sensor.boiler_heating,binary_sensor.boiler_heating,5,0,1,275,1 diff --git a/interface/yarn.lock b/interface/yarn.lock index bbd835c2e..5bad39894 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -33,7 +33,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0, @babel/code-frame@npm:^7.26.2": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.2": version: 7.26.2 resolution: "@babel/code-frame@npm:7.26.2" dependencies: @@ -51,30 +51,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.22.1": - version: 7.26.0 - resolution: "@babel/core@npm:7.26.0" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.26.0" - "@babel/generator": "npm:^7.26.0" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-module-transforms": "npm:^7.26.0" - "@babel/helpers": "npm:^7.26.0" - "@babel/parser": "npm:^7.26.0" - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10c0/91de73a7ff5c4049fbc747930aa039300e4d2670c2a91f5aa622f1b4868600fc89b01b6278385fbcd46f9574186fa3d9b376a9e7538e50f8d118ec13cfbcb63e - languageName: node - linkType: hard - -"@babel/core@npm:^7.26.7": +"@babel/core@npm:^7.22.1, @babel/core@npm:^7.26.7": version: 7.26.7 resolution: "@babel/core@npm:7.26.7" dependencies: @@ -97,7 +74,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.26.0, @babel/generator@npm:^7.26.2, @babel/generator@npm:^7.26.5": +"@babel/generator@npm:^7.26.2, @babel/generator@npm:^7.26.5": version: 7.26.5 resolution: "@babel/generator@npm:7.26.5" dependencies: @@ -119,7 +96,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.25.9, @babel/helper-compilation-targets@npm:^7.26.5": +"@babel/helper-compilation-targets@npm:^7.26.5": version: 7.26.5 resolution: "@babel/helper-compilation-targets@npm:7.26.5" dependencies: @@ -183,16 +160,6 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helpers@npm:7.26.0" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097 - languageName: node - linkType: hard - "@babel/helpers@npm:^7.26.7": version: 7.26.7 resolution: "@babel/helpers@npm:7.26.7" @@ -203,18 +170,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/parser@npm:7.26.5" - dependencies: - "@babel/types": "npm:^7.26.5" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/2e77dd99ee028ee3c10fa03517ae1169f2432751adf71315e4dc0d90b61639d51760d622f418f6ac665ae4ea65f8485232a112ea0e76f18e5900225d3d19a61e - languageName: node - linkType: hard - -"@babel/parser@npm:^7.26.7": +"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.5, @babel/parser@npm:^7.26.7": version: 7.26.7 resolution: "@babel/parser@npm:7.26.7" dependencies: @@ -263,11 +219,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.26.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": - version: 7.26.0 - resolution: "@babel/runtime@npm:7.26.0" + version: 7.26.7 + resolution: "@babel/runtime@npm:7.26.7" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/12c01357e0345f89f4f7e8c0e81921f2a3e3e101f06e8eaa18a382b517376520cd2fa8c237726eb094dab25532855df28a7baaf1c26342b52782f6936b07c287 + checksum: 10c0/60199c049f90e5e41c687687430052a370aca60bac7859ff4ee761c5c1739b8ba1604d391d01588c22dc0e93828cbadb8ada742578ad1b1df240746bce98729a languageName: node linkType: hard @@ -282,22 +238,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.25.9": - version: 7.26.5 - resolution: "@babel/traverse@npm:7.26.5" - dependencies: - "@babel/code-frame": "npm:^7.26.2" - "@babel/generator": "npm:^7.26.5" - "@babel/parser": "npm:^7.26.5" - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.5" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/0779059ecf63e31446564cf31adf170e701e8017ef02c819c57924a9a83d6b2ce41dbff3ef295589da9410497a3e575655bb8084ca470e0ab1bc193128afa9fe - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.26.7": +"@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.26.7": version: 7.26.7 resolution: "@babel/traverse@npm:7.26.7" dependencies: @@ -312,17 +253,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/types@npm:7.26.5" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/0278053b69d7c2b8573aa36dc5242cad95f0d965e1c0ed21ccacac6330092e59ba5949753448f6d6eccf6ad59baaef270295cc05218352e060ea8c68388638c4 - languageName: node - linkType: hard - -"@babel/types@npm:^7.26.7": +"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5, @babel/types@npm:^7.26.7": version: 7.26.7 resolution: "@babel/types@npm:7.26.7" dependencies: @@ -1151,135 +1082,135 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.31.0" +"@rollup/rollup-android-arm-eabi@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.32.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-android-arm64@npm:4.31.0" +"@rollup/rollup-android-arm64@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-android-arm64@npm:4.32.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.31.0" +"@rollup/rollup-darwin-arm64@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.32.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.31.0" +"@rollup/rollup-darwin-x64@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.32.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-freebsd-arm64@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.31.0" +"@rollup/rollup-freebsd-arm64@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.32.0" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-freebsd-x64@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-freebsd-x64@npm:4.31.0" +"@rollup/rollup-freebsd-x64@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-freebsd-x64@npm:4.32.0" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.31.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.32.0" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.31.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.32.0" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.31.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.32.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.31.0" +"@rollup/rollup-linux-arm64-musl@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.32.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-loongarch64-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.31.0" +"@rollup/rollup-linux-loongarch64-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.32.0" conditions: os=linux & cpu=loong64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.31.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.32.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.31.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.32.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.31.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.32.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.31.0" +"@rollup/rollup-linux-x64-gnu@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.32.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.31.0" +"@rollup/rollup-linux-x64-musl@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.32.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.31.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.32.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.31.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.32.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.31.0": - version: 4.31.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.31.0" +"@rollup/rollup-win32-x64-msvc@npm:4.32.0": + version: 4.32.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.32.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1468,16 +1399,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": - version: 22.10.7 - resolution: "@types/node@npm:22.10.7" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/c941b4689dfc4044b64a5f601306cbcb0c7210be853ba378a5dd44137898c45accedd796ee002ad9407024cac7ecaf5049304951cb1d80ce3d7cebbbae56f20e - languageName: node - linkType: hard - -"@types/node@npm:^22.10.10": +"@types/node@npm:*, @types/node@npm:^22.10.10": version: 22.10.10 resolution: "@types/node@npm:22.10.10" dependencies: @@ -1702,10 +1624,10 @@ __metadata: languageName: unknown linkType: soft -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 +"abbrev@npm:^3.0.0": + version: 3.0.0 + resolution: "abbrev@npm:3.0.0" + checksum: 10c0/049704186396f571650eb7b22ed3627b77a5aedf98bb83caf2eac81ca2a3e25e795394b0464cfb2d6076df3db6a5312139eac5b6a126ca296ac53c5008069c28 languageName: node linkType: hard @@ -2693,9 +2615,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.5.73": - version: 1.5.83 - resolution: "electron-to-chromium@npm:1.5.83" - checksum: 10c0/12380962d057c4679add1047cdddb18b909904614272da0527e505a3859eaffde2022dd0688ce7f230582de96405c3d33b667680614475cdafd3f629caa2fee1 + version: 1.5.88 + resolution: "electron-to-chromium@npm:1.5.88" + checksum: 10c0/25946ef310f8e14c763fcf0e62094e7eae2273d9ffe908969ddd97492c3df0198739295ba76388dc210c4503ab6b540130779cd83036f80520cb8efee53be8e4 languageName: node linkType: hard @@ -5052,13 +4974,13 @@ __metadata: linkType: hard "nopt@npm:^8.0.0": - version: 8.0.0 - resolution: "nopt@npm:8.0.0" + version: 8.1.0 + resolution: "nopt@npm:8.1.0" dependencies: - abbrev: "npm:^2.0.0" + abbrev: "npm:^3.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/19cb986f79abaca2d0f0b560021da7b32ee6fcc3de48f3eaeb0c324d36755c17754f886a754c091f01f740c17caf7d6aea8237b7fbaf39f476ae5e30a249f18f + checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef languageName: node linkType: hard @@ -5933,28 +5855,28 @@ __metadata: linkType: hard "rollup@npm:^4.23.0": - version: 4.31.0 - resolution: "rollup@npm:4.31.0" + version: 4.32.0 + resolution: "rollup@npm:4.32.0" dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.31.0" - "@rollup/rollup-android-arm64": "npm:4.31.0" - "@rollup/rollup-darwin-arm64": "npm:4.31.0" - "@rollup/rollup-darwin-x64": "npm:4.31.0" - "@rollup/rollup-freebsd-arm64": "npm:4.31.0" - "@rollup/rollup-freebsd-x64": "npm:4.31.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.31.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.31.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.31.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.31.0" - "@rollup/rollup-linux-loongarch64-gnu": "npm:4.31.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.31.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.31.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.31.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.31.0" - "@rollup/rollup-linux-x64-musl": "npm:4.31.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.31.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.31.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.31.0" + "@rollup/rollup-android-arm-eabi": "npm:4.32.0" + "@rollup/rollup-android-arm64": "npm:4.32.0" + "@rollup/rollup-darwin-arm64": "npm:4.32.0" + "@rollup/rollup-darwin-x64": "npm:4.32.0" + "@rollup/rollup-freebsd-arm64": "npm:4.32.0" + "@rollup/rollup-freebsd-x64": "npm:4.32.0" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.32.0" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.32.0" + "@rollup/rollup-linux-arm64-gnu": "npm:4.32.0" + "@rollup/rollup-linux-arm64-musl": "npm:4.32.0" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.32.0" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.32.0" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.32.0" + "@rollup/rollup-linux-s390x-gnu": "npm:4.32.0" + "@rollup/rollup-linux-x64-gnu": "npm:4.32.0" + "@rollup/rollup-linux-x64-musl": "npm:4.32.0" + "@rollup/rollup-win32-arm64-msvc": "npm:4.32.0" + "@rollup/rollup-win32-ia32-msvc": "npm:4.32.0" + "@rollup/rollup-win32-x64-msvc": "npm:4.32.0" "@types/estree": "npm:1.0.6" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -6000,7 +5922,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10c0/0d6da45098af14c678e78be887fefefbf5a97fef6277c5a1c24ca722537bb3a02e695c6fcad8880218d8fbef8a7a17d865786afd99bb6e70409fad73844ca8cf + checksum: 10c0/3e365a57a366fec5af8ef68b366ddffbff7ecaf426a9ffe3e20bbc1d848cbbb0f384556097efd8e70dec4155d7b56d5808df7f95c75751974aeeac825604b58a languageName: node linkType: hard @@ -6908,15 +6830,15 @@ __metadata: linkType: hard "vite-prerender-plugin@npm:^0.5.3": - version: 0.5.3 - resolution: "vite-prerender-plugin@npm:0.5.3" + version: 0.5.5 + resolution: "vite-prerender-plugin@npm:0.5.5" dependencies: magic-string: "npm:^0.30.6" node-html-parser: "npm:^6.1.12" simple-code-frame: "npm:^1.3.0" source-map: "npm:^0.7.4" stack-trace: "npm:^1.0.0-pre2" - checksum: 10c0/9a07b851c50e5ee463351fe6db93801d819ba822c8a4628e1bfa175e367730d1987fac4260f51b004cefed4ca459e8275ba2b3a9615186c3498f6683509207ae + checksum: 10c0/f457d6e83c7d4134586ccb1700c344b9e52a651dc1f09d1ea64e7076ab7b77759da916ae5addcf4dde6ac4e82faf8addc409156d12a48451cefd1a6f46b44c54 languageName: node linkType: hard diff --git a/mock-api/yarn.lock b/mock-api/yarn.lock index 0db64f3f0..9451d4f9a 100644 --- a/mock-api/yarn.lock +++ b/mock-api/yarn.lock @@ -43,14 +43,14 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/parser@npm:7.26.5" +"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.5, @babel/parser@npm:^7.26.7": + version: 7.26.7 + resolution: "@babel/parser@npm:7.26.7" dependencies: - "@babel/types": "npm:^7.26.5" + "@babel/types": "npm:^7.26.7" bin: parser: ./bin/babel-parser.js - checksum: 10c0/2e77dd99ee028ee3c10fa03517ae1169f2432751adf71315e4dc0d90b61639d51760d622f418f6ac665ae4ea65f8485232a112ea0e76f18e5900225d3d19a61e + checksum: 10c0/dcb08a4f2878ece33caffefe43b71488d753324bae7ca58d64bca3bc4af34dcfa1b58abdf9972516d76af760fceb25bb9294ca33461d56b31c5059ccfe32001f languageName: node linkType: hard @@ -66,27 +66,27 @@ __metadata: linkType: hard "@babel/traverse@npm:^7.25.9": - version: 7.26.5 - resolution: "@babel/traverse@npm:7.26.5" + version: 7.26.7 + resolution: "@babel/traverse@npm:7.26.7" dependencies: "@babel/code-frame": "npm:^7.26.2" "@babel/generator": "npm:^7.26.5" - "@babel/parser": "npm:^7.26.5" + "@babel/parser": "npm:^7.26.7" "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.5" + "@babel/types": "npm:^7.26.7" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10c0/0779059ecf63e31446564cf31adf170e701e8017ef02c819c57924a9a83d6b2ce41dbff3ef295589da9410497a3e575655bb8084ca470e0ab1bc193128afa9fe + checksum: 10c0/b23a36ce40d2e4970741431c45d4f92e3f4c2895c0a421456516b2729bd9e17278846e01ee3d9039b0adf5fc5a071768061c17fcad040e74a5c3e39517449d5b languageName: node linkType: hard -"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/types@npm:7.26.5" +"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5, @babel/types@npm:^7.26.7": + version: 7.26.7 + resolution: "@babel/types@npm:7.26.7" dependencies: "@babel/helper-string-parser": "npm:^7.25.9" "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/0278053b69d7c2b8573aa36dc5242cad95f0d965e1c0ed21ccacac6330092e59ba5949753448f6d6eccf6ad59baaef270295cc05218352e060ea8c68388638c4 + checksum: 10c0/7810a2bca97b13c253f07a0863a628d33dbe76ee3c163367f24be93bfaf4c8c0a325f73208abaaa050a6b36059efc2950c2e4b71fb109c0f07fa62221d8473d4 languageName: node linkType: hard diff --git a/platformio.ini b/platformio.ini index a58abd811..ad15f24ab 100644 --- a/platformio.ini +++ b/platformio.ini @@ -22,8 +22,8 @@ extra_configs = pio_local.ini [common] -core_build_flags = -std=gnu++17 -O3 -Wno-type-limits -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-format -core_unbuild_flags = -std=gnu++11 -std=gnu++14 +core_build_flags = -std=gnu++17 -O3 -flto=auto -Wno-type-limits -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-format +core_unbuild_flags = -std=gnu++11 -std=gnu++14 -fno-lto my_build_flags = @@ -54,7 +54,7 @@ framework = arduino board_build.partitions = partitions/esp32_partition_16M.csv board_upload.flash_size = 16MB board_build.app_partition_name = app0 -platform = espressif32@6.9.0 ; Arduino Core 2.0.18 / IDF 4.4.8 +platform = espressif32@6.10.0 ; Arduino Core 2.0.17 / IDF 4.4.7 ; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip ; Arduino Core 3.1.1 / IDF 5.3.2 ; ; Experimental for building using espidf and the Hybrid mode to remove core libraries. @@ -89,7 +89,7 @@ framework = arduino board_build.partitions = partitions/esp32_partition_32M.csv board_upload.flash_size = 32MB board_build.app_partition_name = app0 -platform = espressif32@6.9.0 ; Arduino Core 2.0.18 / IDF 4.4.8 +platform = espressif32@6.10.0 ; Arduino Core 2.0.17 / IDF 4.4.7 ; use Tasmota's library for 4MB Flash variants. ; Removes libs (like mbedtsl, so no WiFi_secure.h) to increase available heap @@ -126,7 +126,7 @@ build_type = release board_build.filesystem = littlefs lib_deps = bblanchon/ArduinoJson @ 7.3.0 - ESP32Async/AsyncTCP @ ^3.3.2 + ESP32Async/AsyncTCP @ 3.3.2 ESP32Async/ESPAsyncWebServer @ 3.6.2 https://github.com/emsesp/EMS-ESP-Modules.git @ 1.0.4 diff --git a/src/ESP32React/APSettingsService.cpp b/src/ESP32React/APSettingsService.cpp index 2097304d2..e26d3647d 100644 --- a/src/ESP32React/APSettingsService.cpp +++ b/src/ESP32React/APSettingsService.cpp @@ -1,6 +1,6 @@ #include "APSettingsService.h" -#include +#include APSettingsService::APSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) : _httpEndpoint(APSettings::read, APSettings::update, this, server, AP_SETTINGS_SERVICE_PATH, securityManager) diff --git a/src/ESP32React/MqttSettingsService.cpp b/src/ESP32React/MqttSettingsService.cpp index 232a0027c..f2140e071 100644 --- a/src/ESP32React/MqttSettingsService.cpp +++ b/src/ESP32React/MqttSettingsService.cpp @@ -1,6 +1,6 @@ #include "MqttSettingsService.h" -#include +#include MqttSettingsService::MqttSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) : _httpEndpoint(MqttSettings::read, MqttSettings::update, this, server, MQTT_SETTINGS_SERVICE_PATH, securityManager) diff --git a/src/ESP32React/MqttStatus.cpp b/src/ESP32React/MqttStatus.cpp index 03e999ee5..6923eeff8 100644 --- a/src/ESP32React/MqttStatus.cpp +++ b/src/ESP32React/MqttStatus.cpp @@ -1,6 +1,6 @@ #include "MqttStatus.h" -#include +#include MqttStatus::MqttStatus(AsyncWebServer * server, MqttSettingsService * mqttSettingsService, SecurityManager * securityManager) : _mqttSettingsService(mqttSettingsService) { diff --git a/src/ESP32React/NTPSettingsService.cpp b/src/ESP32React/NTPSettingsService.cpp index c2b3d5ab0..337e1649e 100644 --- a/src/ESP32React/NTPSettingsService.cpp +++ b/src/ESP32React/NTPSettingsService.cpp @@ -1,6 +1,6 @@ #include "NTPSettingsService.h" -#include +#include NTPSettingsService::NTPSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) : _httpEndpoint(NTPSettings::read, NTPSettings::update, this, server, NTP_SETTINGS_SERVICE_PATH, securityManager) diff --git a/src/ESP32React/NTPStatus.cpp b/src/ESP32React/NTPStatus.cpp index 308176fa1..9abe0f9ba 100644 --- a/src/ESP32React/NTPStatus.cpp +++ b/src/ESP32React/NTPStatus.cpp @@ -1,6 +1,6 @@ #include "NTPStatus.h" -#include +#include #include diff --git a/src/ESP32React/NetworkSettingsService.cpp b/src/ESP32React/NetworkSettingsService.cpp index e6affecc8..4a7950662 100644 --- a/src/ESP32React/NetworkSettingsService.cpp +++ b/src/ESP32React/NetworkSettingsService.cpp @@ -1,6 +1,6 @@ #include "NetworkSettingsService.h" -#include +#include NetworkSettingsService::NetworkSettingsService(AsyncWebServer * server, FS * fs, SecurityManager * securityManager) : _httpEndpoint(NetworkSettings::read, NetworkSettings::update, this, server, NETWORK_SETTINGS_SERVICE_PATH, securityManager) @@ -182,7 +182,7 @@ void NetworkSettingsService::setWiFiPowerOnRSSI() { p = WIFI_POWER_5dBm; #if defined(EMSESP_DEBUG) - // emsesp::EMSESP::logger().debug("Recommended WiFi Tx Power (set_power %d, new power %d, rssi %d, threshold %d)", min_tx_pwr / 10, p, rssi, threshold); + // emsesp::EMSESP::logger().debug("Recommended WiFi Tx Power (set_power %d, new power %d, rssi %d, threshold %d)", min_tx_pwr / 10, p, rssi, threshold); #endif if (!WiFi.setTxPower(p)) { diff --git a/src/ESP32React/NetworkStatus.cpp b/src/ESP32React/NetworkStatus.cpp index 5b1070e9b..3d82cb57b 100644 --- a/src/ESP32React/NetworkStatus.cpp +++ b/src/ESP32React/NetworkStatus.cpp @@ -1,6 +1,6 @@ #include "NetworkStatus.h" -#include +#include #ifdef TASMOTA_SDK #include "lwip/dns.h" diff --git a/src/ESP32React/UploadFileService.cpp b/src/ESP32React/UploadFileService.cpp index 3d82b458c..126d3e237 100644 --- a/src/ESP32React/UploadFileService.cpp +++ b/src/ESP32React/UploadFileService.cpp @@ -1,6 +1,6 @@ #include "UploadFileService.h" -#include +#include #include diff --git a/src/core/command.cpp b/src/core/command.cpp index a62de931f..72d4ae43c 100644 --- a/src/core/command.cpp +++ b/src/core/command.cpp @@ -220,7 +220,7 @@ const char * Command::return_code_string(const uint8_t return_code) { default: break; } - char s[4]; + static char s[4]; // static to avoid allocation on each call and loosing scope return Helpers::smallitoa(s, return_code); } @@ -343,7 +343,7 @@ uint8_t Command::call(const uint8_t device_type, const char * command, const cha return Command::list(device_type, output); } if (EMSESP::get_device_value_info(output, cmd, id, device_type)) { // entity = cmd - LOG_DEBUG("Fetched device entity/attributes for %s/%s", dname, cmd); + LOG_DEBUG("Fetched device entity/attributes for %s/%s (id=%d)", dname, cmd, id); return CommandRet::OK; } } else if (device_type == EMSdevice::DeviceType::SYSTEM && strchr(cmd, '/')) { diff --git a/src/core/device_library.h b/src/core/device_library.h index c162dde4c..a6032f771 100644 --- a/src/core/device_library.h +++ b/src/core/device_library.h @@ -94,7 +94,7 @@ { 93, DeviceType::THERMOSTAT, "RC20RF", DeviceFlags::EMS_DEVICE_FLAG_RC20}, // 0x19 { 94, DeviceType::THERMOSTAT, "RFM20 Remote", DeviceFlags::EMS_DEVICE_FLAG_NONE}, // 0x18 {151, DeviceType::THERMOSTAT, "RC25", DeviceFlags::EMS_DEVICE_FLAG_RC25}, // 0x17 -{157, DeviceType::THERMOSTAT, "RC200, CW100, CR120, CR50", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18,, CR120 v22 is FLAG_BC400 +{157, DeviceType::THERMOSTAT, "RC200, CW100, CR120, CR50", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18, CR120 v22 is FLAG_BC400 {158, DeviceType::THERMOSTAT, "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410", DeviceFlags::EMS_DEVICE_FLAG_RC300}, // 0x10 {165, DeviceType::THERMOSTAT, "RC100, CR10, Moduline 1000/1010", DeviceFlags::EMS_DEVICE_FLAG_RC100}, // 0x18, 0x38 {172, DeviceType::THERMOSTAT, "Rego 2000/3000", DeviceFlags::EMS_DEVICE_FLAG_R3000}, // 0x10 diff --git a/src/core/emsdevice.cpp b/src/core/emsdevice.cpp index 203c51c4c..c96561a08 100644 --- a/src/core/emsdevice.cpp +++ b/src/core/emsdevice.cpp @@ -586,7 +586,7 @@ void EMSdevice::add_device_value(int8_t tag, // to b if ((entityCustomization.product_id == product_id()) && (entityCustomization.device_id == device_id())) { char entity[70]; if (tag < DeviceValueTAG::TAG_HC1) { - strncpy(entity, short_name, sizeof(entity)); + strncpy(entity, short_name, sizeof(entity)-1); } else { snprintf(entity, sizeof(entity), "%s/%s", tag_to_mqtt(tag), short_name); } @@ -1201,7 +1201,7 @@ void EMSdevice::setCustomizationEntity(const std::string & entity_id) { for (auto & dv : devicevalues_) { char entity_name[70]; if (dv.tag < DeviceValueTAG::TAG_HC1) { - strncpy(entity_name, dv.short_name, sizeof(entity_name)); + strncpy(entity_name, dv.short_name, sizeof(entity_name)-1); } else { snprintf(entity_name, sizeof(entity_name), "%s/%s", tag_to_mqtt(dv.tag), dv.short_name); } @@ -2047,7 +2047,7 @@ int EMSdevice::get_modbus_value(uint8_t tag, const std::string & shortname, std: return -5; } - for (auto i = 0; i < register_length_s; i++) { + for (size_t i = 0; i < register_length_s; i++) { auto hi = (uint8_t)value_s[2 * i]; auto lo = (uint8_t)(2 * i + 1 < length_s ? value_s[2 * i + 1] : 0); result[i] = ((uint16_t)hi << 8) | lo; @@ -2165,7 +2165,7 @@ int EMSdevice::modbus_value_to_json(uint8_t tag, const std::string & shortname, } uint32_t value = 0; - for (auto i = 0; i < modbus_data.size(); i++) { + for (size_t i = 0; i < modbus_data.size(); i++) { value += (uint32_t)modbus_data[modbus_data.size() - i - 1] << (i * 8); } diff --git a/src/core/emsdevice.h b/src/core/emsdevice.h index 0804228fb..df7e72852 100644 --- a/src/core/emsdevice.h +++ b/src/core/emsdevice.h @@ -151,7 +151,7 @@ class EMSdevice { } void has_update(char * value, const char * newvalue, size_t len) { - if (strcmp(value, newvalue) != 0) { + if (value && newvalue && strcmp(value, newvalue) != 0) { strlcpy(value, newvalue, len); has_update_ = true; publish_value(value); diff --git a/src/core/emsesp.cpp b/src/core/emsesp.cpp index 216724341..c6c2f125c 100644 --- a/src/core/emsesp.cpp +++ b/src/core/emsesp.cpp @@ -28,6 +28,24 @@ static_assert(uuid::console::thread_safe, "uuid-console must be thread-safe"); namespace emsesp { +// Static member definitions +std::deque> EMSESP::emsdevices; +std::vector EMSESP::device_library_; +uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN}; +uint16_t EMSESP::watch_id_ = WATCH_ID_NONE; +uint8_t EMSESP::watch_ = 0; +uint16_t EMSESP::read_id_ = WATCH_ID_NONE; +bool EMSESP::read_next_ = false; +uint16_t EMSESP::publish_id_ = 0; +uint16_t EMSESP::response_id_ = 0; +bool EMSESP::tap_water_active_ = false; +uint8_t EMSESP::publish_all_idx_ = 0; +uint8_t EMSESP::unique_id_count_ = 0; +bool EMSESP::trace_raw_ = false; +uint16_t EMSESP::wait_validate_ = 0; +bool EMSESP::wait_km_ = true; +uint32_t EMSESP::last_fetch_ = 0; + AsyncWebServer webServer(80); #if defined(EMSESP_STANDALONE) @@ -56,10 +74,6 @@ WebLogService EMSESP::webLogService = WebLogService(&webServer, EMSESP using DeviceFlags = EMSdevice; using DeviceType = EMSdevice::DeviceType; -std::deque> EMSESP::emsdevices; // array of all the detected EMS devices -std::vector EMSESP::device_library_; // library of all our known EMS devices, in heap - -uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN}; uuid::log::Logger EMSESP::logger() { return logger_; } @@ -79,21 +93,6 @@ AnalogSensor EMSESP::analogsensor_; // Analog sensors Shower EMSESP::shower_; // Shower logic Preferences EMSESP::nvs_; // NV Storage -// static/common variables -uint16_t EMSESP::watch_id_ = WATCH_ID_NONE; // for when log is TRACE. 0 means no trace set -uint8_t EMSESP::watch_ = 0; // trace off -uint16_t EMSESP::read_id_ = WATCH_ID_NONE; -bool EMSESP::read_next_ = false; -uint16_t EMSESP::publish_id_ = 0; -uint16_t EMSESP::response_id_ = 0; -bool EMSESP::tap_water_active_ = false; // for when Boiler states we having running warm water. used in Shower() -uint32_t EMSESP::last_fetch_ = 0; -uint8_t EMSESP::publish_all_idx_ = 0; -uint8_t EMSESP::unique_id_count_ = 0; -bool EMSESP::trace_raw_ = false; -uint16_t EMSESP::wait_validate_ = 0; -bool EMSESP::wait_km_ = true; - // for a specific EMS device go and request data values // or if device_id is 0 it will fetch from all our known and active devices void EMSESP::fetch_device_values(const uint8_t device_id) { @@ -766,11 +765,16 @@ void EMSESP::publish_response(std::shared_ptr telegram) { bool EMSESP::get_device_value_info(JsonObject root, const char * cmd, const int8_t id, const uint8_t devicetype) { // check first for EMS devices bool found_device = false; + for (const auto & emsdevice : emsdevices) { if (emsdevice->device_type() == devicetype) { found_device = true; + // we may have multiple devices of the same type, so we need to check the id (e.g. id could be a hc number) if (emsdevice->get_value_info(root, cmd, id)) { - return true; + // if we have no values, keep going traversing the devices, it may be a thermostat with multiple hc's + if (root.size()) { + return true; + } } } } diff --git a/src/core/emsesp.h b/src/core/emsesp.h index 21c993e88..5f659bbd4 100644 --- a/src/core/emsesp.h +++ b/src/core/emsesp.h @@ -99,8 +99,8 @@ class EMSESP { public: EMSESP(); ~EMSESP() = default; - virtual void start(); - virtual void loop(); + void start(); + void loop(); static uuid::log::Logger logger(); diff --git a/src/core/emsesp_stub.hpp b/src/core/emsesp_stub.hpp deleted file mode 100644 index 19b23ed12..000000000 --- a/src/core/emsesp_stub.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2024 emsesp.org - proddy, MichaelDvP - * - * 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_EMSESP_STUB_H -#define EMSESP_EMSESP_STUB_H - -#include "system.h" -#include "mqtt.h" -#include "temperaturesensor.h" -// #include "../version.h" -#include "ESP32React/ESP32React.h" - -#include - -using uuid::log::Logger; - -// forward declarator -// used to bind EMS-ESP functions to external frameworks -namespace emsesp { -class EMSESP { - public: - static Mqtt mqtt_; - static System system_; - static TemperatureSensor temperaturesensor_; - static Logger logger(); - static ESP32React esp32React; -}; - -} // namespace emsesp - -#endif diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 1db89549b..b73108ae8 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -1211,7 +1211,9 @@ void Boiler::process_UBAFactory(std::shared_ptr telegram) { return; } toggle_fetch(telegram->type_id, false); // only read once - uint8_t min, max, nomPower; + uint8_t min = 0; + uint8_t max = 0; + uint8_t nomPower = 0; telegram->read_value(nomPower, 4); telegram->read_value(min, 5); telegram->read_value(max, 6); @@ -1777,7 +1779,9 @@ void Boiler::process_UBAOutdoorTemp(std::shared_ptr telegram) { // UBASetPoint 0x1A void Boiler::process_UBASetPoints(std::shared_ptr telegram) { - uint8_t setFlowTemp_, setBurnPow_, wwSetBurnPow_; + uint8_t setFlowTemp_ = 0; + uint8_t setBurnPow_ = 0; + uint8_t wwSetBurnPow_ = 0; telegram->read_value(setFlowTemp_, 0); telegram->read_value(setBurnPow_, 1); telegram->read_value(wwSetBurnPow_, 2); @@ -2936,7 +2940,7 @@ bool Boiler::set_HpInLogic(const char * value, const int8_t id) { return true; } char option[] = {"xxxxxxxxxxxxxxx"}; - strncpy(option, value, strlen(value)); // copy without termination + strncpy(option, value, strlen(option)); // copy without termination // inputs 1,2,3 [] if (id < 4) { uint8_t index[] = {0, 3, 6, 9, 12, 15, 18, 21, 24, 39, 36, 30}; diff --git a/src/test/test.cpp b/src/test/test.cpp index c666daea0..73a834cbe 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -99,9 +99,10 @@ bool Test::test(const std::string & cmd, int8_t id1, int8_t id2) { if (cmd == "2thermostats") { EMSESP::logger().notice("Testing with multiple thermostats..."); - add_device(0x08, 123); // GB072 + add_device(0x08, 123); // GB072 boiler + add_device(0x10, 158); // RC310 - add_device(0x18, 157); // Bosch CR100 + add_device(0x19, 157); // RC200 // Boiler -> Me, UBAMonitorFast(0x18), telegram: 08 00 18 00 00 02 5A 73 3D 0A 10 65 40 02 1A 80 00 01 E1 01 76 0E 3D 48 00 C9 44 02 00 (#data=25) uart_telegram({0x08, 0x00, 0x18, 0x00, 0x00, 0x02, 0x5A, 0x73, 0x3D, 0x0A, 0x10, 0x65, 0x40, 0x02, 0x1A, @@ -122,7 +123,7 @@ bool Test::test(const std::string & cmd, int8_t id1, int8_t id2) { // 2nd thermostat on HC2 // Thermostat RC300Monitor(0x02A6) - uart_telegram({0x98, 0x00, 0xFF, 0x00, 0x01, 0xA6, 0x00, 0xCF, 0x21, 0x2E, 0x00, 0x00, 0x2E, 0x24, + uart_telegram({0x99, 0x00, 0xFF, 0x00, 0x01, 0xA6, 0x00, 0xCF, 0x21, 0x2E, 0x00, 0x00, 0x2E, 0x24, 0x03, 0x25, 0x03, 0x03, 0x01, 0x03, 0x25, 0x00, 0xC8, 0x00, 0x00, 0x11, 0x01, 0x03}); return true; @@ -616,9 +617,30 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const if (command == "2thermostats") { shell.printfln("Testing multiple thermostats..."); + // adds hc1=(0x10, 158) RC310 and hc2=(0x19, 157) RC200 test("2thermostats"); - // shell.invoke_command("show values"); + shell.invoke_command("show values"); // shell.invoke_command("show devices"); + + AsyncWebServerRequest request; + request.method(HTTP_GET); + + request.url("/api/thermostat"); + EMSESP::webAPIService.webAPIService(&request); + Serial.println(); + + request.url("/api/thermostat/hc1/entities"); + EMSESP::webAPIService.webAPIService(&request); + Serial.println(); + + + request.url("/api/thermostat/hc2/entities"); + EMSESP::webAPIService.webAPIService(&request); + Serial.println(); + + request.url("/api/thermostat/entities"); + EMSESP::webAPIService.webAPIService(&request); + ok = true; } diff --git a/src/version.h b/src/version.h index 15ebda94d..38c97aac0 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.7.2-dev.15" +#define EMSESP_APP_VERSION "3.7.2-dev.16"