diff --git a/interface/package.json b/interface/package.json index 2dce39cc8..c6a239bdc 100644 --- a/interface/package.json +++ b/interface/package.json @@ -50,7 +50,7 @@ "typescript": "^5.5.3" }, "devDependencies": { - "@babel/core": "^7.24.8", + "@babel/core": "^7.24.9", "@eslint/js": "^9.7.0", "@preact/compat": "^17.1.2", "@preact/preset-vite": "^2.9.0", diff --git a/interface/src/framework/system/ESPSystemStatus.tsx b/interface/src/framework/system/ESPSystemStatus.tsx index b7dcf93e4..b06b96f14 100644 --- a/interface/src/framework/system/ESPSystemStatus.tsx +++ b/interface/src/framework/system/ESPSystemStatus.tsx @@ -8,6 +8,7 @@ import MemoryIcon from '@mui/icons-material/Memory'; import RefreshIcon from '@mui/icons-material/Refresh'; import SdCardAlertIcon from '@mui/icons-material/SdCardAlert'; import SdStorageIcon from '@mui/icons-material/SdStorage'; +import TapAndPlayIcon from '@mui/icons-material/TapAndPlay'; import { Avatar, Box, @@ -32,7 +33,7 @@ function formatNumber(num: number) { const ESPSystemStatus: FC = () => { const { LL } = useI18nContext(); - useLayoutTitle(LL.STATUS_OF('ESP32')); + useLayoutTitle(LL.STATUS_OF(LL.HARDWARE())); const { data: data, @@ -48,6 +49,18 @@ const ESPSystemStatus: FC = () => { return ( <> + + + + + + + + + @@ -90,12 +103,12 @@ const ESPSystemStatus: FC = () => { @@ -131,7 +144,7 @@ const ESPSystemStatus: FC = () => { primary={LL.FLASH()} secondary={ formatNumber(data.flash_chip_size) + - ' KB / ' + + ' KB , ' + (data.flash_chip_speed / 1000000).toFixed(0) + ' MHz' } diff --git a/interface/src/framework/system/SystemStatus.tsx b/interface/src/framework/system/SystemStatus.tsx index 4160cb637..5a6d65383 100644 --- a/interface/src/framework/system/SystemStatus.tsx +++ b/interface/src/framework/system/SystemStatus.tsx @@ -391,8 +391,8 @@ const SystemStatus: FC = () => { disabled={!me.admin} icon={MemoryIcon} bgcolor="#68374d" - label={LL.SYSTEM_MEMORY()} - text={formatNumber(data.free_heap) + ' KB'} + label={LL.STATUS_OF(LL.HARDWARE())} + text={formatNumber(data.free_heap) + ' KB' + ' ' + LL.FREE_MEMORY()} to="/system/espsystemstatus" /> diff --git a/interface/src/framework/system/UploadDownload.tsx b/interface/src/framework/system/UploadDownload.tsx index 242d96cb2..d8e7389b0 100644 --- a/interface/src/framework/system/UploadDownload.tsx +++ b/interface/src/framework/system/UploadDownload.tsx @@ -195,7 +195,6 @@ const UploadDownload: FC = () => { {LL.VERSION_ON() + ' '} {data.emsesp_version} ({data.esp_platform}) - {data.model.length > 0 &&

Gateway Hardware: {data.model}

} {latestVersion && ( diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index fe9a40b67..fe2113107 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -188,9 +188,9 @@ const de: Translation = { RELEASE_NOTES: 'Versionshinweise', EMS_ESP_VER: 'EMS-ESP Version', UPTIME: 'System Betriebszeit', - HEAP: 'freier RAM Speicher (Gesamt / max. Block)', + FREE_MEMORY: 'freier RAM Speicher', PSRAM: 'PSRAM (Größe / Frei)', - FLASH: 'Flash Speicher (Größe / Geschwindigkeit)', + FLASH: 'Flash Speicher (Größe , Geschwindigkeit)', APPSIZE: 'Programm (Partition: Genutzt / Frei)', FILESYSTEM: 'Dateisystem (Genutzt / Frei)', BUFFER_SIZE: 'max. Puffergröße', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index 25c2738d3..42df7e815 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -188,9 +188,9 @@ const en: Translation = { RELEASE_NOTES: 'release notes', EMS_ESP_VER: 'EMS-ESP Version', UPTIME: 'System Uptime', - HEAP: 'Heap (Free / Max Alloc)', + FREE_MEMORY: 'Free Memory', PSRAM: 'PSRAM (Size / Free)', - FLASH: 'Flash Chip (Size / Speed)', + FLASH: 'Flash Chip (Size , Speed)', APPSIZE: 'Application (Partition: Used / Free)', FILESYSTEM: 'File System (Used / Free)', BUFFER_SIZE: 'Max Buffer Size', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index 74a59d09c..bca5d1ecd 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -188,9 +188,9 @@ const fr: Translation = { RELEASE_NOTES: 'notes de version', EMS_ESP_VER: 'Version EMS-ESP', UPTIME: 'Durée de fonctionnement du système', - HEAP: 'Heap (Libre / Max Allouée)', + FREE_MEMORY: 'Libre Memory', PSRAM: 'PSRAM (Taille / Libre)', - FLASH: 'Flash Chip (Taille / Vitesse)', + FLASH: 'Flash Chip (Taille , Vitesse)', APPSIZE: 'Application (Partition: Utilisée / Libre)', FILESYSTEM: 'File System (Utilisée / Libre)', BUFFER_SIZE: 'Max taille du buffer', diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index a0a3cc4d9..0b0e05bf8 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -188,9 +188,9 @@ const it: Translation = { RELEASE_NOTES: 'note rilascio', EMS_ESP_VER: 'Versione EMS-ESP', UPTIME: 'Tempo di attività del sistema', - HEAP: 'Heap (Free / Max Alloc)', + FREE_MEMORY: 'Free Memory', PSRAM: 'PSRAM (Size / Free)', - FLASH: 'Flash Chip (Size / Speed)', + FLASH: 'Flash Chip (Size , Speed)', APPSIZE: 'Applicazione (Partizione: Usata / Libera)', FILESYSTEM: 'Memoria Sistema (Usata / Libera)', BUFFER_SIZE: 'Max Buffer Size', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index 304adc045..ef82e4596 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -188,9 +188,9 @@ const nl: Translation = { RELEASE_NOTES: 'release notes', EMS_ESP_VER: 'EMS-ESP Versie', UPTIME: 'Systeem Uptime', - HEAP: 'Heap (Free / Max Alloc)', + FREE_MEMORY: 'Free Memory', PSRAM: 'PSRAM (Size / Free)', - FLASH: 'Flash Chip (Size / Speed)', + FLASH: 'Flash Chip (Size , Speed)', APPSIZE: 'Application (Partition: Used / Free)', FILESYSTEM: 'File System (Used / Free)', BUFFER_SIZE: 'Max Buffer Size', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index 4264b78b5..af78ba486 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -188,9 +188,9 @@ const no: Translation = { RELEASE_NOTES: 'release notes', EMS_ESP_VER: 'EMS-ESP Version', UPTIME: 'System Oppetid', - HEAP: 'Heap (Ledig / Max Allokert)', + FREE_MEMORY: 'Ledig Memory', PSRAM: 'PSRAM (Størrelse / Ledig)', - FLASH: 'Flash Chip (Størrelse / Hastighet)', + FLASH: 'Flash Chip (Størrelse , Hastighet)', APPSIZE: 'Applikasjon (Partition: Brukt / Ledig)', FILESYSTEM: 'File System (Brukt / Ledig)', BUFFER_SIZE: 'Max Buffer Størrelse', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 53cfb0f21..a9ac4803a 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -188,9 +188,9 @@ const pl: BaseTranslation = { RELEASE_NOTES: 'lista zmian', EMS_ESP_VER: 'Wersja EMS-ESP', UPTIME: 'Czas działania systemu', - HEAP: 'HEAP (wolne / maksymalny przydział)', + FREE_MEMORY: 'Wolne Memory', // TODO translate PSRAM: 'PSRAM (rozmiar / wolne)', - FLASH: 'FLASH (rozmiar / taktowanie)', + FLASH: 'FLASH (rozmiar , taktowanie)', APPSIZE: 'Aplikacja (partycja: wykorzystane / wolne)', FILESYSTEM: 'System plików (wykorzystane / wolne)', BUFFER_SIZE: 'Maksymalna pojemność bufora (ilość wpisów)', diff --git a/interface/src/i18n/sk/index.ts b/interface/src/i18n/sk/index.ts index d34a9b823..19e4dc097 100644 --- a/interface/src/i18n/sk/index.ts +++ b/interface/src/i18n/sk/index.ts @@ -188,9 +188,9 @@ const sk: Translation = { RELEASE_NOTES: 'poznámky k verzii', EMS_ESP_VER: 'EMS-ESP verzia', UPTIME: 'Beh systému', - HEAP: 'Zásobník (voľné / max pridelenie)', + FREE_MEMORY: 'Voľné Memory', // TODO translate PSRAM: 'PSRAM (Veľkosť / Voľné)', - FLASH: 'Flash chip (Veľkosť / Rýchlosť)', + FLASH: 'Flash chip (Veľkosť , Rýchlosť)', APPSIZE: 'Applikácia (Oddiel: Použité / Voľné)', FILESYSTEM: 'Súborový systém (Použité / Voľné)', BUFFER_SIZE: 'Buffer-max.veľkosť', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index f2df96d2e..afd865a7b 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -184,13 +184,13 @@ const sv: Translation = { THE_LATEST: 'Den senaste', OFFICIAL: 'officiell', DEVELOPMENT: 'utveckling', - RELEASE_IS: 'release är', // TODO translate + RELEASE_IS: 'release är', RELEASE_NOTES: 'release-logg', EMS_ESP_VER: 'EMS-ESP Version', UPTIME: 'Systemets Upptid', - HEAP: 'Heap (Ledigt / Max allokerat)', + FREE_MEMORY: 'Ledigt Memory', PSRAM: 'PSRAM (Storlek / Ledigt)', - FLASH: 'Flashminne (Storlek / Hastighet)', + FLASH: 'Flashminne (Storlek , Hastighet)', APPSIZE: 'Applikationer (Partition: Använt / Ledigt)', FILESYSTEM: 'Filsystem (Använt / Ledigt)', BUFFER_SIZE: 'Max Bufferstorlek', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index f38733110..bd968418d 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -188,9 +188,9 @@ const tr: Translation = { RELEASE_NOTES: 'yayınlanma notları', EMS_ESP_VER: 'EMS-ESP Sürümü', UPTIME: 'Sistem Çalışma Süresi', - HEAP: 'Yığın (Boş / Maksimum Tahsis)', + FREE_MEMORY: 'Yığın Memory', // TODO translate PSRAM: 'PSRAM (Boyut / Boş)', - FLASH: 'Flash Çipi (Boyut / Hız)', + FLASH: 'Flash Çipi (Boyut , Hız)', APPSIZE: 'Uygulama (Bölme: Kullanılmış / Boş)', FILESYSTEM: 'Dosya Sistemi (Kullanılmış / Boş)', BUFFER_SIZE: 'En fazla bellek boyutu', diff --git a/interface/yarn.lock b/interface/yarn.lock index 2290c991f..f4ad26e87 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -86,26 +86,26 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/core@npm:7.24.8" +"@babel/core@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/core@npm:7.24.9" dependencies: "@ampproject/remapping": "npm:^2.2.0" "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.24.8" + "@babel/generator": "npm:^7.24.9" "@babel/helper-compilation-targets": "npm:^7.24.8" - "@babel/helper-module-transforms": "npm:^7.24.8" + "@babel/helper-module-transforms": "npm:^7.24.9" "@babel/helpers": "npm:^7.24.8" "@babel/parser": "npm:^7.24.8" "@babel/template": "npm:^7.24.7" "@babel/traverse": "npm:^7.24.8" - "@babel/types": "npm:^7.24.8" + "@babel/types": "npm:^7.24.9" 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/5e21b40cc69746deda3fe3d6540351d9cb0d1ad5aea055b7c319db26071ff5789fd9580d1aa47b114f07631e8e2109f4e71696ca11d7c7e60d157767022c1bd2 + checksum: 10c0/e104ec6efbf099f55184933e9ab078eb5821c792ddfef3e9c6561986ec4ff103f5c11e3d7d6e5e8929e50e2c58db1cc80e5b6f14b530335b6622095ec4b4124c languageName: node linkType: hard @@ -156,6 +156,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/generator@npm:7.24.9" + dependencies: + "@babel/types": "npm:^7.24.9" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10c0/cd1f7edce7717462546c349e15289d1267a3ed627c6f6583fbf51e78eacacc6500ec2f0024f08f1cc7138989e575635b931acf4549f9e728017a22176a9ea6b6 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -279,9 +291,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-module-transforms@npm:7.24.8" +"@babel/helper-module-transforms@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/helper-module-transforms@npm:7.24.9" dependencies: "@babel/helper-environment-visitor": "npm:^7.24.7" "@babel/helper-module-imports": "npm:^7.24.7" @@ -290,7 +302,7 @@ __metadata: "@babel/helper-validator-identifier": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10c0/b76496d5045af55be9de60e59e65e56a43033f01ccc746b26b7af911c358668c206b688ce70a23ab31ec04f9728f3a38e8d01073c85244115ab62f271a7fa3d1 + checksum: 10c0/e27bca43bc113731ee4f2b33a4c5bf9c7eebf4d64487b814c305cbd5feb272c29fcd3d79634ba03131ade171e5972bc7ede8dbc83ba0deb02f1e62d318c87770 languageName: node linkType: hard @@ -642,6 +654,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/types@npm:7.24.9" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10c0/4970b3481cab39c5c3fdb7c28c834df5c7049f3c7f43baeafe121bb05270ebf0da7c65b097abf314877f213baa591109c82204f30d66cdd46c22ece4a2f32415 + languageName: node + linkType: hard + "@emotion/babel-plugin@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/babel-plugin@npm:11.11.0" @@ -2078,7 +2101,7 @@ __metadata: dependencies: "@alova/adapter-xhr": "npm:^1.0.6" "@alova/scene-react": "npm:^1.6.1" - "@babel/core": "npm:^7.24.8" + "@babel/core": "npm:^7.24.9" "@emotion/react": "npm:^11.11.4" "@emotion/styled": "npm:^11.11.5" "@eslint/js": "npm:^9.7.0" diff --git a/mock-api/rest_server.ts b/mock-api/rest_server.ts index 372811152..c6df591d5 100644 --- a/mock-api/rest_server.ts +++ b/mock-api/rest_server.ts @@ -369,7 +369,7 @@ const ESPsystem_status = { psram_size: 0, free_psram: 0, has_loader: true, - model: 'BBQKees Gateway Model E32V2 vE32V2.0P3/2024011' + model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)' }; const system_status = { @@ -651,7 +651,7 @@ const emsesp_devices = { }, { i: 3, - s: 'GB125', + s: 'Buderus GB125', t: 5, tn: 'Boiler', url: 'boiler' @@ -679,7 +679,7 @@ const emsesp_devices = { }, { i: 7, - s: 'Trendline HRC30', + s: 'Trendline HRC30/Generic Heatronic 3', t: 4, tn: 'Boiler', url: 'boiler' @@ -688,7 +688,7 @@ const emsesp_devices = { i: 8, s: 'Bosch Compress 7000i AW Heat Pump', t: 5, - tn: 'Boiler', + tn: 'Boiler/HP', url: 'boiler' }, { @@ -718,7 +718,7 @@ const emsesp_coredata = { t: 5, tn: 'Boiler', b: 'Nefit', - n: 'Nefit Trendline HRC30', + n: 'Nefit Trendline HRC30/Generic Heatronic 3', d: 8, p: 123, v: '06.01', @@ -729,7 +729,7 @@ const emsesp_coredata = { t: 5, tn: 'Boiler', b: 'Buderus', - n: 'GB125', + n: 'Buderus GB125', d: 8, p: 123, v: '06.01', @@ -792,7 +792,7 @@ const emsesp_coredata = { }, { "id": 8, - "tn": "Boiler", + "tn": "Boiler/HP", "t": 5, "b": "", "n": "Bosch Compress 7000i AW Heat Pump", @@ -822,21 +822,22 @@ const emsesp_coredata = { "p": 158, "v": "73.03", "e": 63 - }, - { - id: 99, - t: 4, - tn: 'Custom', - b: '', - n: 'Custom Entities', - d: 1, - p: 1, - v: '', - e: 2 } ] }; +const emsesp_coredata_custom = { + id: 99, + t: 4, + tn: 'Custom', + b: '', + n: 'Custom Entities', + d: 1, + p: 1, + v: '', + e: 2 +}; + const emsesp_sensordata = { // ts: [], ts: [ @@ -4309,14 +4310,16 @@ router // Device Dashboard Data .get(EMSESP_CORE_DATA_ENDPOINT, () => { - // sort by type - const sorted_devices = emsesp_coredata.devices.sort((a, b) => b.t - a.t); + // sort by type, like its done in the C++ code + let sorted_devices = [...emsesp_coredata.devices].sort((a, b) => a.t - b.t); + // append emsesp_coredata to sorted_devices so Custom is always at the end of the list + sorted_devices.push(emsesp_coredata_custom); return { connected: true, devices: sorted_devices }; }) .get(EMSESP_SENSOR_DATA_ENDPOINT, () => emsesp_sensordata) .get(EMSESP_DEVICES_ENDPOINT, () => { // sort by type - const sorted_devices = emsesp_devices.devices.sort((a, b) => b.t - a.t); + const sorted_devices = emsesp_devices.devices.sort((a, b) => a.t - b.t); return { devices: sorted_devices }; }) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index ad2ab8457..bb52d35a4 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -579,6 +579,7 @@ void Mqtt::ha_status() { } #endif + // TODO camelCase publish_system_ha_sensor_config(DeviceValueType::STRING, "EMS Bus", "bus_status", DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::STRING, "Uptime", "uptime", DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT8, "Uptime (sec)", "uptime_sec", DeviceValueUOM::SECONDS); diff --git a/src/system.cpp b/src/system.cpp index 374d28b9b..b661416f3 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -668,6 +668,7 @@ void System::send_info_mqtt() { } // create the json for heartbeat +// TODO camelCase void System::heartbeat_json(JsonObject output) { switch (EMSESP::bus_status()) { case EMSESP::BUS_STATUS_OFFLINE: diff --git a/src/test/test.h b/src/test/test.h index 93fa81e01..5f672358f 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -41,7 +41,7 @@ namespace emsesp { // #define EMSESP_DEBUG_DEFAULT "310" // #define EMSESP_DEBUG_DEFAULT "render" // #define EMSESP_DEBUG_DEFAULT "api" -#define EMSESP_DEBUG_DEFAULT "api3" +// #define EMSESP_DEBUG_DEFAULT "api3" // #define EMSESP_DEBUG_DEFAULT "crash" // #define EMSESP_DEBUG_DEFAULT "dv" // #define EMSESP_DEBUG_DEFAULT "lastcode"