diff --git a/esphome/nspanel_esphome_core_boot.yaml b/esphome/nspanel_esphome_core_boot.yaml index a64b79e51..f3309086f 100644 --- a/esphome/nspanel_esphome_core_boot.yaml +++ b/esphome/nspanel_esphome_core_boot.yaml @@ -45,17 +45,6 @@ display: } } -esphome: - on_boot: - - priority: 500 - then: - - script.execute: boot_sequence - - script.wait: boot_sequence - - lambda: |- - boot_log->execute("Boot", "Jump to wake-up page"); - goto_page->execute(wakeup_page_name->state.c_str(), true); - set_variable_value->execute("wakeup_page_id", get_page_id(wakeup_page_name->state.c_str())); - script: - id: boot_event mode: restart @@ -124,6 +113,13 @@ script: condition: - lambda: return disp1->is_setup(); timeout: 10s + - lambda: |- + if (current_page->state != "boot") + boot_log->execute("Boot", "Waiting for page Boot"); + - wait_until: + condition: + - lambda: return current_page->state == "boot"; + timeout: 10s - lambda: |- if (!wifi_component->is_connected()) boot_log->execute("Boot", "Waiting for Wi-Fi"); diff --git a/esphome/nspanel_esphome_core_page_home.yaml b/esphome/nspanel_esphome_core_page_home.yaml index ed6d40a4c..54956a7e3 100644 --- a/esphome/nspanel_esphome_core_page_home.yaml +++ b/esphome/nspanel_esphome_core_page_home.yaml @@ -74,9 +74,8 @@ script: - lambda: |- disp1->send_command_printf("home.chip%02" PRIu32 ".font=%" PRIu8, iteration, chip_font); - script.execute: - id: boot_progress - step: ${BOOT_STEP_PAGE_HOME} - step_name: Page Home - Chip font + id: page_home_boot_progress + sub_step_name: Chip font - id: custom_buttons_font mode: restart @@ -97,9 +96,8 @@ script: - lambda: |- disp1->send_command_printf("home.button%02" PRIu32 ".font=%" PRIu8, iteration, custom_buttons_font); - script.execute: - id: boot_progress - step: ${BOOT_STEP_PAGE_HOME} - step_name: Page Home - Custom buttons font + id: page_home_boot_progress + sub_step_name: Custom buttons font - id: !extend boot_sequence then: @@ -123,6 +121,22 @@ script: # - nspanel_esphome_core_hw_wifi.yaml # - nspanel_esphome_core_page_weather.yaml + - id: page_home_boot_progress + mode: queued + parameters: + sub_step_name: string + then: + - lambda: |- + static uint8_t page_home_boot_steps_count = 0; + page_home_boot_steps_count++; + ESP_LOGW("DEBUG", "page_home_boot_steps_count: %" PRIu8, page_home_boot_steps_count); + boot_progress->execute(${BOOT_STEP_PAGE_HOME}, ("Page Home - " + sub_step_name).c_str()); + if (current_page->state == "boot" and wakeup_page_name->state == "home") { + ESP_LOGI("script.page_home_boot_progress", "Jump to Home page"); + goto_page->execute("home", true); + set_variable_value->execute("wakeup_page_id", get_page_id("home")); + } + - id: !extend set_var_int then: - lambda: |- @@ -146,4 +160,5 @@ script: chip_font->stop(); custom_buttons_font->stop(); page_home->stop(); + page_home_boot_progress->stop(); ... diff --git a/hmi/dev/nspanel_CJK_eu_code/boot.txt b/hmi/dev/nspanel_CJK_eu_code/boot.txt index 0fd8668bf..a10792e24 100644 --- a/hmi/dev/nspanel_CJK_eu_code/boot.txt +++ b/hmi/dev/nspanel_CJK_eu_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/dev/nspanel_CJK_us_code/boot.txt b/hmi/dev/nspanel_CJK_us_code/boot.txt index 3dca5776b..f3dd06941 100644 --- a/hmi/dev/nspanel_CJK_us_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/dev/nspanel_CJK_us_land_code/boot.txt b/hmi/dev/nspanel_CJK_us_land_code/boot.txt index 0fd8668bf..a10792e24 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/dev/nspanel_eu_code/boot.txt b/hmi/dev/nspanel_eu_code/boot.txt index 0fd8668bf..a10792e24 100644 --- a/hmi/dev/nspanel_eu_code/boot.txt +++ b/hmi/dev/nspanel_eu_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/dev/nspanel_us_code/boot.txt b/hmi/dev/nspanel_us_code/boot.txt index 3dca5776b..f3dd06941 100644 --- a/hmi/dev/nspanel_us_code/boot.txt +++ b/hmi/dev/nspanel_us_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/dev/nspanel_us_land_code/boot.txt b/hmi/dev/nspanel_us_land_code/boot.txt index 0fd8668bf..a10792e24 100644 --- a/hmi/dev/nspanel_us_land_code/boot.txt +++ b/hmi/dev/nspanel_us_land_code/boot.txt @@ -12,12 +12,6 @@ Page boot Events Preinitialize Event - printh 92 - prints "current_page",0 - printh 00 - prints "boot",0 - printh 00 - printh FF FF FF dim=100 ver_tft.txt="TFT: "+version.txt click sys_baudrate,1 @@ -323,6 +317,12 @@ Timer tm_esphome Events Timer Event + printh 92 + prints "current_page",0 + printh 00 + prints "boot",0 + printh 00 + printh FF FF FF counter.val++ if(counter.val>30) { diff --git a/hmi/nspanel_CJK_eu.HMI b/hmi/nspanel_CJK_eu.HMI index 4e37fa7f6..508d3f013 100644 Binary files a/hmi/nspanel_CJK_eu.HMI and b/hmi/nspanel_CJK_eu.HMI differ diff --git a/hmi/nspanel_CJK_eu.tft b/hmi/nspanel_CJK_eu.tft index 0e2669bb2..28bb07e14 100644 Binary files a/hmi/nspanel_CJK_eu.tft and b/hmi/nspanel_CJK_eu.tft differ diff --git a/hmi/nspanel_CJK_us.HMI b/hmi/nspanel_CJK_us.HMI index 2fac0a23d..491bf813f 100644 Binary files a/hmi/nspanel_CJK_us.HMI and b/hmi/nspanel_CJK_us.HMI differ diff --git a/hmi/nspanel_CJK_us.tft b/hmi/nspanel_CJK_us.tft index 7842cef11..1d913dd29 100644 Binary files a/hmi/nspanel_CJK_us.tft and b/hmi/nspanel_CJK_us.tft differ diff --git a/hmi/nspanel_CJK_us_land.HMI b/hmi/nspanel_CJK_us_land.HMI index 1a1e7d6b4..5fe25b4b4 100644 Binary files a/hmi/nspanel_CJK_us_land.HMI and b/hmi/nspanel_CJK_us_land.HMI differ diff --git a/hmi/nspanel_CJK_us_land.tft b/hmi/nspanel_CJK_us_land.tft index f4346d00d..963ab6cf8 100644 Binary files a/hmi/nspanel_CJK_us_land.tft and b/hmi/nspanel_CJK_us_land.tft differ diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 96c94418c..27938346e 100644 Binary files a/hmi/nspanel_eu.HMI and b/hmi/nspanel_eu.HMI differ diff --git a/hmi/nspanel_eu.tft b/hmi/nspanel_eu.tft index f66e8ad74..13e1a2426 100644 Binary files a/hmi/nspanel_eu.tft and b/hmi/nspanel_eu.tft differ diff --git a/hmi/nspanel_us.HMI b/hmi/nspanel_us.HMI index 628caf64c..4c4071d33 100644 Binary files a/hmi/nspanel_us.HMI and b/hmi/nspanel_us.HMI differ diff --git a/hmi/nspanel_us.tft b/hmi/nspanel_us.tft index abd869af5..0d37f1187 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/hmi/nspanel_us_land.HMI b/hmi/nspanel_us_land.HMI index e085c489c..29bd25164 100644 Binary files a/hmi/nspanel_us_land.HMI and b/hmi/nspanel_us_land.HMI differ diff --git a/hmi/nspanel_us_land.tft b/hmi/nspanel_us_land.tft index ccf529e52..20153bc73 100644 Binary files a/hmi/nspanel_us_land.tft and b/hmi/nspanel_us_land.tft differ