diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 1e81a2e..73524c6 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -18,7 +18,7 @@ substitutions: temp_units: "°C" invalid_cooldown: "100ms" ##### DON'T CHANGE THIS ###### - version: "4.3dev2" + version: "4.3dev3" ############################## ##### External components ##### @@ -2168,7 +2168,8 @@ script: { {"type", "page_changed"}, {"page", page.c_str()}, - {"entity", detailed_entity->state.c_str()} + {"entity", detailed_entity->state.c_str()}, + {"display_mode", display_mode->state.c_str()} }); // Call page constructor diff --git a/hmi/dev/nspanel_CJK_eu_code/Program.s.txt b/hmi/dev/nspanel_CJK_eu_code/Program.s.txt index 439f69b..e37b9eb 100644 --- a/hmi/dev/nspanel_CJK_eu_code/Program.s.txt +++ b/hmi/dev/nspanel_CJK_eu_code/Program.s.txt @@ -4,12 +4,12 @@ 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 is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=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 + int is_qrcode=0,is_notification=0,is_utilities=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 diff --git a/hmi/dev/nspanel_CJK_eu_code/boot.txt b/hmi/dev/nspanel_CJK_eu_code/boot.txt index ed2d4b6..17a8d9f 100644 --- a/hmi/dev/nspanel_CJK_eu_code/boot.txt +++ b/hmi/dev/nspanel_CJK_eu_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev + Text : 4.3dev3 Max. Text Size : 9 Text esph_version diff --git a/hmi/dev/nspanel_CJK_eu_code/home.txt b/hmi/dev/nspanel_CJK_eu_code/home.txt index e8109d7..6bd21a1 100644 --- a/hmi/dev/nspanel_CJK_eu_code/home.txt +++ b/hmi/dev/nspanel_CJK_eu_code/home.txt @@ -13,9 +13,16 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities + vis bt_utilities,is_utilities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +371,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 @@ -590,6 +612,23 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_utilities + Attributes + ID : 45 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Release Event + if(api==1) + { + page utilities + } + Picture weather Attributes ID : 7 diff --git a/hmi/dev/nspanel_CJK_eu_code/utilities.txt b/hmi/dev/nspanel_CJK_eu_code/utilities.txt index cf4600e..af61588 100644 --- a/hmi/dev/nspanel_CJK_eu_code/utilities.txt +++ b/hmi/dev/nspanel_CJK_eu_code/utilities.txt @@ -16,34 +16,59 @@ Page utilities { page home } - vis unavailable,0 + vis 255,0 + vis title_icon,1 + vis title,1 + vis button_back,1 Postinitialize Event sendme -Text title +Variable (int32) line_main_d Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : Power Dashboard - Max. Text Size : 100 + ID : 46 + Scope: local + Value: 1 -Text title_icon +Variable (int32) group01_line_d Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text :  - Max. Text Size : 10 + ID : 47 + Scope: local + Value: 4294967295 + +Variable (int32) group02_line_d + Attributes + ID : 48 + Scope: local + Value: 1 + +Variable (int32) group03_line_d + Attributes + ID : 49 + Scope: local + Value: 4294967295 + +Variable (int32) group04_line_d + Attributes + ID : 50 + Scope: local + Value: 1 + +Variable (int32) group05_line_d + Attributes + ID : 51 + Scope: local + Value: 4294967295 + +Variable (int32) group06_line_d + Attributes + ID : 52 + Scope: local + Value: 1 Text unavailable Attributes - ID : 5 + ID : 3 Scope : local Dragging : 0 Send Component ID : disabled @@ -51,19 +76,29 @@ Text unavailable Text : Max. Text Size : 1 -Text t0 +Text title_icon Attributes - ID : 6 + ID : 4 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : î´½ - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t1 +Text title Attributes - ID : 7 + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 100 + +Text home_icon + Attributes + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -71,49 +106,9 @@ Text t1 Text : 賈 Max. Text Size : 4 -Text t2 +Text home_label Attributes - ID : 9 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t3 - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t4 - Attributes - ID : 11 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Green - Max. Text Size : 10 - -Text t5 - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Fossil - Max. Text Size : 10 - -Text t6 - Attributes - ID : 15 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,199 +116,309 @@ Text t6 Text : Home Max. Text Size : 10 -Text t7 +Text home + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text homeb + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text grid_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : î´½ + Max. Text Size : 4 + +Text grid_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Grid + Max. Text Size : 10 + +Text grid + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text gridb + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group01_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group01_label Attributes ID : 16 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 全 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t8 +Text group01 Attributes ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Solar + Text : Max. Text Size : 10 -Text t9 +Text group01b Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 98% + Text : Max. Text Size : 10 -Text t10 +Text group02_icon Attributes ID : 20 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 2% - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t11 +Text group02_label Attributes ID : 21 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 豈 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t12 +Text group02 Attributes ID : 22 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Battery + Text : Max. Text Size : 10 -Text t13 +Text group02b Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 暑 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t14 +Text group03_icon Attributes ID : 25 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Heating + Text :  + Max. Text Size : 4 + +Text group03_label + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label Max. Text Size : 10 -Text t15 +Text group03 Attributes ID : 27 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.7 kW + Text : Max. Text Size : 10 -Text t16 +Text group03b Attributes ID : 28 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 21.7°C + Text : Max. Text Size : 10 -Text t17 - Attributes - ID : 29 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 - -Text t18 +Text group04_icon Attributes ID : 30 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : -2.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t19 +Text group04_label Attributes ID : 31 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 0.8 kW + Text : Label Max. Text Size : 10 -Text t20 +Text group04 Attributes ID : 32 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 慎 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t21 +Text group04b Attributes ID : 33 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Wind + Text : Max. Text Size : 10 -Text t22 +Text group05_icon Attributes ID : 35 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t23 +Text group05_label Attributes ID : 36 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : î—° - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t24 +Text group05 Attributes ID : 37 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Car + Text : Max. Text Size : 10 -Text t25 +Text group05b Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW + Text : Max. Text Size : 10 -Slider h0 +Text group06_icon Attributes - ID : 8 + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group06_label + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label + Max. Text Size : 10 + +Text group06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group06b + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider line_main + Attributes + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled @@ -321,9 +426,9 @@ Slider h0 Upper range limit: 100 Lower range limit: 0 -Slider h1 +Slider group01_line Attributes - ID : 13 + ID : 19 Scope : local Dragging : 0 Send Component ID: disabled @@ -331,9 +436,9 @@ Slider h1 Upper range limit: 100 Lower range limit: 0 -Slider h2 +Slider group02_line Attributes - ID : 14 + ID : 24 Scope : local Dragging : 0 Send Component ID: disabled @@ -341,9 +446,9 @@ Slider h2 Upper range limit: 100 Lower range limit: 0 -Slider h3 +Slider group03_line Attributes - ID : 18 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled @@ -351,27 +456,7 @@ Slider h3 Upper range limit: 100 Lower range limit: 0 -Slider h4 - Attributes - ID : 23 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h5 - Attributes - ID : 26 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h6 +Slider group04_line Attributes ID : 34 Scope : local @@ -381,9 +466,19 @@ Slider h6 Upper range limit: 100 Lower range limit: 0 -Slider h7 +Slider group05_line Attributes - ID : 38 + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 50 + Upper range limit: 100 + Lower range limit: 0 + +Slider group06_line + Attributes + ID : 44 Scope : local Dragging : 0 Send Component ID: disabled @@ -393,7 +488,7 @@ Slider h7 Button button_back Attributes - ID : 3 + ID : 2 Scope : local Dragging : 0 Send Component ID: on press and release @@ -403,11 +498,11 @@ Button button_back Events Touch Press Event - page back_page_id + page home Timer wakeup_timer Attributes - ID : 4 + ID : 1 Scope : local Period (ms): 100 Enabled : yes @@ -428,3 +523,76 @@ Timer wakeup_timer wakeup_timer.en=0 } +Timer tm_movement + Attributes + ID : 45 + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + //line_main + line_main.val+=line_main_d.val + if(line_main.val>=line_main.maxval) + { + line_main.val=line_main.minval + }else if(line_main.val<=line_main.minval) + { + line_main.val=line_main.maxval + } + //group01_line + group01_line.val+=group01_line_d.val + if(group01_line.val>=group01_line.maxval) + { + group01_line.val=group01_line.minval + }else if(group01_line.val<=group01_line.minval) + { + group01_line.val=group01_line.maxval + } + //group02_line + group02_line.val+=group02_line_d.val + if(group02_line.val>=group02_line.maxval) + { + group02_line.val=group02_line.minval + }else if(group02_line.val<=group02_line.minval) + { + group02_line.val=group02_line.maxval + } + //group03_line + group03_line.val+=group03_line_d.val + if(group03_line.val>=group03_line.maxval) + { + group03_line.val=group03_line.minval + }else if(group03_line.val<=group03_line.minval) + { + group03_line.val=group03_line.maxval + } + //group04_line + group04_line.val+=group04_line_d.val + if(group04_line.val>=group04_line.maxval) + { + group04_line.val=group04_line.minval + }else if(group04_line.val<=group04_line.minval) + { + group04_line.val=group04_line.maxval + } + //group05_line + group05_line.val+=group05_line_d.val + if(group05_line.val>=group05_line.maxval) + { + group05_line.val=group05_line.minval + }else if(group05_line.val<=group05_line.minval) + { + group05_line.val=group05_line.maxval + } + //group06_line + group06_line.val+=group06_line_d.val + if(group06_line.val>=group06_line.maxval) + { + group06_line.val=group06_line.minval + }else if(group06_line.val<=group06_line.minval) + { + group06_line.val=group06_line.maxval + } + diff --git a/hmi/dev/nspanel_CJK_us_code/Program.s.txt b/hmi/dev/nspanel_CJK_us_code/Program.s.txt index 85e414e..d9d2f36 100644 --- a/hmi/dev/nspanel_CJK_us_code/Program.s.txt +++ b/hmi/dev/nspanel_CJK_us_code/Program.s.txt @@ -4,12 +4,12 @@ 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 is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=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 + int is_qrcode=0,is_notification=0,is_utilities=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=2 // 1 = International (original), 2 = CJK diff --git a/hmi/dev/nspanel_CJK_us_code/boot.txt b/hmi/dev/nspanel_CJK_us_code/boot.txt index f2f45ef..3e63dce 100644 --- a/hmi/dev/nspanel_CJK_us_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev + Text : 4.3dev3 Max. Text Size : 9 Events diff --git a/hmi/dev/nspanel_CJK_us_code/home.txt b/hmi/dev/nspanel_CJK_us_code/home.txt index e8109d7..6bd21a1 100644 --- a/hmi/dev/nspanel_CJK_us_code/home.txt +++ b/hmi/dev/nspanel_CJK_us_code/home.txt @@ -13,9 +13,16 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities + vis bt_utilities,is_utilities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +371,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 @@ -590,6 +612,23 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_utilities + Attributes + ID : 45 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Release Event + if(api==1) + { + page utilities + } + Picture weather Attributes ID : 7 diff --git a/hmi/dev/nspanel_CJK_us_code/utilities.txt b/hmi/dev/nspanel_CJK_us_code/utilities.txt index c507044..0d47821 100644 --- a/hmi/dev/nspanel_CJK_us_code/utilities.txt +++ b/hmi/dev/nspanel_CJK_us_code/utilities.txt @@ -16,34 +16,59 @@ Page utilities { page home } - vis unavailable,0 + vis 255,0 + vis title_icon,1 + vis title,1 + vis button_back,1 Postinitialize Event sendme -Text title +Variable (int32) line_main_d Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : Power Dashboard - Max. Text Size : 100 + ID : 46 + Scope: local + Value: 4294967295 -Text title_icon +Variable (int32) group01_line_d Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text :  - Max. Text Size : 10 + ID : 47 + Scope: local + Value: 1 + +Variable (int32) group02_line_d + Attributes + ID : 48 + Scope: local + Value: 4294967295 + +Variable (int32) group03_line_d + Attributes + ID : 49 + Scope: local + Value: 1 + +Variable (int32) group04_line_d + Attributes + ID : 50 + Scope: local + Value: 4294967295 + +Variable (int32) group05_line_d + Attributes + ID : 51 + Scope: local + Value: 1 + +Variable (int32) group06_line_d + Attributes + ID : 52 + Scope: local + Value: 4294967295 Text unavailable Attributes - ID : 5 + ID : 3 Scope : local Dragging : 0 Send Component ID : disabled @@ -51,7 +76,27 @@ Text unavailable Text : Max. Text Size : 1 -Text t1 +Text title_icon + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text title + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 100 + +Text home_icon Attributes ID : 6 Scope : local @@ -61,7 +106,7 @@ Text t1 Text : 賈 Max. Text Size : 4 -Text t6 +Text home_label Attributes ID : 7 Scope : local @@ -71,29 +116,29 @@ Text t6 Text : Home Max. Text Size : 10 -Text t15 +Text home Attributes ID : 8 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.7 kW + Text : Max. Text Size : 10 -Text t16 +Text homeb Attributes ID : 9 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 21.7°C + Text : Max. Text Size : 10 -Text t0 +Text grid_icon Attributes - ID : 10 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,219 +146,279 @@ Text t0 Text : î´½ Max. Text Size : 4 -Text t2 +Text grid_label Attributes ID : 12 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text :  - Max. Text Size : 4 + Text : Grid + Max. Text Size : 10 -Text t4 +Text grid Attributes ID : 13 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : Green + Text : Max. Text Size : 10 -Text t9 +Text gridb + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group01_icon Attributes ID : 15 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : 98% - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t3 +Text group01_label Attributes ID : 16 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text :  - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t5 +Text group01 Attributes ID : 17 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : Fossil + Text : Max. Text Size : 10 -Text t10 +Text group01b Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : 2% + Text : Max. Text Size : 10 -Text t7 +Text group02_icon Attributes ID : 20 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 全 + Text :  Max. Text Size : 4 -Text t8 +Text group02_label Attributes ID : 21 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : Solar + Text : Label Max. Text Size : 10 -Text t17 +Text group02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group02b Attributes ID : 23 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW + Text : Max. Text Size : 10 -Text t20 - Attributes - ID : 24 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : 慎 - Max. Text Size : 4 - -Text t21 +Text group03_icon Attributes ID : 25 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Wind + Text :  + Max. Text Size : 4 + +Text group03_label + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label Max. Text Size : 10 -Text t22 +Text group03 Attributes ID : 27 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW + Text : Max. Text Size : 10 -Text t11 +Text group03b Attributes ID : 28 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 豈 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t12 +Text group04_icon Attributes - ID : 29 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Battery - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t18 +Text group04_label Attributes ID : 31 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : -2.1 kW + Text : Label Max. Text Size : 10 -Text t23 +Text group04 Attributes ID : 32 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : î—° - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t24 +Text group04b Attributes ID : 33 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Car + Text : Max. Text Size : 10 -Text t25 +Text group05_icon Attributes ID : 35 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t13 +Text group05_label Attributes ID : 36 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 暑 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t14 +Text group05 Attributes ID : 37 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Heating + Text : Max. Text Size : 10 -Text t19 +Text group05b Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 0.8 kW + Text : Max. Text Size : 10 -Slider h0 +Text group06_icon Attributes - ID : 11 + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group06_label + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label + Max. Text Size : 10 + +Text group06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group06b + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider line_main + Attributes + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled @@ -321,9 +426,19 @@ Slider h0 Upper range limit: 100 Lower range limit: 0 -Slider h1 +Slider group01_line Attributes - ID : 14 + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: on press and release + Position : 50 + Upper range limit: 100 + Lower range limit: 0 + +Slider group02_line + Attributes + ID : 24 Scope : local Dragging : 0 Send Component ID: disabled @@ -331,9 +446,9 @@ Slider h1 Upper range limit: 100 Lower range limit: 0 -Slider h2 +Slider group03_line Attributes - ID : 18 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled @@ -341,37 +456,7 @@ Slider h2 Upper range limit: 100 Lower range limit: 0 -Slider h3 - Attributes - ID : 22 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h6 - Attributes - ID : 26 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h4 - Attributes - ID : 30 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h7 +Slider group04_line Attributes ID : 34 Scope : local @@ -381,9 +466,19 @@ Slider h7 Upper range limit: 100 Lower range limit: 0 -Slider h5 +Slider group05_line Attributes - ID : 38 + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 50 + Upper range limit: 100 + Lower range limit: 0 + +Slider group06_line + Attributes + ID : 44 Scope : local Dragging : 0 Send Component ID: disabled @@ -393,7 +488,7 @@ Slider h5 Button button_back Attributes - ID : 3 + ID : 2 Scope : local Dragging : 0 Send Component ID: on release @@ -403,11 +498,11 @@ Button button_back Events Touch Press Event - page back_page_id + page home Timer wakeup_timer Attributes - ID : 4 + ID : 1 Scope : local Period (ms): 100 Enabled : yes @@ -428,3 +523,76 @@ Timer wakeup_timer wakeup_timer.en=0 } +Timer tm_movement + Attributes + ID : 45 + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + //line_main + line_main.val+=line_main_d.val + if(line_main.val>=line_main.maxval) + { + line_main.val=line_main.minval + }else if(line_main.val<=line_main.minval) + { + line_main.val=line_main.maxval + } + //group01_line + group01_line.val+=group01_line_d.val + if(group01_line.val>=group01_line.maxval) + { + group01_line.val=group01_line.minval + }else if(group01_line.val<=group01_line.minval) + { + group01_line.val=group01_line.maxval + } + //group02_line + group02_line.val+=group02_line_d.val + if(group02_line.val>=group02_line.maxval) + { + group02_line.val=group02_line.minval + }else if(group02_line.val<=group02_line.minval) + { + group02_line.val=group02_line.maxval + } + //group03_line + group03_line.val+=group03_line_d.val + if(group03_line.val>=group03_line.maxval) + { + group03_line.val=group03_line.minval + }else if(group03_line.val<=group03_line.minval) + { + group03_line.val=group03_line.maxval + } + //group04_line + group04_line.val+=group04_line_d.val + if(group04_line.val>=group04_line.maxval) + { + group04_line.val=group04_line.minval + }else if(group04_line.val<=group04_line.minval) + { + group04_line.val=group04_line.maxval + } + //group05_line + group05_line.val+=group05_line_d.val + if(group05_line.val>=group05_line.maxval) + { + group05_line.val=group05_line.minval + }else if(group05_line.val<=group05_line.minval) + { + group05_line.val=group05_line.maxval + } + //group06_line + group06_line.val+=group06_line_d.val + if(group06_line.val>=group06_line.maxval) + { + group06_line.val=group06_line.minval + }else if(group06_line.val<=group06_line.minval) + { + group06_line.val=group06_line.maxval + } + diff --git a/hmi/dev/nspanel_CJK_us_land_code/Program.s.txt b/hmi/dev/nspanel_CJK_us_land_code/Program.s.txt index 1874b9b..468e201 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/Program.s.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/Program.s.txt @@ -4,12 +4,12 @@ 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 is_buttonpage01=1, is_buttonpage02=1, is_buttonpage03=1, is_buttonpage04=1 - int is_entitypage01=1, is_entitypage02=1, is_entitypage03=1, is_entitypage04=1 + int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0 + int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=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 + int is_qrcode=0,is_notification=0,is_utilities=0 int brightness=100,brightness_dim=40,brightness_sleep=0 int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank int charset=2 // 1 = International (original), 2 = CJK diff --git a/hmi/dev/nspanel_CJK_us_land_code/boot.txt b/hmi/dev/nspanel_CJK_us_land_code/boot.txt index ed2d4b6..17a8d9f 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev + Text : 4.3dev3 Max. Text Size : 9 Text esph_version diff --git a/hmi/dev/nspanel_CJK_us_land_code/home.txt b/hmi/dev/nspanel_CJK_us_land_code/home.txt index e8109d7..6bd21a1 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/home.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/home.txt @@ -13,9 +13,16 @@ Page home Events Preinitialize Event back_page_id=0 + if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0) + { + vis bt_entities,1 + }else + { + vis bt_entities,0 + } vis bt_notific,is_notification vis bt_qrcode,is_qrcode - vis bt_entities,is_entities + vis bt_utilities,is_utilities if(display_mode==3) { vis left_bt_text,0 @@ -364,7 +371,22 @@ Text bt_entities Touch Release Event if(api==1) { - page entitypage01 + if(is_entitypage01>0) + { + page entitypage01 + }else if(is_entitypage02>0) + { + page entitypage02 + }else if(is_entitypage03>0) + { + page entitypage03 + }else if(is_entitypage04>0) + { + page entitypage04 + }else + { + vis bt_entities,0 + } } Text button07 @@ -590,6 +612,23 @@ Text unavailable Text : Max. Text Size : 1 +Text bt_utilities + Attributes + ID : 45 + Scope : global + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 3 + + Events + Touch Release Event + if(api==1) + { + page utilities + } + Picture weather Attributes ID : 7 diff --git a/hmi/dev/nspanel_CJK_us_land_code/utilities.txt b/hmi/dev/nspanel_CJK_us_land_code/utilities.txt index cf4600e..af61588 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/utilities.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/utilities.txt @@ -16,34 +16,59 @@ Page utilities { page home } - vis unavailable,0 + vis 255,0 + vis title_icon,1 + vis title,1 + vis button_back,1 Postinitialize Event sendme -Text title +Variable (int32) line_main_d Attributes - ID : 1 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text : Power Dashboard - Max. Text Size : 100 + ID : 46 + Scope: local + Value: 1 -Text title_icon +Variable (int32) group01_line_d Attributes - ID : 2 - Scope : local - Dragging : 0 - Send Component ID : on press and release - Associated Keyboard: none - Text :  - Max. Text Size : 10 + ID : 47 + Scope: local + Value: 4294967295 + +Variable (int32) group02_line_d + Attributes + ID : 48 + Scope: local + Value: 1 + +Variable (int32) group03_line_d + Attributes + ID : 49 + Scope: local + Value: 4294967295 + +Variable (int32) group04_line_d + Attributes + ID : 50 + Scope: local + Value: 1 + +Variable (int32) group05_line_d + Attributes + ID : 51 + Scope: local + Value: 4294967295 + +Variable (int32) group06_line_d + Attributes + ID : 52 + Scope: local + Value: 1 Text unavailable Attributes - ID : 5 + ID : 3 Scope : local Dragging : 0 Send Component ID : disabled @@ -51,19 +76,29 @@ Text unavailable Text : Max. Text Size : 1 -Text t0 +Text title_icon Attributes - ID : 6 + ID : 4 Scope : local Dragging : 0 - Send Component ID : disabled + Send Component ID : on press and release Associated Keyboard: none - Text : î´½ - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t1 +Text title Attributes - ID : 7 + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : on press and release + Associated Keyboard: none + Text : + Max. Text Size : 100 + +Text home_icon + Attributes + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -71,49 +106,9 @@ Text t1 Text : 賈 Max. Text Size : 4 -Text t2 +Text home_label Attributes - ID : 9 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t3 - Attributes - ID : 10 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 4 - -Text t4 - Attributes - ID : 11 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Green - Max. Text Size : 10 - -Text t5 - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : Fossil - Max. Text Size : 10 - -Text t6 - Attributes - ID : 15 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,199 +116,309 @@ Text t6 Text : Home Max. Text Size : 10 -Text t7 +Text home + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text homeb + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text grid_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : î´½ + Max. Text Size : 4 + +Text grid_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Grid + Max. Text Size : 10 + +Text grid + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text gridb + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group01_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group01_label Attributes ID : 16 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 全 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t8 +Text group01 Attributes ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Solar + Text : Max. Text Size : 10 -Text t9 +Text group01b Attributes - ID : 19 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 98% + Text : Max. Text Size : 10 -Text t10 +Text group02_icon Attributes ID : 20 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 2% - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t11 +Text group02_label Attributes ID : 21 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 豈 - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t12 +Text group02 Attributes ID : 22 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Battery + Text : Max. Text Size : 10 -Text t13 +Text group02b Attributes - ID : 24 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 暑 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t14 +Text group03_icon Attributes ID : 25 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Heating + Text :  + Max. Text Size : 4 + +Text group03_label + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label Max. Text Size : 10 -Text t15 +Text group03 Attributes ID : 27 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.7 kW + Text : Max. Text Size : 10 -Text t16 +Text group03b Attributes ID : 28 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 21.7°C + Text : Max. Text Size : 10 -Text t17 - Attributes - ID : 29 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 - -Text t18 +Text group04_icon Attributes ID : 30 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : -2.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t19 +Text group04_label Attributes ID : 31 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 0.8 kW + Text : Label Max. Text Size : 10 -Text t20 +Text group04 Attributes ID : 32 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 慎 - Max. Text Size : 4 + Text : + Max. Text Size : 10 -Text t21 +Text group04b Attributes ID : 33 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Wind + Text : Max. Text Size : 10 -Text t22 +Text group05_icon Attributes ID : 35 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW - Max. Text Size : 10 + Text :  + Max. Text Size : 4 -Text t23 +Text group05_label Attributes ID : 36 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : î—° - Max. Text Size : 4 + Text : Label + Max. Text Size : 10 -Text t24 +Text group05 Attributes ID : 37 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Car + Text : Max. Text Size : 10 -Text t25 +Text group05b Attributes - ID : 39 + ID : 38 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 1.1 kW + Text : Max. Text Size : 10 -Slider h0 +Text group06_icon Attributes - ID : 8 + ID : 40 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 4 + +Text group06_label + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Label + Max. Text Size : 10 + +Text group06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text group06b + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider line_main + Attributes + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled @@ -321,9 +426,9 @@ Slider h0 Upper range limit: 100 Lower range limit: 0 -Slider h1 +Slider group01_line Attributes - ID : 13 + ID : 19 Scope : local Dragging : 0 Send Component ID: disabled @@ -331,9 +436,9 @@ Slider h1 Upper range limit: 100 Lower range limit: 0 -Slider h2 +Slider group02_line Attributes - ID : 14 + ID : 24 Scope : local Dragging : 0 Send Component ID: disabled @@ -341,9 +446,9 @@ Slider h2 Upper range limit: 100 Lower range limit: 0 -Slider h3 +Slider group03_line Attributes - ID : 18 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled @@ -351,27 +456,7 @@ Slider h3 Upper range limit: 100 Lower range limit: 0 -Slider h4 - Attributes - ID : 23 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h5 - Attributes - ID : 26 - Scope : local - Dragging : 0 - Send Component ID: disabled - Position : 50 - Upper range limit: 100 - Lower range limit: 0 - -Slider h6 +Slider group04_line Attributes ID : 34 Scope : local @@ -381,9 +466,19 @@ Slider h6 Upper range limit: 100 Lower range limit: 0 -Slider h7 +Slider group05_line Attributes - ID : 38 + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 50 + Upper range limit: 100 + Lower range limit: 0 + +Slider group06_line + Attributes + ID : 44 Scope : local Dragging : 0 Send Component ID: disabled @@ -393,7 +488,7 @@ Slider h7 Button button_back Attributes - ID : 3 + ID : 2 Scope : local Dragging : 0 Send Component ID: on press and release @@ -403,11 +498,11 @@ Button button_back Events Touch Press Event - page back_page_id + page home Timer wakeup_timer Attributes - ID : 4 + ID : 1 Scope : local Period (ms): 100 Enabled : yes @@ -428,3 +523,76 @@ Timer wakeup_timer wakeup_timer.en=0 } +Timer tm_movement + Attributes + ID : 45 + Scope : local + Period (ms): 50 + Enabled : yes + + Events + Timer Event + //line_main + line_main.val+=line_main_d.val + if(line_main.val>=line_main.maxval) + { + line_main.val=line_main.minval + }else if(line_main.val<=line_main.minval) + { + line_main.val=line_main.maxval + } + //group01_line + group01_line.val+=group01_line_d.val + if(group01_line.val>=group01_line.maxval) + { + group01_line.val=group01_line.minval + }else if(group01_line.val<=group01_line.minval) + { + group01_line.val=group01_line.maxval + } + //group02_line + group02_line.val+=group02_line_d.val + if(group02_line.val>=group02_line.maxval) + { + group02_line.val=group02_line.minval + }else if(group02_line.val<=group02_line.minval) + { + group02_line.val=group02_line.maxval + } + //group03_line + group03_line.val+=group03_line_d.val + if(group03_line.val>=group03_line.maxval) + { + group03_line.val=group03_line.minval + }else if(group03_line.val<=group03_line.minval) + { + group03_line.val=group03_line.maxval + } + //group04_line + group04_line.val+=group04_line_d.val + if(group04_line.val>=group04_line.maxval) + { + group04_line.val=group04_line.minval + }else if(group04_line.val<=group04_line.minval) + { + group04_line.val=group04_line.maxval + } + //group05_line + group05_line.val+=group05_line_d.val + if(group05_line.val>=group05_line.maxval) + { + group05_line.val=group05_line.minval + }else if(group05_line.val<=group05_line.minval) + { + group05_line.val=group05_line.maxval + } + //group06_line + group06_line.val+=group06_line_d.val + if(group06_line.val>=group06_line.maxval) + { + group06_line.val=group06_line.minval + }else if(group06_line.val<=group06_line.minval) + { + group06_line.val=group06_line.maxval + } + diff --git a/hmi/dev/nspanel_eu_code/boot.txt b/hmi/dev/nspanel_eu_code/boot.txt index 8a940d8..17a8d9f 100644 --- a/hmi/dev/nspanel_eu_code/boot.txt +++ b/hmi/dev/nspanel_eu_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev2 + Text : 4.3dev3 Max. Text Size : 9 Text esph_version diff --git a/hmi/dev/nspanel_us_code/boot.txt b/hmi/dev/nspanel_us_code/boot.txt index ad86552..3e63dce 100644 --- a/hmi/dev/nspanel_us_code/boot.txt +++ b/hmi/dev/nspanel_us_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev2 + Text : 4.3dev3 Max. Text Size : 9 Events diff --git a/hmi/dev/nspanel_us_land_code/boot.txt b/hmi/dev/nspanel_us_land_code/boot.txt index 8a940d8..17a8d9f 100644 --- a/hmi/dev/nspanel_us_land_code/boot.txt +++ b/hmi/dev/nspanel_us_land_code/boot.txt @@ -103,7 +103,7 @@ Text tft_version Dragging : 0 Send Component ID : on press and release Associated Keyboard: none - Text : 4.3dev2 + Text : 4.3dev3 Max. Text Size : 9 Text esph_version diff --git a/hmi/nspanel_CJK_eu.HMI b/hmi/nspanel_CJK_eu.HMI index fdfc8e1..b497f08 100644 Binary files a/hmi/nspanel_CJK_eu.HMI and b/hmi/nspanel_CJK_eu.HMI differ diff --git a/hmi/nspanel_CJK_eu.tft b/hmi/nspanel_CJK_eu.tft index d726740..7836262 100644 Binary files a/hmi/nspanel_CJK_eu.tft and b/hmi/nspanel_CJK_eu.tft differ diff --git a/hmi/nspanel_CJK_us.HMI b/hmi/nspanel_CJK_us.HMI index 4ff0f0f..aa2756f 100644 Binary files a/hmi/nspanel_CJK_us.HMI and b/hmi/nspanel_CJK_us.HMI differ diff --git a/hmi/nspanel_CJK_us.tft b/hmi/nspanel_CJK_us.tft index 32530ea..22079ae 100644 Binary files a/hmi/nspanel_CJK_us.tft and b/hmi/nspanel_CJK_us.tft differ diff --git a/hmi/nspanel_CJK_us_land.HMI b/hmi/nspanel_CJK_us_land.HMI index a695979..af170f8 100644 Binary files a/hmi/nspanel_CJK_us_land.HMI and b/hmi/nspanel_CJK_us_land.HMI differ diff --git a/hmi/nspanel_CJK_us_land.tft b/hmi/nspanel_CJK_us_land.tft index 234276a..bdbb2d4 100644 Binary files a/hmi/nspanel_CJK_us_land.tft and b/hmi/nspanel_CJK_us_land.tft differ diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 8886725..281affe 100644 Binary files a/hmi/nspanel_eu.HMI and b/hmi/nspanel_eu.HMI differ diff --git a/hmi/nspanel_eu.tft b/hmi/nspanel_eu.tft index f0c8796..abf5132 100644 Binary files a/hmi/nspanel_eu.tft and b/hmi/nspanel_eu.tft differ diff --git a/hmi/nspanel_us.HMI b/hmi/nspanel_us.HMI index 76deb99..e23ec97 100644 Binary files a/hmi/nspanel_us.HMI and b/hmi/nspanel_us.HMI differ diff --git a/hmi/nspanel_us.tft b/hmi/nspanel_us.tft index f082ef0..f8f405b 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/hmi/nspanel_us_land.HMI b/hmi/nspanel_us_land.HMI index f1791e8..c348f18 100644 Binary files a/hmi/nspanel_us_land.HMI and b/hmi/nspanel_us_land.HMI differ diff --git a/hmi/nspanel_us_land.tft b/hmi/nspanel_us_land.tft index ef9eda7..42632d5 100644 Binary files a/hmi/nspanel_us_land.tft and b/hmi/nspanel_us_land.tft differ diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 3b5794e..c84fc05 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -10,7 +10,7 @@ blueprint: description: > # NSPanel Configuration via Blueprint: Complete UI-Based Setup - **Version**: v4.3dev2 + **Version**: v4.3dev3 This project enables comprehensive configuration of your NSPanel through a Blueprint featuring a user interface. @@ -2597,6 +2597,22 @@ blueprint: description: "Select the color for the items related to the Grid area." default: [192, 192, 192] selector: *color_selector + ##### Utilities page 01 - Main line ##### + utilities_page01_main_line_reference: + name: Main Line Direction Reference + description: "Select a sensor to use as a reference for the main line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_main_line_inverted: + name: Main Line Direction Inverted + description: "Enable this to reverse the main line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 1 ##### utilities_page01_group01_label: name: Utilities page - Group 1 - Label (Optional) @@ -2626,6 +2642,21 @@ blueprint: description: "Select the color for the items related to the Group 1 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group01_line_reference: + name: Utilities page - Group 1 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 1 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group01_line_inverted: + name: Utilities page - Group 1 - Line Direction Inverted + description: "Enable this to reverse the Group 1 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 2 ##### utilities_page01_group02_label: name: Utilities page - Group 2 - Label (Optional) @@ -2655,6 +2686,21 @@ blueprint: description: "Select the color for the items related to the Group 2 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group02_line_reference: + name: Utilities page - Group 2 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 2 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group02_line_inverted: + name: Utilities page - Group 2 - Line Direction Inverted + description: "Enable this to reverse the Group 2 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 3 ##### utilities_page01_group03_label: name: Utilities page - Group 3 - Label (Optional) @@ -2684,6 +2730,21 @@ blueprint: description: "Select the color for the items related to the Group 3 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group03_line_reference: + name: Utilities page - Group 3 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 3 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group03_line_inverted: + name: Utilities page - Group 3 - Line Direction Inverted + description: "Enable this to reverse the Group 3 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 4 ##### utilities_page01_group04_label: name: Utilities page - Group 4 - Label (Optional) @@ -2713,6 +2774,21 @@ blueprint: description: "Select the color for the items related to the Group 4 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group04_line_reference: + name: Utilities page - Group 4 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 4 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group04_line_inverted: + name: Utilities page - Group 4 - Line Direction Inverted + description: "Enable this to reverse the Group 4 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 5 ##### utilities_page01_group05_label: name: Utilities page - Group 5 - Label (Optional) @@ -2742,6 +2818,21 @@ blueprint: description: "Select the color for the items related to the Group 5 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group05_line_reference: + name: Utilities page - Group 5 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 5 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group05_line_inverted: + name: Utilities page - Group 5 - Line Direction Inverted + description: "Enable this to reverse the Group 5 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### Utilities page 01 - Group 6 ##### utilities_page01_group06_label: name: Utilities page - Group 6 - Label (Optional) @@ -2771,6 +2862,21 @@ blueprint: description: "Select the color for the items related to the Group 6 area." default: [192, 192, 192] selector: *color_selector + utilities_page01_group06_line_reference: + name: Utilities page - Group 6 - Line Direction Reference + description: "Select a sensor to use as a reference for the Group 6 line's movement direction." + default: [] + selector: + entity: + filter: + domain: + - sensor + utilities_page01_group06_line_inverted: + name: Utilities page - Group 6 - Line Direction Inverted + description: "Enable this to reverse the Group 6 line's movement direction relative to the sensor's readings." + default: false + selector: + boolean: ##### General Custom Design ##### ##### PLACEHOLDER ###################################################################### placeholder16: @@ -3115,10 +3221,9 @@ trigger_variables: home_page_background_update: !input home_page_background_update - variables: ##### GENERAL ##### - blueprint_version: '4.3dev2' + blueprint_version: '4.3dev3' date_format_temp: !input 'date_format' # Avoid breaking change for existing users with legacy type format date_format: '{{ date_format_temp if date_format_temp not in ["%d.%m", "%d/%m", "%-d/%-m", "%-m/%-d"] else "%A, " ~ date_format_temp }}' @@ -6203,36 +6308,48 @@ variables: value1: !input utilities_page01_group01_value1 value2: !input utilities_page01_group01_value2 color: !input utilities_page01_group01_color + line_ref: !input utilities_page01_group01_line_reference + line_inverted: !input utilities_page01_group01_line_inverted - name: group02 label: !input utilities_page01_group02_label icon: !input utilities_page01_group02_icon value1: !input utilities_page01_group02_value1 value2: !input utilities_page01_group02_value2 color: !input utilities_page01_group02_color + line_ref: !input utilities_page01_group02_line_reference + line_inverted: !input utilities_page01_group02_line_inverted - name: group03 label: !input utilities_page01_group03_label icon: !input utilities_page01_group03_icon value1: !input utilities_page01_group03_value1 value2: !input utilities_page01_group03_value2 color: !input utilities_page01_group03_color + line_ref: !input utilities_page01_group03_line_reference + line_inverted: !input utilities_page01_group03_line_inverted - name: group04 label: !input utilities_page01_group04_label icon: !input utilities_page01_group04_icon value1: !input utilities_page01_group04_value1 value2: !input utilities_page01_group04_value2 color: !input utilities_page01_group04_color + line_ref: !input utilities_page01_group04_line_reference + line_inverted: !input utilities_page01_group04_line_inverted - name: group05 label: !input utilities_page01_group05_label icon: !input utilities_page01_group05_icon value1: !input utilities_page01_group05_value1 value2: !input utilities_page01_group05_value2 color: !input utilities_page01_group05_color + line_ref: !input utilities_page01_group05_line_reference + line_inverted: !input utilities_page01_group05_line_inverted - name: group06 label: !input utilities_page01_group06_label icon: !input utilities_page01_group06_icon value1: !input utilities_page01_group06_value1 value2: !input utilities_page01_group06_value2 color: !input utilities_page01_group06_color + line_ref: !input utilities_page01_group06_line_reference + line_inverted: !input utilities_page01_group06_line_inverted ###### MEDIA PLAYER REFRESH ##### media_player_update_interval: !input 'media_player_update_interval' @@ -6867,6 +6984,10 @@ trigger: id: right_button_state ##### Trigger - Page utilities - State change ################################################################################################################# + ##### Page utilities - Main line ##### + - platform: state + entity_id: !input utilities_page01_main_line_reference + id: utilities_page ##### Page utilities - Home ##### - platform: state entity_id: !input utilities_page01_home_value1 @@ -6888,6 +7009,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group01_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group01_line_reference + id: utilities_page ##### Page utilities - Group 02 ##### - platform: state entity_id: !input utilities_page01_group02_value1 @@ -6895,6 +7019,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group02_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group02_line_reference + id: utilities_page ##### Page utilities - Group 03 ##### - platform: state entity_id: !input utilities_page01_group03_value1 @@ -6902,6 +7029,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group03_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group03_line_reference + id: utilities_page ##### Page utilities - Group 04 ##### - platform: state entity_id: !input utilities_page01_group04_value1 @@ -6909,6 +7039,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group04_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group04_line_reference + id: utilities_page ##### Page utilities - Group 05 ##### - platform: state entity_id: !input utilities_page01_group05_value1 @@ -6916,6 +7049,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group05_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group05_line_reference + id: utilities_page ##### Page utilities - Group 06 ##### - platform: state entity_id: !input utilities_page01_group06_value1 @@ -6923,6 +7059,9 @@ trigger: - platform: state entity_id: !input utilities_page01_group06_value2 id: utilities_page + - platform: state + entity_id: !input utilities_page01_group06_line_reference + id: utilities_page ##### Trigger - Time ################################################################################################################# @@ -9215,6 +9354,15 @@ action: ids: ["utilities.line_main"] visible: true continue_on_error: true + - variables: + main_line_ref: !input utilities_page01_main_line_reference + main_line_inverted: !input utilities_page01_main_line_inverted + main_line_ref_state: '{{ states(main_line_ref) | int(0) if main_line_ref is string and main_line_ref.split(".") | count == 2 else 0 }}' + - service: '{{ nspanel.service.component.value }}' + data: + id: utilities.line_main_d + val: '{{ (((main_line_ref_state > 0) - (main_line_ref_state < 0)) * (-1 if main_line_inverted else 1)) | int(0) }}' + continue_on_error: true ## Groups - repeat: for_each: > @@ -9226,7 +9374,7 @@ action: }} sequence: &refresh_page_utilities_group - condition: '{{ repeat.item.icon is defined and repeat.item.icon is string and repeat.item.icon.split("mdi:") | count == 2 }}' - - alias: Var aux 1 + - alias: Var aux 1 # To Do: clean-up variables: icon_code: '{{ repeat.item.icon.split("mdi:")[1] if repeat.item.icon is string and repeat.item.icon.split("mdi:") | count == 2 }}' - alias: Var aux 2 @@ -9269,6 +9417,22 @@ action: value: *value_with_unit_and_translations value_color: '{{ repeat.item.color }}' continue_on_error: true + # Define direction of line movement + - if: '{{ repeat.item.name not in ["home", "grid"] }}' + then: + - variables: + line_ref_state: > + {{ + states(repeat.item.line_ref) | int(0) + if repeat.item.line_ref is defined and repeat.item.line_ref is string and repeat.item.line_ref.split(".") | count == 2 + else 0 + }} + - service: '{{ nspanel.service.component.value }}' + data: + id: 'utilities.{{ repeat.item.name }}_line_d' + val: '{{ (((line_ref_state > 0) - (line_ref_state < 0)) * (-1 if repeat.item.line_inverted else 1)) | int(0) }}' + continue_on_error: true + # Make components visible - alias: Var group_components variables: group_components: > @@ -9848,6 +10012,7 @@ action: - variables: list1: '{{ pages_utilities.groups | selectattr("value1", "defined") | selectattr("value1", "eq", trigger.entity_id) | list }}' list2: '{{ pages_utilities.groups | selectattr("value2", "defined") | selectattr("value2", "eq", trigger.entity_id) | list }}' + list3: '{{ pages_utilities.groups | selectattr("line_ref", "defined") | selectattr("line_ref", "eq", trigger.entity_id) | list }}' full_list: '{{ list1 + list2 }}' groups: '{{ full_list | map(attribute="name") | unique | list }}' - repeat: