diff --git a/interface/package.json b/interface/package.json index 92183700e..d18938043 100644 --- a/interface/package.json +++ b/interface/package.json @@ -21,13 +21,13 @@ "lint": "eslint . --fix" }, "dependencies": { - "@alova/adapter-xhr": "2.0.11", + "@alova/adapter-xhr": "2.1.0", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@mui/icons-material": "^6.2.0", - "@mui/material": "^6.2.0", + "@mui/icons-material": "^6.2.1", + "@mui/material": "^6.2.1", "@table-library/react-table-library": "4.1.7", - "alova": "3.2.6", + "alova": "3.2.7", "async-validator": "^4.2.5", "jwt-decode": "^4.0.0", "mime-types": "^2.1.35", @@ -36,7 +36,7 @@ "react-dom": "^19.0.0", "react-icons": "^5.4.0", "react-router": "^7.0.2", - "react-toastify": "^10.0.6", + "react-toastify": "^11.0.1", "typesafe-i18n": "^5.26.2", "typescript": "^5.7.2" }, @@ -48,7 +48,7 @@ "@trivago/prettier-plugin-sort-imports": "^5.2.0", "@types/formidable": "^3", "@types/node": "^22.10.2", - "@types/react": "^19.0.1", + "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2", "concurrently": "^9.1.0", "eslint": "^9.17.0", diff --git a/interface/src/App.tsx b/interface/src/App.tsx index f9f3a9a91..e25f48aa4 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -1,6 +1,5 @@ import { useEffect, useState } from 'react'; import { Slide, ToastContainer } from 'react-toastify'; -import 'react-toastify/dist/ReactToastify.min.css'; import AppRouting from 'AppRouting'; import CustomTheme from 'CustomTheme'; diff --git a/interface/yarn.lock b/interface/yarn.lock index 5ea66a0cf..229a282c3 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -5,21 +5,21 @@ __metadata: version: 8 cacheKey: 10c0 -"@alova/adapter-xhr@npm:2.0.11": - version: 2.0.11 - resolution: "@alova/adapter-xhr@npm:2.0.11" +"@alova/adapter-xhr@npm:2.1.0": + version: 2.1.0 + resolution: "@alova/adapter-xhr@npm:2.1.0" dependencies: - "@alova/shared": "npm:1.1.1" + "@alova/shared": "npm:1.1.2" peerDependencies: alova: ^3.0.20 - checksum: 10c0/798dd0794c30750f59859de684744f71705d25cbd97bf7f159fa024f8a729c94aff2050c3f3a3019466b9b964ea56241d1cfb6b0ea1f1b15ece37503f074ddd6 + checksum: 10c0/41cf62a5ed7fb654df8b201ce33c665950fde6b845b7c061a1b28132cfcc60b099ad20f807affb8dfbb4563439dc60b2c7c25126717137e1748cfa00436da01b languageName: node linkType: hard -"@alova/shared@npm:1.1.1": - version: 1.1.1 - resolution: "@alova/shared@npm:1.1.1" - checksum: 10c0/98aa4bb9d917532aabdf0c2e32fdd8b3708c8e5635a822ce87cff4b1617e8c282cf301c0ef73a352d16a3da9960446a94dea2b585ea805f5d7a92bb3a1e2af4b +"@alova/shared@npm:1.1.2": + version: 1.1.2 + resolution: "@alova/shared@npm:1.1.2" + checksum: 10c0/faa1f909255bd214570868a89bf29051fb3c80ccb818467a2a26e05309540acb688f59f6deb37679da9ec0e65f5782db125d76b4980d7e3a366d212f6b9e4219 languageName: node linkType: hard @@ -775,40 +775,40 @@ __metadata: languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/core-downloads-tracker@npm:6.2.0" - checksum: 10c0/5bdfb204859f004d631fcd2d97bcf0ec41ca17a7e4a453f89ecd8e8d460b3cd26c6eb93a6170bdcc510bb481e028fa35fdcf17e6673ea593dba615b95477fde6 +"@mui/core-downloads-tracker@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/core-downloads-tracker@npm:6.2.1" + checksum: 10c0/873c95a54fc8c5520a22feb1e98855742ce76b88e2cb909c02a9a99200cbb0e80971458626c435dc290634aaa3f066c501a7b87c03626dd135fee7bf52a12e4e languageName: node linkType: hard -"@mui/icons-material@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/icons-material@npm:6.2.0" +"@mui/icons-material@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/icons-material@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" peerDependencies: - "@mui/material": ^6.2.0 + "@mui/material": ^6.2.1 "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/317990cd9c349a9dadc24f2ece6aa7b99b202f01c549010881d361cc44f816f2a5def0e70b6241967184f1dea16e7459715d32299ca0fd9524226c9f1f91efc2 + checksum: 10c0/5ff137c8fbe6875b871d9c47e4a1d767d8b8f3f9b092a9b7fc5bb9fedf479dadf528f6602992408ba514e3fd69b2c8c0e6a14a4676a5cc4f4b779f33ba5b5d0a languageName: node linkType: hard -"@mui/material@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/material@npm:6.2.0" +"@mui/material@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/material@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" - "@mui/core-downloads-tracker": "npm:^6.2.0" - "@mui/system": "npm:^6.2.0" - "@mui/types": "npm:^7.2.19" - "@mui/utils": "npm:^6.2.0" + "@mui/core-downloads-tracker": "npm:^6.2.1" + "@mui/system": "npm:^6.2.1" + "@mui/types": "npm:^7.2.20" + "@mui/utils": "npm:^6.2.1" "@popperjs/core": "npm:^2.11.8" - "@types/react-transition-group": "npm:^4.4.11" + "@types/react-transition-group": "npm:^4.4.12" clsx: "npm:^2.1.1" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -817,7 +817,7 @@ __metadata: peerDependencies: "@emotion/react": ^11.5.0 "@emotion/styled": ^11.3.0 - "@mui/material-pigment-css": ^6.2.0 + "@mui/material-pigment-css": ^6.2.1 "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -830,16 +830,16 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10c0/e01d719b3d9ffc7bec6ff277f272505c8caa6406a1c520b28b5abb389a78bb103893a815a78e9fe10f20b62fbc4c95c787ab31b8d50410465a683e421286b33c + checksum: 10c0/9ebef984b0aeec933290bf4d984bed02a984e30d0dbfeb473becbcf7c284bbe058d5dc1302445abe4a799750d415ea4893df18fa41545cf191f6fa5bc0d229a4 languageName: node linkType: hard -"@mui/private-theming@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/private-theming@npm:6.2.0" +"@mui/private-theming@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/private-theming@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" - "@mui/utils": "npm:^6.2.0" + "@mui/utils": "npm:^6.2.1" prop-types: "npm:^15.8.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -847,13 +847,13 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/49f563276747c8e2a133c2cf81713ebd5231cce8c24940ddc72d470477218621c0b5a203e0e4729d276d4d3eb1670fc15afe7b497719b84851cbc798b3a52bda + checksum: 10c0/15003060e88264e0247f0e0fc63ca696f3b326987d079615eee40670b77fd0c021ffcf8f650a33e84e0ac790075ab00bc8a9d577aa842298b889676dc6f06ef9 languageName: node linkType: hard -"@mui/styled-engine@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/styled-engine@npm:6.2.0" +"@mui/styled-engine@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/styled-engine@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" "@emotion/cache": "npm:^11.13.5" @@ -870,19 +870,19 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 10c0/9831015df8057ce99db21e611410b4eaf947c959fbbf1cb4652c77288ae2db176cd10a1c7a8a2f1d7f80b0478075beaec3c0338a8c3ad146695f169f22582f5d + checksum: 10c0/3e95744b642b41afde7e5040fc428dbcf01a4a3937c859380b19a3ec3e23ebb460cb3681cf86773c13ea5be76f64ee071afa8ded9d38850bd5b90710623a8549 languageName: node linkType: hard -"@mui/system@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/system@npm:6.2.0" +"@mui/system@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/system@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" - "@mui/private-theming": "npm:^6.2.0" - "@mui/styled-engine": "npm:^6.2.0" - "@mui/types": "npm:^7.2.19" - "@mui/utils": "npm:^6.2.0" + "@mui/private-theming": "npm:^6.2.1" + "@mui/styled-engine": "npm:^6.2.1" + "@mui/types": "npm:^7.2.20" + "@mui/utils": "npm:^6.2.1" clsx: "npm:^2.1.1" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -898,28 +898,28 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10c0/1b593985fe0428cc945e397e948500f91d9f5f8b1610cdd47b3e55dbfbe54a4467fe8af333e8261545553cfe71b394cf4762e7f93944d8bbafe0d4090310639e + checksum: 10c0/94aef42804fa4052b7ceabb41979b9192c432f0ae8bb74a450c604426eb9813c0066e646966704f30bbb262e75629bed05c9f87e0753e5416d6e903e6c870e23 languageName: node linkType: hard -"@mui/types@npm:^7.2.19": - version: 7.2.19 - resolution: "@mui/types@npm:7.2.19" +"@mui/types@npm:^7.2.20": + version: 7.2.20 + resolution: "@mui/types@npm:7.2.20" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/9c390d7eddc7e7c396852202fdca021aee275391bc7f48d0b6458748bf75eebb34c73109958692655ba5e72946cf47db2c0c7d2e1c26be568599ed65c931d080 + checksum: 10c0/257285386903fe0705ac6d53d0ece700323b7bc9be5239ab448b2c6523965b3cadbb636f2aec8ff60354180f53daf78df687d6828a75ad220b0f71fb5a117b5e languageName: node linkType: hard -"@mui/utils@npm:^6.2.0": - version: 6.2.0 - resolution: "@mui/utils@npm:6.2.0" +"@mui/utils@npm:^6.2.1": + version: 6.2.1 + resolution: "@mui/utils@npm:6.2.1" dependencies: "@babel/runtime": "npm:^7.26.0" - "@mui/types": "npm:^7.2.19" + "@mui/types": "npm:^7.2.20" "@types/prop-types": "npm:^15.7.14" clsx: "npm:^2.1.1" prop-types: "npm:^15.8.1" @@ -930,7 +930,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/a010b21f16673ece7f7c05e9c8a26a3db7d1a9e5557f2669178049bdd6f64525983eee9e6e3837221ff9261981048166716f4d37ae8cc77a2f9f525514b83496 + checksum: 10c0/1c81a5d3918fda0c8518e726a4630779f9b1145306e42a72f6f5264b9c30527fc31caea6a429457ad6eee17be40636240a0e57159c881abae0c266628f7a3615 languageName: node linkType: hard @@ -1427,7 +1427,7 @@ __metadata: languageName: node linkType: hard -"@types/react-transition-group@npm:^4.4.11": +"@types/react-transition-group@npm:^4.4.12": version: 4.4.12 resolution: "@types/react-transition-group@npm:4.4.12" peerDependencies: @@ -1436,12 +1436,12 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^19.0.1": - version: 19.0.1 - resolution: "@types/react@npm:19.0.1" +"@types/react@npm:^19.0.2": + version: 19.0.2 + resolution: "@types/react@npm:19.0.2" dependencies: csstype: "npm:^3.0.2" - checksum: 10c0/25eb69114abb9a6d5fc4414ee584388275bbc9ac32976449cf58b95fe9880efe6b3f936c3842be9bed8c571546a9752e8d3e2095288381e9c809269f5f574f2e + checksum: 10c0/8992f39701fcf1bf893ef8f94a56196445667baf08fe4f6050a14e229a17aad3265ad3efc01595ff3b4d5d5c69da885f9aa4ff80f164a613018734efcff1eb8f languageName: node linkType: hard @@ -1579,22 +1579,22 @@ __metadata: version: 0.0.0-use.local resolution: "EMS-ESP@workspace:." dependencies: - "@alova/adapter-xhr": "npm:2.0.11" + "@alova/adapter-xhr": "npm:2.1.0" "@babel/core": "npm:^7.26.0" "@emotion/react": "npm:^11.14.0" "@emotion/styled": "npm:^11.14.0" "@eslint/js": "npm:^9.17.0" - "@mui/icons-material": "npm:^6.2.0" - "@mui/material": "npm:^6.2.0" + "@mui/icons-material": "npm:^6.2.1" + "@mui/material": "npm:^6.2.1" "@preact/compat": "npm:^18.3.1" "@preact/preset-vite": "npm:^2.9.3" "@table-library/react-table-library": "npm:4.1.7" "@trivago/prettier-plugin-sort-imports": "npm:^5.2.0" "@types/formidable": "npm:^3" "@types/node": "npm:^22.10.2" - "@types/react": "npm:^19.0.1" + "@types/react": "npm:^19.0.2" "@types/react-dom": "npm:^19.0.2" - alova: "npm:3.2.6" + alova: "npm:3.2.7" async-validator: "npm:^4.2.5" concurrently: "npm:^9.1.0" eslint: "npm:^9.17.0" @@ -1608,7 +1608,7 @@ __metadata: react-dom: "npm:^19.0.0" react-icons: "npm:^5.4.0" react-router: "npm:^7.0.2" - react-toastify: "npm:^10.0.6" + react-toastify: "npm:^11.0.1" rollup-plugin-visualizer: "npm:^5.12.0" terser: "npm:^5.37.0" typesafe-i18n: "npm:^5.26.2" @@ -1664,13 +1664,13 @@ __metadata: languageName: node linkType: hard -"alova@npm:3.2.6": - version: 3.2.6 - resolution: "alova@npm:3.2.6" +"alova@npm:3.2.7": + version: 3.2.7 + resolution: "alova@npm:3.2.7" dependencies: - "@alova/shared": "npm:1.1.1" + "@alova/shared": "npm:1.1.2" rate-limiter-flexible: "npm:^5.0.3" - checksum: 10c0/d9915f999d1678d190a7e0a39afcefcfd96d8788a0503a6ee34fe44979280fe1cdc45d060b13d6531323c3e02accc6ebb50f071064da4ec01744c67d99ab1d66 + checksum: 10c0/5d0c3bec48ba27950014b7eb65c71f110562641f98489978276fdc352742954781e3b5fec759ea8c343e050371cabb8ea508db92d1287b7e0b5388e661b7a46c languageName: node linkType: hard @@ -2103,7 +2103,7 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.1.0, clsx@npm:^2.1.1": +"clsx@npm:^2.1.1": version: 2.1.1 resolution: "clsx@npm:2.1.1" checksum: 10c0/c4c8eb865f8c82baab07e71bfa8897c73454881c4f99d6bc81585aecd7c441746c1399d08363dc096c550cceaf97bd4ce1e8854e1771e9998d9f94c4fe075839 @@ -5607,15 +5607,15 @@ __metadata: languageName: node linkType: hard -"react-toastify@npm:^10.0.6": - version: 10.0.6 - resolution: "react-toastify@npm:10.0.6" +"react-toastify@npm:^11.0.1": + version: 11.0.1 + resolution: "react-toastify@npm:11.0.1" dependencies: - clsx: "npm:^2.1.0" + clsx: "npm:^2.1.1" peerDependencies: - react: ">=18" - react-dom: ">=18" - checksum: 10c0/4042b716d008295d0feab32488d1e88ec655a1b7a9176fa7d253c70387578a8a0c04aca0ff86d20e1722f3b4baadae8970f50f462940d67a90453c307dd350a9 + react: ^18 || ^19 + react-dom: ^18 || ^19 + checksum: 10c0/ead322440484e89b184d0db59842b65a606ddbd1f6695d8695698178c55782ca7ac1dded24cf1f6aa3c40853579370131dee3943785e0f9db97d15ea4d9c711e languageName: node linkType: hard diff --git a/mock-api/rest_server.ts b/mock-api/rest_server.ts index 9d1bb4b39..3043baf95 100644 --- a/mock-api/rest_server.ts +++ b/mock-api/rest_server.ts @@ -14,7 +14,7 @@ const headers = { 'Content-type': 'application/msgpack' }; -let VERSION_IS_UPGRADEABLE; +let VERSION_IS_UPGRADEABLE: boolean; // Versions // default - on latest stable, no upgrades @@ -882,6 +882,18 @@ const emsesp_coredata = { v: '73.03', e: 63, url: 'thermostat' + }, + { + id: 11, + tn: 'Ventilation', + t: 18, + b: '', + n: 'Vent4000CC', + d: 81, + p: 231, + v: '53.02', + e: 10, + url: 'ventilation' } ] }; @@ -936,6 +948,10 @@ const activity = { // 5 - MM10 mixer // 6 - SM10 solar // 7 - Nefit Trendline boiler +// 8 - Bosch Compress 7000i AW Heat Pump +// 9 - RC100H thermostat +// 10 - Thermostat RC310 +// 11 - Ventilation // 99 - Custom const emsesp_devicedata_1 = { @@ -3776,6 +3792,71 @@ const emsesp_devicedata_10 = { ] }; +const emsesp_devicedata_11 = { + nodes: [ + { + v: 11, + u: 1, + id: '00outdoor fresh air' + }, + { + v: 13.699999809265137, + u: 1, + id: '00indoor fresh air' + }, + { + v: 11.399999618530273, + u: 1, + id: '00outdoor exhaust air' + }, + { + v: 14.800000190734863, + u: 1, + id: '00indoor exhaust air' + }, + { + v: 0, + u: 3, + id: '00in blower speed' + }, + { + v: 0, + u: 3, + id: '00out blower speed' + }, + { + v: 'auto', + u: 0, + id: '00ventilation mode', + c: 'ventmode', + l: [ + 'auto', + 'off', + 'L1', + 'L2', + 'L3', + 'L4', + 'demand', + 'sleep', + 'intense', + 'bypass', + 'party', + 'fireplace' + ] + }, + { + v: 1770, + u: 0, + id: '00air quality (voc)' + }, + { + v: 53, + u: 3, + id: '00relative air humidity' + } + ] +}; + const emsesp_devicedata_99 = { nodes: [ { @@ -3940,7 +4021,7 @@ let emsesp_modules = { const dummy_deviceentities = [ { v: 'unknown', - n: 'no entities for this device', + n: 'sorry, no demo entities for this device!', id: 'unknown', m: 0, w: false @@ -3955,6 +4036,7 @@ const emsesp_deviceentities_6 = dummy_deviceentities; const emsesp_deviceentities_8 = dummy_deviceentities; const emsesp_deviceentities_9 = dummy_deviceentities; const emsesp_deviceentities_10 = dummy_deviceentities; +const emsesp_deviceentities_11 = dummy_deviceentities; const emsesp_deviceentities_none = dummy_deviceentities; const emsesp_deviceentities_2 = [ @@ -4272,6 +4354,9 @@ function deviceData(id: number) { if (id == 10) { return new Response(encoder.encode(emsesp_devicedata_10), { headers }); } + if (id == 11) { + return new Response(encoder.encode(emsesp_devicedata_11), { headers }); + } if (id == 99) { return new Response(encoder.encode(emsesp_devicedata_99), { headers }); } @@ -4325,6 +4410,7 @@ function getDashboardEntityData(id: number) { else if (id == 8) device_data = emsesp_devicedata_8; else if (id == 9) device_data = emsesp_devicedata_9; else if (id == 10) device_data = emsesp_devicedata_10; + else if (id == 11) device_data = emsesp_devicedata_11; else if (id == 99) device_data = emsesp_devicedata_99; // filter device_data on @@ -4541,7 +4627,9 @@ router } else if (id === 9) { updateMask(entity, emsesp_deviceentities_9, emsesp_devicedata_9); } else if (id === 10) { - updateMask(entity, emsesp_deviceentities_9, emsesp_devicedata_10); + updateMask(entity, emsesp_deviceentities_10, emsesp_devicedata_10); + } else if (id === 11) { + updateMask(entity, emsesp_deviceentities_11, emsesp_devicedata_11); } } console.log('customization saved', content); @@ -4646,6 +4734,10 @@ router objIndex = emsesp_devicedata_10.nodes.findIndex((obj) => obj.c == command); emsesp_devicedata_10.nodes[objIndex].v = value; } + if (id === 10) { + objIndex = emsesp_devicedata_11.nodes.findIndex((obj) => obj.c == command); + emsesp_devicedata_11.nodes[objIndex].v = value; + } if (id === DeviceTypeUniqueID.CUSTOM_UID) { // custom entities objIndex = emsesp_devicedata_99.nodes.findIndex((obj) => obj.c == command);