mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 11:14:58 +00:00
@@ -18,6 +18,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
|
||||
- remove HA config for excluded entities [#3229](https://github.com/emsesp/EMS-ESP32/issues/3229)
|
||||
- `show system` reports the Ethernet status on boards with a PHY, so a failed initialisation or a link that never came up is visible instead of Ethernet being omitted completely. Also shows the loop task's lowest free stack, to help diagnose reboots
|
||||
- new Application Setting "Automatically check for firmware updates", off by default. When enabled EMS-ESP asks emsesp.org for the latest version once a day on its own, otherwise it only asks when the WebUI wants to show it, so an unattended system never contacts emsesp.org
|
||||
- Automatically check and convert older 3.8.x filesystem to the new 3.9.0 format
|
||||
|
||||
## Fixed
|
||||
|
||||
|
||||
@@ -297,16 +297,12 @@ const InstallDialog = memo(
|
||||
)}
|
||||
</Typography>
|
||||
{upgradeImportantMessageType === 2 && LL.UPGRADE_IMPORTANT_MESSAGES_2()}
|
||||
{upgradeImportantMessageType === 1 && (
|
||||
<>
|
||||
{LL.UPGRADE_IMPORTANT_MESSAGES_1()}
|
||||
<Typography sx={{ mt: 2 }}>
|
||||
<Link to="/settings/downloadUpload" style={{ color: 'lightblue' }}>
|
||||
{LL.DOWNLOAD_SYSTEM_BACKUP()}
|
||||
</Link>
|
||||
</Typography>
|
||||
</>
|
||||
)}
|
||||
{upgradeImportantMessageType === 1 && LL.UPGRADE_IMPORTANT_MESSAGES_1()}
|
||||
<Typography sx={{ mt: 2 }}>
|
||||
<Link to="/settings/downloadUpload" style={{ color: 'lightblue' }}>
|
||||
{LL.DOWNLOAD_SYSTEM_BACKUP()}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography sx={{ mt: 2 }}>
|
||||
<Link
|
||||
to="https://docs.emsesp.org/FAQ#upgrading-the-firmware"
|
||||
|
||||
@@ -311,7 +311,7 @@ const cs: Translation = {
|
||||
ALLVALUES: 'Všechny hodnoty',
|
||||
SPECIAL_FUNCTIONS: 'Speciální funkce',
|
||||
WAIT_FIRMWARE: 'Firmware se nahrává a instaluje',
|
||||
INSTALL_VERSION: 'Tímto se {0} verze {1}. Jste si jistí?',
|
||||
INSTALL_VERSION: 'Tímto se {0} verze {1}',
|
||||
UPDATE_AVAILABLE: 'aktualizace dostupná',
|
||||
LATEST_VERSION: 'Používáte nejnovější verzi {0}firmwaru',
|
||||
PLEASE_WAIT: 'Prosím čekejte',
|
||||
@@ -340,7 +340,7 @@ const cs: Translation = {
|
||||
ONLINE_HELP: 'online nápověda',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizovat důležité zprávy',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Tato aktualizace vyžaduje obnovení továrního nastavení. Ujistěte se, že nejprve stáhnete systémovou zálohu před pokračováním a poté nahrajte tento soubor po instalaci nové verze.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete se na novou hlavní verzi. Ujistěte se, že jste přečetli ChangeLog pro jakékoliv závažné změny.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete se na novou major verzi. Je vhodné nejprve vytvořit systémovou zálohu. Také zkontrolujte online nápovědu pro jakékoliv závažné změny.',
|
||||
WARNING_SYSTEM_BACKUP: 'Toto vytvoří zálohu vašich celých systémových konfigurací a nastavení. Všechna hesla budou v zálohovém souboru čitelná. Buďte opatrní při sdílení! Opravdu chcete pokračovat?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email byl úspěšně odeslán',
|
||||
SYSTEM_NAME: 'Název systému',
|
||||
|
||||
@@ -311,7 +311,7 @@ const de: Translation = {
|
||||
ALLVALUES: 'Alle Werte',
|
||||
SPECIAL_FUNCTIONS: 'Sonderfunktionen',
|
||||
WAIT_FIRMWARE: 'Die Firmware wird hochgeladen und installiert.',
|
||||
INSTALL_VERSION: 'Dadurch wird die Version {1} {0}. Sind Sie sicher?',
|
||||
INSTALL_VERSION: 'Dadurch wird die Version {1} {0}',
|
||||
UPDATE_AVAILABLE: 'Firmware-Update verfügbar',
|
||||
LATEST_VERSION: 'Sie verwenden die neueste {0} Firmware-Version',
|
||||
PLEASE_WAIT: 'Bitte warten',
|
||||
@@ -340,7 +340,7 @@ const de: Translation = {
|
||||
ONLINE_HELP: 'Online-Hilfe',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Wichtige Nachrichten aktualisieren',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Für diese Aktualisierung ist ein Werksreset erforderlich. Stellen Sie sicher, dass Sie zuerst eine Systemsicherung herunterladen, bevor Sie fortfahren, und laden Sie diese Datei dann nach der Installation der neuen Version hoch.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Sie aktualisieren auf eine neue Hauptversion. Stellen Sie sicher, dass Sie den ChangeLog für alle wichtigen Änderungen gelesen haben.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Sie aktualisieren auf eine neue major Version. Es ist ratsam, zuerst eine Systemsicherung zu erstellen. Überprüfen Sie auch die Online-Hilfe für eventuelle wichtige Änderungen.',
|
||||
WARNING_SYSTEM_BACKUP: 'Dies wird eine Sicherung Ihrer vollständigen Systemkonfiguration und Einstellungen erstellen. Alle Passwörter werden in dieser Sicherungsdatei lesbar sein. Seien Sie vorsichtig beim Teilen! Möchten Sie fortfahren?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email erfolgreich gesendet',
|
||||
SYSTEM_NAME: 'Systemname',
|
||||
|
||||
@@ -311,7 +311,7 @@ const en: Translation = {
|
||||
ALLVALUES: 'All Values',
|
||||
SPECIAL_FUNCTIONS: 'Special Functions',
|
||||
WAIT_FIRMWARE: 'Firmware is uploading and installing',
|
||||
INSTALL_VERSION: 'This will {0} version {1}. Are you sure?',
|
||||
INSTALL_VERSION: 'This will {0} version {1}',
|
||||
UPDATE_AVAILABLE: 'update available',
|
||||
LATEST_VERSION: 'You are using the latest {0} firmware version',
|
||||
PLEASE_WAIT: 'Please wait',
|
||||
@@ -340,7 +340,7 @@ const en: Translation = {
|
||||
ONLINE_HELP: 'online help',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Upgrade Important Messages',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'This upgrade requires a factory reset. Make sure you first download a System Backup before continuing, and then upload this file after the new version is installed.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'You are upgrading to a new major version. Make sure you have read the ChangeLog for any breaking changes.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'You are upgrading to a new major version. It is advisable to make a system backup first. Also check the online help for any breaking changes.',
|
||||
WARNING_SYSTEM_BACKUP: 'This will create a backup of your full system configuration and settings. All passwords will be readable in the backup file. Be careful with sharing! Do you want to continue?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email sent successfully',
|
||||
SYSTEM_NAME: 'System Name',
|
||||
|
||||
@@ -311,7 +311,7 @@ const fr: Translation = {
|
||||
ALLVALUES: 'Toutes les valeurs',
|
||||
SPECIAL_FUNCTIONS: 'Fonctions spéciales',
|
||||
WAIT_FIRMWARE: 'Firmware en cours de téléchargement et d\'installation',
|
||||
INSTALL_VERSION: 'Cela va {0} la version {1}. Êtes-vous sûr ?',
|
||||
INSTALL_VERSION: 'Cela va {0} la version {1}',
|
||||
UPDATE_AVAILABLE: 'mise à jour disponible',
|
||||
LATEST_VERSION: 'Vous utilisez la dernière version {0} du firmware',
|
||||
PLEASE_WAIT: 'Veuillez patienter',
|
||||
@@ -340,7 +340,7 @@ const fr: Translation = {
|
||||
ONLINE_HELP: 'aide en ligne',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Mettre à jour les messages importants',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Cette mise à jour nécessite une réinitialisation de fabrique. Assurez-vous de télécharger une sauvegarde système avant de continuer, et de la charger après l\'installation de la nouvelle version.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Vous mettez à jour vers une nouvelle version majeure. Assurez-vous de lire le ChangeLog pour tout changement important.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Vous mettez à jour vers une nouvelle version majeure. Il est recommandé de créer d\'abord une sauvegarde système. Vérifiez également l\'aide en ligne pour les éventuelles modifications importantes.',
|
||||
WARNING_SYSTEM_BACKUP: 'Cela créera une sauvegarde de votre configuration et paramètres complets. Tous les mots de passe seront lisibles dans le fichier de sauvegarde. Soyez prudent avec le partage ! Voulez-vous continuer ?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email envoyé avec succès',
|
||||
SYSTEM_NAME: 'Nom du système',
|
||||
|
||||
@@ -311,7 +311,7 @@ const it: Translation = {
|
||||
ALLVALUES: 'Tutti i valori',
|
||||
SPECIAL_FUNCTIONS: 'Funzioni speciali',
|
||||
WAIT_FIRMWARE: 'Firmware è in upload e installazione',
|
||||
INSTALL_VERSION: 'Questo installerà la versione {1} {0}. Sei sicuro?',
|
||||
INSTALL_VERSION: 'Questo installerà la versione {1} {0}',
|
||||
UPDATE_AVAILABLE: 'aggiornamento disponibile',
|
||||
LATEST_VERSION: 'Stai usando la versione più recente del firmware {0}',
|
||||
PLEASE_WAIT: 'Attendere',
|
||||
@@ -340,7 +340,7 @@ const it: Translation = {
|
||||
ONLINE_HELP: 'aiuto online',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Aggiorna Messaggi Importanti',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Questa aggiornamento richiede un ripristino di fabbrica. Assicurati di prima scaricare un backup del sistema prima di continuare, e poi caricare questo file dopo l\'installazione della nuova versione.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Stai aggiornando a una nuova versione principale. Assicurati di aver letto il ChangeLog per qualsiasi cambiamento importante.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Stai aggiornando a una nuova versione major. È consigliabile prima creare un backup del sistema. Controlla anche l\'aiuto online per eventuali modifiche importanti.',
|
||||
WARNING_SYSTEM_BACKUP: 'Questo creerà un backup delle tue configurazioni e impostazioni complete. Tutte le password saranno leggibili nel file di backup. Sei sicuro di voler continuare?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email inviata con successo',
|
||||
SYSTEM_NAME: 'Nome del sistema',
|
||||
|
||||
@@ -311,7 +311,7 @@ const nl: Translation = {
|
||||
ALLVALUES: 'All waarden',
|
||||
SPECIAL_FUNCTIONS: 'Speciale functies',
|
||||
WAIT_FIRMWARE: 'Firmware wordt geüpload en geïnstalleerd',
|
||||
INSTALL_VERSION: 'Hiermee wordt versie {1} {0}. Weet je het zeker?',
|
||||
INSTALL_VERSION: 'Hiermee wordt versie {1} {0}',
|
||||
UPDATE_AVAILABLE: 'update beschikbaar',
|
||||
LATEST_VERSION: 'U gebruikt de nieuwste {0} firmwareversie',
|
||||
PLEASE_WAIT: 'Een ogenblik geduld',
|
||||
@@ -340,7 +340,7 @@ const nl: Translation = {
|
||||
ONLINE_HELP: 'online help',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Upgrade Belangrijke Berichten',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Deze upgrade vereist een fabrieksinstelling. Zorg ervoor dat u eerst een Systeem Backup download voordat u doorgaat, en upload deze file na de installatie van de nieuwe versie.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'U updatet naar een nieuwe grote versie. Zorg ervoor dat u de ChangeLog hebt gelezen voor alle brekende wijzigingen.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'U updatet naar een nieuwe major versie. Het is raadzaam om eerst een systeem backup te maken. Controleer ook de online help voor eventuele brekende wijzigingen.',
|
||||
WARNING_SYSTEM_BACKUP: 'Dit zal een back-up van uw volledige systeemconfiguratie en instellingen maken. Alle wachtwoorden zijn leesbaar in het back-upbestand. Wees voorzichtig bij delen! Wilt u doorgaan?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email verzonden succesvol',
|
||||
SYSTEM_NAME: 'Systeemnaam',
|
||||
|
||||
@@ -311,7 +311,7 @@ const no: Translation = {
|
||||
ALLVALUES: 'Alle verdier',
|
||||
SPECIAL_FUNCTIONS: 'Spesielle funksjoner',
|
||||
WAIT_FIRMWARE: 'Firmware er i opplasting og installasjon',
|
||||
INSTALL_VERSION: 'Dette vil {0} versjon {1}. Er du sikker?',
|
||||
INSTALL_VERSION: 'Dette vil {0} versjon {1}',
|
||||
UPDATE_AVAILABLE: 'oppdatering tilgjengelig',
|
||||
LATEST_VERSION: 'Du bruker den nyeste {0} firmware versjonen',
|
||||
PLEASE_WAIT: 'Vennligst vent',
|
||||
@@ -340,7 +340,7 @@ const no: Translation = {
|
||||
ONLINE_HELP: 'online hjelp',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Oppdater viktige meldinger',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Denne oppdateringen krever en fabriksinstilling. Sørg for at du først lastet ned en System Backup før du fortsetter, og last denne filen etter at den nye versjonen er installert.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Du oppdaterer til en ny hovedversjon. Sørg for at du har lest ChangeLog for eventuelle bruddende endringer.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Du oppdaterer til en ny major versjon. Det er anbefalt å først lage en systembackup. Kontroller også onlinehjelp for eventuelle viktige endringer.',
|
||||
WARNING_SYSTEM_BACKUP: 'Dette vil lage en sikkerhetskopi av din fullstendige systemkonfigurasjon og innstillinger. Alle passord vil være lesbare i sikkerhetskopien. Vær forsiktig med deling! Vil du fortsette?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email sendt suksessfullt',
|
||||
SYSTEM_NAME: 'Systemnavn',
|
||||
|
||||
@@ -311,7 +311,7 @@ const pl: BaseTranslation = {
|
||||
ALLVALUES: 'Wszystkie wartości',
|
||||
SPECIAL_FUNCTIONS: 'Specjalne funkcje',
|
||||
WAIT_FIRMWARE: 'Firmware ściąga się i instaluje',
|
||||
INSTALL_VERSION: 'To zainstaluje wersję {1} {0}. Jesteś pewny?',
|
||||
INSTALL_VERSION: 'To zainstaluje wersję {1} {0}',
|
||||
UPDATE_AVAILABLE: 'aktualizacja dostępna',
|
||||
LATEST_VERSION: 'Jesteś używając najnowszej wersji firmware {0}',
|
||||
PLEASE_WAIT: 'Proszę czekać',
|
||||
@@ -340,7 +340,7 @@ const pl: BaseTranslation = {
|
||||
ONLINE_HELP: 'pomoc online',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizuj ważne wiadomości',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Ta aktualizacja wymaga resetu fabrycznego. Upewnij się, że najpierw pobierzesz kopię zapasową systemu przed kontynuowaniem, a następnie przesuń tę plik po zainstalowaniu nowej wersji.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujesz się do nowej głównej wersji. Upewnij się, że przeczytałeś ChangeLog dla wszelkich istotnych zmian.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujesz się na nową major wersję. Jest to zalecane, aby najpierw utworzyć kopię zapasową systemu. Sprawdź również online pomoc dla ewentualnych istotnych zmian.',
|
||||
WARNING_SYSTEM_BACKUP: 'To spowoduje utworzenie kopii zapasowej całej konfiguracji i ustawień systemu. Wszystkie hasła będą widoczne w pliku kopii zapasowej. Bądź ostrożny przy udostępnianiu! Chcesz kontynuować?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email wysłany pomyślnie',
|
||||
SYSTEM_NAME: 'Nazwa systemu',
|
||||
|
||||
@@ -311,7 +311,7 @@ const sk: Translation = {
|
||||
ALLVALUES: 'Všetky hodnoty',
|
||||
SPECIAL_FUNCTIONS: 'Špeciálne funkcie',
|
||||
WAIT_FIRMWARE: 'Firmvér sa nahráva a inštaluje',
|
||||
INSTALL_VERSION: 'Týmto sa {0} verzia {1}. Si si istý?',
|
||||
INSTALL_VERSION: 'Týmto sa {0} verzia {1}',
|
||||
UPDATE_AVAILABLE: 'dostupná aktualizácia',
|
||||
LATEST_VERSION: 'Používate poslednú {0} verziu firmvéru',
|
||||
PLEASE_WAIT: 'Čakajte prosím',
|
||||
@@ -340,7 +340,7 @@ const sk: Translation = {
|
||||
ONLINE_HELP: 'online pomoc',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizovať dôležité správy',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Táto aktualizácia vyžaduje reštart základných nastavení. Uistite sa, že najprv stiahnete systémovú zálohu pred pokračovaním, a potom nahrajte tento súbor po instalácii novej verzie.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete sa na novú hlavnú verziu. Uistite sa, že ste prečítali ChangeLog pre akékoľvek dôležité zmeny.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete sa na novú major verziu. Je vhodné najprv vytvoriť systémovú zálohu. Taktiež skontrolujte online nápovľu pre akékoľvek dôležité zmeny.',
|
||||
WARNING_SYSTEM_BACKUP: 'Toto vytvorí zálohu všetkých vašich celých systémových konfigurácií a nastavení. Všetky hesla budú čitateľné v zálohovom súbore. Buďte opatrní pri zdieľaní! Chcete pokračovať?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email bol úspešne odoslaný',
|
||||
SYSTEM_NAME: 'Názov systému',
|
||||
|
||||
@@ -311,7 +311,7 @@ const sv: Translation = {
|
||||
ALLVALUES: 'Alla värden',
|
||||
SPECIAL_FUNCTIONS: 'Specialfunktioner',
|
||||
WAIT_FIRMWARE: 'Firmware laddas upp och installeras',
|
||||
INSTALL_VERSION: 'Det här kommer {0} version {1}. Är du säker?',
|
||||
INSTALL_VERSION: 'Det här kommer {0} version {1}',
|
||||
UPDATE_AVAILABLE: 'uppdatering tillgänglig',
|
||||
LATEST_VERSION: 'Du använder den senaste {0} firmwareversionen.',
|
||||
PLEASE_WAIT: 'Var god vänta',
|
||||
@@ -340,7 +340,7 @@ const sv: Translation = {
|
||||
ONLINE_HELP: 'online hjälp',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Uppdatera viktiga meddelanden',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Denna uppdatering kräver en fabriksåterställning. Se till att du först laddar ned en System Backup innan du fortsätter, och ladda upp denna fil efter att den nya versionen är installerad.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Du uppdaterar till en ny huvudversion. Se till att du har läst ChangeLog för eventuella brkande ändringar.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Du uppdaterar till en ny major version. Det är rekommenderat att först skapa en systembackup. Kontrollera också onlinehjälpen för eventuella viktiga ändringar.',
|
||||
WARNING_SYSTEM_BACKUP: 'Detta kommer att skapa en säkerhetskopia av din fullständiga systemkonfiguration och inställningar. Alla lösenord kommer att vara läsbara i säkerhetskopien. Var försiktig med att dela! Vill du fortsätta?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email skickad lyckades',
|
||||
SYSTEM_NAME: 'Systemnamn',
|
||||
|
||||
@@ -311,7 +311,7 @@ const tr: Translation = {
|
||||
ALLVALUES: 'Tüm Değerler',
|
||||
SPECIAL_FUNCTIONS: 'Özel Fonksiyonlar',
|
||||
WAIT_FIRMWARE: 'Firmware yükleniyor ve yükleniyor',
|
||||
INSTALL_VERSION: 'Bu {0} sürümü {1} yükleyecek. Emin misiniz?',
|
||||
INSTALL_VERSION: 'Bu {0} sürümü {1} yükleyecek',
|
||||
UPDATE_AVAILABLE: 'güncellendi!',
|
||||
LATEST_VERSION: 'En son {0} firmware sürümünü kullanıyorsunuz.',
|
||||
PLEASE_WAIT: 'Lütfen bekleyin',
|
||||
@@ -340,7 +340,7 @@ const tr: Translation = {
|
||||
ONLINE_HELP: 'online yardım',
|
||||
UPGRADE_IMPORTANT_MESSAGES: 'Önemli Mesajları Güncelle',
|
||||
UPGRADE_IMPORTANT_MESSAGES_1: 'Bu güncelleme továrnı ayarlarını gerektirir. Yapılandırmanızı ve ayarlarınızı önce yedekleyin ve ardından yeni sürüm yüklendikten sonra yükleyin.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Yeni bir büyük sürüme yükselteceksiniz. Değişiklikleri ChangeLogı okuduğunuzdan emin olun.',
|
||||
UPGRADE_IMPORTANT_MESSAGES_2: 'Yeni bir major sürüme güncelleme yapıyorsunuz. Sistem yedeklemesi yapmanız önerilir. Ayrıca online yardımı kontrol ederek önemli değişiklikleri gözden geçirin.',
|
||||
WARNING_SYSTEM_BACKUP: 'Bu, sistem yapılandırmanızı ve ayarlarınızın bir yedeklemesi oluşturacaktır. Tüm şifreler yedekleme dosyasında okunabilir olacaktır. Paylaşırken dikkatli olun! Devam etmek istediğinize emin misiniz?',
|
||||
TEST_EMAIL_SUCCESSFUL: 'Test email başarıyla gönderildi',
|
||||
SYSTEM_NAME: 'Sistem Adı',
|
||||
|
||||
+20
-23
@@ -98,13 +98,13 @@ let system_status = {
|
||||
wifi_rssi: -41,
|
||||
esp_platform: 'ESP32',
|
||||
build_flags: 'DEMO',
|
||||
cpu_type: 'ESP32',
|
||||
cpu_type: 'ESP32-D0WD-V3',
|
||||
cpu_rev: 0,
|
||||
cpu_cores: 2,
|
||||
cpu_freq_mhz: 240,
|
||||
max_alloc_heap: 191,
|
||||
arduino_version: 'ESP32 Arduino v2.0.17',
|
||||
sdk_version: 'v4.4.7',
|
||||
arduino_version: 'Tasmota Arduino v3.3.8',
|
||||
sdk_version: '5.5.4.260407',
|
||||
partition: 'app0',
|
||||
flash_chip_size: 16384,
|
||||
flash_chip_speed: 80000000,
|
||||
@@ -127,13 +127,13 @@ let system_status = {
|
||||
},
|
||||
{
|
||||
partition: 'app1',
|
||||
version: '3.8.1-dev.40',
|
||||
version: '3.8.3',
|
||||
install_date: '2025-03-01T13:29:13.999Z',
|
||||
size: 4672
|
||||
},
|
||||
{
|
||||
partition: 'factory',
|
||||
version: '3.8.1-dev.39',
|
||||
version: '3.8.4',
|
||||
install_date: '2025-03-01T13:29:13.999Z',
|
||||
size: 4672
|
||||
}
|
||||
@@ -141,24 +141,22 @@ let system_status = {
|
||||
// partitions: [],
|
||||
developer_mode: settings.developer_mode,
|
||||
disable_reset: settings.disable_reset,
|
||||
model: '',
|
||||
board: '',
|
||||
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
|
||||
// board: 'E32V2',
|
||||
// status: 0,
|
||||
status: 3
|
||||
model: 'BBQKees Electronics E32V2.2 rev.2.2/2024074',
|
||||
board: 'E32V2_2',
|
||||
status: 0
|
||||
// status: 3
|
||||
};
|
||||
|
||||
// Test Versioning
|
||||
// Test the versioning
|
||||
let DEV_VERSION_IS_UPGRADEABLE: boolean;
|
||||
let STABLE_VERSION_IS_UPGRADEABLE: boolean;
|
||||
let THIS_VERSION: string;
|
||||
let LATEST_STABLE_VERSION = '3.8.3';
|
||||
let LATEST_STABLE_VERSION = '3.8.4';
|
||||
let LATEST_DEV_VERSION = '3.9.0-dev.1';
|
||||
|
||||
// scenarios for testing versioning
|
||||
// let version_test = 0; // on latest stable, or switch to dev
|
||||
let version_test = 1; // on latest dev, or switch back to stable
|
||||
let version_test = 0; // on latest stable, or switch to dev
|
||||
// let version_test = 1; // on latest dev, or switch back to stable
|
||||
// let version_test = 2; // upgrade an older stable to latest stable or switch to latest dev
|
||||
// let version_test = 3; // upgrade dev to latest, or switch to stable
|
||||
// let version_test = 4; // downgrade to an older dev, or switch back to stable
|
||||
@@ -446,25 +444,24 @@ function executeCommand(name: string) {
|
||||
}
|
||||
|
||||
// called by Action endpoint upgradeImportantMessages
|
||||
// 0 is do nothing
|
||||
// 1 is a special upgrade and needs an export->factory reset->import
|
||||
// 2 is a major upgrade
|
||||
function upgradeImportantMessages(version: string) {
|
||||
// 0 is do nothing
|
||||
// 1 means 3.9 and factory reset required
|
||||
// 2 means a major version upgrade
|
||||
|
||||
let upgradeImportantMessageType_n = 0;
|
||||
|
||||
// check file extensions
|
||||
// check file extensions first
|
||||
if (version.endsWith('.md5') || version.endsWith('.json')) {
|
||||
upgradeImportantMessageType_n = 0; // digest / backup restore: no upgrade warning
|
||||
} else if (version.endsWith('.bin')) {
|
||||
// extract the version number from the filename and if its going from 3.8.x to 3.9.x, then set upgradeImportantMessageType_n to 1
|
||||
const versionNumber = version.split('.');
|
||||
if (versionNumber[0] === '3' && versionNumber[1] === '8') {
|
||||
upgradeImportantMessageType_n = 1; // make it 1, factory reset required
|
||||
upgradeImportantMessageType_n = 2; // major upgrade
|
||||
}
|
||||
} else {
|
||||
// this is a version string like "3.9.0"
|
||||
upgradeImportantMessageType_n = 1; // make it 1, for testing, meaning a factory reset is required
|
||||
// the parameter is a version string like "3.9.0"
|
||||
upgradeImportantMessageType_n = 2; // major upgrade
|
||||
}
|
||||
|
||||
console.log(
|
||||
|
||||
@@ -41,7 +41,8 @@ custom_password = admin
|
||||
; ** upload settings **
|
||||
; for direct USB, which is the default you can set an optional port for example:
|
||||
; upload_port = /dev/ttyUSB0 or COM3
|
||||
;
|
||||
; upload_speed = 921600
|
||||
|
||||
; for direct via HTTP (OTA) set:
|
||||
; upload_protocol = custom
|
||||
; custom_emsesp_ip = <ip address> or ems-esp.local
|
||||
|
||||
+29
-28
@@ -6,9 +6,9 @@ abluftqualität
|
||||
abluftqualitätsfühler
|
||||
abrt
|
||||
absburnpow
|
||||
ACAC
|
||||
ACAH
|
||||
ACAO
|
||||
acac
|
||||
acah
|
||||
acao
|
||||
accomodate
|
||||
aceotrope
|
||||
activehigh
|
||||
@@ -48,6 +48,7 @@ appused
|
||||
apssid
|
||||
apsta
|
||||
arduhal
|
||||
arduinoespressif
|
||||
arduinojson
|
||||
arduinoota
|
||||
arjan
|
||||
@@ -70,6 +71,7 @@ ausreichend
|
||||
authmode
|
||||
autodst
|
||||
automode
|
||||
autonegotiation
|
||||
autoscroll
|
||||
auxelecheatnrgcons
|
||||
auxelecheatnrgconsheating
|
||||
@@ -139,6 +141,7 @@ bytetime
|
||||
calinttemp
|
||||
catagory
|
||||
cbuf
|
||||
ccrc
|
||||
cerapur
|
||||
cfamily
|
||||
changeloglevel
|
||||
@@ -289,6 +292,7 @@ dewoffset
|
||||
dewpoint
|
||||
dewtemp
|
||||
dewtemperature
|
||||
dhcpc
|
||||
dhwmintemp
|
||||
dhwprio
|
||||
dhwvalve
|
||||
@@ -362,6 +366,7 @@ entitypath
|
||||
enumupdate
|
||||
enviline
|
||||
equipt
|
||||
eraseap
|
||||
erct
|
||||
erdwärmetauscher
|
||||
errordisp
|
||||
@@ -458,6 +463,7 @@ gpoc
|
||||
greenstar
|
||||
grokhotkov
|
||||
haclimate
|
||||
handshaked
|
||||
hardwarestatus
|
||||
harwerth
|
||||
headersize
|
||||
@@ -501,7 +507,7 @@ heatsource
|
||||
heatsources
|
||||
heatstarts
|
||||
heattemp
|
||||
heattransfer
|
||||
heattransfer
|
||||
heattransfersystem
|
||||
heatup
|
||||
heatvalve
|
||||
@@ -578,6 +584,7 @@ iconua
|
||||
idedata
|
||||
iele
|
||||
ignwork
|
||||
iile
|
||||
iiwi
|
||||
ijoy
|
||||
imlhd
|
||||
@@ -615,6 +622,7 @@ itty
|
||||
ivtclock
|
||||
jtag
|
||||
junkersclock
|
||||
juststopped
|
||||
kamin
|
||||
karlesky
|
||||
keelbypass
|
||||
@@ -706,6 +714,7 @@ mbap
|
||||
mbar
|
||||
mbed
|
||||
mbedtsl
|
||||
mbit
|
||||
mdio
|
||||
mdns
|
||||
melis
|
||||
@@ -744,7 +753,7 @@ mlongcalls
|
||||
mmio
|
||||
mmode
|
||||
mmplus
|
||||
mockServer
|
||||
mockserver
|
||||
modbus
|
||||
modee
|
||||
modetype
|
||||
@@ -762,6 +771,7 @@ msgstr
|
||||
msys
|
||||
mtext
|
||||
mult
|
||||
mwdt
|
||||
mysys
|
||||
nachheiz
|
||||
nachheizreg
|
||||
@@ -780,6 +790,7 @@ neopixel
|
||||
netcmp
|
||||
netflowtemp
|
||||
netif
|
||||
netifs
|
||||
newdatetime
|
||||
newnow
|
||||
newpcb
|
||||
@@ -836,6 +847,7 @@ oilpreheat
|
||||
oldoffset
|
||||
olimex
|
||||
olimexpoe
|
||||
olimexpoew
|
||||
omea
|
||||
onchange
|
||||
onetimekey
|
||||
@@ -843,6 +855,7 @@ onewire
|
||||
ooops
|
||||
operatingstate
|
||||
opmode
|
||||
optimisations
|
||||
optipng
|
||||
osrc
|
||||
outdoorhold
|
||||
@@ -877,7 +890,7 @@ poolsettemp
|
||||
poolshunt
|
||||
poolshuntstatus
|
||||
poolstarts
|
||||
pooltemp
|
||||
pooltemp
|
||||
portx
|
||||
powerreduction
|
||||
powervalues
|
||||
@@ -944,7 +957,7 @@ rawstr
|
||||
rcplus
|
||||
readback
|
||||
readelf
|
||||
READYCLIENT
|
||||
readyclient
|
||||
readymail
|
||||
recp
|
||||
recved
|
||||
@@ -1000,6 +1013,7 @@ roomsettings
|
||||
roomtemp
|
||||
roomtempdiff
|
||||
roomtemperature
|
||||
roomtempoffset
|
||||
roomthermostat
|
||||
roomthermostats
|
||||
rrts
|
||||
@@ -1029,6 +1043,7 @@ seltemp
|
||||
seltemplow
|
||||
seltempoff
|
||||
seltempsingle
|
||||
sendmail
|
||||
sendtype
|
||||
sensordata
|
||||
sensorfails
|
||||
@@ -1037,6 +1052,7 @@ sensorname
|
||||
sensorreads
|
||||
sensortype
|
||||
seperator
|
||||
serialises
|
||||
serverclass
|
||||
servicecode
|
||||
servicecodenumber
|
||||
@@ -1087,11 +1103,13 @@ soll
|
||||
speicher
|
||||
spidqs
|
||||
spiio
|
||||
spiram
|
||||
squaremeters
|
||||
srts
|
||||
staconnected
|
||||
stadisconnected
|
||||
staipassigned
|
||||
startm
|
||||
startshp
|
||||
starttemp
|
||||
starttemperature
|
||||
@@ -1112,6 +1130,7 @@ substract
|
||||
summermode
|
||||
summersetmode
|
||||
summertemp
|
||||
sumr
|
||||
supchan
|
||||
suprapur
|
||||
svenska
|
||||
@@ -1161,6 +1180,7 @@ tempparmode
|
||||
temprature
|
||||
tempsensor
|
||||
tempstatus
|
||||
testemail
|
||||
testtemperature
|
||||
thermaldisinfect
|
||||
thermostate
|
||||
@@ -1271,6 +1291,7 @@ werror
|
||||
wextra
|
||||
whenmodeoff
|
||||
wificlient
|
||||
wifioff
|
||||
wifireconnects
|
||||
wifistrength
|
||||
winsock
|
||||
@@ -1281,6 +1302,7 @@ workm
|
||||
workmin
|
||||
worktime
|
||||
wouldblock
|
||||
wrover
|
||||
wswitch
|
||||
wtype
|
||||
wunused
|
||||
@@ -1330,24 +1352,3 @@ zyxwvutsrqponmlkjihgfedcba
|
||||
öffnen
|
||||
česky
|
||||
živanović
|
||||
MWDT
|
||||
juststopped
|
||||
handshaked
|
||||
startm
|
||||
netifs
|
||||
testemail
|
||||
sendmail
|
||||
serialises
|
||||
SPIRAM
|
||||
optimisations
|
||||
IILE
|
||||
Sumr
|
||||
eraseap
|
||||
roomtempoffset
|
||||
dhcpc
|
||||
wifioff
|
||||
autonegotiation
|
||||
Mbit
|
||||
WROVER
|
||||
OLIMEXPOEW
|
||||
arduinoespressif
|
||||
@@ -319,7 +319,7 @@ static void setup_commands(std::shared_ptr<Commands> const & commands) {
|
||||
settings.eth_clock_mode = data[8];
|
||||
return StateUpdateResult::CHANGED;
|
||||
});
|
||||
shell.printfln("Loaded board profile %s. Restarting...", board_profile.c_str());
|
||||
shell.printfln("Set board profile to %s. Restarting...", board_profile.c_str());
|
||||
EMSESP::system_.system_restart();
|
||||
});
|
||||
|
||||
|
||||
+19
-14
@@ -21,6 +21,7 @@
|
||||
#ifndef EMSESP_STANDALONE
|
||||
#include "esp_ota_ops.h"
|
||||
#include "rom/rtc.h"
|
||||
#include "littlefs_compat.h"
|
||||
#endif
|
||||
|
||||
static_assert(uuid::thread_safe, "uuid-common must be thread-safe");
|
||||
@@ -1723,22 +1724,26 @@ void EMSESP::start() {
|
||||
|
||||
// start the file system
|
||||
#ifndef EMSESP_STANDALONE
|
||||
#if defined(EMSESP_DEBUG)
|
||||
// don't format the filesystem in debug mode
|
||||
if (!LittleFS.begin(false)) {
|
||||
LOG_ERROR("LittleFS Mount Failed. Attempting to convert...");
|
||||
return;
|
||||
} else {
|
||||
// it mounted, show the contents of the root directory
|
||||
LOG_DEBUG("Listing root directory before:");
|
||||
system_.listDir("/", 3);
|
||||
}
|
||||
#else
|
||||
// format filesystem if there isn't one
|
||||
if (!LittleFS.begin(true)) {
|
||||
LOG_ERROR("LittleFS Mount Failed");
|
||||
return;
|
||||
// A partition written by an Arduino Core 2 build is readable but records limits
|
||||
// this build refuses to mount. Rewrite the superblock and retry before resorting
|
||||
// to a format, which would throw away the user's settings.
|
||||
if (littlefs_migrate() && LittleFS.begin(false)) {
|
||||
LOG_NOTICE("Converted Filesystem to new format");
|
||||
} else if (LittleFS.begin(true)) {
|
||||
LOG_WARNING("Formatted Filesystem, any previous settings have been lost");
|
||||
} else {
|
||||
// if we reach here, nothing will ever work so go into a infinite loop
|
||||
Serial.println("LittleFS Mount Failed. Cannot start EMS-ESP");
|
||||
while (true) {
|
||||
delay(1000);
|
||||
yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(EMSESP_DEBUG)
|
||||
LOG_DEBUG("Listing root directory before:");
|
||||
system_.listDir("/", 3);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2025 emsesp.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// A LittleFS partition written by an Arduino Core 2 build will not mount under the
|
||||
// esp_littlefs that ships with Core 3, even though every byte of it is readable. Two
|
||||
// fields of the superblock are compatibility gates rather than real format differences,
|
||||
// and lfs_mount() rejects the filesystem on either one:
|
||||
//
|
||||
// name_max Core 2 used the upstream default of 255, while esp_littlefs derives 63 from
|
||||
// CONFIG_LITTLEFS_OBJ_NAME_LEN and refuses anything larger. Storing 0 means
|
||||
// "use the library's own limit", which is what a Core 3 format writes.
|
||||
// version Core 2 recorded v2.1 and this build writes v2.0, and a higher minor is
|
||||
// refused. The library here understands everything a v2.1 image holds, so
|
||||
// lowering the field is enough.
|
||||
//
|
||||
// Rewriting them means walking the metadata block by hand. A block holds a revision count
|
||||
// followed by a chain of commits, each one a run of tags terminated by a CCRC tag and a
|
||||
// CRC covering everything that commit wrote. Tags are stored big endian and XORed with the
|
||||
// preceding tag, so the chain has to be replayed from the start to find anything. The
|
||||
// superblock struct is not at a fixed offset either: on a filesystem that has been written
|
||||
// to, directory entries are committed ahead of it.
|
||||
|
||||
#ifndef EMSESP_STANDALONE
|
||||
|
||||
#include "littlefs_compat.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <esp_partition.h>
|
||||
#include <sdkconfig.h>
|
||||
|
||||
namespace emsesp {
|
||||
|
||||
namespace {
|
||||
|
||||
#ifndef CONFIG_LITTLEFS_OBJ_NAME_LEN
|
||||
#define CONFIG_LITTLEFS_OBJ_NAME_LEN 64
|
||||
#endif
|
||||
constexpr uint32_t NAME_MAX_SUPPORTED = CONFIG_LITTLEFS_OBJ_NAME_LEN - 1;
|
||||
constexpr uint32_t DISK_VERSION_TARGET = 0x00020000;
|
||||
|
||||
// littlefs block size on the ESP32, which is the flash sector size
|
||||
constexpr uint32_t BLOCK_SIZE = 4096;
|
||||
|
||||
// byte offsets within lfs_superblock_t, all little endian uint32_t
|
||||
constexpr uint32_t SB_VERSION = 0;
|
||||
constexpr uint32_t SB_BLOCK_SIZE = 4;
|
||||
constexpr uint32_t SB_NAME_MAX = 12;
|
||||
constexpr uint32_t SB_SIZE = 24;
|
||||
|
||||
// tag accessors, mirroring lfs.c
|
||||
constexpr uint32_t TYPE_INLINESTRUCT = 0x201;
|
||||
constexpr uint32_t TYPE_CCRC = 0x500;
|
||||
|
||||
constexpr bool tag_isvalid(uint32_t t) {
|
||||
return (t & 0x80000000) == 0;
|
||||
}
|
||||
constexpr uint32_t tag_type2(uint32_t t) {
|
||||
return (t & 0x78000000) >> 20;
|
||||
}
|
||||
constexpr uint32_t tag_type3(uint32_t t) {
|
||||
return (t & 0x7ff00000) >> 20;
|
||||
}
|
||||
constexpr uint32_t tag_chunk(uint32_t t) {
|
||||
return (t & 0x0ff00000) >> 20;
|
||||
}
|
||||
constexpr uint32_t tag_id(uint32_t t) {
|
||||
return (t & 0x000ffc00) >> 10;
|
||||
}
|
||||
constexpr uint32_t tag_size(uint32_t t) {
|
||||
return t & 0x3ff;
|
||||
}
|
||||
// a size of 0x3ff marks a delete tag, which carries no payload
|
||||
constexpr uint32_t tag_dsize(uint32_t t) {
|
||||
return 4 + (tag_size(t) == 0x3ff ? 0 : tag_size(t));
|
||||
}
|
||||
|
||||
uint32_t rd_be32(const uint8_t * p) {
|
||||
return (static_cast<uint32_t>(p[0]) << 24) | (static_cast<uint32_t>(p[1]) << 16) | (static_cast<uint32_t>(p[2]) << 8) | p[3];
|
||||
}
|
||||
uint32_t rd_le32(const uint8_t * p) {
|
||||
return (static_cast<uint32_t>(p[3]) << 24) | (static_cast<uint32_t>(p[2]) << 16) | (static_cast<uint32_t>(p[1]) << 8) | p[0];
|
||||
}
|
||||
void wr_le32(uint8_t * p, uint32_t v) {
|
||||
p[0] = static_cast<uint8_t>(v);
|
||||
p[1] = static_cast<uint8_t>(v >> 8);
|
||||
p[2] = static_cast<uint8_t>(v >> 16);
|
||||
p[3] = static_cast<uint8_t>(v >> 24);
|
||||
}
|
||||
|
||||
// the CRC-32 littlefs commits with: reflected 0x04C11DB7, seeded 0xffffffff, no final xor
|
||||
uint32_t lfs_crc(uint32_t crc, const void * buffer, size_t size) {
|
||||
static const uint32_t rtable[16] = {
|
||||
0x00000000,
|
||||
0x1db71064,
|
||||
0x3b6e20c8,
|
||||
0x26d930ac,
|
||||
0x76dc4190,
|
||||
0x6b6b51f4,
|
||||
0x4db26158,
|
||||
0x5005713c,
|
||||
0xedb88320,
|
||||
0xf00f9344,
|
||||
0xd6d6a3e8,
|
||||
0xcb61b38c,
|
||||
0x9b64c2b0,
|
||||
0x86d3d2d4,
|
||||
0xa00ae278,
|
||||
0xbdbdf21c,
|
||||
};
|
||||
const uint8_t * data = static_cast<const uint8_t *>(buffer);
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
crc = (crc >> 4) ^ rtable[(crc ^ data[i]) & 0xf];
|
||||
crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 4)) & 0xf];
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
// where the superblock lives, and which bytes the CRC of its commit covers
|
||||
struct Located {
|
||||
bool found = false;
|
||||
uint32_t struct_off = 0; // start of the 24 byte lfs_superblock_t
|
||||
uint32_t commit_start = 0; // first byte the commit's CRC covers
|
||||
uint32_t crc_off = 0; // where that CRC is stored
|
||||
};
|
||||
|
||||
// Replays a metadata block's commit chain the same way lfs_dir_fetchmatch() does, keeping
|
||||
// the last superblock struct that belongs to a commit whose CRC verifies. Reporting
|
||||
// nothing until a stored CRC matches means a successful scan also proves we are reading
|
||||
// the tag stream correctly, so we never write back a block we misunderstood.
|
||||
Located locate_superblock(const uint8_t * buf) {
|
||||
Located found;
|
||||
uint32_t off = 0;
|
||||
uint32_t ptag = 0xffffffff;
|
||||
uint32_t commit_start = 0;
|
||||
uint32_t crc = lfs_crc(0xffffffff, buf, 4); // the revision count leads the first commit
|
||||
bool pending = false;
|
||||
uint32_t pending_off = 0;
|
||||
|
||||
while (true) {
|
||||
off += tag_dsize(ptag);
|
||||
if (off + 4 > BLOCK_SIZE) {
|
||||
break;
|
||||
}
|
||||
|
||||
crc = lfs_crc(crc, &buf[off], 4);
|
||||
const uint32_t tag = rd_be32(&buf[off]) ^ ptag;
|
||||
|
||||
if (!tag_isvalid(tag)) {
|
||||
break; // nothing committed beyond this point
|
||||
}
|
||||
if (off + tag_dsize(tag) > BLOCK_SIZE) {
|
||||
break;
|
||||
}
|
||||
ptag = tag;
|
||||
|
||||
if (tag_type2(tag) == TYPE_CCRC) {
|
||||
if (crc != rd_le32(&buf[off + 4])) {
|
||||
break; // commit never completed, so the chain ends here
|
||||
}
|
||||
if (pending) {
|
||||
found.found = true;
|
||||
found.struct_off = pending_off;
|
||||
found.commit_start = commit_start;
|
||||
found.crc_off = off + 4;
|
||||
pending = false;
|
||||
}
|
||||
ptag ^= (tag_chunk(tag) & 1u) << 31;
|
||||
crc = 0xffffffff;
|
||||
commit_start = off + tag_dsize(tag); // the padding after the CRC is not covered
|
||||
continue;
|
||||
}
|
||||
|
||||
crc = lfs_crc(crc, &buf[off + 4], tag_dsize(tag) - 4);
|
||||
|
||||
if (tag_type3(tag) == TYPE_INLINESTRUCT && tag_id(tag) == 0 && tag_size(tag) == SB_SIZE) {
|
||||
pending = true;
|
||||
pending_off = off + 4;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
// resolve the same partition esp_littlefs would pick
|
||||
const esp_partition_t * find_partition(const char * partition_label) {
|
||||
if (partition_label != nullptr) {
|
||||
return esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, partition_label);
|
||||
}
|
||||
// 0x83 is the littlefs subtype, 0x82 the spiffs one that older partition tables use
|
||||
const esp_partition_t * part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, static_cast<esp_partition_subtype_t>(0x83), nullptr);
|
||||
if (part != nullptr) {
|
||||
return part;
|
||||
}
|
||||
return esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_SPIFFS, nullptr);
|
||||
}
|
||||
|
||||
bool patch_block(const esp_partition_t * part, uint32_t block, uint8_t * buf) {
|
||||
const uint32_t addr = block * BLOCK_SIZE;
|
||||
|
||||
if (esp_partition_read(part, addr, buf, BLOCK_SIZE) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const Located sb = locate_superblock(buf);
|
||||
if (!sb.found) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t * s = buf + sb.struct_off;
|
||||
if (rd_le32(s + SB_BLOCK_SIZE) != BLOCK_SIZE) {
|
||||
return false; // geometry we did not expect means we are not reading a superblock
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
|
||||
if (rd_le32(s + SB_NAME_MAX) > NAME_MAX_SUPPORTED) {
|
||||
wr_le32(s + SB_NAME_MAX, 0);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
const uint32_t version = rd_le32(s + SB_VERSION);
|
||||
if (version > DISK_VERSION_TARGET && (version >> 16) == (DISK_VERSION_TARGET >> 16)) {
|
||||
wr_le32(s + SB_VERSION, DISK_VERSION_TARGET);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (!changed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
wr_le32(buf + sb.crc_off, lfs_crc(0xffffffff, buf + sb.commit_start, sb.crc_off - sb.commit_start));
|
||||
|
||||
return esp_partition_erase_range(part, addr, BLOCK_SIZE) == ESP_OK && esp_partition_write(part, addr, buf, BLOCK_SIZE) == ESP_OK;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool littlefs_migrate(const char * partition_label) {
|
||||
const esp_partition_t * part = find_partition(partition_label);
|
||||
if (part == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t * buf = static_cast<uint8_t *>(malloc(BLOCK_SIZE));
|
||||
if (buf == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Blocks 0 and 1 are the root metadata pair. Rewriting them one at a time keeps one
|
||||
// readable copy available for littlefs to fall back on if we lose power mid-write.
|
||||
bool patched = false;
|
||||
for (uint32_t block = 0; block < 2; block++) {
|
||||
if (patch_block(part, block, buf)) {
|
||||
patched = true;
|
||||
}
|
||||
}
|
||||
|
||||
free(buf);
|
||||
return patched;
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* EMS-ESP - https://github.com/emsesp/EMS-ESP
|
||||
* Copyright 2020-2025 emsesp.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef EMSESP_LITTLEFS_COMPAT_H_
|
||||
#define EMSESP_LITTLEFS_COMPAT_H_
|
||||
|
||||
namespace emsesp {
|
||||
|
||||
// Rewrites the superblock of a LittleFS partition created by an Arduino Core 2 build so
|
||||
// that this build's littlefs will mount it. Only call once a mount has already failed.
|
||||
// Returns true if flash was changed, meaning another mount attempt is worth making.
|
||||
bool littlefs_migrate(const char * partition_label = nullptr);
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
#endif
|
||||
+5
-2
@@ -487,7 +487,8 @@ void System::get_partition_info() {
|
||||
auto current_partition = (const char *)esp_ota_get_running_partition()->label;
|
||||
|
||||
// update the current version and partition name in NVS if not already set
|
||||
if (EMSESP::nvs_.getString(current_partition) != EMSESP_APP_VERSION || emsesp::EMSESP::nvs_.getBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, true)) {
|
||||
if (!EMSESP::nvs_.isKey(current_partition) || EMSESP::nvs_.getString(current_partition) != EMSESP_APP_VERSION
|
||||
|| emsesp::EMSESP::nvs_.getBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, true)) {
|
||||
EMSESP::nvs_.putBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, false);
|
||||
EMSESP::nvs_.putString(current_partition, EMSESP_APP_VERSION);
|
||||
char c[20];
|
||||
@@ -519,7 +520,9 @@ void System::get_partition_info() {
|
||||
if (is_valid) {
|
||||
PartitionInfo p_info;
|
||||
// if there is an entry for this partition in NVS, get it's version from NVS
|
||||
p_info.version = EMSESP::nvs_.getString(part->label, "").c_str();
|
||||
if (EMSESP::nvs_.isKey(part->label)) {
|
||||
p_info.version = EMSESP::nvs_.getString(part->label).c_str();
|
||||
}
|
||||
char c[20];
|
||||
snprintf(c, sizeof(c), "d_%s", (const char *)part->label);
|
||||
time_t d = EMSESP::nvs_.getULong(c, 0);
|
||||
|
||||
@@ -199,7 +199,7 @@ void TemperatureSensor::loop() {
|
||||
if (firstscan_ > 0 && set_internal_) {
|
||||
set_internal_ = false;
|
||||
Sensor * s = &sensors_[0];
|
||||
if (firstscan_ > 1) {
|
||||
if (firstscan_ > 1 && EMSESP::nvs_.isKey("intTemp")) {
|
||||
std::string s_nvs = EMSESP::nvs_.getString("intTemp").c_str();
|
||||
for (uint8_t i = 0; i < firstscan_; i++) {
|
||||
if (s_nvs == sensors_[i].id()) {
|
||||
|
||||
@@ -465,7 +465,7 @@ void WebSettings::set_board_profile(WebSettings & settings) {
|
||||
String bbq_board = EMSESP::system_.getBBQKeesGatewayDetails(FUSE_VALUE::BOARD);
|
||||
if (!bbq_board.isEmpty() && settings.board_profile != "CUSTOM") {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().info("Overriding board profile with eFuse value %s", bbq_board.c_str());
|
||||
EMSESP::logger().debug("Overriding board profile with eFuse value %s", bbq_board.c_str());
|
||||
#endif
|
||||
settings.board_profile = bbq_board;
|
||||
}
|
||||
@@ -532,9 +532,9 @@ void WebSettings::set_board_profile(WebSettings & settings) {
|
||||
#ifndef EMSESP_STANDALONE
|
||||
uint32_t psram_size = ESP.getPsramSize() / 1024; // in KB
|
||||
if (psram_size > 0) {
|
||||
EMSESP::logger().info("Loaded board profile %s (PSRAM: %lu KB)", settings.board_profile.c_str(), psram_size);
|
||||
EMSESP::logger().info("Applied board profile %s (PSRAM: %lu KB)", settings.board_profile.c_str(), psram_size);
|
||||
} else {
|
||||
EMSESP::logger().info("Loaded board profile %s (PSRAM: not available)", settings.board_profile.c_str());
|
||||
EMSESP::logger().info("Applied board profile %s (PSRAM: not available)", settings.board_profile.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -258,9 +258,9 @@ void WebStatusService::action(AsyncWebServerRequest * request, JsonVariant json)
|
||||
|
||||
// action = upgradeImportantMessages
|
||||
// returns the type of upgrade important message to display in the UI
|
||||
// 0 = no message (if just a minor version upgrade)
|
||||
// 1 = going from <= 3.8 to 3.9 (has new partition layout)
|
||||
// 2 = major version upgrade
|
||||
// 0 = no message (if just a minor version upgrade)
|
||||
// 1 = special message for upgrades (no longer used)
|
||||
// 2 = major version upgrade
|
||||
// version can be like 3.8.2 or a filename like EMS-ESP-3_8_2-dev_13-ESP32-16MB+.bin
|
||||
uint8_t WebStatusService::upgradeImportantMessages(std::string & version) {
|
||||
if (version.empty()) {
|
||||
@@ -307,9 +307,10 @@ uint8_t WebStatusService::upgradeImportantMessages(std::string & version) {
|
||||
return 0; // no upgrade (same version or downgrade)
|
||||
}
|
||||
|
||||
if (current_version < FirmwareVersion("3.9.0-dev.0") && latest_version.major() == 3 && latest_version.minor() == 9) {
|
||||
return 1; // upgrading to 3.9.x from anything older - new partition layout warning
|
||||
}
|
||||
// case "1" is no longer used
|
||||
// if (current_version < FirmwareVersion("3.9.0-dev.0") && latest_version.major() == 3 && latest_version.minor() == 9) {
|
||||
// return 1; // upgrading to 3.9.x from anything older - new partition layout warning
|
||||
// }
|
||||
|
||||
if (current_version.major() < latest_version.major()) {
|
||||
return 2; // major version upgrade
|
||||
|
||||
Reference in New Issue
Block a user