diff --git a/ReleaseNotes.md b/ReleaseNotes.md index c001bb2..ff1a704 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -32,7 +32,7 @@ Updates may come with changes on the blueprint inputs and we highly recommend yo   ## Breaking changes 1. **The `background` parameter in the `esphome.xxxxx_set_component_color` service is now deprecated.** -2. With the introduction of additional custom buttons, the **layout of other buttons on the home page has been adjusted**. +2. **On the home and climate pages, the button layout has changed.** This adjustment was made to incorporate additional custom buttons on the home page and new target temperature indicators on the climate page. 3. **Wi-Fi power save mode has been reset to `NONE` as the default setting.**
This was the standard up to v4.0. We switched it in v4.1 to accommodate Bluetooth components. However, since this feature isn't widely used, we're reverting to the original setting. For Bluetooth usage, you should manually set a different mode, such as `LIGHT`, as shown in the customization example below: ```yaml ##### My customization - Start ##### @@ -78,8 +78,9 @@ wifi: 11. Add swipe control to screensaver page 12. Enhanced control for automation entities on buttons 13. Dual thermostat controller support (add-on) -14. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings -15. Display time on the `screensaver` page +14. Dual thermostat display +15. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings +16. Display time on the `screensaver` page   ## Details of noteworthy changes @@ -184,11 +185,15 @@ Users can configure their heating and cooling settings independently, providing This feature enhances the capabilities of the NSPanel without compromising its existing functionalities. Users who previously used the NSPanel for single-mode (either heating or cooling) control can now explore dual-mode options for a more comprehensive climate control solution.   -### 14. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings +### 14. Enhanced Climate Page for Dual Thermostat Control +Leveraging the capabilities introduced with the Dual Thermostat Controller add-on, the existing climate page has been upgraded to support systems with dual temperature settings. This enhancement allows users to effectively manage thermostats that require both heating and cooling target temperatures, directly from the NSPanel's interface. While originally developed to complement the new add-on, this refined climate page also seamlessly extends its functionality to existing thermostats with dual set capabilities, offering a more versatile and comprehensive climate control experience. + +  +### 15. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings We have improved the functionality of our system by enhancing the timeout flexibility for Sleep, Page Fallback, and Dimming settings. The previous timeout limit of 300 seconds has been significantly expanded, offering users more control and customization options for these specific features. This enhancement allows for a wider range of use cases, catering to the needs of those who require extended periods for these settings, while still maintaining the option for shorter durations.   -### 15. Display time on the `screensaver` page +### 16. Display time on the `screensaver` page In this release, we're excited to introduce a new feature that adds a display time function to the Screensaver page. With this update, our screensaver not only serves its primary purpose of saving screen energy but also doubles as an informative display, reflecting our commitment to creating practical, user-friendly solutions. You can enable this feature on the bueprint settings, at the **CUSTOM CONFIGURATION** section (almost at the end). You also have to set **Display Brightness Sleep** at the device's page (**Settings** > **Devices & Services** > **ESPHome**). diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index 90869c7..e3ce070 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -14,7 +14,7 @@ substitutions: ota_password: ${wifi_password} ap_password: ${wifi_password} ##### DON'T CHANGE THIS ###### - version: "4.2dev.3" + version: "4.2dev.4" ############################## ##### External components ##### @@ -359,6 +359,7 @@ api: embedded_indoor_temperature: bool temperature_unit_is_fahrenheit: bool mui_please_confirm: string + mui_unavailable: string screensaver_time: bool screensaver_time_color: int[] then: @@ -370,6 +371,7 @@ api: embedded_indoor_temperature: !lambda "return embedded_indoor_temperature;" temperature_unit_is_fahrenheit: !lambda "return temperature_unit_is_fahrenheit;" mui_please_confirm: !lambda "return mui_please_confirm;" + mui_unavailable: !lambda "return mui_unavailable;" screensaver_time: !lambda "return screensaver_time;" screensaver_time_color: !lambda "return screensaver_time_color;" @@ -434,7 +436,11 @@ api: - service: set_climate variables: current_temp: float + supported_features: int + supported_hvac_modes: int target_temp: float + target_temp_high: float + target_temp_low: float temp_step: int total_steps: int temp_offset: int @@ -447,7 +453,11 @@ api: - script.execute: id: set_climate current_temp: !lambda "return current_temp;" + supported_features: !lambda "return supported_features;" + supported_hvac_modes: !lambda "return supported_hvac_modes;" target_temp: !lambda "return target_temp;" + target_temp_high: !lambda "return target_temp_high;" + target_temp_low: !lambda "return target_temp_low;" temp_step: !lambda "return temp_step;" total_steps: !lambda "return total_steps;" temp_offset: !lambda "return temp_offset;" @@ -869,6 +879,16 @@ globals: restore_value: false initial_value: '{"AM", "PM"}' + #### MUI strings #### + - id: mui_please_confirm_global + type: std::string + restore_value: true + initial_value: '"Please confirm"' + - id: mui_unavailable_global + type: std::string + restore_value: true + initial_value: '"Unavailable"' + ##### Chips ##### - id: home_chip_font_size type: uint @@ -1832,6 +1852,7 @@ script: embedded_indoor_temperature: bool temperature_unit_is_fahrenheit: bool mui_please_confirm: string + mui_unavailable: string screensaver_time: bool screensaver_time_color: int[] then: @@ -1852,9 +1873,9 @@ script: id(temp_unit_fahrenheit) = temperature_unit_is_fahrenheit; display_embedded_temp->execute(); - // Confirm page - ESP_LOGV(TAG, "Setup confirm page"); - display_wrapped_text->execute("confirm.title", mui_please_confirm.c_str(), 15); + // MUI strings + id(mui_please_confirm_global) = mui_please_confirm; + id(mui_unavailable_global) = mui_unavailable; // Screen saver page (sleep) ESP_LOGV(TAG, "Setup screensaver page"); @@ -2154,7 +2175,9 @@ script: - id: page_confirm mode: restart - then: # There's nothing here so far + then: + - lambda: |- + if (not id(is_uploading_tft)) display_wrapped_text->execute("confirm.title", id(mui_please_confirm_global).c_str(), 15); - id: page_cover mode: restart @@ -2475,11 +2498,15 @@ script: disp1->set_backlight_brightness(static_cast(brightness) / 100.0f); id(display_last_brightness) = brightness; - - id: set_climate + - id: set_climate #DEBUG mode: restart parameters: current_temp: float + supported_features: int + supported_hvac_modes: int target_temp: float + target_temp_high: float + target_temp_low: float temp_step: uint total_steps: uint temp_offset: int @@ -2487,43 +2514,63 @@ script: embedded_climate: bool then: - lambda: |- + if (id(is_uploading_tft)) set_climate->stop(); static const char *const TAG = "script.set_climate"; ESP_LOGV(TAG, "Starting"); - ESP_LOGV(TAG, " current_temp: %f", current_temp); - ESP_LOGV(TAG, " target_temp: %f", target_temp); - ESP_LOGV(TAG, " temp_step: %d", temp_step); - ESP_LOGV(TAG, " total_steps: %d", total_steps); - ESP_LOGV(TAG, " temp_offset: %i", temp_offset); - ESP_LOGV(TAG, " climate_icon: %s", climate_icon.c_str()); - ESP_LOGV(TAG, " embedded_climate: %s", embedded_climate ? "True" : "False"); + ESP_LOGV(TAG, " current_temp: %f", current_temp); + ESP_LOGV(TAG, " supported_features: %i", supported_features); + ESP_LOGV(TAG, " supported_hvac_modes: %i", supported_hvac_modes); + ESP_LOGV(TAG, " target_temp: %f", target_temp); + ESP_LOGV(TAG, " target_temp_high: %f", target_temp_high); + ESP_LOGV(TAG, " target_temp_low: %f", target_temp_low); + ESP_LOGV(TAG, " temp_step: %d", temp_step); + ESP_LOGV(TAG, " total_steps: %d", total_steps); + ESP_LOGV(TAG, " temp_offset: %i", temp_offset); + ESP_LOGV(TAG, " climate_icon: %s", climate_icon.c_str()); + ESP_LOGV(TAG, " embedded_climate: %s", embedded_climate ? "True" : "False"); if (current_page->state == "climate") { ESP_LOGV(TAG, "Page climate is visible"); disp1->send_command_printf("climateslider.maxval=%i", total_steps); disp1->set_component_value("temp_offset", temp_offset); disp1->set_component_value("temp_step", temp_step); - disp1->set_component_text_printf("current_temp", "%.1f°", current_temp); disp1->show_component("current_temp"); disp1->show_component("current_icon"); - if (target_temp > -999) - { - float slider_val = round(((10*target_temp) - temp_offset) / temp_step); - disp1->set_component_value("climateslider", slider_val); - disp1->set_component_text_printf("target_temp", "%.1f°", target_temp); - disp1->set_component_text_printf("target_icon", "%s", climate_icon.c_str()); - disp1->show_component("target_icon"); - disp1->show_component("target_temp"); - disp1->show_component("climateslider"); - disp1->show_component("decrease_temp"); - disp1->show_component("increase_temp"); - } + if (current_temp > -999) + disp1->set_component_text_printf("current_temp", "%.1f°", current_temp); else - { - disp1->hide_component("target_icon"); - disp1->hide_component("target_temp"); - disp1->hide_component("climateslider"); - disp1->hide_component("decrease_temp"); - disp1->hide_component("increase_temp"); - } + disp1->set_component_text_printf("current_temp", id(mui_unavailable_global).c_str()); + + disp1->set_component_value("hvac_modes", supported_hvac_modes); + if (supported_hvac_modes & 1) { // Heat + if (target_temp_high <= -999 and target_temp > -999) target_temp_high = target_temp; + disp1->set_component_text_printf("target_temp_high", "%.1f°", target_temp_high); + disp1->show_component("target_temp_high"); + disp1->set_component_value("slider_high", round(((10*target_temp_high) - temp_offset) / temp_step)); + disp1->show_component("slider_high"); + } else { + disp1->hide_component("target_temp_high"); + disp1->hide_component("slider_high"); + } + if (supported_hvac_modes & 2) { // Cool + if (target_temp_low <= -999 and target_temp > -999) target_temp_low = target_temp; + disp1->set_component_text_printf("target_temp_low", "%.1f°", target_temp_low); + disp1->show_component("target_temp_low"); + disp1->set_component_value("slider_low", round(((10*target_temp_low) - temp_offset) / temp_step)); + disp1->show_component("slider_low"); + } else { + disp1->hide_component("target_temp_low"); + disp1->hide_component("slider_low"); + } + if (supported_hvac_modes > 0) { + disp1->set_component_text_printf("target_icon", "%s", climate_icon.c_str()); + disp1->show_component("target_icon"); + disp1->show_component("decrease_temp"); + disp1->show_component("increase_temp"); + } else { + disp1->hide_component("target_icon"); + disp1->hide_component("decrease_temp"); + disp1->hide_component("increase_temp"); + } disp1->set_component_value("embedded", (embedded_climate) ? 1 : 0); } ESP_LOGV(TAG, "Finished"); diff --git a/advanced/hmi/nspanel_CJK_eu.HMI b/advanced/hmi/nspanel_CJK_eu.HMI index f120b6d..75ff1fe 100644 Binary files a/advanced/hmi/nspanel_CJK_eu.HMI and b/advanced/hmi/nspanel_CJK_eu.HMI differ diff --git a/advanced/hmi/nspanel_CJK_eu.tft b/advanced/hmi/nspanel_CJK_eu.tft index 486fa07..1da64c5 100644 Binary files a/advanced/hmi/nspanel_CJK_eu.tft and b/advanced/hmi/nspanel_CJK_eu.tft differ diff --git a/advanced/hmi/nspanel_CJK_eu_code/Program.s.txt b/advanced/hmi/nspanel_CJK_eu_code/Program.s.txt index 88b6588..0558b85 100644 --- a/advanced/hmi/nspanel_CJK_eu_code/Program.s.txt +++ b/advanced/hmi/nspanel_CJK_eu_code/Program.s.txt @@ -9,7 +9,7 @@ Program.s int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 - int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape + int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=2 // 1 = International (original), 2 = CJK //bauds=115200//Configure baudrate recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode diff --git a/advanced/hmi/nspanel_CJK_eu_code/boot.txt b/advanced/hmi/nspanel_CJK_eu_code/boot.txt index 8fe509d..810f0cc 100644 --- a/advanced/hmi/nspanel_CJK_eu_code/boot.txt +++ b/advanced/hmi/nspanel_CJK_eu_code/boot.txt @@ -13,53 +13,26 @@ Page boot Events Preinitialize Event sendme - dim=0 + dim=100 + vis bt_reboot,0 + sendme + dim=100 vis bt_reboot,0 covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF Page Exit Event dim=0 Variable (int32) counter Attributes - ID : 12 + ID : 11 Scope: local Value: 0 Variable (string) aux1 Attributes - ID : 13 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) nspanelevent - Attributes - ID : 14 - Scope : local - Text : - Max. Text Size: 150 - -Variable (string) aux2 - Attributes - ID : 15 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) aux3 - Attributes - ID : 21 + ID : 12 Scope : local Text : Max. Text Size: 10 @@ -131,7 +104,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.2 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version @@ -156,7 +129,7 @@ Text bluep_version Text baud_rate Attributes - ID : 18 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -166,7 +139,7 @@ Text baud_rate Text framework Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -184,85 +157,44 @@ Dual-state Button bt_reboot Text : Reboot Max. Text Size : 6 -Timer timer - Attributes - ID : 11 - Scope : local - Period (ms): 65534 - Enabled : yes - - Events - Timer Event - counter.val++ - covx counter.val,aux1.txt,0,0 - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - bluep_version.txt="Retry: "+aux1.txt - printh 92 - prints "nspanelevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - -Timer wakeup_timer - Attributes - ID : 16 - Scope : local - Period (ms): 50 - Enabled : yes - - Events - Timer Event - if(dim<100) - { - dimdelta=100-dim - dimdelta/=25 - if(dimdelta<1) - { - dimdelta=1 - } - dim+=dimdelta - }else - { - wakeup_timer.en=0 - } - Timer tm_esphome Attributes - ID : 17 + ID : 13 Scope : local Period (ms): 30000 Enabled : yes Events Timer Event - if(baud==115200) + counter.val++ + if(counter.val>60) { - bauds=921600 - }else + rest + } + sendme + printh 91 + prints "display_mode",0 + printh 00 + prints display_mode,0 + printh FF FF FF + printh 91 + prints "charset",0 + printh 00 + prints charset,0 + printh FF FF FF + printh 92 + prints "tft_version",0 + printh 00 + prints tft_version.txt,0 + printh 00 + printh FF FF FF + covx counter.val,aux1.txt,0,0 + esph_version.txt="Retry #"+aux1.txt + sys0=counter.val%10 + if(sys0==0) { - bauds=115200 + baud=115200 } covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" -Timer tm_pageid - Attributes - ID : 19 - Scope : local - Period (ms): 2500 - Enabled : yes - - Events - Timer Event - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - diff --git a/advanced/hmi/nspanel_CJK_eu_code/climate.txt b/advanced/hmi/nspanel_CJK_eu_code/climate.txt index 4b0e562..a411133 100644 --- a/advanced/hmi/nspanel_CJK_eu_code/climate.txt +++ b/advanced/hmi/nspanel_CJK_eu_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 0 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,6 +469,10 @@ Slider slider_high Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_low.val=slider_high.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -491,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -501,6 +494,10 @@ Slider slider_low Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_high.val=slider_low.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -512,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -586,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -606,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -624,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_CJK_us.HMI b/advanced/hmi/nspanel_CJK_us.HMI index e22dc6d..de43f01 100644 Binary files a/advanced/hmi/nspanel_CJK_us.HMI and b/advanced/hmi/nspanel_CJK_us.HMI differ diff --git a/advanced/hmi/nspanel_CJK_us.tft b/advanced/hmi/nspanel_CJK_us.tft index b26a71c..060caec 100644 Binary files a/advanced/hmi/nspanel_CJK_us.tft and b/advanced/hmi/nspanel_CJK_us.tft differ diff --git a/advanced/hmi/nspanel_CJK_us_code/Program.s.txt b/advanced/hmi/nspanel_CJK_us_code/Program.s.txt index 7598a94..64ce113 100644 --- a/advanced/hmi/nspanel_CJK_us_code/Program.s.txt +++ b/advanced/hmi/nspanel_CJK_us_code/Program.s.txt @@ -9,7 +9,7 @@ Program.s int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 - int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape + int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=2 // 1 = International (original), 2 = CJK //bauds=115200//Configure baudrate recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode diff --git a/advanced/hmi/nspanel_CJK_us_code/boot.txt b/advanced/hmi/nspanel_CJK_us_code/boot.txt index 8fe509d..27369a7 100644 --- a/advanced/hmi/nspanel_CJK_us_code/boot.txt +++ b/advanced/hmi/nspanel_CJK_us_code/boot.txt @@ -13,53 +13,23 @@ Page boot Events Preinitialize Event sendme - dim=0 + dim=100 vis bt_reboot,0 covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF Page Exit Event dim=0 Variable (int32) counter Attributes - ID : 12 + ID : 11 Scope: local Value: 0 Variable (string) aux1 Attributes - ID : 13 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) nspanelevent - Attributes - ID : 14 - Scope : local - Text : - Max. Text Size: 150 - -Variable (string) aux2 - Attributes - ID : 15 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) aux3 - Attributes - ID : 21 + ID : 12 Scope : local Text : Max. Text Size: 10 @@ -131,7 +101,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.2 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version @@ -156,7 +126,7 @@ Text bluep_version Text baud_rate Attributes - ID : 18 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -166,7 +136,7 @@ Text baud_rate Text framework Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -184,85 +154,44 @@ Dual-state Button bt_reboot Text : Reboot Max. Text Size : 6 -Timer timer - Attributes - ID : 11 - Scope : local - Period (ms): 65534 - Enabled : yes - - Events - Timer Event - counter.val++ - covx counter.val,aux1.txt,0,0 - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - bluep_version.txt="Retry: "+aux1.txt - printh 92 - prints "nspanelevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - -Timer wakeup_timer - Attributes - ID : 16 - Scope : local - Period (ms): 50 - Enabled : yes - - Events - Timer Event - if(dim<100) - { - dimdelta=100-dim - dimdelta/=25 - if(dimdelta<1) - { - dimdelta=1 - } - dim+=dimdelta - }else - { - wakeup_timer.en=0 - } - Timer tm_esphome Attributes - ID : 17 + ID : 13 Scope : local Period (ms): 30000 Enabled : yes Events Timer Event - if(baud==115200) + counter.val++ + if(counter.val>60) { - bauds=921600 - }else + rest + } + sendme + printh 91 + prints "display_mode",0 + printh 00 + prints display_mode,0 + printh FF FF FF + printh 91 + prints "charset",0 + printh 00 + prints charset,0 + printh FF FF FF + printh 92 + prints "tft_version",0 + printh 00 + prints tft_version.txt,0 + printh 00 + printh FF FF FF + covx counter.val,aux1.txt,0,0 + esph_version.txt="Retry #"+aux1.txt + sys0=counter.val%10 + if(sys0==0) { - bauds=115200 + baud=115200 } covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" -Timer tm_pageid - Attributes - ID : 19 - Scope : local - Period (ms): 2500 - Enabled : yes - - Events - Timer Event - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - diff --git a/advanced/hmi/nspanel_CJK_us_code/climate.txt b/advanced/hmi/nspanel_CJK_us_code/climate.txt index 01c8d4a..7ecb10a 100644 --- a/advanced/hmi/nspanel_CJK_us_code/climate.txt +++ b/advanced/hmi/nspanel_CJK_us_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 1 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,7 +469,7 @@ Slider slider_high Events Touch Release Event - if(single_slider.val==1) + if(hvac_mode.val!=3) { slider_low.val=slider_high.val } @@ -495,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -505,7 +494,7 @@ Slider slider_low Events Touch Release Event - if(single_slider.val==1) + if(hvac_mode.val!=3) { slider_high.val=slider_low.val } @@ -520,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -594,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -614,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -632,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_CJK_us_land.HMI b/advanced/hmi/nspanel_CJK_us_land.HMI index e981407..e4a0278 100644 Binary files a/advanced/hmi/nspanel_CJK_us_land.HMI and b/advanced/hmi/nspanel_CJK_us_land.HMI differ diff --git a/advanced/hmi/nspanel_CJK_us_land.tft b/advanced/hmi/nspanel_CJK_us_land.tft index e0f9ff3..64e0b70 100644 Binary files a/advanced/hmi/nspanel_CJK_us_land.tft and b/advanced/hmi/nspanel_CJK_us_land.tft differ diff --git a/advanced/hmi/nspanel_CJK_us_land_code/Program.s.txt b/advanced/hmi/nspanel_CJK_us_land_code/Program.s.txt index 1cf6760..3ce3d4e 100644 --- a/advanced/hmi/nspanel_CJK_us_land_code/Program.s.txt +++ b/advanced/hmi/nspanel_CJK_us_land_code/Program.s.txt @@ -9,7 +9,7 @@ Program.s int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 - int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape + int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=2 // 1 = International (original), 2 = CJK //bauds=115200//Configure baudrate recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode diff --git a/advanced/hmi/nspanel_CJK_us_land_code/boot.txt b/advanced/hmi/nspanel_CJK_us_land_code/boot.txt index 8fe509d..810f0cc 100644 --- a/advanced/hmi/nspanel_CJK_us_land_code/boot.txt +++ b/advanced/hmi/nspanel_CJK_us_land_code/boot.txt @@ -13,53 +13,26 @@ Page boot Events Preinitialize Event sendme - dim=0 + dim=100 + vis bt_reboot,0 + sendme + dim=100 vis bt_reboot,0 covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF Page Exit Event dim=0 Variable (int32) counter Attributes - ID : 12 + ID : 11 Scope: local Value: 0 Variable (string) aux1 Attributes - ID : 13 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) nspanelevent - Attributes - ID : 14 - Scope : local - Text : - Max. Text Size: 150 - -Variable (string) aux2 - Attributes - ID : 15 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) aux3 - Attributes - ID : 21 + ID : 12 Scope : local Text : Max. Text Size: 10 @@ -131,7 +104,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.2 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version @@ -156,7 +129,7 @@ Text bluep_version Text baud_rate Attributes - ID : 18 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -166,7 +139,7 @@ Text baud_rate Text framework Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -184,85 +157,44 @@ Dual-state Button bt_reboot Text : Reboot Max. Text Size : 6 -Timer timer - Attributes - ID : 11 - Scope : local - Period (ms): 65534 - Enabled : yes - - Events - Timer Event - counter.val++ - covx counter.val,aux1.txt,0,0 - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - bluep_version.txt="Retry: "+aux1.txt - printh 92 - prints "nspanelevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - -Timer wakeup_timer - Attributes - ID : 16 - Scope : local - Period (ms): 50 - Enabled : yes - - Events - Timer Event - if(dim<100) - { - dimdelta=100-dim - dimdelta/=25 - if(dimdelta<1) - { - dimdelta=1 - } - dim+=dimdelta - }else - { - wakeup_timer.en=0 - } - Timer tm_esphome Attributes - ID : 17 + ID : 13 Scope : local Period (ms): 30000 Enabled : yes Events Timer Event - if(baud==115200) + counter.val++ + if(counter.val>60) { - bauds=921600 - }else + rest + } + sendme + printh 91 + prints "display_mode",0 + printh 00 + prints display_mode,0 + printh FF FF FF + printh 91 + prints "charset",0 + printh 00 + prints charset,0 + printh FF FF FF + printh 92 + prints "tft_version",0 + printh 00 + prints tft_version.txt,0 + printh 00 + printh FF FF FF + covx counter.val,aux1.txt,0,0 + esph_version.txt="Retry #"+aux1.txt + sys0=counter.val%10 + if(sys0==0) { - bauds=115200 + baud=115200 } covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" -Timer tm_pageid - Attributes - ID : 19 - Scope : local - Period (ms): 2500 - Enabled : yes - - Events - Timer Event - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - diff --git a/advanced/hmi/nspanel_CJK_us_land_code/climate.txt b/advanced/hmi/nspanel_CJK_us_land_code/climate.txt index 4b0e562..a411133 100644 --- a/advanced/hmi/nspanel_CJK_us_land_code/climate.txt +++ b/advanced/hmi/nspanel_CJK_us_land_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 0 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,6 +469,10 @@ Slider slider_high Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_low.val=slider_high.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -491,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -501,6 +494,10 @@ Slider slider_low Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_high.val=slider_low.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -512,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -586,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -606,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -624,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI index d3309d2..960b1e1 100644 Binary files a/advanced/hmi/nspanel_eu.HMI and b/advanced/hmi/nspanel_eu.HMI differ diff --git a/advanced/hmi/nspanel_eu_code/Program.s.txt b/advanced/hmi/nspanel_eu_code/Program.s.txt index 0558b85..bdaf5e7 100644 --- a/advanced/hmi/nspanel_eu_code/Program.s.txt +++ b/advanced/hmi/nspanel_eu_code/Program.s.txt @@ -10,7 +10,7 @@ Program.s int is_entities=0,is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank - int charset=2 // 1 = International (original), 2 = CJK + int charset=1 // 1 = International (original), 2 = CJK //bauds=115200//Configure baudrate recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port diff --git a/advanced/hmi/nspanel_eu_code/boot.txt b/advanced/hmi/nspanel_eu_code/boot.txt index eac39c0..810f0cc 100644 --- a/advanced/hmi/nspanel_eu_code/boot.txt +++ b/advanced/hmi/nspanel_eu_code/boot.txt @@ -104,7 +104,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.3 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version diff --git a/advanced/hmi/nspanel_eu_code/climate.txt b/advanced/hmi/nspanel_eu_code/climate.txt index 4b0e562..a411133 100644 --- a/advanced/hmi/nspanel_eu_code/climate.txt +++ b/advanced/hmi/nspanel_eu_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 0 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,6 +469,10 @@ Slider slider_high Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_low.val=slider_high.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -491,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -501,6 +494,10 @@ Slider slider_low Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_high.val=slider_low.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -512,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -586,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -606,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -624,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us.HMI b/advanced/hmi/nspanel_us.HMI index 432b915..8b96b53 100644 Binary files a/advanced/hmi/nspanel_us.HMI and b/advanced/hmi/nspanel_us.HMI differ diff --git a/advanced/hmi/nspanel_us_code/boot.txt b/advanced/hmi/nspanel_us_code/boot.txt index c94bf2f..27369a7 100644 --- a/advanced/hmi/nspanel_us_code/boot.txt +++ b/advanced/hmi/nspanel_us_code/boot.txt @@ -101,7 +101,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.3 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version diff --git a/advanced/hmi/nspanel_us_code/climate.txt b/advanced/hmi/nspanel_us_code/climate.txt index 01c8d4a..7ecb10a 100644 --- a/advanced/hmi/nspanel_us_code/climate.txt +++ b/advanced/hmi/nspanel_us_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 1 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,7 +469,7 @@ Slider slider_high Events Touch Release Event - if(single_slider.val==1) + if(hvac_mode.val!=3) { slider_low.val=slider_high.val } @@ -495,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -505,7 +494,7 @@ Slider slider_low Events Touch Release Event - if(single_slider.val==1) + if(hvac_mode.val!=3) { slider_high.val=slider_low.val } @@ -520,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -594,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -614,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -632,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_land.HMI b/advanced/hmi/nspanel_us_land.HMI index 34c3799..7eddcda 100644 Binary files a/advanced/hmi/nspanel_us_land.HMI and b/advanced/hmi/nspanel_us_land.HMI differ diff --git a/advanced/hmi/nspanel_us_land_code/Program.s.txt b/advanced/hmi/nspanel_us_land_code/Program.s.txt index dfe0bcf..0c3ab34 100644 --- a/advanced/hmi/nspanel_us_land_code/Program.s.txt +++ b/advanced/hmi/nspanel_us_land_code/Program.s.txt @@ -9,7 +9,7 @@ Program.s int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 int brightness=100,brightness_dim=40,brightness_sleep=0 - int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape + int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=1 // 1 = International (original), 2 = CJK //bauds=115200//Configure baudrate recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode diff --git a/advanced/hmi/nspanel_us_land_code/boot.txt b/advanced/hmi/nspanel_us_land_code/boot.txt index 8fe509d..810f0cc 100644 --- a/advanced/hmi/nspanel_us_land_code/boot.txt +++ b/advanced/hmi/nspanel_us_land_code/boot.txt @@ -13,53 +13,26 @@ Page boot Events Preinitialize Event sendme - dim=0 + dim=100 + vis bt_reboot,0 + sendme + dim=100 vis bt_reboot,0 covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF Page Exit Event dim=0 Variable (int32) counter Attributes - ID : 12 + ID : 11 Scope: local Value: 0 Variable (string) aux1 Attributes - ID : 13 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) nspanelevent - Attributes - ID : 14 - Scope : local - Text : - Max. Text Size: 150 - -Variable (string) aux2 - Attributes - ID : 15 - Scope : local - Text : - Max. Text Size: 10 - -Variable (string) aux3 - Attributes - ID : 21 + ID : 12 Scope : local Text : Max. Text Size: 10 @@ -131,7 +104,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.2dev.2 + Text : 4.2dev.4 Max. Text Size : 9 Text esph_version @@ -156,7 +129,7 @@ Text bluep_version Text baud_rate Attributes - ID : 18 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -166,7 +139,7 @@ Text baud_rate Text framework Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -184,85 +157,44 @@ Dual-state Button bt_reboot Text : Reboot Max. Text Size : 6 -Timer timer - Attributes - ID : 11 - Scope : local - Period (ms): 65534 - Enabled : yes - - Events - Timer Event - counter.val++ - covx counter.val,aux1.txt,0,0 - covx display_mode,aux2.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}" - bluep_version.txt="Retry: "+aux1.txt - printh 92 - prints "nspanelevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - -Timer wakeup_timer - Attributes - ID : 16 - Scope : local - Period (ms): 50 - Enabled : yes - - Events - Timer Event - if(dim<100) - { - dimdelta=100-dim - dimdelta/=25 - if(dimdelta<1) - { - dimdelta=1 - } - dim+=dimdelta - }else - { - wakeup_timer.en=0 - } - Timer tm_esphome Attributes - ID : 17 + ID : 13 Scope : local Period (ms): 30000 Enabled : yes Events Timer Event - if(baud==115200) + counter.val++ + if(counter.val>60) { - bauds=921600 - }else + rest + } + sendme + printh 91 + prints "display_mode",0 + printh 00 + prints display_mode,0 + printh FF FF FF + printh 91 + prints "charset",0 + printh 00 + prints charset,0 + printh FF FF FF + printh 92 + prints "tft_version",0 + printh 00 + prints tft_version.txt,0 + printh 00 + printh FF FF FF + covx counter.val,aux1.txt,0,0 + esph_version.txt="Retry #"+aux1.txt + sys0=counter.val%10 + if(sys0==0) { - bauds=115200 + baud=115200 } covx baud,baud_rate.txt,0,0 baud_rate.txt+=" bps" -Timer tm_pageid - Attributes - ID : 19 - Scope : local - Period (ms): 2500 - Enabled : yes - - Events - Timer Event - covx display_mode,aux2.txt,0,0 - covx charset,aux3.txt,0,0 - nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\", \"charset\": \""+aux3.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints nspanelevent.txt,0 - printh 00 - printh FF FF FF - diff --git a/advanced/hmi/nspanel_us_land_code/climate.txt b/advanced/hmi/nspanel_us_land_code/climate.txt index 4b0e562..a411133 100644 --- a/advanced/hmi/nspanel_us_land_code/climate.txt +++ b/advanced/hmi/nspanel_us_land_code/climate.txt @@ -19,7 +19,6 @@ Page climate vis target_high,0 vis target_low,0 vis current_temp,0 - vis current_icon,0 vis slider_high,0 vis slider_low,0 vis button01,0 @@ -50,80 +49,80 @@ Page climate Variable (string) va1 Attributes - ID : 25 + ID : 24 Scope : local Text : Max. Text Size: 10 Variable (string) climatesetting Attributes - ID : 26 + ID : 25 Scope : local Text : Max. Text Size: 255 Variable (string) lastclick Attributes - ID : 27 + ID : 26 Scope : local Text : Max. Text Size: 255 Variable (int32) temp_offset Attributes - ID : 29 + ID : 28 Scope: local Value: 0 Variable (int32) temp_step Attributes - ID : 30 + ID : 29 Scope: local Value: 0 Variable (int32) temp_number Attributes - ID : 34 + ID : 33 Scope: local Value: 0 Variable (int32) va0 Attributes - ID : 35 + ID : 34 Scope: local Value: 0 Variable (int32) embedded Attributes - ID : 36 + ID : 35 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 37 + ID : 36 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 39 + ID : 38 Scope : local Text : Max. Text Size: 8 -Variable (int32) single_slider +Variable (int32) active_slider Attributes - ID : 43 + ID : 42 Scope: local Value: 1 -Variable (int32) active_slider +Variable (int32) hvac_mode Attributes ID : 44 Scope: local - Value: 1 + Value: 0 Text current_temp Attributes @@ -133,7 +132,7 @@ Text current_temp Send Component ID : on press and release Associated Keyboard: none Text : - Max. Text Size : 10 + Max. Text Size : 25 Text page_label Attributes @@ -145,7 +144,7 @@ Text page_label Text : Max. Text Size : 100 -Text current_icon +Text target_icon Attributes ID : 8 Scope : local @@ -155,7 +154,7 @@ Text current_icon Text : Max. Text Size : 10 -Text target_icon +Text value01_icon Attributes ID : 9 Scope : local @@ -165,19 +164,9 @@ Text target_icon Text : Max. Text Size : 10 -Text value01_icon - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : - Max. Text Size : 10 - Text value01 Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -187,7 +176,7 @@ Text value01 Text value02_icon Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -197,7 +186,7 @@ Text value02_icon Text value02 Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -207,7 +196,7 @@ Text value02 Text value03_icon Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -217,7 +206,7 @@ Text value03_icon Text value03 Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -227,7 +216,7 @@ Text value03 Text value04_icon Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -237,7 +226,7 @@ Text value04_icon Text value04 Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -247,7 +236,7 @@ Text value04 Text button01 Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +257,7 @@ Text button01 Text button02 Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : on press and release @@ -289,7 +278,7 @@ Text button02 Text button03 Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : on press and release @@ -310,7 +299,7 @@ Text button03 Text button04 Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : on press and release @@ -331,7 +320,7 @@ Text button04 Text button05 Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : on press and release @@ -352,7 +341,7 @@ Text button05 Text button06 Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID : on press and release @@ -373,7 +362,7 @@ Text button06 Text button07 Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : on press and release @@ -394,7 +383,7 @@ Text button07 Text button08 Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID : on press and release @@ -422,7 +411,7 @@ Text button08 Text button09 Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID : on press and release @@ -450,7 +439,7 @@ Text button09 Text target_high Attributes - ID : 33 + ID : 32 Scope : local Dragging : 0 Send Component ID : on press and release @@ -460,7 +449,7 @@ Text target_high Text target_low Attributes - ID : 45 + ID : 43 Scope : local Dragging : 0 Send Component ID : on press and release @@ -480,6 +469,10 @@ Slider slider_high Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_low.val=slider_high.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -491,7 +484,7 @@ Slider slider_high Slider slider_low Attributes - ID : 42 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release @@ -501,6 +494,10 @@ Slider slider_low Events Touch Release Event + if(hvac_mode.val!=3) + { + slider_high.val=slider_low.val + } temp_number.val=slider_high.val*temp_step.val temp_number.val+=temp_offset.val va0.val=temp_number.val/10 @@ -512,7 +509,7 @@ Slider slider_low Button button_back Attributes - ID : 38 + ID : 37 Scope : local Dragging : 0 Send Component ID: on press and release @@ -586,7 +583,7 @@ Timer swipestore Timer timer01 Attributes - ID : 28 + ID : 27 Scope : local Period (ms): 1000 Enabled : no @@ -606,7 +603,7 @@ Timer timer01 Timer click_timer Attributes - ID : 40 + ID : 39 Scope : local Period (ms): 800 Enabled : no @@ -624,7 +621,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 100 Enabled : yes diff --git a/dev/instructions_for_developers.md b/dev/instructions_for_developers.md index e3b1f79..954b56f 100644 --- a/dev/instructions_for_developers.md +++ b/dev/instructions_for_developers.md @@ -71,7 +71,6 @@ sensor: ``` or: - ```yaml sensor: - id: my_sensor @@ -85,4 +84,15 @@ sensor: } else { // Your code here } -``` \ No newline at end of file +``` + +or if you are setting up a script (largely used in this project) it can just kill itself if `is_uploading_tft`: +```yaml +scripts: + - id: my_new_script_id + ... + then: + - lambda: |- + if (id(is_uploading_tft)) my_new_script_id->stop(); + // Your code here +``` diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 6502823..c8aa3da 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -37,7 +37,7 @@ blueprint: 🎉 Roadmap can be found here: [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap) - ℹ️ Version: v4.2dev.3 + ℹ️ Version: v4.2dev.4 source_url: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/nspanel_blueprint.yaml domain: automation @@ -3928,7 +3928,7 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: '4.2dev.3' + blueprint_version: '4.2dev.4' date_format_temp: !input 'date_format' # Avoid breaking change for existing users with legacy type format date_format: > @@ -6483,24 +6483,40 @@ variables: embedded_indoor_temperature: '{{ indoor_temperature_sensor == nspaneltemp or not (indoor_temperature_sensor is string and indoor_temperature_sensor is match "sensor.")}}' domain_automation_button_action: !input domain_automation_button_action + # yamllint disable rule:truthy rule:line-length enum: - color_mode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py - unknown: "[]" - onoff: "[]" - brightness: "[]" - color_temp: "[]" - hs: "[]" - xy: "[]" - rgb: "[]" - rgbw: "[]" - rgbww: "[]" - white: "[]" + ColorMode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py + UNKNOWN: "[]" + ONOFF: "[]" + BRIGHTNESS: "[]" + COLOR_TEMP: "[]" + HS: "[]" + XY: "[]" + RGB: "[]" + RGBW: "[]" + RGBWW: "[]" + WHITE: "[]" + HVACMode: # Possible HVAC modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/climate/const.py#L13 + "OFF": "[]" # All activity disabled / Device is off/standby + HEAT: "[]" # Heating + COOL: "[]" # Cooling + HEAT_COOL: "[]" # The device supports heating/cooling to a range + AUTO: "[]" # The temperature is set based on a schedule, learned behavior, AI or some other related mechanism. User is not able to adjust the temperature + DRY: "[]" # Device is in Dry/Humidity mode + FAN_ONLY: "[]" # Only the fan is on, not fan and another mode like cool + HVACMode_bits: + "OFF": 1 + HEAT: 2 + COOL: 4 + HEAT_COOL: 8 + AUTO: 16 + DRY: 32 + FAN_ONLY: 64 states: - # yamllint disable rule:truthy rule:line-length "on": ["on", "open", "opening", "true", "True", true, True, "playing", "heat", "cold", "dry", "armed_home", "armed_away", "armed_vacation", "armed_custom_bypass", "triggered", "pending", "arming", 1] "off": ["off", "closed", "closing", "false", "False", false, False, "standby", "paused", "idle", "disarmed", "disarming", 0] unknown: ["unknown", "unavailable", None, none, ""] - # yamllint enable rule:truthy rule:line-length + # yamllint enable rule:truthy rule:line-length ############################################################# ##### CLOSE - Variables ##### @@ -7220,7 +7236,7 @@ condition: ##### START - Action ##### ############################################################# action: - - if: '{{ false }}' #### Global anchor repository #### #DEBUG + - if: '{{ false }}' #### Global anchor repository #### then: - variables: entity_id: '{{ None }}' @@ -7598,6 +7614,7 @@ action: embedded_indoor_temperature: '{{ embedded_indoor_temperature }}' temperature_unit_is_fahrenheit: '{{ state_attr((nspaneltemp if embedded_indoor_temperature else indoor_temperature_sensor), "unit_of_measurement") | default("") in ["°F", "F"]}}' mui_please_confirm: '{{ mui[language].please_confirm }}' + mui_unavailable: '{{ mui[language].unavailable }}' screensaver_time: '{{ screensaver_display_time if screensaver_display_time is boolean else false }}' screensaver_time_color: '{{ screensaver_display_time_font_color if screensaver_display_time_font_color is sequence else [64, 64, 64] }}' continue_on_error: true @@ -8362,7 +8379,7 @@ action: component: '255' # all components continue_on_error: true - ##### NSPanel build Button page ##### #DEBUG + ##### NSPanel build Button page ##### - repeat: for_each: > {{ @@ -8390,7 +8407,7 @@ action: or (entity.domain == "climate" and entity.state != "off") or (entity.domain in ["button","input_button","scene","automation","remote"] and trigger.id is match "current_state_entity") }} - btn_bri_txt: > # Buttons value (brightness, temperature, etc.) #DEBUG + btn_bri_txt: > # Buttons value (brightness, temperature, etc.) {% if not entity.has_value %} 0 {% elif entity.domain == "light" and entity.state == "on" %} {% set entity_brightness = state_attr(entity.id, "brightness") | default(None) %} @@ -8895,16 +8912,31 @@ action: for_each: '{{ climate_page_entities }}' sequence: *display_value - ##### Slider & climate values ##### + ##### Slider & climate values ##### #DEBUG - &climate-update_slider if: '{{ not (climate_entity == climate and embedded_climate) }}' then: - variables: current_temp: '{{ state_attr(climate_entity, "current_temperature") | float(-999) | round(1) }}' + supported_features: '{{ state_attr(climate_entity, "supported_features") | int(0) }}' + is_target_temperature: '{{ supported_features | bitwise_and(1) == 0 }}' + is_target_temperature_range: '{{ supported_features | bitwise_and(2) == 0 }}' target_temp: > {{ state_attr(climate_entity, "temperature") | float(-999) | round(1) - if has_value(climate_entity) + if is_target_temperature and has_value(climate_entity) + else -999 + }} + target_temp_high: > + {{ + state_attr(climate_entity, "target_temp_high") | float(-999) | round(1) + if is_target_temperature_range and has_value(climate_entity) + else -999 + }} + target_temp_low: > + {{ + state_attr(climate_entity, "target_temp_low") | float(-999) | round(1) + if is_target_temperature_range and has_value(climate_entity) else -999 }} temp_step: > @@ -8921,6 +8953,15 @@ action: total_steps: '{{ ((max_temp-temp_offset)/temp_step) | round(0) | int }}' climate_state: '{{ states(climate_entity) | default("unavailable") if climate_entity is string else "unavailable" }}' hvac_action: '{{ state_attr(climate_entity, "hvac_action") }}' + hvac_mode: '{{ state_attr(climate_entity, "hvac_mode") }}' + supported_hvac_modes: > + {% if is_target_temperature_range %}{{ 3 }} + {% else %} + {% set supported_hvac_modes_temp = 0 %} + {% if "heat" in hvac_mode %}{% set supported_hvac_modes_temp += 1 %}{% endif %} + {% if "cold" in hvac_mode %}{% set supported_hvac_modes_temp += 2 %}{% endif %} + {{ supported_hvac_modes_temp }} + {% endif %} climate_action: '{{ hvac_action if hvac_action not in ["unavailable", "unknown", "", None] else climate_state }}' climate_icon: > {% if "off" in climate_action %}{{ all_icons.blank }} @@ -8937,7 +8978,11 @@ action: - service: '{{ nextion.command.set_climate }}' data: current_temp: '{{ current_temp }}' + supported_features: '{{ supported_features }}' + supported_hvac_modes: '{{ supported_hvac_modes }}' target_temp: '{{ target_temp }}' + target_temp_high: '{{ target_temp_high }}' + target_temp_low: '{{ target_temp_low }}' temp_step: '{{ temp_step }}' total_steps: '{{ total_steps }}' temp_offset: '{{ temp_offset }}' @@ -9255,7 +9300,7 @@ action: ent_id: '{{ repeat.item.page }}.{{ repeat.item.component }}' ent_icon: '{{ entity.icon }}' ent_label: '{{ entity.name }}' - ent_value: '{{ entity.state_rounded ~ entity.unit_of_measurement }}' + ent_value: '{{ entity.state_rounded ~ entity.unit_of_measurement if entity.has_value else mui[language].unavailable }}' ent_value_xcen: '{{ entitypages_value_alignment }}' continue_on_error: true diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 79b10d1..4e96b56 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_us.tft b/nspanel_us.tft index c7f0ce4..fce0f19 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 5bfda01..b2becac 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ