diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index b2ea056..2b765cd 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -428,6 +428,17 @@ api: back_page: string then: - lambda: |- + static const char *const TAG = "service.open_entity_settings_page"; + + auto pageIndex = [](const std::string& page_name) -> uint8_t { + for (uint8_t i = 0; i < id(page_names).size(); ++i) { + if (id(page_names)[i] == page_name) { + return i; // Return the index if found + } + } + return 0u; // Return 0 (home page) if not found + }; + detailed_entity->publish_state(entity); if (page == "alarm_control_panel") page = "alarm"; std::string cmd_page = std::string("page ") + page.c_str(); @@ -436,7 +447,7 @@ api: page_label = page_label.replace(page_label.find("\\r"), 2, " "); } disp1->set_component_text_printf("page_label", "%s", page_label.c_str()); - disp1->set_component_text_printf("back_page", "%s", back_page.c_str()); + disp1->send_command_printf("back_page_id=%i", pageIndex(back_page.c_str())); if (page == "climate") { if (entity == "embedded_climate") addon_climate_set_climate_friendly_name->execute(page_label.c_str()); @@ -1445,7 +1456,7 @@ text_sensor: std::string component = doc["component"]; if (not (component == "currentpage" and (page == "screensaver" or page == "home"))) timer_reset_all->execute(page.c_str()); std::string value = doc["value"]; - std::string entity = detailed_entity->state.c_str(); //doc["entity"]; + std::string entity = detailed_entity->state.c_str(); // doc["entity"]; ESP_LOGE(TAG, "page: %s", page.c_str()); ESP_LOGE(TAG, "component: %s", component.c_str()); ESP_LOGE(TAG, "value: %s", value.c_str()); @@ -1483,11 +1494,11 @@ text_sensor: std::string component = doc["component"]; std::string key = doc["key"]; std::string value = doc["value"]; - std::string entity = detailed_entity->state.c_str(); //doc["entity"]; + std::string entity = detailed_entity->state.c_str(); // doc["entity"]; int embedded = doc["embedded"]; std::string service = ""; - // send event to Home Assistant #DEBUG + // Send event to Home Assistant auto ha_event = new esphome::api::CustomAPIDevice(); if (event == "short_click" or event == "long_click") { ha_button->execute(page.c_str(), component.c_str(), event.c_str()); @@ -1495,7 +1506,7 @@ text_sensor: detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : ""); disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0); disp1->goto_page("climate"); - } else if (page == "light" or page == "climate" or page == "notification") { // Generic event + } else if (page == "light" or page == "climate" or page == "notification") { // Generic event ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", { {"type", "generic"}, {"page", page}, @@ -2219,6 +2230,7 @@ script: page != "confirm" && page != "keyb_num") { detailed_entity->publish_state(""); + disp1->send_command_printf("back_page_id=0"); } if (page != "media_player") { id(last_volume_level) = 0; diff --git a/advanced/hmi/nspanel_eu.HMI b/advanced/hmi/nspanel_eu.HMI index da3562b..a24cb6b 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 8828da8..4fb7264 100644 --- a/advanced/hmi/nspanel_eu_code/Program.s.txt +++ b/advanced/hmi/nspanel_eu_code/Program.s.txt @@ -4,6 +4,7 @@ Program.s int r=0,g=0,b=0 int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 + int back_page_id=0 int dimdelta=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 @@ -17,10 +18,4 @@ Program.s { lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version } - printh 92 - prints "currentpage",0 - printh 00 - prints "",0 - printh 00 - printh FF FF FF page 8//Power on start page boot diff --git a/advanced/hmi/nspanel_eu_code/alarm.txt b/advanced/hmi/nspanel_eu_code/alarm.txt index a38a016..768ad8c 100644 --- a/advanced/hmi/nspanel_eu_code/alarm.txt +++ b/advanced/hmi/nspanel_eu_code/alarm.txt @@ -32,23 +32,16 @@ Variable (string) lastclick Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 4 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) code_format Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 15 Variable (string) code_arm_req Attributes - ID : 30 + ID : 29 Scope : local Text : Max. Text Size: 1 @@ -75,7 +68,7 @@ Text icon_state Text bt_home_text Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID : disabled @@ -85,7 +78,7 @@ Text bt_home_text Text bt_away_text Attributes - ID : 8 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -95,7 +88,7 @@ Text bt_away_text Text bt_night_text Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -105,7 +98,7 @@ Text bt_night_text Text bt_vacat_text Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -115,7 +108,7 @@ Text bt_vacat_text Text bt_bypass_text Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -125,7 +118,7 @@ Text bt_bypass_text Text bt_disarm_text Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -135,7 +128,7 @@ Text bt_disarm_text Text bt_home_icon Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -145,7 +138,7 @@ Text bt_home_icon Text bt_away_icon Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -155,7 +148,7 @@ Text bt_away_icon Text bt_night_icon Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -165,7 +158,7 @@ Text bt_night_icon Text bt_vacat_icon Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -175,7 +168,7 @@ Text bt_vacat_icon Text bt_bypass_icon Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -185,7 +178,7 @@ Text bt_bypass_icon Text bt_disarm_icon Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -195,49 +188,49 @@ Text bt_disarm_icon Picture bt_home_pic Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_away_pic Attributes - ID : 7 + ID : 6 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_vacat_pic Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_bypass_pic Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_disarm_pic Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID: disabled Button button_back Attributes - ID : 31 + ID : 30 Scope : local Dragging : 0 Send Component ID: on press and release @@ -247,26 +240,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot bt_home Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID: on press and release @@ -290,7 +268,7 @@ Hotspot bt_home Hotspot bt_away Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID: on press and release @@ -314,7 +292,7 @@ Hotspot bt_away Hotspot bt_night Attributes - ID : 25 + ID : 24 Scope : local Dragging : 0 Send Component ID: on press and release @@ -338,7 +316,7 @@ Hotspot bt_night Hotspot bt_vacat Attributes - ID : 26 + ID : 25 Scope : local Dragging : 0 Send Component ID: on press and release @@ -362,7 +340,7 @@ Hotspot bt_vacat Hotspot bt_bypass Attributes - ID : 27 + ID : 26 Scope : local Dragging : 0 Send Component ID: on press and release @@ -386,7 +364,7 @@ Hotspot bt_bypass Hotspot bt_disarm Attributes - ID : 28 + ID : 27 Scope : local Dragging : 0 Send Component ID: on press and release @@ -410,7 +388,7 @@ Hotspot bt_disarm Timer wakeup_timer Attributes - ID : 32 + ID : 31 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu_code/climate.txt b/advanced/hmi/nspanel_eu_code/climate.txt index c2f8507..4b0e562 100644 --- a/advanced/hmi/nspanel_eu_code/climate.txt +++ b/advanced/hmi/nspanel_eu_code/climate.txt @@ -93,42 +93,35 @@ Variable (int32) va0 Scope: local Value: 0 -Variable (string) back_page - Attributes - ID : 36 - Scope : local - Text : home - Max. Text Size: 15 - Variable (int32) embedded Attributes - ID : 37 + ID : 36 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 38 + ID : 37 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 40 + ID : 39 Scope : local Text : Max. Text Size: 8 Variable (int32) single_slider Attributes - ID : 44 + ID : 43 Scope: local Value: 1 Variable (int32) active_slider Attributes - ID : 45 + ID : 44 Scope: local Value: 1 @@ -467,7 +460,7 @@ Text target_high Text target_low Attributes - ID : 46 + ID : 45 Scope : local Dragging : 0 Send Component ID : on press and release @@ -498,7 +491,7 @@ Slider slider_high Slider slider_low Attributes - ID : 43 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release @@ -519,7 +512,7 @@ Slider slider_low Button button_back Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release @@ -529,22 +522,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot decrease_temp Attributes @@ -628,7 +606,7 @@ Timer timer01 Timer click_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 800 Enabled : no @@ -646,7 +624,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 42 + ID : 41 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu_code/cover.txt b/advanced/hmi/nspanel_eu_code/cover.txt index 76933eb..2d6b6f7 100644 --- a/advanced/hmi/nspanel_eu_code/cover.txt +++ b/advanced/hmi/nspanel_eu_code/cover.txt @@ -34,13 +34,6 @@ Variable (string) coversetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 12 - Scope : local - Text : home - Max. Text Size: 15 - Text battery_value Attributes ID : 1 @@ -172,7 +165,7 @@ Button cover_stop Button button_back Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: on press and release @@ -182,26 +175,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer wakeup_timer Attributes - ID : 14 + ID : 13 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu_code/fan.txt b/advanced/hmi/nspanel_eu_code/fan.txt index 22b6eb3..b149f12 100644 --- a/advanced/hmi/nspanel_eu_code/fan.txt +++ b/advanced/hmi/nspanel_eu_code/fan.txt @@ -27,16 +27,9 @@ Variable (string) fansetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 8 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) va0 Attributes - ID : 9 + ID : 8 Scope : local Text : Max. Text Size: 10 @@ -106,7 +99,7 @@ Slider fanslider Button button_up Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID: on press and release @@ -145,7 +138,7 @@ Button button_up Button button_on Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID: on press and release @@ -187,7 +180,7 @@ Button button_on Button button_down Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID: on press and release @@ -226,7 +219,7 @@ Button button_down Button button_off Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: on press and release @@ -269,7 +262,7 @@ Button button_off Button button_back Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID: on press and release @@ -279,22 +272,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer swipestore Attributes @@ -310,7 +288,7 @@ Timer swipestore Timer timer0 Attributes - ID : 14 + ID : 13 Scope : local Period (ms): 1000 Enabled : no @@ -331,7 +309,7 @@ Timer timer0 Timer wakeup_timer Attributes - ID : 16 + ID : 15 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu_code/home.txt b/advanced/hmi/nspanel_eu_code/home.txt index 9dbd03f..a121f4f 100644 --- a/advanced/hmi/nspanel_eu_code/home.txt +++ b/advanced/hmi/nspanel_eu_code/home.txt @@ -13,6 +13,7 @@ Page home Events Preinitialize Event sendme + back_page_id=0 vis bt_notific,is_notification vis bt_qrcode,is_qrcode vis bt_entities,is_entities diff --git a/advanced/hmi/nspanel_eu_code/light.txt b/advanced/hmi/nspanel_eu_code/light.txt index eea2a7a..796f9d6 100644 --- a/advanced/hmi/nspanel_eu_code/light.txt +++ b/advanced/hmi/nspanel_eu_code/light.txt @@ -78,13 +78,6 @@ Variable (string) lightsetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 31 - Scope : local - Text : home - Max. Text Size: 15 - Number ring Attributes ID : 4 @@ -417,7 +410,7 @@ Slider tempslider Button button_back Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID: on press and release @@ -427,22 +420,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot hsv2rgb Attributes @@ -622,7 +600,7 @@ Timer swipestore Timer wakeup_timer Attributes - ID : 33 + ID : 32 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_eu_code/media_player.txt b/advanced/hmi/nspanel_eu_code/media_player.txt index ef30119..00046ba 100644 --- a/advanced/hmi/nspanel_eu_code/media_player.txt +++ b/advanced/hmi/nspanel_eu_code/media_player.txt @@ -20,42 +20,35 @@ Page media_player sendme } -Variable (string) back_page - Attributes - ID : 3 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) lastclick Attributes - ID : 19 + ID : 18 Scope : local Text : Max. Text Size: 255 Variable (string) va0 Attributes - ID : 22 + ID : 21 Scope : local Text : Max. Text Size: 10 Variable (int32) is_muted Attributes - ID : 23 + ID : 22 Scope: local Value: 0 Variable (int32) prg_current Attributes - ID : 25 + ID : 24 Scope: local Value: 0 Variable (int32) prg_total Attributes - ID : 26 + ID : 25 Scope: local Value: 0 @@ -81,7 +74,7 @@ Text icon_state Text vol_text Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +84,7 @@ Text vol_text Text bt_vol_down Attributes - ID : 7 + ID : 6 Scope : local Dragging : 0 Send Component ID : on press and release @@ -117,7 +110,7 @@ Text bt_vol_down Text bt_vol_up Attributes - ID : 8 + ID : 7 Scope : local Dragging : 0 Send Component ID : on press @@ -143,7 +136,7 @@ Text bt_vol_up Text bt_mute Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Send Component ID : on press and release @@ -170,7 +163,7 @@ Text bt_mute Text time_current Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -180,7 +173,7 @@ Text time_current Text time_total Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -190,7 +183,7 @@ Text time_total Text track Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -200,7 +193,7 @@ Text track Text artist Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -210,7 +203,7 @@ Text artist Text bt_prev Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -230,7 +223,7 @@ Text bt_prev Text bt_play_pause Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -249,7 +242,7 @@ Text bt_play_pause Text bt_next Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -268,7 +261,7 @@ Text bt_next Text bt_on_off Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -287,7 +280,7 @@ Text bt_on_off Progress Bar time_progress Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID: on press and release @@ -295,7 +288,7 @@ Progress Bar time_progress Slider vol_slider Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID: on press and release @@ -311,7 +304,7 @@ Slider vol_slider Button button_back Attributes - ID : 4 + ID : 3 Scope : local Dragging : 0 Send Component ID: on press and release @@ -321,26 +314,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer wakeup_timer Attributes - ID : 20 + ID : 19 Scope : local Period (ms): 100 Enabled : yes @@ -363,7 +341,7 @@ Timer wakeup_timer Timer timer0 Attributes - ID : 21 + ID : 20 Scope : local Period (ms): 1000 Enabled : no @@ -383,7 +361,7 @@ Timer timer0 Timer prg_timer Attributes - ID : 24 + ID : 23 Scope : local Period (ms): 1000 Enabled : no diff --git a/advanced/hmi/nspanel_us.HMI b/advanced/hmi/nspanel_us.HMI index 3a2b6eb..5762ab9 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/Program.s.txt b/advanced/hmi/nspanel_us_code/Program.s.txt index ecccb99..c99d3cc 100644 --- a/advanced/hmi/nspanel_us_code/Program.s.txt +++ b/advanced/hmi/nspanel_us_code/Program.s.txt @@ -4,6 +4,7 @@ Program.s int r=0,g=0,b=0 int h=0,s=0,v=0 int p=0,q=0,t=0,f=0 + int back_page_id=0 int dimdelta=0 int api=0 // 0 = disconnected from HA, 1 = connected to HA int is_entities=0,is_qrcode=0,is_notification=0 @@ -17,10 +18,4 @@ Program.s { lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version } - printh 92 - prints "currentpage",0 - printh 00 - prints "",0 - printh 00 - printh FF FF FF page 8//Power on start page boot diff --git a/advanced/hmi/nspanel_us_code/alarm.txt b/advanced/hmi/nspanel_us_code/alarm.txt index b0597d3..6005911 100644 --- a/advanced/hmi/nspanel_us_code/alarm.txt +++ b/advanced/hmi/nspanel_us_code/alarm.txt @@ -32,30 +32,23 @@ Variable (string) lastclick Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 4 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) code_format Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 15 Variable (string) entity Attributes - ID : 30 + ID : 29 Scope : local Text : Max. Text Size: 100 Variable (string) code_arm_req Attributes - ID : 31 + ID : 30 Scope : local Text : Max. Text Size: 1 @@ -82,7 +75,7 @@ Text icon_state Text bt_home_text Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID : disabled @@ -92,7 +85,7 @@ Text bt_home_text Text bt_away_text Attributes - ID : 8 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -102,7 +95,7 @@ Text bt_away_text Text bt_night_text Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -112,7 +105,7 @@ Text bt_night_text Text bt_vacat_text Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -122,7 +115,7 @@ Text bt_vacat_text Text bt_bypass_text Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -132,7 +125,7 @@ Text bt_bypass_text Text bt_disarm_text Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -142,7 +135,7 @@ Text bt_disarm_text Text bt_home_icon Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -152,7 +145,7 @@ Text bt_home_icon Text bt_away_icon Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -162,7 +155,7 @@ Text bt_away_icon Text bt_night_icon Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -172,7 +165,7 @@ Text bt_night_icon Text bt_vacat_icon Attributes - ID : 20 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -182,7 +175,7 @@ Text bt_vacat_icon Text bt_bypass_icon Attributes - ID : 21 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -192,7 +185,7 @@ Text bt_bypass_icon Text bt_disarm_icon Attributes - ID : 22 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -202,49 +195,49 @@ Text bt_disarm_icon Picture bt_home_pic Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_away_pic Attributes - ID : 7 + ID : 6 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_vacat_pic Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_bypass_pic Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_disarm_pic Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID: disabled Button button_back Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID: on press and release @@ -254,26 +247,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot bt_home Attributes - ID : 23 + ID : 22 Scope : local Dragging : 0 Send Component ID: on press and release @@ -297,7 +275,7 @@ Hotspot bt_home Hotspot bt_away Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID: on press and release @@ -321,7 +299,7 @@ Hotspot bt_away Hotspot bt_night Attributes - ID : 25 + ID : 24 Scope : local Dragging : 0 Send Component ID: on press and release @@ -345,7 +323,7 @@ Hotspot bt_night Hotspot bt_vacat Attributes - ID : 26 + ID : 25 Scope : local Dragging : 0 Send Component ID: on press and release @@ -369,7 +347,7 @@ Hotspot bt_vacat Hotspot bt_bypass Attributes - ID : 27 + ID : 26 Scope : local Dragging : 0 Send Component ID: on press and release @@ -393,7 +371,7 @@ Hotspot bt_bypass Hotspot bt_disarm Attributes - ID : 28 + ID : 27 Scope : local Dragging : 0 Send Component ID: on press and release @@ -417,7 +395,7 @@ Hotspot bt_disarm Timer wakeup_timer Attributes - ID : 33 + ID : 32 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_code/climate.txt b/advanced/hmi/nspanel_us_code/climate.txt index 84c5d2d..01c8d4a 100644 --- a/advanced/hmi/nspanel_us_code/climate.txt +++ b/advanced/hmi/nspanel_us_code/climate.txt @@ -93,42 +93,35 @@ Variable (int32) va0 Scope: local Value: 0 -Variable (string) back_page - Attributes - ID : 36 - Scope : local - Text : home - Max. Text Size: 15 - Variable (int32) embedded Attributes - ID : 37 + ID : 36 Scope: global Value: 0 Variable (string) va2 Attributes - ID : 38 + ID : 37 Scope : local Text : Max. Text Size: 10 Variable (string) click_comp Attributes - ID : 40 + ID : 39 Scope : local Text : Max. Text Size: 8 Variable (int32) single_slider Attributes - ID : 44 + ID : 43 Scope: local Value: 1 Variable (int32) active_slider Attributes - ID : 45 + ID : 44 Scope: local Value: 1 @@ -467,7 +460,7 @@ Text target_high Text target_low Attributes - ID : 46 + ID : 45 Scope : local Dragging : 0 Send Component ID : on press and release @@ -502,7 +495,7 @@ Slider slider_high Slider slider_low Attributes - ID : 43 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release @@ -527,7 +520,7 @@ Slider slider_low Button button_back Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release @@ -537,22 +530,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot decrease_temp Attributes @@ -636,7 +614,7 @@ Timer timer01 Timer click_timer Attributes - ID : 41 + ID : 40 Scope : local Period (ms): 800 Enabled : no @@ -654,7 +632,7 @@ Timer click_timer Timer wakeup_timer Attributes - ID : 42 + ID : 41 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_code/cover.txt b/advanced/hmi/nspanel_us_code/cover.txt index f146380..7e727ed 100644 --- a/advanced/hmi/nspanel_us_code/cover.txt +++ b/advanced/hmi/nspanel_us_code/cover.txt @@ -34,13 +34,6 @@ Variable (string) coversetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 12 - Scope : local - Text : home - Max. Text Size: 15 - Text battery_value Attributes ID : 1 @@ -172,7 +165,7 @@ Button cover_stop Button button_back Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: on press and release @@ -182,26 +175,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer wakeup_timer Attributes - ID : 14 + ID : 13 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_code/fan.txt b/advanced/hmi/nspanel_us_code/fan.txt index 22b6eb3..b149f12 100644 --- a/advanced/hmi/nspanel_us_code/fan.txt +++ b/advanced/hmi/nspanel_us_code/fan.txt @@ -27,16 +27,9 @@ Variable (string) fansetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 8 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) va0 Attributes - ID : 9 + ID : 8 Scope : local Text : Max. Text Size: 10 @@ -106,7 +99,7 @@ Slider fanslider Button button_up Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID: on press and release @@ -145,7 +138,7 @@ Button button_up Button button_on Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID: on press and release @@ -187,7 +180,7 @@ Button button_on Button button_down Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID: on press and release @@ -226,7 +219,7 @@ Button button_down Button button_off Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: on press and release @@ -269,7 +262,7 @@ Button button_off Button button_back Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID: on press and release @@ -279,22 +272,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer swipestore Attributes @@ -310,7 +288,7 @@ Timer swipestore Timer timer0 Attributes - ID : 14 + ID : 13 Scope : local Period (ms): 1000 Enabled : no @@ -331,7 +309,7 @@ Timer timer0 Timer wakeup_timer Attributes - ID : 16 + ID : 15 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_code/home.txt b/advanced/hmi/nspanel_us_code/home.txt index bc64bd9..e564168 100644 --- a/advanced/hmi/nspanel_us_code/home.txt +++ b/advanced/hmi/nspanel_us_code/home.txt @@ -13,6 +13,7 @@ Page home Events Preinitialize Event sendme + back_page_id=0 vis bt_notific,is_notification vis bt_qrcode,is_qrcode vis bt_entities,is_entities diff --git a/advanced/hmi/nspanel_us_code/light.txt b/advanced/hmi/nspanel_us_code/light.txt index 4ab9773..c3fa61a 100644 --- a/advanced/hmi/nspanel_us_code/light.txt +++ b/advanced/hmi/nspanel_us_code/light.txt @@ -78,13 +78,6 @@ Variable (string) lightsetting Text : Max. Text Size: 255 -Variable (string) back_page - Attributes - ID : 31 - Scope : local - Text : home - Max. Text Size: 15 - Number ring Attributes ID : 4 @@ -417,7 +410,7 @@ Slider tempslider Button button_back Attributes - ID : 32 + ID : 31 Scope : local Dragging : 0 Send Component ID: on press and release @@ -427,22 +420,7 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Hotspot hsv2rgb Attributes @@ -622,7 +600,7 @@ Timer swipestore Timer wakeup_timer Attributes - ID : 33 + ID : 32 Scope : local Period (ms): 100 Enabled : yes diff --git a/advanced/hmi/nspanel_us_code/media_player.txt b/advanced/hmi/nspanel_us_code/media_player.txt index b3248ab..13e650a 100644 --- a/advanced/hmi/nspanel_us_code/media_player.txt +++ b/advanced/hmi/nspanel_us_code/media_player.txt @@ -20,42 +20,35 @@ Page media_player sendme } -Variable (string) back_page - Attributes - ID : 3 - Scope : local - Text : home - Max. Text Size: 15 - Variable (string) lastclick Attributes - ID : 19 + ID : 18 Scope : local Text : Max. Text Size: 255 Variable (string) va0 Attributes - ID : 22 + ID : 21 Scope : local Text : Max. Text Size: 10 Variable (int32) is_muted Attributes - ID : 23 + ID : 22 Scope: local Value: 0 Variable (int32) prg_current Attributes - ID : 25 + ID : 24 Scope: local Value: 0 Variable (int32) prg_total Attributes - ID : 26 + ID : 25 Scope: local Value: 0 @@ -81,7 +74,7 @@ Text icon_state Text vol_text Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +84,7 @@ Text vol_text Text bt_vol_down Attributes - ID : 7 + ID : 6 Scope : local Dragging : 0 Send Component ID : on press and release @@ -117,7 +110,7 @@ Text bt_vol_down Text bt_vol_up Attributes - ID : 8 + ID : 7 Scope : local Dragging : 0 Send Component ID : on press and release @@ -143,7 +136,7 @@ Text bt_vol_up Text bt_mute Attributes - ID : 9 + ID : 8 Scope : local Dragging : 0 Send Component ID : on press and release @@ -170,7 +163,7 @@ Text bt_mute Text time_current Attributes - ID : 11 + ID : 10 Scope : local Dragging : 0 Send Component ID : on press and release @@ -180,7 +173,7 @@ Text time_current Text time_total Attributes - ID : 12 + ID : 11 Scope : local Dragging : 0 Send Component ID : on press and release @@ -190,7 +183,7 @@ Text time_total Text track Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID : on press and release @@ -200,7 +193,7 @@ Text track Text artist Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : on press and release @@ -210,7 +203,7 @@ Text artist Text bt_prev Attributes - ID : 15 + ID : 14 Scope : local Dragging : 0 Send Component ID : on press and release @@ -229,7 +222,7 @@ Text bt_prev Text bt_play_pause Attributes - ID : 16 + ID : 15 Scope : local Dragging : 0 Send Component ID : on press and release @@ -248,7 +241,7 @@ Text bt_play_pause Text bt_next Attributes - ID : 17 + ID : 16 Scope : local Dragging : 0 Send Component ID : on press and release @@ -267,7 +260,7 @@ Text bt_next Text bt_on_off Attributes - ID : 18 + ID : 17 Scope : local Dragging : 0 Send Component ID : on press and release @@ -286,7 +279,7 @@ Text bt_on_off Progress Bar time_progress Attributes - ID : 10 + ID : 9 Scope : local Dragging : 0 Send Component ID: on press and release @@ -294,7 +287,7 @@ Progress Bar time_progress Slider vol_slider Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID: on press and release @@ -310,7 +303,7 @@ Slider vol_slider Button button_back Attributes - ID : 4 + ID : 3 Scope : local Dragging : 0 Send Component ID: on release @@ -320,26 +313,11 @@ Button button_back Events Touch Press Event - if(back_page.txt=="buttonpage01") - { - page buttonpage01 - }else if(back_page.txt=="buttonpage02") - { - page buttonpage02 - }else if(back_page.txt=="buttonpage03") - { - page buttonpage03 - }else if(back_page.txt=="buttonpage04") - { - page buttonpage04 - }else - { - page home - } + page back_page_id Timer wakeup_timer Attributes - ID : 20 + ID : 19 Scope : local Period (ms): 100 Enabled : yes @@ -362,7 +340,7 @@ Timer wakeup_timer Timer timer0 Attributes - ID : 21 + ID : 20 Scope : local Period (ms): 1000 Enabled : no @@ -382,7 +360,7 @@ Timer timer0 Timer prg_timer Attributes - ID : 24 + ID : 23 Scope : local Period (ms): 1000 Enabled : no