From c44cb7e7fdcdb5cc26a1cc823e1fb21bf424afa5 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 24 Feb 2025 21:37:02 +0100 Subject: [PATCH 1/5] add comments --- src/devices/thermostat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 7261cc85d..0b48649fc 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1986,6 +1986,8 @@ bool Thermostat::set_brightness(const char * value, const int8_t id) { return true; } +// thermostat/hc/remotetemp +// value of -1 to turn off bool Thermostat::set_remotetemp(const char * value, const int8_t id) { float f; if (!Helpers::value2temperature(value, f)) { @@ -2147,11 +2149,15 @@ bool Thermostat::set_control(const char * value, const int8_t id) { } uint8_t ctrl; + // Junkers + // 1-FB10, 2-FB100 if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS && !has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) { if (Helpers::value2enum(value, ctrl, FL_(enum_j_control))) { write_command(set_typeids[hc->hc()], 1, ctrl); return true; } + // BC400 + // 1-RC100, 2-RC100H, 3-RC200 } else if (model() == EMSdevice::EMS_DEVICE_FLAG_BC400) { if (Helpers::value2enum(value, ctrl, FL_(enum_control2))) { write_command(hpmode_typeids[hc->hc()], 3, ctrl); @@ -2170,6 +2176,8 @@ bool Thermostat::set_control(const char * value, const int8_t id) { } return true; } + // RC100 or RC300 + // 1-RC200, 2-RC100, 3-RC100H } else if (isRC300() || model() == EMSdevice::EMS_DEVICE_FLAG_RC100) { if (Helpers::value2enum(value, ctrl, FL_(enum_control1))) { write_command(hpmode_typeids[hc->hc()], 3, ctrl); From 08b0ddbb7ffb12317cfbcc209d648714689b3943 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 24 Feb 2025 21:37:13 +0100 Subject: [PATCH 2/5] update packages --- interface/package.json | 4 +- interface/yarn.lock | 126 ++++++++++++++++++++--------------------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/interface/package.json b/interface/package.json index a58f04962..e8d9323bb 100644 --- a/interface/package.json +++ b/interface/package.json @@ -36,7 +36,7 @@ "react-dom": "^19.0.0", "react-icons": "^5.5.0", "react-router": "^7.2.0", - "react-toastify": "^11.0.3", + "react-toastify": "^11.0.5", "typesafe-i18n": "^5.26.2", "typescript": "^5.7.3" }, @@ -57,7 +57,7 @@ "prettier": "^3.5.2", "rollup-plugin-visualizer": "^5.14.0", "terser": "^5.39.0", - "typescript-eslint": "8.24.1", + "typescript-eslint": "8.25.0", "vite": "^6.1.1", "vite-plugin-imagemin": "^0.6.1", "vite-tsconfig-paths": "^5.1.4" diff --git a/interface/yarn.lock b/interface/yarn.lock index 35deac78f..1a9e5e42a 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1467,15 +1467,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.24.1" +"@typescript-eslint/eslint-plugin@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.25.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.24.1" - "@typescript-eslint/type-utils": "npm:8.24.1" - "@typescript-eslint/utils": "npm:8.24.1" - "@typescript-eslint/visitor-keys": "npm:8.24.1" + "@typescript-eslint/scope-manager": "npm:8.25.0" + "@typescript-eslint/type-utils": "npm:8.25.0" + "@typescript-eslint/utils": "npm:8.25.0" + "@typescript-eslint/visitor-keys": "npm:8.25.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -1484,64 +1484,64 @@ __metadata: "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/fe5f56f248370f40322a7cb2d96fbab724a7a8892895e3d41027c9a1df309916433633e04df84a1d3f9535d282953738b1ad627d8af37ab288a39a6e411afd76 + checksum: 10c0/11d63850f5f03b29cd31166f8da111788dc74e46877c2e16a5c488d6c4aa4b6c68c0857b9a396ad920aa7f0f3e7166f4faecbb194c19cd2bb9d3f687c5d2b292 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/parser@npm:8.24.1" +"@typescript-eslint/parser@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/parser@npm:8.25.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.24.1" - "@typescript-eslint/types": "npm:8.24.1" - "@typescript-eslint/typescript-estree": "npm:8.24.1" - "@typescript-eslint/visitor-keys": "npm:8.24.1" + "@typescript-eslint/scope-manager": "npm:8.25.0" + "@typescript-eslint/types": "npm:8.25.0" + "@typescript-eslint/typescript-estree": "npm:8.25.0" + "@typescript-eslint/visitor-keys": "npm:8.25.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/9de557698c8debf3de06b6adf6aa06a8345e0e38600e5ccbeda62270d1a4a757dfa191db89d4e86cf373103a11bef1965c9d9889f622c51f4f26d1bf12394ae3 + checksum: 10c0/9a54539ba297791f23093ff42a885cc57d36b26205d7a390e114d1f01cc584ce91ac6ead01819daa46b48f873cac6c829fcf399a436610bdbfa98e5cd78148a2 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/scope-manager@npm:8.24.1" +"@typescript-eslint/scope-manager@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/scope-manager@npm:8.25.0" dependencies: - "@typescript-eslint/types": "npm:8.24.1" - "@typescript-eslint/visitor-keys": "npm:8.24.1" - checksum: 10c0/779880743ed7ab67fe477f1ad5648bbd77ad69b4663b5a42024112004c8f231049b1e4eeb67e260005769c3bb005049e00a80b885e19d593ffb080bd39f4fa94 + "@typescript-eslint/types": "npm:8.25.0" + "@typescript-eslint/visitor-keys": "npm:8.25.0" + checksum: 10c0/0a53a07873bdb569be38053ec006009cc8ba6b12c538b6df0935afd18e431cb17da1eb15b0c9cd267ac211c47aaa44fbc8d7ff3b7b44ff711621ff305fa3b355 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/type-utils@npm:8.24.1" +"@typescript-eslint/type-utils@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/type-utils@npm:8.25.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.24.1" - "@typescript-eslint/utils": "npm:8.24.1" + "@typescript-eslint/typescript-estree": "npm:8.25.0" + "@typescript-eslint/utils": "npm:8.25.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^2.0.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/ba248bc12068383374d9d077f9cca1815f347ea008d04d08ad7a54dbef70189a0da7872246f8369e6d30938fa7e408dadcda0ae71041be68fc836c886dd9c3ab + checksum: 10c0/b7477a2d239cfd337f7d28641666763cf680a43a8d377a09dc42415f715670d35fbb4e772e103dfe8cd620c377e66bce740106bb3983ee65a739c28fab7325d1 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/types@npm:8.24.1" - checksum: 10c0/ebb40ce16c746ef236dbcc25cb2e6950753ca6fb34d04ed7d477016370de1fdaf7402ed4569673c6ff14bf60af7124ff45c6ddd9328d2f8c94dc04178368e2a3 +"@typescript-eslint/types@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/types@npm:8.25.0" + checksum: 10c0/b39addbee4be4d66e3089c2d01f9f1d69cedc13bff20e4fa9ed0ca5a0e7591d7c6e41ab3763c8c35404f971bc0fbf9f7867dbc2832740e5b63ee0049d60289f5 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.24.1" +"@typescript-eslint/typescript-estree@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.25.0" dependencies: - "@typescript-eslint/types": "npm:8.24.1" - "@typescript-eslint/visitor-keys": "npm:8.24.1" + "@typescript-eslint/types": "npm:8.25.0" + "@typescript-eslint/visitor-keys": "npm:8.25.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -1550,32 +1550,32 @@ __metadata: ts-api-utils: "npm:^2.0.1" peerDependencies: typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/8eeeae6e8de1cd83f2eddd52293e9c31a655e0974cc2d410f00ba2b6fd6bb9aec1c346192d5784d64d0d1b15a55e56e35550788c04dda87e0f1a99b21a3eb709 + checksum: 10c0/fc9de1c4f6ab81fb80b632dedef84d1ecf4c0abdc5f5246698deb6d86d5c6b5d582ef8a44fdef445bf7fbfa6658db516fe875c9d7c984bf4802e3a508b061856 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/utils@npm:8.24.1" +"@typescript-eslint/utils@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/utils@npm:8.25.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.24.1" - "@typescript-eslint/types": "npm:8.24.1" - "@typescript-eslint/typescript-estree": "npm:8.24.1" + "@typescript-eslint/scope-manager": "npm:8.25.0" + "@typescript-eslint/types": "npm:8.25.0" + "@typescript-eslint/typescript-estree": "npm:8.25.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/b3300d5c7e18ec524a46bf683052539f24df0d8c709e39e3bde9dfc6c65180610c46b875f1f4eaad5e311193a56acdfd7111a73f1e8aec4108e9cd19561bf8b8 + checksum: 10c0/cd15c4919f02899fd3975049a0a051a1455332a108c085a3e90ae9872e2cddac7f20a9a2c616f1366fca84274649e836ad6a437c9c5ead0bdabf5a123d12403f languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.24.1": - version: 8.24.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.24.1" +"@typescript-eslint/visitor-keys@npm:8.25.0": + version: 8.25.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.25.0" dependencies: - "@typescript-eslint/types": "npm:8.24.1" + "@typescript-eslint/types": "npm:8.25.0" eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/ba09412fb4b1605aa73c890909c9a8dba2aa72e00ccd7d69baad17c564eedd77f489a06b1686985c7f0c49724787b82d76dcf4c146c4de44ef2c8776a9b6ad2b + checksum: 10c0/7eb84c5899a25b1eb89d3c3f4be3ff18171f934669c57e2530b6dfa5fdd6eaae60629f3c89d06f4c8075fd1c701de76c0b9194e2922895c661ab6091e48f7db9 languageName: node linkType: hard @@ -1612,12 +1612,12 @@ __metadata: react-dom: "npm:^19.0.0" react-icons: "npm:^5.5.0" react-router: "npm:^7.2.0" - react-toastify: "npm:^11.0.3" + react-toastify: "npm:^11.0.5" rollup-plugin-visualizer: "npm:^5.14.0" terser: "npm:^5.39.0" typesafe-i18n: "npm:^5.26.2" typescript: "npm:^5.7.3" - typescript-eslint: "npm:8.24.1" + typescript-eslint: "npm:8.25.0" vite: "npm:^6.1.1" vite-plugin-imagemin: "npm:^0.6.1" vite-tsconfig-paths: "npm:^5.1.4" @@ -5621,15 +5621,15 @@ __metadata: languageName: node linkType: hard -"react-toastify@npm:^11.0.3": - version: 11.0.3 - resolution: "react-toastify@npm:11.0.3" +"react-toastify@npm:^11.0.5": + version: 11.0.5 + resolution: "react-toastify@npm:11.0.5" dependencies: clsx: "npm:^2.1.1" peerDependencies: react: ^18 || ^19 react-dom: ^18 || ^19 - checksum: 10c0/23b989c6080bc5bf0eb0c1f7ed17bd53d067d9beb33baf93c520119cd69cf75c9f2d1ee524dfe6c8a2a5d326029772b576de00e018b379d03a0e37630b83adea + checksum: 10c0/50f5b81323ebb1957b2efd0963fac24aa1407155d16ab756ffd6d0f42f8af17e796b3958a9fce13e9d1b945d6c3a5a9ebf13529478474d8a2af4bf1dd0db67d2 languageName: node linkType: hard @@ -6646,17 +6646,17 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:8.24.1": - version: 8.24.1 - resolution: "typescript-eslint@npm:8.24.1" +"typescript-eslint@npm:8.25.0": + version: 8.25.0 + resolution: "typescript-eslint@npm:8.25.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.24.1" - "@typescript-eslint/parser": "npm:8.24.1" - "@typescript-eslint/utils": "npm:8.24.1" + "@typescript-eslint/eslint-plugin": "npm:8.25.0" + "@typescript-eslint/parser": "npm:8.25.0" + "@typescript-eslint/utils": "npm:8.25.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/5bcb6af12d04777ca04ca9300552e1c7410d640950945d854be41c264fdfe965ce40c0203336e073eb0697567d59043b3096dfed825e76fd7347081e9abf3b16 + checksum: 10c0/bdc1165be1bc60311045ca69aa1bff4bbb7feac906c6b7885c4bc859693d8ca1b88840a1ba10b226ca2343c4bd7388b7a36e5c787b0d7f1bab5ababb80e783cc languageName: node linkType: hard From 3f8add73ac8b4e6693ece7af1fe05924341b63ff Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 24 Feb 2025 21:37:29 +0100 Subject: [PATCH 3/5] adjust toast messages --- interface/src/App.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/interface/src/App.tsx b/interface/src/App.tsx index ae2023e73..7b4115c2c 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Slide, ToastContainer } from 'react-toastify'; +import { ToastContainer, Zoom } from 'react-toastify'; import AppRouting from 'AppRouting'; import CustomTheme from 'CustomTheme'; @@ -43,17 +43,20 @@ const App = () => { From b857c6eb44783c757c0cd0dc1de61e5d4e42c320 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 24 Feb 2025 21:37:56 +0100 Subject: [PATCH 4/5] change color or num entities so its consistent --- interface/src/app/main/Customizations.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/app/main/Customizations.tsx b/interface/src/app/main/Customizations.tsx index 3fcb102b0..da901c14b 100644 --- a/interface/src/app/main/Customizations.tsx +++ b/interface/src/app/main/Customizations.tsx @@ -593,7 +593,7 @@ const Customizations = () => { - + {LL.SHOWING()} {shown_data.length}/{deviceEntities.length}  {LL.ENTITIES(deviceEntities.length)} From ec11ae2ef777083e82643dc4e165f6c6c46f5001 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 24 Feb 2025 21:38:14 +0100 Subject: [PATCH 5/5] add search --- interface/src/app/main/Devices.tsx | 121 +++++++++++++++++++---------- 1 file changed, 79 insertions(+), 42 deletions(-) diff --git a/interface/src/app/main/Devices.tsx b/interface/src/app/main/Devices.tsx index 0e5dc71fe..8e5a2a8ad 100644 --- a/interface/src/app/main/Devices.tsx +++ b/interface/src/app/main/Devices.tsx @@ -19,6 +19,7 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; import KeyboardArrowDownOutlinedIcon from '@mui/icons-material/KeyboardArrowDownOutlined'; import KeyboardArrowUpOutlinedIcon from '@mui/icons-material/KeyboardArrowUpOutlined'; import PlayArrowIcon from '@mui/icons-material/PlayArrow'; +import SearchIcon from '@mui/icons-material/Search'; import StarIcon from '@mui/icons-material/Star'; import StarBorderOutlinedIcon from '@mui/icons-material/StarBorderOutlined'; import UnfoldMoreOutlinedIcon from '@mui/icons-material/UnfoldMoreOutlined'; @@ -32,9 +33,12 @@ import { DialogTitle, Grid2 as Grid, IconButton, + InputAdornment, List, ListItem, ListItemText, + TextField, + ToggleButton, Typography } from '@mui/material'; @@ -81,6 +85,7 @@ const Devices = () => { const [deviceValueDialogOpen, setDeviceValueDialogOpen] = useState(false); const [showDeviceInfo, setShowDeviceInfo] = useState(false); const [selectedDevice, setSelectedDevice] = useState(); + const [search, setSearch] = useState(''); const navigate = useNavigate(); @@ -591,8 +596,12 @@ const Devices = () => { ); const shown_data = onlyFav - ? deviceData.nodes.filter((dv) => hasMask(dv.id, DeviceEntityMask.DV_FAVORITE)) - : deviceData.nodes; + ? deviceData.nodes.filter( + (dv) => + hasMask(dv.id, DeviceEntityMask.DV_FAVORITE) && + dv.id.slice(2).includes(search) + ) + : deviceData.nodes.filter((dv) => dv.id.slice(2).includes(search)); const deviceIndex = coreData.devices.findIndex( (d) => d.id === device_select.state.id @@ -615,47 +624,11 @@ const Devices = () => { border: '1px solid #177ac9' }} > - - - {coreData.devices[deviceIndex].n} ( - {coreData.devices[deviceIndex].tn}) - - + - - {LL.SHOWING() + - ' ' + - shown_data.length + - '/' + - coreData.devices[deviceIndex].e + - ' ' + - LL.ENTITIES(shown_data.length)} - - setShowDeviceInfo(true)}> - - - - {me.admin && ( - - - - - - )} - - - - - - - setOnlyFav(!onlyFav)}> - {onlyFav ? ( - - ) : ( - - )} - - + + {coreData.devices[deviceIndex].n} ( + {coreData.devices[deviceIndex].tn}) @@ -665,6 +638,70 @@ const Devices = () => { + + { + setSearch(event.target.value); + }} + slotProps={{ + input: { + startAdornment: ( + + + + ) + } + }} + /> + + setShowDeviceInfo(true)}> + + + + {me.admin && ( + + + + + + )} + + + + + + + + { + setOnlyFav(!onlyFav); + }} + > + {onlyFav ? ( + + ) : ( + + )}{' '} + + + + +   + {LL.SHOWING() + + ' ' + + shown_data.length + + '/' + + coreData.devices[deviceIndex].e + + ' ' + + LL.ENTITIES(shown_data.length)} +