From 58aacc189fd8dba272e37b5bc6fd0d175c3b087c Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 16 Jul 2024 13:57:03 +0200 Subject: [PATCH 1/3] system/send: use busId if SRC is null --- src/telegram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram.cpp b/src/telegram.cpp index 5bc116c36..fc2183c94 100644 --- a/src/telegram.cpp +++ b/src/telegram.cpp @@ -475,7 +475,7 @@ void TxService::add(uint8_t operation, const uint8_t * data, const uint8_t lengt } // build header. src, dest and offset have fixed positions - uint8_t src = operation == Telegram::Operation::TX_RAW ? data[0] : ems_bus_id(); + uint8_t src = operation == Telegram::Operation::TX_RAW && data[0] ? data[0] : ems_bus_id(); uint8_t dest = data[1]; uint8_t offset = data[3]; From 54a023d8122ea6472c004e29444a41dcb65b9d2e Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 16 Jul 2024 19:08:05 +0200 Subject: [PATCH 2/3] update packages --- interface/package.json | 10 +- interface/yarn.lock | 225 +++++++++++++---------------------------- 2 files changed, 73 insertions(+), 162 deletions(-) diff --git a/interface/package.json b/interface/package.json index c6a239bdc..511b8fc51 100644 --- a/interface/package.json +++ b/interface/package.json @@ -26,8 +26,8 @@ "@alova/scene-react": "^1.6.1", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@mui/icons-material": "^5.16.1", - "@mui/material": "^5.16.1", + "@mui/icons-material": "^5.16.4", + "@mui/material": "^5.16.4", "@table-library/react-table-library": "4.1.7", "@types/lodash-es": "^4.17.12", "@types/node": "^20.14.10", @@ -44,7 +44,7 @@ "react-dom": "latest", "react-dropzone": "^14.2.3", "react-icons": "^5.2.1", - "react-router-dom": "^6.24.1", + "react-router-dom": "^6.25.0", "react-toastify": "^10.0.5", "typesafe-i18n": "^5.26.2", "typescript": "^5.5.3" @@ -62,9 +62,9 @@ "preact": "^10.22.1", "prettier": "^3.3.3", "rollup-plugin-visualizer": "^5.12.0", - "terser": "^5.31.2", + "terser": "^5.31.3", "typescript-eslint": "8.0.0-alpha.10", - "vite": "^5.3.3", + "vite": "^5.3.4", "vite-plugin-imagemin": "^0.6.1", "vite-tsconfig-paths": "^4.3.2" }, diff --git a/interface/yarn.lock b/interface/yarn.lock index f4ad26e87..2fc3b20ec 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1046,44 +1046,6 @@ __metadata: languageName: node linkType: hard -"@floating-ui/core@npm:^1.0.0": - version: 1.6.1 - resolution: "@floating-ui/core@npm:1.6.1" - dependencies: - "@floating-ui/utils": "npm:^0.2.0" - checksum: 10c0/7d78b3788d438807d3c1a52477ee1693a29b8a4416dd6e13761427925d9fba1d45c849527752d8fd9776842182d919fddf7ecbc34f3bf2de3bafa1717619a56f - languageName: node - linkType: hard - -"@floating-ui/dom@npm:^1.0.0": - version: 1.6.5 - resolution: "@floating-ui/dom@npm:1.6.5" - dependencies: - "@floating-ui/core": "npm:^1.0.0" - "@floating-ui/utils": "npm:^0.2.0" - checksum: 10c0/ebdc14806f786e60df8e7cc2c30bf9cd4d75fe734f06d755588bbdef2f60d0a0f21dffb14abdc58dea96e5577e2e366feca6d66ba962018efd1bc91a3ece4526 - languageName: node - linkType: hard - -"@floating-ui/react-dom@npm:^2.0.8": - version: 2.0.9 - resolution: "@floating-ui/react-dom@npm:2.0.9" - dependencies: - "@floating-ui/dom": "npm:^1.0.0" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10c0/d8cd1fb2b8a5012ca692d6f677a0af923ef81131f69accea8ce8b5413202ab4c3c79e6eda1446f4dad06a2dfd596ece748c562ba28c289678a856755db4f528f - languageName: node - linkType: hard - -"@floating-ui/utils@npm:^0.2.0": - version: 0.2.2 - resolution: "@floating-ui/utils@npm:0.2.2" - checksum: 10c0/b2becdcafdf395af1641348da0031ff1eaad2bc60c22e14bd3abad4acfe2c8401e03097173d89a2f646a99b75819a78ef21ebb2572cab0042a56dd654b0065cd - languageName: node - linkType: hard - "@humanwhocodes/module-importer@npm:^1.0.1": version: 1.0.1 resolution: "@humanwhocodes/module-importer@npm:1.0.1" @@ -1164,38 +1126,16 @@ __metadata: languageName: node linkType: hard -"@mui/base@npm:5.0.0-beta.40": - version: 5.0.0-beta.40 - resolution: "@mui/base@npm:5.0.0-beta.40" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@floating-ui/react-dom": "npm:^2.0.8" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - "@popperjs/core": "npm:^2.11.8" - clsx: "npm:^2.1.0" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/631b4ee389e23d82c16c5845c2849af43000f52f1def639b9bb5bf39fd09f4eab93787d32950b715a7de7b689faab53bb7c9a78f6fd12b663876cf8128d45de1 +"@mui/core-downloads-tracker@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/core-downloads-tracker@npm:5.16.4" + checksum: 10c0/639099e14132a66a472a92432d2b0fca7c2ebb718afcc22b4a1ebd537fe34f96fed57d95e84525461d1ab2a41672a14a746da7de8060ed3a60fafc0beadb3ebb languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/core-downloads-tracker@npm:5.16.1" - checksum: 10c0/2bdad71c53d65e59eba4889e6d3270b964200dddae448ae7d095de7130a4ec82e7fccdf8668488996e22993b653b91544195c10eeb996dc1c3a6c7a34c88c9c4 - languageName: node - linkType: hard - -"@mui/icons-material@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/icons-material@npm:5.16.1" +"@mui/icons-material@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/icons-material@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" peerDependencies: @@ -1205,20 +1145,20 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/90c235ee065a18e07e2c3059dcfe15ef880c5f936cde538c41ba3dfab83bbb963093a28603852647e0ef05e0a233e50ea4cd932d9ae58dcf803dadc16dd603af + checksum: 10c0/e6cd3b64dd02d21182f0a0509d412a084fdea8752e4a202907cd1cf92a5476ec87e6074a409ebcb9a35e29c91d20729e9eddd9530c1d3755a93b0f56cf3be519 languageName: node linkType: hard -"@mui/material@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/material@npm:5.16.1" +"@mui/material@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/material@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" - "@mui/base": "npm:5.0.0-beta.40" - "@mui/core-downloads-tracker": "npm:^5.16.1" - "@mui/system": "npm:^5.16.1" + "@mui/core-downloads-tracker": "npm:^5.16.4" + "@mui/system": "npm:^5.16.4" "@mui/types": "npm:^7.2.15" - "@mui/utils": "npm:^5.16.1" + "@mui/utils": "npm:^5.16.4" + "@popperjs/core": "npm:^2.11.8" "@types/react-transition-group": "npm:^4.4.10" clsx: "npm:^2.1.0" csstype: "npm:^3.1.3" @@ -1238,16 +1178,16 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10c0/13baf645c276a97fade56ccce83ceaea95ee71cff56fea407cce576ff96b81115dacc5dd3d30a250047fc104e5ce63c28bdc095351e567407f9944af9d9daa83 + checksum: 10c0/ab12f3219d3a6b5dd3564e7b3826e283167c64b947774e3e35301419d35cd9875d45d8625e8c145d59fe38c7a7ef110251b11a47b94e5468fa96afbb179d2e1f languageName: node linkType: hard -"@mui/private-theming@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/private-theming@npm:5.16.1" +"@mui/private-theming@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/private-theming@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" - "@mui/utils": "npm:^5.16.1" + "@mui/utils": "npm:^5.16.4" prop-types: "npm:^15.8.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 @@ -1255,13 +1195,13 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/8a95c7d59be1fd3ba8e49addb76870d5efe675a8f61ecb1558306053f0c71abad22f08d551e55fc48d5c012b0d1f1aefe924e0d3395485451ad1fe92a47adab2 + checksum: 10c0/3c191afe4025cac9bbdecae1ea6232155e71c45c2929acce1ce31dd4c913800d6e9eaa38897e91dd7bff74529de3247768d26120c54c33ef69e40136c9ec6b04 languageName: node linkType: hard -"@mui/styled-engine@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/styled-engine@npm:5.16.1" +"@mui/styled-engine@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/styled-engine@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" "@emotion/cache": "npm:^11.11.0" @@ -1276,19 +1216,19 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 10c0/fc011390c64ff970ad095e0a9e18f5ad777491fd49974233137b673fa9698d178c6b5f6346a28c1d8a1718dd453879ded4198bbc73e73dfcc8d5a90ea17760f6 + checksum: 10c0/5dbd656aedfbf308dbbbb651a589c12b85ba1af2b6b351a657ee5af1210eab9629cee0781b2dc33b14b0a9482f7a6fa6e8b695d94f7cc5f1f7df7efe88034372 languageName: node linkType: hard -"@mui/system@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/system@npm:5.16.1" +"@mui/system@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/system@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" - "@mui/private-theming": "npm:^5.16.1" - "@mui/styled-engine": "npm:^5.16.1" + "@mui/private-theming": "npm:^5.16.4" + "@mui/styled-engine": "npm:^5.16.4" "@mui/types": "npm:^7.2.15" - "@mui/utils": "npm:^5.16.1" + "@mui/utils": "npm:^5.16.4" clsx: "npm:^2.1.0" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -1304,19 +1244,7 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10c0/17b76d32d4ee1800910993d7309c36a8ea1982890ee952d1a301e5125a8ebe7bcdf3d8930fb385dd79712c4e3ea9e9e9547fac23b79dc874b60b33b0dbdffa8a - languageName: node - linkType: hard - -"@mui/types@npm:^7.2.14": - version: 7.2.14 - resolution: "@mui/types@npm:7.2.14" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/d4e0a9fce4bddfb5e0b7b6be1b15b591df33bb90ef0087e4bd5fe85f00f62776c7ed0e4698e7fb43213e1f04064aac1695b53ca52aaeaee7dbba248a792bdd1e + checksum: 10c0/1665e2f9b6b30f2177b49b19bc778980e3f076167a1436f8b8bf513075674192e33684ab3a9262144f6008d3f9521ac4c073f5e15abfb4c989efc78cd09f8ecc languageName: node linkType: hard @@ -1332,30 +1260,13 @@ __metadata: languageName: node linkType: hard -"@mui/utils@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/utils@npm:5.15.14" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@types/prop-types": "npm:^15.7.11" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10c0/36265988477637a011361456b40929de928e215466b72e6c48673a2088610d83e09960a3e0608100448910683079fc80a5e11dbf49b9ce7109dd8e49403ae3b3 - languageName: node - linkType: hard - -"@mui/utils@npm:^5.16.1": - version: 5.16.1 - resolution: "@mui/utils@npm:5.16.1" +"@mui/utils@npm:^5.16.4": + version: 5.16.4 + resolution: "@mui/utils@npm:5.16.4" dependencies: "@babel/runtime": "npm:^7.23.9" "@types/prop-types": "npm:^15.7.12" + clsx: "npm:^2.1.1" prop-types: "npm:^15.8.1" react-is: "npm:^18.3.1" peerDependencies: @@ -1364,7 +1275,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/9a64bbfcd84474c9d18a79f3e236c4145d43983c3b1810cbcb6cf9d37d36f1bfeeb5a4f9ebf907050364b0a991caba28c481d2e6b2818e4e1c22729eeed24505 + checksum: 10c0/f3d6c22a61440b76c3396c437669668e5733db7fcbb82de571a98b9d8259d690b6817081269e961cb20a67a28bedcfa85f234342ee560daf6a981fcce85ab088 languageName: node linkType: hard @@ -1503,10 +1414,10 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.17.1": - version: 1.17.1 - resolution: "@remix-run/router@npm:1.17.1" - checksum: 10c0/bee1631feb03975b64e1c7b574da432a05095dda2ff0f164c737e4952841a58d7b9861de87bd13a977fd970c74dcf8c558fc2d26c6ec01a9ae9041b1b4430869 +"@remix-run/router@npm:1.18.0": + version: 1.18.0 + resolution: "@remix-run/router@npm:1.18.0" + checksum: 10c0/3ec7e441a0e54932a3d3bf932432094420f2c117715d80a5454bc7e55d13b91250749942aab032cd07aee191f1c1de33fede8682025bfd3a453dd207c016e140 languageName: node linkType: hard @@ -1883,7 +1794,7 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.11, @types/prop-types@npm:^15.7.12": +"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.12": version: 15.7.12 resolution: "@types/prop-types@npm:15.7.12" checksum: 10c0/1babcc7db6a1177779f8fde0ccc78d64d459906e6ef69a4ed4dd6339c920c2e05b074ee5a92120fe4e9d9f1a01c952f843ebd550bee2332fc2ef81d1706878f8 @@ -2105,8 +2016,8 @@ __metadata: "@emotion/react": "npm:^11.11.4" "@emotion/styled": "npm:^11.11.5" "@eslint/js": "npm:^9.7.0" - "@mui/icons-material": "npm:^5.16.1" - "@mui/material": "npm:^5.16.1" + "@mui/icons-material": "npm:^5.16.4" + "@mui/material": "npm:^5.16.4" "@preact/compat": "npm:^17.1.2" "@preact/preset-vite": "npm:^2.9.0" "@table-library/react-table-library": "npm:4.1.7" @@ -2132,14 +2043,14 @@ __metadata: react-dom: "npm:latest" react-dropzone: "npm:^14.2.3" react-icons: "npm:^5.2.1" - react-router-dom: "npm:^6.24.1" + react-router-dom: "npm:^6.25.0" react-toastify: "npm:^10.0.5" rollup-plugin-visualizer: "npm:^5.12.0" - terser: "npm:^5.31.2" + terser: "npm:^5.31.3" typesafe-i18n: "npm:^5.26.2" typescript: "npm:^5.5.3" typescript-eslint: "npm:8.0.0-alpha.10" - vite: "npm:^5.3.3" + vite: "npm:^5.3.4" vite-plugin-imagemin: "npm:^0.6.1" vite-tsconfig-paths: "npm:^4.3.2" languageName: unknown @@ -2694,7 +2605,7 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.1.0": +"clsx@npm:^2.1.0, clsx@npm:^2.1.1": version: 2.1.1 resolution: "clsx@npm:2.1.1" checksum: 10c0/c4c8eb865f8c82baab07e71bfa8897c73454881c4f99d6bc81585aecd7c441746c1399d08363dc096c550cceaf97bd4ce1e8854e1771e9998d9f94c4fe075839 @@ -6267,34 +6178,34 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^18.2.0, react-is@npm:^18.3.1": +"react-is@npm:^18.3.1": version: 18.3.1 resolution: "react-is@npm:18.3.1" checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072 languageName: node linkType: hard -"react-router-dom@npm:^6.24.1": - version: 6.24.1 - resolution: "react-router-dom@npm:6.24.1" +"react-router-dom@npm:^6.25.0": + version: 6.25.0 + resolution: "react-router-dom@npm:6.25.0" dependencies: - "@remix-run/router": "npm:1.17.1" - react-router: "npm:6.24.1" + "@remix-run/router": "npm:1.18.0" + react-router: "npm:6.25.0" peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: 10c0/458c6c539304984c47b0ad8d5d5b1f8859cc0845e47591d530cb4fcb13498f70a89b42bc4daeea55d57cfa08408b453bcf601cabb2c987f554cdcac13805caa8 + checksum: 10c0/a837686f3ce9a12224d97e9b200a0e38575f32a568c80d5d8470e8f14208986ab266c1d6ec95e903ab3b1c3d1273cfe886401c33bdef393aa2c7eef4d6987692 languageName: node linkType: hard -"react-router@npm:6.24.1": - version: 6.24.1 - resolution: "react-router@npm:6.24.1" +"react-router@npm:6.25.0": + version: 6.25.0 + resolution: "react-router@npm:6.25.0" dependencies: - "@remix-run/router": "npm:1.17.1" + "@remix-run/router": "npm:1.18.0" peerDependencies: react: ">=16.8" - checksum: 10c0/f50c78ca52c5154ab933c17708125e8bf71ccf2072993a80302526a0a23db9ceac6e36d5c891d62ccd16f13e60cd1b6533a2036523d1b09e0148ac49e34b2e83 + checksum: 10c0/82a7e9de69f444c57bbece2904518f1279a8ef80563172fff36cec3b74d854ae5702c560b6f9e02a5439b756f884dc16b81996ba613b3b6c0b31cd16bd1bc189 languageName: node linkType: hard @@ -7162,9 +7073,9 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.31.2": - version: 5.31.2 - resolution: "terser@npm:5.31.2" +"terser@npm:^5.31.3": + version: 5.31.3 + resolution: "terser@npm:5.31.3" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -7172,7 +7083,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10c0/5b72f58421f69267f67cb60cf4398282afcdec697e9b6f1909035cdf52d9960226fc1df5968e27ba96736b7a7ba76609d0b7b060ee5da7769553940726059b63 + checksum: 10c0/eb2b525dada9febd3db74e94bd295f9cd7abd809e4f9c6bbc795a3048ad50fd327c15eab99db383fa820239680eef6d2dbd7dc05361769c204ddee5cf684d41e languageName: node linkType: hard @@ -7524,9 +7435,9 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.3.3": - version: 5.3.3 - resolution: "vite@npm:5.3.3" +"vite@npm:^5.3.4": + version: 5.3.4 + resolution: "vite@npm:5.3.4" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" @@ -7560,7 +7471,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/a796872e1d11875d994615cd00da185c80eeb7753034d35c096050bf3c269c02004070cf623c5fe2a4a90ea2f12488e6f9d13933ec810f117f1b931e1b5e3385 + checksum: 10c0/604a1c8698bcf09d6889533c552f20137c80cb5027e9e7ddf6215d51e3df763414f8712168c22b3c8c16383aff9447094c05f21d7cca3c115874ff9d12e1538e languageName: node linkType: hard From 711d1dfe94755f25f4c1fa53786a5a73f1a17fda Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 16 Jul 2024 19:09:59 +0200 Subject: [PATCH 3/3] remote RT800 #1867 --- src/devices/thermostat.cpp | 9 ++++++- src/locale_common.h | 3 ++- src/roomcontrol.cpp | 53 ++++++++++++++++++++++++++------------ src/roomcontrol.h | 2 +- 4 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index f0118879f..a8c36e1a2 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1913,6 +1913,8 @@ bool Thermostat::set_remotetemp(const char * value, const int8_t id) { Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); // RC100H } else if (hc->control == 2) { // RC100(2) Roomctrl::set_remotetemp(Roomctrl::RC100, hc->hc(), hc->remotetemp); // RC100 + } else if (hc->control == 6) { + Roomctrl::set_remotetemp(Roomctrl::RT800, hc->hc(), hc->remotetemp); } else { hc->remotetemp = EMS_VALUE_INT16_NOTSET; Roomctrl::set_remotetemp(0, hc->hc(), EMS_VALUE_INT16_NOTSET); // unknown remote set, switch off @@ -1940,9 +1942,12 @@ bool Thermostat::set_remotehum(const char * value, const int8_t id) { hc->remotehum = h; } - if (hc->control == 3 && isRC300()) { + if (hc->control == 3) { Roomctrl::set_remotehum(Roomctrl::RC100H, hc->hc(), hc->remotehum); // RC100H return true; + } else if (hc->control == 6) { + Roomctrl::set_remotehum(Roomctrl::RT800, hc->hc(), hc->remotehum); + return true; } Roomctrl::set_remotehum(Roomctrl::RC100H, hc->hc(), EMS_VALUE_UINT8_NOTSET); // RC100H return false; @@ -2040,6 +2045,8 @@ bool Thermostat::set_control(const char * value, const int8_t id) { Roomctrl::set_remotetemp(Roomctrl::RC100, hc->hc(), hc->remotetemp); } else if (ctrl == 3) { Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); + } else if (ctrl == 6) { + Roomctrl::set_remotetemp(Roomctrl::RT800, hc->hc(), hc->remotetemp); } else { hc->remotetemp = EMS_VALUE_INT16_NOTSET; Roomctrl::set_remotetemp(0, hc->hc(), hc->remotetemp); diff --git a/src/locale_common.h b/src/locale_common.h index f2d55f275..d1f7f9b14 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -183,6 +183,7 @@ MAKE_NOTRANSLATION(rc100h, "RC100H") MAKE_NOTRANSLATION(tc100, "TC100") MAKE_NOTRANSLATION(rc120rf, "RC120RF") MAKE_NOTRANSLATION(rc220, "RC220") +MAKE_NOTRANSLATION(rt800, "RT800") MAKE_NOTRANSLATION(single, "single") MAKE_NOTRANSLATION(dash, "-") MAKE_NOTRANSLATION(BLANK, "") @@ -346,7 +347,7 @@ MAKE_ENUM(enum_j_control, FL_(off), FL_(fb10), FL_(fb100)) MAKE_ENUM(enum_roomsensor, FL_(extern), FL_(intern), FL_(auto)) MAKE_ENUM(enum_roominfluence, FL_(off), FL_(intern), FL_(extern), FL_(auto)) MAKE_ENUM(enum_control1, FL_(rc310), FL_(rc200), FL_(rc100), FL_(rc100h), FL_(tc100)) -MAKE_ENUM(enum_control2, FL_(off), FL_(dash), FL_(rc100), FL_(rc100h), FL_(dash), FL_(rc120rf), FL_(rc220), FL_(single)) // BC400 +MAKE_ENUM(enum_control2, FL_(off), FL_(dash), FL_(rc100), FL_(rc100h), FL_(dash), FL_(rc120rf), FL_(rt800), FL_(single)) // BC400 MAKE_ENUM(enum_switchmode, FL_(off), FL_(eco), FL_(comfort), FL_(heat)) diff --git a/src/roomcontrol.cpp b/src/roomcontrol.cpp index 1e958d206..28ee615d9 100644 --- a/src/roomcontrol.cpp +++ b/src/roomcontrol.cpp @@ -47,7 +47,7 @@ void Roomctrl::set_remotetemp(const uint8_t type, const uint8_t hc, const int16_ sendtype_[hc] = SendType::TEMP; return; } - if (hc >= HCS || (type != RC20 && type != FB10 && type != RC100H && type != SENSOR && type != RC200 && type != RC100)) { + if (hc >= HCS || !type) { return; } if (remotetemp_[hc] != temp) { @@ -61,7 +61,7 @@ void Roomctrl::set_remotetemp(const uint8_t type, const uint8_t hc, const int16_ // set humidity for RC100H emulation void Roomctrl::set_remotehum(const uint8_t type, const uint8_t hc, const int8_t hum) { - if (hc >= HCS || (type != RC100H) || type != type_[hc]) { + if (hc >= HCS || type != type_[hc]) { return; } if (remotehum_[hc] != hum) { @@ -75,7 +75,8 @@ uint8_t Roomctrl::get_hc(uint8_t addr) { addr &= 0x7F; if (addr >= 0x40 && addr <= 0x44 && type_[addr - 0x40] == SENSOR) { return addr - 0x40; // SENSOR - } else if (addr >= 0x38 && addr <= 0x3B && (type_[addr - 0x38] == RC100H || type_[addr - 0x38] == RC200 || type_[addr - 0x38] == RC100)) { + } else if (addr >= 0x38 && addr <= 0x3B + && (type_[addr - 0x38] == RC100H || type_[addr - 0x38] == RC200 || type_[addr - 0x38] == RC100 || type_[addr - 0x38] == RT800)) { return addr - 0x38; // RC100H, RC200 } else if (addr >= 0x18 && addr <= 0x1B && (type_[addr - 0x18] == RC20 || type_[addr - 0x18] == FB10)) { return addr - 0x18; // RC20, FB10 @@ -107,7 +108,7 @@ void Roomctrl::send(uint8_t addr) { EMSESP::logger().warning("remotetemp timeout hc%d, stop sending roomtemperature to thermostat", hc); } if (switch_off_[hc] || (uuid::get_uptime() - send_time_[hc]) > SEND_INTERVAL) { // check interval - if (type_[hc] == RC100H) { + if (type_[hc] == RC100H || type_[hc] == RT800) { if (sendtype_[hc] == SendType::HUMI) { // send humidity if (switch_off_[hc]) { remotehum_[hc] = EMS_VALUE_UINT8_NOTSET; @@ -247,6 +248,12 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) { data[9] = EMSbus::calculate_crc(data, 9); // apppend CRC EMSuart::transmit(data, 10); return; + } else if (type_[hc] == RT800) { + data[5] = 21; // version 21.03 + data[6] = 3; + data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC + EMSuart::transmit(data, 8); + return; } } @@ -279,7 +286,7 @@ void Roomctrl::unknown(uint8_t addr, uint8_t dst, uint8_t offset, uint8_t typeh, * send the room temperature in message 0xAF */ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) { - uint8_t data[12]; + uint8_t data[14]; data[0] = addr | EMSbus::ems_mask(); data[1] = dst & 0x7F; if (type_[hc] == RC20) { // RC20, telegram 0xAF @@ -330,6 +337,20 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) { data[7] = (uint8_t)(remotetemp_[hc] & 0xFF); data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC EMSuart::transmit(data, 9); + } else if (type_[hc] == RT800) { // RC200, telegram 42B, ff + data[2] = 0xFF; + data[3] = 0; + data[4] = 3; + data[5] = 0x2B + hc; + data[6] = (uint8_t)(remotetemp_[hc] >> 8); + data[7] = (uint8_t)(remotetemp_[hc] & 0xFF); + uint16_t t1 = remotetemp_[hc] * 10 + 3; + data[8] = (uint8_t)(t1 >> 8); + data[9] = (uint8_t)(t1 & 0xFF); + data[10] = 1; // not sure what this is and if we need it, maybe mode? + data[11] = 9; // not sure what this is and if we need it, maybe mode? + data[12] = EMSbus::calculate_crc(data, 12); // apppend CRC + EMSuart::transmit(data, 13); } } @@ -339,18 +360,16 @@ void Roomctrl::humidity(uint8_t addr, uint8_t dst, uint8_t hc) { data[0] = addr | EMSbus::ems_mask(); data[1] = dst & 0x7F; uint16_t dew = calc_dew(remotetemp_[hc], remotehum_[hc]); - if (type_[hc] == RC100H) { // RC100H, telegram 47B - data[2] = 0xFF; - data[3] = 0; - data[4] = 3; - data[5] = 0x7B + hc; - data[6] = dew == EMS_VALUE_INT16_NOTSET ? EMS_VALUE_INT8_NOTSET : (uint8_t)((dew + 5) / 10); - data[7] = remotehum_[hc]; - data[8] = (uint8_t)(dew << 8); - data[9] = (uint8_t)(dew & 0xFF); - data[10] = EMSbus::calculate_crc(data, 10); // apppend CRC - EMSuart::transmit(data, 11); - } + data[2] = 0xFF; + data[3] = 0; + data[4] = 3; + data[5] = 0x7B + hc; + data[6] = dew == EMS_VALUE_INT16_NOTSET ? EMS_VALUE_INT8_NOTSET : (uint8_t)((dew + 5) / 10); + data[7] = remotehum_[hc]; + data[8] = (uint8_t)(dew << 8); + data[9] = (uint8_t)(dew & 0xFF); + data[10] = EMSbus::calculate_crc(data, 10); // apppend CRC + EMSuart::transmit(data, 11); } /** diff --git a/src/roomcontrol.h b/src/roomcontrol.h index 7aa682c79..be503b49d 100644 --- a/src/roomcontrol.h +++ b/src/roomcontrol.h @@ -25,7 +25,7 @@ namespace emsesp { class Roomctrl { public: // Product-Id of the remote - enum RemoteType : uint8_t { NONE = 0, RC20 = 113, FB10 = 109, RC100H = 200, SENSOR = 0x40, RC200 = 157, RC100 = 165 }; + enum RemoteType : uint8_t { NONE = 0, RC20 = 113, FB10 = 109, RC100H = 200, SENSOR = 0x40, RC200 = 157, RC100 = 165, RT800 = 3 }; static void send(uint8_t addr); static void check(uint8_t addr, const uint8_t * data, const uint8_t length);