mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
merge PR#1497 from pswid, add partiton, resort system status
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
- heatpump max power [#1475](https://github.com/emsesp/EMS-ESP32/issues/1475)
|
||||
- checkbox for MQTT-TLS enable [#1474](https://github.com/emsesp/EMS-ESP32/issues/1474)
|
||||
- added SK (Slovencina) language. Thanks @misa1515
|
||||
- CPU info [#1497](https://github.com/emsesp/EMS-ESP32/pull/1497)
|
||||
|
||||
## Fixed
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import AppsIcon from '@mui/icons-material/Apps';
|
||||
import BuildIcon from '@mui/icons-material/Build';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import DeveloperBoardIcon from '@mui/icons-material/DeveloperBoard';
|
||||
import DevicesIcon from '@mui/icons-material/Devices';
|
||||
import FolderIcon from '@mui/icons-material/Folder';
|
||||
import MemoryIcon from '@mui/icons-material/Memory';
|
||||
@@ -9,7 +10,6 @@ import RefreshIcon from '@mui/icons-material/Refresh';
|
||||
import SdCardAlertIcon from '@mui/icons-material/SdCardAlert';
|
||||
import SdStorageIcon from '@mui/icons-material/SdStorage';
|
||||
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
|
||||
import ShowChartIcon from '@mui/icons-material/ShowChart';
|
||||
import TimerIcon from '@mui/icons-material/Timer';
|
||||
import {
|
||||
Avatar,
|
||||
@@ -200,15 +200,6 @@ const SystemStatusForm: FC = () => {
|
||||
</Button>
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar>
|
||||
<DevicesIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.PLATFORM()} secondary={data.esp_platform + ' / ' + data.sdk_version} />
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar>
|
||||
@@ -221,10 +212,31 @@ const SystemStatusForm: FC = () => {
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar>
|
||||
<ShowChartIcon />
|
||||
<DevicesIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.CPU_FREQ()} secondary={data.cpu_freq_mhz + ' MHz'} />
|
||||
<ListItemText primary="SDK" secondary={data.arduino_version + ' / ESP-IDF v' + data.sdk_version} />
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar>
|
||||
<DeveloperBoardIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
primary="CPU"
|
||||
secondary={
|
||||
data.cpu_type +
|
||||
' (rev.' +
|
||||
data.cpu_rev +
|
||||
', ' +
|
||||
(data.cpu_cores == 1 ? 'single-core)' : 'dual-core)') +
|
||||
' @ ' +
|
||||
data.cpu_freq_mhz +
|
||||
' Mhz'
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
<ListItem>
|
||||
@@ -277,7 +289,9 @@ const SystemStatusForm: FC = () => {
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
primary={LL.APPSIZE()}
|
||||
secondary={formatNumber(data.app_used) + ' KB / ' + formatNumber(data.app_free) + ' KB'}
|
||||
secondary={
|
||||
data.partition + ': ' + formatNumber(data.app_used) + ' KB / ' + formatNumber(data.app_free) + ' KB'
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
|
||||
@@ -196,11 +196,10 @@ const de: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Version',
|
||||
PLATFORM: 'Platform (Platform / SDK)',
|
||||
UPTIME: 'System Betriebszeit',
|
||||
CPU_FREQ: 'CPU Frequenz',
|
||||
HEAP: 'freier RAM Speicher (Gesamt / max. Block)',
|
||||
PSRAM: 'PSRAM (Größe / Frei)',
|
||||
FLASH: 'Flash Speicher (Größe / Geschwindigkeit)',
|
||||
APPSIZE: 'Programm (Genutzt / Frei)',
|
||||
APPSIZE: 'Programm (Partition: Genutzt / Frei)',
|
||||
FILESYSTEM: 'Dateisystem (Genutzt / Frei)',
|
||||
BUFFER_SIZE: 'max. Puffergröße',
|
||||
COMPACT: 'Kompakte Darstellung',
|
||||
|
||||
@@ -196,11 +196,10 @@ const en: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Version',
|
||||
PLATFORM: 'Device (Platform / SDK)',
|
||||
UPTIME: 'System Uptime',
|
||||
CPU_FREQ: 'CPU Frequency',
|
||||
HEAP: 'Heap (Free / Max Alloc)',
|
||||
PSRAM: 'PSRAM (Size / Free)',
|
||||
FLASH: 'Flash Chip (Size / Speed)',
|
||||
APPSIZE: 'Application (Used / Free)',
|
||||
APPSIZE: 'Application (Partition: Used / Free)',
|
||||
FILESYSTEM: 'File System (Used / Free)',
|
||||
BUFFER_SIZE: 'Max Buffer Size',
|
||||
COMPACT: 'Compact',
|
||||
|
||||
@@ -196,11 +196,10 @@ const fr: Translation = {
|
||||
EMS_ESP_VER: 'Version EMS-ESP',
|
||||
PLATFORM: 'Appareil (Plateforme / SDK)',
|
||||
UPTIME: 'Durée de fonctionnement du système',
|
||||
CPU_FREQ: 'Fréquence du CPU',
|
||||
HEAP: 'Heap (Libre / Max Allouée)',
|
||||
PSRAM: 'PSRAM (Taille / Libre)',
|
||||
FLASH: 'Flash Chip (Taille / Vitesse)',
|
||||
APPSIZE: 'Application (Utilisée / Libre)',
|
||||
APPSIZE: 'Application (Partition: Utilisée / Libre)',
|
||||
FILESYSTEM: 'File System (Utilisée / Libre)',
|
||||
BUFFER_SIZE: 'Max taille du buffer',
|
||||
COMPACT: 'Compact',
|
||||
|
||||
@@ -198,11 +198,10 @@ const it: Translation = {
|
||||
EMS_ESP_VER: 'Versione EMS-ESP',
|
||||
PLATFORM: 'Dispositivo (Piattaforma / SDK)',
|
||||
UPTIME: 'Tempo di attività del sistema',
|
||||
CPU_FREQ: 'Frequenza CPU ',
|
||||
HEAP: 'Heap (Free / Max Alloc)',
|
||||
PSRAM: 'PSRAM (Size / Free)',
|
||||
FLASH: 'Flash Chip (Size / Speed)',
|
||||
APPSIZE: 'Applicazione (Usata / Libera)',
|
||||
APPSIZE: 'Applicazione (Partizione: Usata / Libera)',
|
||||
FILESYSTEM: 'Memoria Sistema (Usata / Libera)',
|
||||
BUFFER_SIZE: 'Max Buffer Size',
|
||||
COMPACT: 'Compact',
|
||||
|
||||
@@ -196,11 +196,10 @@ const nl: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Versie',
|
||||
PLATFORM: 'Apparaat (Platform / SDK)',
|
||||
UPTIME: 'Systeem Uptime',
|
||||
CPU_FREQ: 'CPU Frequency',
|
||||
HEAP: 'Heap (Free / Max Alloc)',
|
||||
PSRAM: 'PSRAM (Size / Free)',
|
||||
FLASH: 'Flash Chip (Size / Speed)',
|
||||
APPSIZE: 'Application (Used / Free)',
|
||||
APPSIZE: 'Application (Partition: Used / Free)',
|
||||
FILESYSTEM: 'File System (Used / Free)',
|
||||
BUFFER_SIZE: 'Max Buffer Size',
|
||||
COMPACT: 'Compact',
|
||||
|
||||
@@ -196,11 +196,10 @@ const no: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Version',
|
||||
PLATFORM: 'Enhet (Platform / SDK)',
|
||||
UPTIME: 'System Oppetid',
|
||||
CPU_FREQ: 'CPU Frekvens',
|
||||
HEAP: 'Heap (Ledig / Max Allokert)',
|
||||
PSRAM: 'PSRAM (Størrelse / Ledig)',
|
||||
FLASH: 'Flash Chip (Størrelse / Hastighet)',
|
||||
APPSIZE: 'Applikasjon (Brukt / Ledig)',
|
||||
APPSIZE: 'Applikasjon (Partition: Brukt / Ledig)',
|
||||
FILESYSTEM: 'File System (Brukt / Ledig)',
|
||||
BUFFER_SIZE: 'Max Buffer Størrelse',
|
||||
COMPACT: 'Komprimere',
|
||||
|
||||
@@ -196,11 +196,10 @@ const pl: BaseTranslation = {
|
||||
EMS_ESP_VER: 'Wersja EMS-ESP',
|
||||
PLATFORM: 'Urządzenie (platforma / SDK)',
|
||||
UPTIME: 'Czas działania systemu',
|
||||
CPU_FREQ: 'Taktowanie CPU',
|
||||
HEAP: 'HEAP (wolne / maksymalny przydział)',
|
||||
PSRAM: 'PSRAM (rozmiar / wolne)',
|
||||
FLASH: 'FLASH (rozmiar / taktowanie)',
|
||||
APPSIZE: 'Aplikacja (wykorzystane / wolne)',
|
||||
APPSIZE: 'Aplikacja (Partition: wykorzystane / wolne)',
|
||||
FILESYSTEM: 'System plików (wykorzystane / wolne)',
|
||||
BUFFER_SIZE: 'Maksymalna pojemność bufora (ilość wpisów)',
|
||||
COMPACT: 'Kompaktowy',
|
||||
|
||||
@@ -196,11 +196,10 @@ const sk: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP verzia',
|
||||
PLATFORM: 'Zariadenie (Platforma / SDK)',
|
||||
UPTIME: 'Beh systému',
|
||||
CPU_FREQ: 'CPU frekvencia',
|
||||
HEAP: 'Zásobník (voľné / max pridelenie)',
|
||||
PSRAM: 'PSRAM (Veľkosť / Voľné)',
|
||||
FLASH: 'Flash chip (Veľkosť / Rýchlosť)',
|
||||
APPSIZE: 'Applikácia (Použité / Voľné)',
|
||||
APPSIZE: 'Applikácia (Priečka: Použité / Voľné)',
|
||||
FILESYSTEM: 'Súborový systém (Použité / Voľné)',
|
||||
BUFFER_SIZE: 'Maximálna veľkosť vyrovnávacej pamäte',
|
||||
COMPACT: 'Kompaktné',
|
||||
|
||||
@@ -196,11 +196,10 @@ const sv: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Version',
|
||||
PLATFORM: 'Enhet (Plattform / SDK)',
|
||||
UPTIME: 'Systemets Upptid',
|
||||
CPU_FREQ: 'CPU-frekvens',
|
||||
HEAP: 'Heap (Ledigt / Max allokerat)',
|
||||
PSRAM: 'PSRAM (Storlek / Ledigt)',
|
||||
FLASH: 'Flashminne (Storlek / Hastighet)',
|
||||
APPSIZE: 'Applikationer (Använt / Ledigt)',
|
||||
APPSIZE: 'Applikationer (Partition: Använt / Ledigt)',
|
||||
FILESYSTEM: 'Filsystem (Använt / Ledigt)',
|
||||
BUFFER_SIZE: 'Max Bufferstorlek',
|
||||
COMPACT: 'Komprimera',
|
||||
|
||||
@@ -196,11 +196,10 @@ const tr: Translation = {
|
||||
EMS_ESP_VER: 'EMS-ESP Sürümü',
|
||||
PLATFORM: 'Cihaz (Platform / SDK)',
|
||||
UPTIME: 'Sistem Çalışma Süresi',
|
||||
CPU_FREQ: 'İşlemci frekansı',
|
||||
HEAP: 'Yığın (Boş / Maksimum Tahsis)',
|
||||
PSRAM: 'PSRAM (Boyut / Boş)',
|
||||
FLASH: 'Flash Çipi (Boyut / Hız)',
|
||||
APPSIZE: 'Uygulama (Kullanılmış / Boş)',
|
||||
APPSIZE: 'Uygulama (Bölme: Kullanılmış / Boş)',
|
||||
FILESYSTEM: 'Dosya Sistemi (Kullanılmış / Boş)',
|
||||
BUFFER_SIZE: 'En fazla bellek boyutu',
|
||||
COMPACT: 'Sıkışık',
|
||||
|
||||
@@ -2,9 +2,14 @@ export interface SystemStatus {
|
||||
emsesp_version: string;
|
||||
esp_platform: string;
|
||||
max_alloc_heap: number;
|
||||
cpu_type: string;
|
||||
cpu_rev: number;
|
||||
cpu_cores: number;
|
||||
cpu_freq_mhz: number;
|
||||
free_heap: number;
|
||||
arduino_version: string;
|
||||
sdk_version: string;
|
||||
partition: string;
|
||||
flash_chip_size: number;
|
||||
flash_chip_speed: number;
|
||||
app_used: number;
|
||||
|
||||
@@ -19,10 +19,15 @@ void SystemStatus::systemStatus(AsyncWebServerRequest * request) {
|
||||
|
||||
root["emsesp_version"] = EMSESP_APP_VERSION;
|
||||
root["esp_platform"] = EMSESP_PLATFORM;
|
||||
root["cpu_type"] = ESP.getChipModel();
|
||||
root["cpu_rev"] = ESP.getChipRevision();
|
||||
root["cpu_cores"] = ESP.getChipCores();
|
||||
root["cpu_freq_mhz"] = ESP.getCpuFreqMHz();
|
||||
root["max_alloc_heap"] = emsesp::EMSESP::system_.getMaxAllocMem();
|
||||
root["free_heap"] = emsesp::EMSESP::system_.getHeapMem();
|
||||
root["arduino_version"] = ARDUINO_VERSION;
|
||||
root["sdk_version"] = ESP.getSdkVersion();
|
||||
root["partition"] = esp_ota_get_running_partition()->label;
|
||||
root["flash_chip_size"] = ESP.getFlashChipSize() / 1024;
|
||||
root["flash_chip_speed"] = ESP.getFlashChipSpeed();
|
||||
root["app_used"] = emsesp::EMSESP::system_.appUsed();
|
||||
|
||||
@@ -55,7 +55,9 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
|
||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.02/platform-espressif32.zip
|
||||
framework = arduino
|
||||
board_build.filesystem = littlefs
|
||||
build_flags = ${common.build_flags}
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-DTASMOTA_SDK
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
extra_scripts =
|
||||
pre:scripts/build_interface.py
|
||||
@@ -83,8 +85,6 @@ extra_scripts = scripts/rename_fw.py
|
||||
board = esp32dev
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
board_build.extra_flags = -DBOARD_HAS_PSRAM
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
build_flags = ${common.build_flags}
|
||||
|
||||
[env:ci_s3]
|
||||
extends = espressi32_base
|
||||
@@ -95,7 +95,7 @@ board_upload.flash_size = 16MB
|
||||
board_build.partitions = esp32_partition_16M.csv
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
|
||||
@@ -105,7 +105,7 @@ board = esp32dev
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-Os
|
||||
|
||||
[env:esp32_4Mplus]
|
||||
@@ -113,7 +113,6 @@ extends = espressi32_base_tasmota
|
||||
board = esp32dev
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_asym_partition_4M.csv
|
||||
build_flags = ${common.build_flags}
|
||||
|
||||
[env:esp32_16M]
|
||||
extends = espressi32_base_tasmota
|
||||
@@ -121,7 +120,6 @@ board = esp32dev
|
||||
board_build.extra_flags = -DBOARD_HAS_PSRAM
|
||||
board_upload.flash_size = 16MB
|
||||
board_build.partitions = esp32_partition_16M.csv
|
||||
build_flags = ${common.build_flags}
|
||||
|
||||
[env:lolin_c3_mini]
|
||||
extends = espressi32_base_tasmota
|
||||
@@ -129,7 +127,7 @@ board = lolin_c3_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
|
||||
; lolin C3 mini v1 needs special wifi init.
|
||||
@@ -140,7 +138,7 @@ board = lolin_c3_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-DBOARD_C3_MINI_V1
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
|
||||
@@ -150,7 +148,7 @@ board = lolin_s2_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S2MINI"'
|
||||
|
||||
[env:lolin_s3]
|
||||
@@ -162,7 +160,7 @@ board_build.partitions = esp32_partition_16M.csv
|
||||
board_upload.use_1200bps_touch = false
|
||||
board_upload.wait_for_upload_port = false
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
|
||||
|
||||
@@ -252,4 +252,16 @@ enum {
|
||||
#error Target CONFIG_IDF_TARGET is not supported
|
||||
#endif
|
||||
|
||||
#ifndef ARDUINO_VERSION
|
||||
#ifndef STRINGIZE
|
||||
#define STRINGIZE(s) #s
|
||||
#endif
|
||||
#if TASMOTA_SDK
|
||||
#define ARDUINO_VERSION_STR(major, minor, patch) "Tasmota Arduino v" STRINGIZE(major) "." STRINGIZE(minor) "." STRINGIZE(patch)
|
||||
#else
|
||||
#define ARDUINO_VERSION_STR(major, minor, patch) "ESP32 Arduino v" STRINGIZE(major) "." STRINGIZE(minor) "." STRINGIZE(patch)
|
||||
#endif
|
||||
#define ARDUINO_VERSION ARDUINO_VERSION_STR(ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1206,13 +1206,16 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
|
||||
// System
|
||||
node = output.createNestedObject("System Info");
|
||||
node["version"] = EMSESP_APP_VERSION;
|
||||
node["platform"] = EMSESP_PLATFORM;
|
||||
node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
||||
node["uptime (seconds)"] = uuid::get_uptime_sec();
|
||||
#ifndef EMSESP_STANDALONE
|
||||
node["platform"] = ARDUINO_VERSION;
|
||||
node["sdk"] = ESP.getSdkVersion();
|
||||
node["free mem"] = getHeapMem();
|
||||
node["max alloc"] = getMaxAllocMem();
|
||||
node["used app"] = EMSESP::system_.appUsed(); // kilobytes
|
||||
node["free app"] = EMSESP::system_.appFree(); // kilobytes
|
||||
node["partition"] = esp_ota_get_running_partition()->label;
|
||||
#endif
|
||||
node["reset reason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.6.5-dev.5"
|
||||
#define EMSESP_APP_VERSION "3.6.5-dev.6"
|
||||
|
||||
Reference in New Issue
Block a user