From 21822dae379e5c271627106ee4ce98d52e40e1ea Mon Sep 17 00:00:00 2001 From: Edward Firmo Date: Thu, 3 Aug 2023 23:53:06 +0200 Subject: [PATCH] Icons on ESPHome Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text. --- nspanel_esphome.yaml | 19 +- nspanel_eu.HMI | Bin 21307134 -> 21307134 bytes nspanel_eu.tft | Bin 6324480 -> 6324472 bytes nspanel_eu_code/buttonpage01.txt | 23 +- nspanel_eu_code/buttonpage03.txt | 23 +- nspanel_eu_code/buttonpage04.txt | 23 +- nspanel_eu_code/climate.txt | 710 ++++++++++++++++++++++++++ nspanel_eu_code/cover.txt | 2 +- nspanel_eu_code/entitypage01.txt | 2 +- nspanel_eu_code/entitypage03.txt | 19 +- nspanel_eu_code/entitypage04.txt | 19 +- nspanel_eu_code/fan.txt | 409 +++++++++++++++ nspanel_eu_code/home.txt | 61 ++- nspanel_eu_code/light.txt | 12 +- nspanel_eu_code/settings.txt | 1 + nspanel_eu_code/weather01.txt | 2 +- nspanel_eu_code/weather05.txt | 19 +- nspanel_us.HMI | Bin 21307134 -> 21307134 bytes nspanel_us.tft | Bin 7666364 -> 7666364 bytes nspanel_us_code/buttonpage01.txt | 23 +- nspanel_us_code/buttonpage02.txt | 23 +- nspanel_us_code/buttonpage03.txt | 23 +- nspanel_us_code/buttonpage04.txt | 23 +- nspanel_us_code/climate.txt | 710 ++++++++++++++++++++++++++ nspanel_us_code/cover.txt | 2 +- nspanel_us_code/entitypage01.txt | 2 +- nspanel_us_code/entitypage02.txt | 19 +- nspanel_us_code/entitypage03.txt | 19 +- nspanel_us_code/entitypage04.txt | 19 +- nspanel_us_code/fan.txt | 409 +++++++++++++++ nspanel_us_code/home.txt | 108 ++-- nspanel_us_code/light.txt | 12 +- nspanel_us_code/weather01.txt | 2 +- nspanel_us_code/weather02.txt | 2 +- nspanel_us_code/weather03.txt | 2 +- nspanel_us_code/weather04.txt | 2 +- nspanel_us_code/weather05.txt | 2 +- nspanel_us_land.HMI | Bin 21307134 -> 21307134 bytes nspanel_us_land.tft | Bin 6324496 -> 6324492 bytes nspanel_us_land_code/buttonpage01.txt | 635 +++++++++++++++++++++++ nspanel_us_land_code/buttonpage03.txt | 635 +++++++++++++++++++++++ nspanel_us_land_code/buttonpage04.txt | 635 +++++++++++++++++++++++ nspanel_us_land_code/climate.txt | 710 ++++++++++++++++++++++++++ nspanel_us_land_code/cover.txt | 2 +- nspanel_us_land_code/entitypage01.txt | 2 +- nspanel_us_land_code/entitypage03.txt | 362 +++++++++++++ nspanel_us_land_code/entitypage04.txt | 362 +++++++++++++ nspanel_us_land_code/fan.txt | 409 +++++++++++++++ nspanel_us_land_code/home.txt | 690 +++++++++++++++++++++++++ nspanel_us_land_code/light.txt | 12 +- nspanel_us_land_code/settings.txt | 229 +++++++++ nspanel_us_land_code/weather01.txt | 2 +- nspanel_us_land_code/weather05.txt | 259 ++++++++++ 53 files changed, 7494 insertions(+), 196 deletions(-) create mode 100644 nspanel_us_land_code/buttonpage01.txt create mode 100644 nspanel_us_land_code/buttonpage03.txt create mode 100644 nspanel_us_land_code/buttonpage04.txt create mode 100644 nspanel_us_land_code/entitypage03.txt create mode 100644 nspanel_us_land_code/entitypage04.txt create mode 100644 nspanel_us_land_code/home.txt create mode 100644 nspanel_us_land_code/settings.txt create mode 100644 nspanel_us_land_code/weather05.txt diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 2d1e545..bab0960 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -919,7 +919,24 @@ text_sensor: id(current_page).publish_state(page); if (page=="home") id(update_page_home).execute(); else if (page=="screensaver") id(disp1).set_component_value("orign", id(wakeup_page_id)); - else if (page=="climate" and id(is_embedded_thermostat_visible)) id(update_page_climate); + else if (page=="climate") + { + id(disp1).set_component_text_printf("climate.button01_icon", "%s", "\uEE8D"); //mdi:calendar-sync + id(disp1).set_component_text_printf("climate.button02_icon", "%s", "\uE069"); //mdi:autorenew + id(disp1).set_component_text_printf("climate.button03_icon", "%s", "\uE237"); //mdi:fire + id(disp1).set_component_text_printf("climate.button04_icon", "%s", "\uE716"); //mdi:snowflake + id(disp1).set_component_text_printf("climate.button05_icon", "%s", "\uE58D"); //mdi:water-percent + id(disp1).set_component_text_printf("climate.button06_icon", "%s", "\uE20F"); //mdi:fan + id(disp1).set_component_text_printf("climate.button07_icon", "%s", "\uE424"); //mdi:power + if (id(is_embedded_thermostat_visible)) id(update_page_climate); + } + else if (page=="fan") + { + id(disp1).set_component_text_printf("fan.button_on", "%s", "\uE20F"); //mdi:fan + id(disp1).set_component_text_printf("fan.button_off", "%s", "\uE81C"); //mdi:fan-off + id(disp1).set_component_text_printf("fan.button_up", "%s", "\uF46D"); //mdi:fan-chevron-up + id(disp1).set_component_text_printf("fan.button_down", "%s", "\uF46C"); //mdi:fan-chevron-down + } } else if (page=="boot" and component=="timeout" and stof(value) >= 5) id(disp1).send_command_printf("page %i", id(wakeup_page_id)); diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index 6ee85f742cd962132e7b8835572cccd04f12cd84..b971e15880d907ac75495c7458b5e73e7308a99d 100644 GIT binary patch delta 4200 zcmeH}dsGxv9LMj>?gFAIX_AGHm4Gx;Kuo{~3kp6G6SYWFlShVF@@OG9d@SaTT^=b4 zIFhAUMwliUYV;)&iQ=!&7HY-c4mIx zT`ts?dR_q1)!QT=4~doZ^0?L@y;ofm>M`HLXMSR8+Msb0$1`o4T$jNzJh6ilc6*I6 z7+R`LH6GW*y89U-Fp534=9JuCW0(FO-D_i=P)i4^S?Hh$FcJ`N25EqK1=Ihn>)qH{5#{=ejMAsf;HB! zU=1yWrqXA&lvD@AgkHJU<_%8Pdc|6_Pg`YZKHG~AjJ0Y8+_<=_@r3zYc}a12k7aG) zj<#?K$iM)Mzy#dXws3c2!~f6ppMR#ynk|lIiv(m~07hT}Zfdi|-CXw{IRPI=O0e)S z9?pmH;d}%i$s@RhNAf5>ijU^eJcf_qWBE8fp5MwR@K`>P-^M5LI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pVY+WxGz{XgPu*!-;D zmi<0$+wx*O1RF}-$p$xN(psOX=5IXQXJNe z_lKB*(roF;?6EynF>6st%3h(fWu(*DWM#2`VM$Tu_!fTqi4>(w_=3ie)v8SK1&pD+ zR;7s6r6@_7IaL{(eziH zI-Rr&>Tu2J5|vbY&DmM2zUFLF+>aFrr-J~ppffDX1UUIr!YocYhIvi_K;00XpO-L? zm47Qzdi>bp&`K6GC#Tkp!HFJ?*JRTwin>z%pe%g9l8MFU^@lS>4P9B=6p@e zTN=R)J6nQaB`0hK9Sl9s1;ps#7ahP|NPzGkI6%A}YJvemMI`+G8^G2|Js6prML)>t zAz z2!{Md0rSI*kjfR_7H0V3YXPmXMwrS8^wJE+?sCGq08e0EFC~249N@#4Q;dWhM~L6Q zSVlrxnuL=lL*NO=UnFCpYJvpIjSyJK@u~na>egQ#;9`_$mj|dx*3btQ30;#UlqXA| z;gd?bbhL{q7!3WPQXHYav(&Su9c!ypJ55-~KAZR- z>LW5OVxLWvwMcCiR_eK!r!)#F=P84JEmyS=`w$5gLnZ8?6BYi=S1VX;Wu@YY?Y8GGfU@xfTd5H^o%Jv21 zSjL4srK)ABW_&n8!pxDr6MyH5HCZ8#UsN2ZPzn!e#&X_rkBw8vT*+JR(Wpwbp~FwP z5=!#;)6J)_6>5UGLADj_xI3ReLuy&Uj=L#(B`etl{Eq3$N>;K-RI!pfihoShSj9>% z-C@O$H(J7}(UKnY;EKyReJ{Q|FcSlWjIahO5H*H+aies#VbCkP=6$dR@ s!%FvY64p|Ro0aY~&CQvcS;-nN;d?UIsJ+CGlwG5q3if(0?R)>sUyyz@u>b%7 diff --git a/nspanel_eu_code/buttonpage01.txt b/nspanel_eu_code/buttonpage01.txt index 5a1fe58..291f9d9 100644 --- a/nspanel_eu_code/buttonpage01.txt +++ b/nspanel_eu_code/buttonpage01.txt @@ -12,14 +12,21 @@ Page buttonpage01 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/buttonpage03.txt b/nspanel_eu_code/buttonpage03.txt index 375f8f6..5b5988e 100644 --- a/nspanel_eu_code/buttonpage03.txt +++ b/nspanel_eu_code/buttonpage03.txt @@ -12,14 +12,21 @@ Page buttonpage03 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/buttonpage04.txt b/nspanel_eu_code/buttonpage04.txt index c66ee0f..fcf05d5 100644 --- a/nspanel_eu_code/buttonpage04.txt +++ b/nspanel_eu_code/buttonpage04.txt @@ -12,14 +12,21 @@ Page buttonpage04 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/climate.txt b/nspanel_eu_code/climate.txt index e69de29..12ab8a4 100644 --- a/nspanel_eu_code/climate.txt +++ b/nspanel_eu_code/climate.txt @@ -0,0 +1,710 @@ +Page climate + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==1||home.entity.txt=="embedded_climate") + { + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + vis target_icon,0 + vis target_temp,0 + vis current_temp,0 + vis current_icon,0 + vis climateslider,0 + vis button01,0 + vis button02,0 + vis button03,0 + vis button04,0 + vis button05,0 + vis button06,0 + vis button07,0 + page_label.txt=home.entity.txt + }else + { + page home + } + + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + if(timer01.en==1) + { + timer01.en=0 + covx temp_number.val,va1.txt,0,0 + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + home.entity.txt="" + +Variable (string) va1 + Attributes + ID : 26 + Scope : local + Text : + Max. Text Size: 10 + +Variable (string) climatesetting + Attributes + ID : 27 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) lastclick + Attributes + ID : 35 + Scope : local + Text : + Max. Text Size: 255 + +Variable (int32) temp_offset + Attributes + ID : 37 + Scope: local + Value: 0 + +Variable (int32) temp_step + Attributes + ID : 38 + Scope: local + Value: 0 + +Variable (int32) temp_number + Attributes + ID : 44 + Scope: local + Value: 0 + +Variable (int32) va0 + Attributes + ID : 45 + Scope: local + Value: 0 + +Variable (string) back_page + Attributes + ID : 46 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (int32) embedded + Attributes + ID : 47 + Scope: local + Value: 0 + +Variable (string) va2 + Attributes + ID : 48 + Scope : local + Text : + Max. Text Size: 10 + +Text current_temp + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text current_icon + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_icon + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value02_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03 + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value04_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04 + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text button01_icon + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02_icon + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03_icon + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04_icon + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05_icon + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06_icon + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07_icon + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08_icon + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button09_icon + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_temp + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider climateslider + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 20 + Upper range limit: 40 + Lower range limit: 0 + + Events + Touch Release Event + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + timer01.en=1 + +Hotspot decrease_temp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.val>0) + { + climateslider.val-- + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + } + + Touch Release Event + timer01.en=1 + +Hotspot increase_temp + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/cover.txt b/nspanel_eu_code/cover.txt index cf0ae97..32a10e6 100644 --- a/nspanel_eu_code/cover.txt +++ b/nspanel_eu_code/cover.txt @@ -13,7 +13,7 @@ Page cover Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_eu_code/entitypage01.txt b/nspanel_eu_code/entitypage01.txt index 864e3f1..3c33d52 100644 --- a/nspanel_eu_code/entitypage01.txt +++ b/nspanel_eu_code/entitypage01.txt @@ -13,7 +13,7 @@ Page entitypage01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_eu_code/entitypage03.txt b/nspanel_eu_code/entitypage03.txt index 6c0658d..b110583 100644 --- a/nspanel_eu_code/entitypage03.txt +++ b/nspanel_eu_code/entitypage03.txt @@ -12,12 +12,19 @@ Page entitypage03 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/entitypage04.txt b/nspanel_eu_code/entitypage04.txt index 76f4d0c..26916c3 100644 --- a/nspanel_eu_code/entitypage04.txt +++ b/nspanel_eu_code/entitypage04.txt @@ -12,12 +12,19 @@ Page entitypage04 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/fan.txt b/nspanel_eu_code/fan.txt index e69de29..4b68f1f 100644 --- a/nspanel_eu_code/fan.txt +++ b/nspanel_eu_code/fan.txt @@ -0,0 +1,409 @@ +Page fan + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + page_label.txt=home.entity.txt + } + + Touch Press Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + home.entity.txt="" + +Variable (string) fansetting + Attributes + ID : 9 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) back_page + Attributes + ID : 10 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) va0 + Attributes + ID : 11 + Scope : local + Text : + Max. Text Size: 10 + +Text fan_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture fan_exit + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Slider fanslider + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 0 + Upper range limit: 4 + Lower range limit: 0 + + Events + Touch Release Event + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.val=5) + { + fanslider.val++ + } + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + fanslider.val-- + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + } + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_eu_code/home.txt b/nspanel_eu_code/home.txt index 4d8b83a..25be259 100644 --- a/nspanel_eu_code/home.txt +++ b/nspanel_eu_code/home.txt @@ -21,6 +21,8 @@ Page home prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 printh 00 printh FF FF FF + vis button06_icon,0 + vis button06,0 Variable (int32) brightness Attributes @@ -410,22 +412,10 @@ Hotspot fc_weather Events Touch Press Event - lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - - Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(api==1) + { + page weather01 + } Hotspot jump_climate Attributes @@ -559,13 +549,10 @@ Hotspot button06 Events Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(api==1) + { + page entitypage01 + } Hotspot button07 Attributes @@ -589,8 +576,15 @@ Hotspot settings_click ID : 52 Scope : local Dragging : 0 - Send Component ID: on press and release + Send Component ID: disabled + Events + Touch Press Event + settings_timer.en=1 + + Touch Release Event + settings_timer.en=0 + Timer dimtimer Attributes ID : 1 @@ -633,6 +627,17 @@ Timer sleeptimer page screensaver } +Timer settings_timer + Attributes + ID : 56 + Scope : local + Period (ms): 1000 + Enabled : no + + Events + Timer Event + page settings + TouchCap swipe Attributes ID : 5 @@ -653,13 +658,13 @@ TouchCap swipe { swipec=swipex-tch2 // From Left to Right - if(swipec>swipedx) + if(swipec>swipedx&&api==1) { page buttonpage04 } // Right to Left swipec2=0-swipedx - if(swipec100) + if(swipec>100&&api==1) { page buttonpage02 } // Down to Up swipec2=0-swipedy - if(swipec<-100) + if(swipec<-100&&api==1) { page buttonpage03 } diff --git a/nspanel_eu_code/light.txt b/nspanel_eu_code/light.txt index b2c8af9..9a30cd1 100644 --- a/nspanel_eu_code/light.txt +++ b/nspanel_eu_code/light.txt @@ -13,7 +13,7 @@ Page light Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else @@ -387,7 +387,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -420,9 +420,9 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"page\": \"light\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 @@ -443,9 +443,9 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"page\": \"light\", \"component\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 diff --git a/nspanel_eu_code/settings.txt b/nspanel_eu_code/settings.txt index 9c993e4..d672d90 100644 --- a/nspanel_eu_code/settings.txt +++ b/nspanel_eu_code/settings.txt @@ -12,6 +12,7 @@ Page settings Events Preinitialize Event + dim=home.brightness.val printh 92 prints "nspanelevent",0 printh 00 diff --git a/nspanel_eu_code/weather01.txt b/nspanel_eu_code/weather01.txt index 7116f43..8b12957 100644 --- a/nspanel_eu_code/weather01.txt +++ b/nspanel_eu_code/weather01.txt @@ -13,7 +13,7 @@ Page weather01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_eu_code/weather05.txt b/nspanel_eu_code/weather05.txt index 31fa499..0165675 100644 --- a/nspanel_eu_code/weather05.txt +++ b/nspanel_eu_code/weather05.txt @@ -12,12 +12,19 @@ Page weather05 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 64d05e8aa30fc2285445555dc2e50d622534b341..7540398b9a1aa5b3c1a1c618c8581deddab32c4c 100644 GIT binary patch delta 2268 zcmdthiC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txt index 5a1fe58..291f9d9 100644 --- a/nspanel_us_code/buttonpage01.txt +++ b/nspanel_us_code/buttonpage01.txt @@ -12,14 +12,21 @@ Page buttonpage01 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_us_code/buttonpage02.txt b/nspanel_us_code/buttonpage02.txt index 3d6af5d..c614825 100644 --- a/nspanel_us_code/buttonpage02.txt +++ b/nspanel_us_code/buttonpage02.txt @@ -12,14 +12,21 @@ Page buttonpage02 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_us_code/buttonpage03.txt b/nspanel_us_code/buttonpage03.txt index 375f8f6..5b5988e 100644 --- a/nspanel_us_code/buttonpage03.txt +++ b/nspanel_us_code/buttonpage03.txt @@ -12,14 +12,21 @@ Page buttonpage03 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_us_code/buttonpage04.txt b/nspanel_us_code/buttonpage04.txt index c66ee0f..fcf05d5 100644 --- a/nspanel_us_code/buttonpage04.txt +++ b/nspanel_us_code/buttonpage04.txt @@ -12,14 +12,21 @@ Page buttonpage04 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF - vis 255,0 - vis button_back,1 + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } Touch Press Event printh 92 diff --git a/nspanel_us_code/climate.txt b/nspanel_us_code/climate.txt index e69de29..56716cf 100644 --- a/nspanel_us_code/climate.txt +++ b/nspanel_us_code/climate.txt @@ -0,0 +1,710 @@ +Page climate + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==1||home.entity.txt=="embedded_climate") + { + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + vis target_icon,0 + vis target_temp,0 + vis current_temp,0 + vis current_icon,0 + vis climateslider,0 + vis button01,0 + vis button02,0 + vis button03,0 + vis button04,0 + vis button05,0 + vis button06,0 + vis button07,0 + page_label.txt=home.entity.txt + }else + { + page home + } + + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + if(timer01.en==1) + { + timer01.en=0 + covx temp_number.val,va1.txt,0,0 + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + home.entity.txt="" + +Variable (string) va1 + Attributes + ID : 26 + Scope : local + Text : + Max. Text Size: 10 + +Variable (string) climatesetting + Attributes + ID : 27 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) lastclick + Attributes + ID : 35 + Scope : local + Text : + Max. Text Size: 255 + +Variable (int32) temp_offset + Attributes + ID : 37 + Scope: local + Value: 0 + +Variable (int32) temp_step + Attributes + ID : 38 + Scope: local + Value: 1 + +Variable (int32) temp_number + Attributes + ID : 44 + Scope: local + Value: 0 + +Variable (int32) va0 + Attributes + ID : 45 + Scope: local + Value: 0 + +Variable (string) back_page + Attributes + ID : 46 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (int32) embedded + Attributes + ID : 47 + Scope: local + Value: 0 + +Variable (string) va2 + Attributes + ID : 48 + Scope : local + Text : + Max. Text Size: 10 + +Text current_temp + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text current_icon + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_icon + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value02_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03 + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value04_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04 + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text button01_icon + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02_icon + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03_icon + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04_icon + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05_icon + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06_icon + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07_icon + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08_icon + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button09_icon + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_temp + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider climateslider + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 20 + Upper range limit: 40 + Lower range limit: 0 + + Events + Touch Release Event + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + timer01.en=1 + +Hotspot decrease_temp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.val>0) + { + climateslider.val-- + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + } + + Touch Release Event + timer01.en=1 + +Hotspot increase_temp + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/cover.txt b/nspanel_us_code/cover.txt index cf0ae97..32a10e6 100644 --- a/nspanel_us_code/cover.txt +++ b/nspanel_us_code/cover.txt @@ -13,7 +13,7 @@ Page cover Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/entitypage01.txt b/nspanel_us_code/entitypage01.txt index 864e3f1..3c33d52 100644 --- a/nspanel_us_code/entitypage01.txt +++ b/nspanel_us_code/entitypage01.txt @@ -13,7 +13,7 @@ Page entitypage01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/entitypage02.txt b/nspanel_us_code/entitypage02.txt index 5c453cf..c0473b9 100644 --- a/nspanel_us_code/entitypage02.txt +++ b/nspanel_us_code/entitypage02.txt @@ -12,12 +12,19 @@ Page entitypage02 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_us_code/entitypage03.txt b/nspanel_us_code/entitypage03.txt index 6c0658d..b110583 100644 --- a/nspanel_us_code/entitypage03.txt +++ b/nspanel_us_code/entitypage03.txt @@ -12,12 +12,19 @@ Page entitypage03 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_us_code/entitypage04.txt b/nspanel_us_code/entitypage04.txt index 76f4d0c..26916c3 100644 --- a/nspanel_us_code/entitypage04.txt +++ b/nspanel_us_code/entitypage04.txt @@ -12,12 +12,19 @@ Page entitypage04 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_us_code/fan.txt b/nspanel_us_code/fan.txt index e69de29..4b68f1f 100644 --- a/nspanel_us_code/fan.txt +++ b/nspanel_us_code/fan.txt @@ -0,0 +1,409 @@ +Page fan + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + page_label.txt=home.entity.txt + } + + Touch Press Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + home.entity.txt="" + +Variable (string) fansetting + Attributes + ID : 9 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) back_page + Attributes + ID : 10 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) va0 + Attributes + ID : 11 + Scope : local + Text : + Max. Text Size: 10 + +Text fan_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture fan_exit + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Slider fanslider + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 0 + Upper range limit: 4 + Lower range limit: 0 + + Events + Touch Release Event + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.val=5) + { + fanslider.val++ + } + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + fanslider.val-- + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + } + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_code/home.txt b/nspanel_us_code/home.txt index e1f0777..0b4831e 100644 --- a/nspanel_us_code/home.txt +++ b/nspanel_us_code/home.txt @@ -21,8 +21,6 @@ Page home prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 printh 00 printh FF FF FF - vis 255,0 - vis settings_click,1 Variable (int32) brightness Attributes @@ -55,6 +53,13 @@ Variable (string) lastclick Text : Max. Text Size: 100 +Variable (string) entity + Attributes + ID : 55 + Scope : global + Text : + Max. Text Size: 100 + Text time Attributes ID : 7 @@ -405,22 +410,10 @@ Hotspot fc_weather Events Touch Press Event - lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - - Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(api==1) + { + page weather01 + } Hotspot jump_climate Attributes @@ -431,22 +424,34 @@ Hotspot jump_climate Events Touch Press Event - lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(entity.txt=="") + { + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + }else + { + page climate + } Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(entity.txt=="") + { + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + }else + { + page climate + } Hotspot button01 Attributes @@ -542,13 +547,10 @@ Hotspot button06 Events Touch Release Event - lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF + if(api==1) + { + page entitypage01 + } Hotspot button07 Attributes @@ -572,8 +574,15 @@ Hotspot settings_click ID : 52 Scope : local Dragging : 0 - Send Component ID: on press and release + Send Component ID: on release + Events + Touch Press Event + settings_timer.en=1 + + Touch Release Event + settings_timer.en=0 + Timer dimtimer Attributes ID : 1 @@ -616,6 +625,17 @@ Timer sleeptimer page screensaver } +Timer settings_timer + Attributes + ID : 56 + Scope : local + Period (ms): 1000 + Enabled : no + + Events + Timer Event + page settings + TouchCap swipe Attributes ID : 5 @@ -636,13 +656,13 @@ TouchCap swipe { swipec=swipex-tch2 // From Left to Right - if(swipec>swipedx) + if(swipec>swipedx&&api==1) { page buttonpage04 } // Right to Left swipec2=0-swipedx - if(swipec100) + if(swipec>100&&api==1) { page buttonpage02 } // Down to Up swipec2=0-swipedy - if(swipec<-100) + if(swipec<-100&&api==1) { page buttonpage03 } diff --git a/nspanel_us_code/light.txt b/nspanel_us_code/light.txt index b2c8af9..9a30cd1 100644 --- a/nspanel_us_code/light.txt +++ b/nspanel_us_code/light.txt @@ -13,7 +13,7 @@ Page light Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else @@ -387,7 +387,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -420,9 +420,9 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"page\": \"light\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 @@ -443,9 +443,9 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"page\": \"light\", \"component\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 diff --git a/nspanel_us_code/weather01.txt b/nspanel_us_code/weather01.txt index 7161474..0e9bc13 100644 --- a/nspanel_us_code/weather01.txt +++ b/nspanel_us_code/weather01.txt @@ -13,7 +13,7 @@ Page weather01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/weather02.txt b/nspanel_us_code/weather02.txt index 5f34cca..52f4f34 100644 --- a/nspanel_us_code/weather02.txt +++ b/nspanel_us_code/weather02.txt @@ -13,7 +13,7 @@ Page weather02 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/weather03.txt b/nspanel_us_code/weather03.txt index 801cf59..05a083c 100644 --- a/nspanel_us_code/weather03.txt +++ b/nspanel_us_code/weather03.txt @@ -13,7 +13,7 @@ Page weather03 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/weather04.txt b/nspanel_us_code/weather04.txt index c097ed6..8c34b9a 100644 --- a/nspanel_us_code/weather04.txt +++ b/nspanel_us_code/weather04.txt @@ -13,7 +13,7 @@ Page weather04 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_code/weather05.txt b/nspanel_us_code/weather05.txt index 279047c..0165675 100644 --- a/nspanel_us_code/weather05.txt +++ b/nspanel_us_code/weather05.txt @@ -13,7 +13,7 @@ Page weather05 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index a462722afab65d66329bcd1e0380554b285a574e..812c18fbbdcc7be674fcd47ca3f77fefb7cb5bba 100644 GIT binary patch delta 4838 zcmeH~X;@U(8OP6^VL-tMXfy)K-~wn8k;Mf!VCK#+m}tZ$Mq`W&R1u>x2*e34!*XPC zX;9E{NfnF1HEM$OTC0X=Tx$}eMQiHXYBXtWwYAYkqxrvg?s%{E>GSkMKlDS+_4mK; zea|`Xea|`X_*@?DtMz{fgmxbaI}Ksy!`bc4J#`k`7atB8w?Ep!S_q5@hrS(KbJ7qJ zcrKhVaQK$h;IpwzS98x`)tw8kN%jq;+j!s5e;dJl(?+My%*~!@pB|IXJnj7$2lMrT zjW7wZF*%A`zHNzjum?Jr`Zs5>qq$F{v!RcJZAKrZ(-`5mUI=6MoEb4`!-jYxY)x`7 zhd)L%hc{ko(aEn3OX%}N{1bUK{{Eo>-{(0PLk3t|V?t1fAWW|r7W|x^eHPxB9h|Dy z-`Z|y-0|#Czhr$9LgR_8xUQ3J$_&2q2b`=GY~kp3##Ud~1=2V)y5B%wsUCd?8XJur zoBc<{#l|@7o_<-2q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eUh0$dhtnSf)7ggCFy&(rRADtyynqN zGgGt1{Qe#uGkdLs!?YyAnrwP3!b|y*nbi#v{zCZ!-2V%PrrE)Y1{xkv?Y6*3T+P1# D_Z)KV diff --git a/nspanel_us_land_code/buttonpage01.txt b/nspanel_us_land_code/buttonpage01.txt new file mode 100644 index 0000000..0f10895 --- /dev/null +++ b/nspanel_us_land_code/buttonpage01.txt @@ -0,0 +1,635 @@ +Page buttonpage01 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bpage01_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page home + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/buttonpage03.txt b/nspanel_us_land_code/buttonpage03.txt new file mode 100644 index 0000000..43ebe21 --- /dev/null +++ b/nspanel_us_land_code/buttonpage03.txt @@ -0,0 +1,635 @@ +Page buttonpage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bpage03_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page home + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/buttonpage04.txt b/nspanel_us_land_code/buttonpage04.txt new file mode 100644 index 0000000..fb671b7 --- /dev/null +++ b/nspanel_us_land_code/buttonpage04.txt @@ -0,0 +1,635 @@ +Page buttonpage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis 255,0 + vis button_back,1 + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Variable (string) lastclick + Attributes + ID : 45 + Scope : local + Text : + Max. Text Size: 100 + +Text button01text + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button01bri + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button02text + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02bri + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button03text + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03bri + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button04text + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04bri + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button05text + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05bri + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button06text + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06bri + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button07text + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07bri + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text button08text + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08bri + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bpage04_label + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text button01icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06icon + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07icon + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08icon + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture button01pic + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button02pic + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button03pic + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button04pic + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button05pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button06pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button07pic + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture button08pic + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot button_back + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Hotspot button01 + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 40 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 42 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button07 + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button08 + Attributes + ID : 44 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page buttonpage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/climate.txt b/nspanel_us_land_code/climate.txt index e69de29..12ab8a4 100644 --- a/nspanel_us_land_code/climate.txt +++ b/nspanel_us_land_code/climate.txt @@ -0,0 +1,710 @@ +Page climate + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==1||home.entity.txt=="embedded_climate") + { + climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + vis target_icon,0 + vis target_temp,0 + vis current_temp,0 + vis current_icon,0 + vis climateslider,0 + vis button01,0 + vis button02,0 + vis button03,0 + vis button04,0 + vis button05,0 + vis button06,0 + vis button07,0 + page_label.txt=home.entity.txt + }else + { + page home + } + + Touch Press Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + if(timer01.en==1) + { + timer01.en=0 + covx temp_number.val,va1.txt,0,0 + climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints climatesetting.txt,0 + printh 00 + printh FF FF FF + } + home.entity.txt="" + +Variable (string) va1 + Attributes + ID : 26 + Scope : local + Text : + Max. Text Size: 10 + +Variable (string) climatesetting + Attributes + ID : 27 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) lastclick + Attributes + ID : 35 + Scope : local + Text : + Max. Text Size: 255 + +Variable (int32) temp_offset + Attributes + ID : 37 + Scope: local + Value: 0 + +Variable (int32) temp_step + Attributes + ID : 38 + Scope: local + Value: 0 + +Variable (int32) temp_number + Attributes + ID : 44 + Scope: local + Value: 0 + +Variable (int32) va0 + Attributes + ID : 45 + Scope: local + Value: 0 + +Variable (string) back_page + Attributes + ID : 46 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (int32) embedded + Attributes + ID : 47 + Scope: local + Value: 0 + +Variable (string) va2 + Attributes + ID : 48 + Scope : local + Text : + Max. Text Size: 10 + +Text current_temp + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text current_icon + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_icon + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01_icon + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value02_icon + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02 + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value03_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03 + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text value04_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04 + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 6 + +Text button01_icon + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02_icon + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03_icon + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04_icon + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05_icon + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06_icon + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07_icon + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button08_icon + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button09_icon + Attributes + ID : 41 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text target_temp + Attributes + ID : 43 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Slider climateslider + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 20 + Upper range limit: 40 + Lower range limit: 0 + + Events + Touch Release Event + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + timer01.en=1 + +Hotspot decrease_temp + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.val>0) + { + climateslider.val-- + temp_number.val=climateslider.val*temp_step.val + temp_number.val+=temp_offset.val + va0.val=temp_number.val/10 + covx va0.val,target_temp.txt,0,0 + va0.val=temp_number.val%10 + covx va0.val,va1.txt,0,0 + target_temp.txt+="."+va1.txt + } + + Touch Release Event + timer01.en=1 + +Hotspot increase_temp + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(climateslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/cover.txt b/nspanel_us_land_code/cover.txt index cf0ae97..32a10e6 100644 --- a/nspanel_us_land_code/cover.txt +++ b/nspanel_us_land_code/cover.txt @@ -13,7 +13,7 @@ Page cover Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_land_code/entitypage01.txt b/nspanel_us_land_code/entitypage01.txt index ec2dbf7..3f04fae 100644 --- a/nspanel_us_land_code/entitypage01.txt +++ b/nspanel_us_land_code/entitypage01.txt @@ -13,7 +13,7 @@ Page entitypage01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_land_code/entitypage03.txt b/nspanel_us_land_code/entitypage03.txt new file mode 100644 index 0000000..f5c4557 --- /dev/null +++ b/nspanel_us_land_code/entitypage03.txt @@ -0,0 +1,362 @@ +Page entitypage03 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text entity03_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Hotspot entity03_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage02 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + page entitypage01 + } + } + diff --git a/nspanel_us_land_code/entitypage04.txt b/nspanel_us_land_code/entitypage04.txt new file mode 100644 index 0000000..d28a3a8 --- /dev/null +++ b/nspanel_us_land_code/entitypage04.txt @@ -0,0 +1,362 @@ +Page entitypage04 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text value01_label + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value05_label + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value04_label + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value02_label + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value03_label + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text entity04_label + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 30 + +Text value06_label + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value07_label + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value08_label + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text value01_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value02_pic + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value03_pic + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value04_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value05_pic + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value06_pic + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value07_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value08_pic + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text value01 + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02 + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03 + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04 + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value05 + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value06 + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value07 + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value08 + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Hotspot entity04_back + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page entitypage03 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + page entitypage01 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/fan.txt b/nspanel_us_land_code/fan.txt index e69de29..4b68f1f 100644 --- a/nspanel_us_land_code/fan.txt +++ b/nspanel_us_land_code/fan.txt @@ -0,0 +1,409 @@ +Page fan + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + page_label.txt=home.entity.txt + } + + Touch Press Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints fansetting.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + home.entity.txt="" + +Variable (string) fansetting + Attributes + ID : 9 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) back_page + Attributes + ID : 10 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) va0 + Attributes + ID : 11 + Scope : local + Text : + Max. Text Size: 10 + +Text fan_value + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text page_label + Attributes + ID : 2 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture fan_exit + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Slider fanslider + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + Position : 0 + Upper range limit: 4 + Lower range limit: 0 + + Events + Touch Release Event + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.val=5) + { + fanslider.val++ + } + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + fanslider.val-- + sys0=100*fanslider.val/fanslider.maxval + covx sys0,va0.txt,0,0 + fan_value.txt=va0.txt+"%" + } + if(fanslider.val>fanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valfanslider.minval) + { + button_off.pco=59164 + button_down.pco=59164 + }else + { + button_off.pco=10597 + button_down.pco=10597 + } + if(fanslider.valswipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/home.txt b/nspanel_us_land_code/home.txt new file mode 100644 index 0000000..5c20218 --- /dev/null +++ b/nspanel_us_land_code/home.txt @@ -0,0 +1,690 @@ +Page home + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=brightness.val + dimtimer.en=1 + sleeptimer.en=1 + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + vis button06_icon,0 + vis button06,0 + vis left_bt_text,0 + vis right_bt_text,0 + +Variable (int32) brightness + Attributes + ID : 2 + Scope: global + Value: 100 + +Variable (int32) brightdd + Attributes + ID : 3 + Scope: global + Value: 40 + +Variable (int32) disdim + Attributes + ID : 4 + Scope: global + Value: 0 + +Variable (int32) sleepmodus + Attributes + ID : 16 + Scope: global + Value: 0 + +Variable (string) lastclick + Attributes + ID : 54 + Scope : local + Text : + Max. Text Size: 100 + +Variable (string) entity + Attributes + ID : 55 + Scope : global + Text : + Max. Text Size: 100 + +Text time + Attributes + ID : 7 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text current_temp + Attributes + ID : 8 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 8 + +Text outdoor_temp + Attributes + ID : 9 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 8 + +Text date + Attributes + ID : 10 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 25 + +Text value01_state + Attributes + ID : 12 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text left_bt_text + Attributes + ID : 17 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text right_bt_text + Attributes + ID : 18 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text icon_top_01 + Attributes + ID : 21 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_02 + Attributes + ID : 22 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_03 + Attributes + ID : 23 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_04 + Attributes + ID : 24 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_05 + Attributes + ID : 25 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_06 + Attributes + ID : 26 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_07 + Attributes + ID : 27 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_08 + Attributes + ID : 28 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_09 + Attributes + ID : 29 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text icon_top_10 + Attributes + ID : 30 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value01_icon + Attributes + ID : 31 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03_state + Attributes + ID : 32 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03_icon + Attributes + ID : 33 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02_icon + Attributes + ID : 34 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02_state + Attributes + ID : 35 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text wifi_icon + Attributes + ID : 36 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 5 + +Text indoortempicon + Attributes + ID : 37 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button01_icon + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button02_icon + Attributes + ID : 39 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button03_icon + Attributes + ID : 40 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button04_icon + Attributes + ID : 41 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button05_icon + Attributes + ID : 42 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button06_icon + Attributes + ID : 43 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text button07_icon + Attributes + ID : 44 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text meridiem + Attributes + ID : 53 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture weather + Attributes + ID : 11 + Scope : global + Dragging : 0 + Send Component ID: disabled + +Picture left_bt_pic + Attributes + ID : 19 + Scope : global + Dragging : 0 + Send Component ID: disabled + +Picture right_bt_pic + Attributes + ID : 20 + Scope : global + Dragging : 0 + Send Component ID: disabled + +Hotspot fc_weather + Attributes + ID : 13 + Scope : global + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + if(api==1) + { + page weather01 + } + +Hotspot jump_climate + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID: on press and release + + Events + Touch Press Event + if(entity.txt=="") + { + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + }else + { + page climate + } + + Touch Release Event + if(entity.txt=="") + { + lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + }else + { + page climate + } + +Hotspot button01 + Attributes + ID : 45 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button01\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button02 + Attributes + ID : 46 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button02\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button03 + Attributes + ID : 47 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button03\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button04 + Attributes + ID : 48 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button05 + Attributes + ID : 49 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot button06 + Attributes + ID : 50 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + if(api==1) + { + page entitypage01 + } + +Hotspot button07 + Attributes + ID : 51 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"page\": \"home\", \"component\": \"button07\", \"value\": \"release\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot settings_click + Attributes + ID : 52 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + settings_timer.en=1 + + Touch Release Event + settings_timer.en=0 + +Timer dimtimer + Attributes + ID : 1 + Scope : global + Period (ms): 50000 + Enabled : yes + + Events + Timer Event + if(disdim.val==0) + { + dim=brightdd.val // Dim down screen to val set from HA + } + +Timer swipestore + Attributes + ID : 6 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +Timer sleeptimer + Attributes + ID : 15 + Scope : local + Period (ms): 65000 + Enabled : no + + Events + Timer Event + if(sleepmodus.val==1) + { + screensaver.orign.val=0 + // Go to screensaver page + page screensaver + } + +Timer settings_timer + Attributes + ID : 56 + Scope : local + Period (ms): 1000 + Enabled : no + + Events + Timer Event + page settings + +TouchCap swipe + Attributes + ID : 5 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + dim=brightness.val // Set brightness to saved value (from HA) + dimtimer.en=1 // Enable timer to calc down for dimming screen + sleeptimer.en=1 + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx&&api==1) + { + page buttonpage04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100&&api==1) + { + page buttonpage02 + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100&&api==1) + { + page buttonpage03 + } + } + diff --git a/nspanel_us_land_code/light.txt b/nspanel_us_land_code/light.txt index b2c8af9..9a30cd1 100644 --- a/nspanel_us_land_code/light.txt +++ b/nspanel_us_land_code/light.txt @@ -13,7 +13,7 @@ Page light Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else @@ -387,7 +387,7 @@ Picture colorwheel covx r,va1.txt,0,0 covx g,va2.txt,0,0 covx b,va3.txt,0,0 - lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 @@ -420,9 +420,9 @@ Slider lightslider covx lightslider.val,va1.txt,0,0 light_value.txt=va1.txt+"%" light_value_2.txt=va1.txt+"%" - lightsetting.txt="{\"page\": \"light\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 @@ -443,9 +443,9 @@ Slider tempslider covx tempslider.val,va1.txt,0,0 temp_value.txt=va1.txt temp_value_2.txt=va1.txt - lightsetting.txt="{\"page\": \"light\", \"component\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" + lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 prints lightsetting.txt,0 printh 00 diff --git a/nspanel_us_land_code/settings.txt b/nspanel_us_land_code/settings.txt new file mode 100644 index 0000000..2fc9ab0 --- /dev/null +++ b/nspanel_us_land_code/settings.txt @@ -0,0 +1,229 @@ +Page settings + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text a03 + Attributes + ID : 5 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text a04 + Attributes + ID : 6 + Scope : global + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 3 + +Text a06 + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Reboot + Max. Text Size : 6 + +Text a07 + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Sleep + Max. Text Size : 5 + +Text a08 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Brightness + Max. Text Size : 10 + +Text a09 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Dimming + Max. Text Size : 7 + +Picture settings_exit + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Slider brightslider + Attributes + ID : 3 + Scope : global + Dragging : 0 + Send Component ID: on press and release + Position : 80 + Upper range limit: 100 + Lower range limit: 0 + + Events + Touch Release Event + printh 91 + prints "brightslider",0 + printh 00 + prints brightslider.val,0 + printh FF FF FF + +Slider dimslider + Attributes + ID : 4 + Scope : global + Dragging : 0 + Send Component ID: on press and release + Position : 20 + Upper range limit: 100 + Lower range limit: 0 + + Events + Touch Release Event + printh 91 + prints "dimslider",0 + printh 00 + prints dimslider.val,0 + printh FF FF FF + +Dual-state Button bt0 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: on press and release + State : unpressed + Text : + Max. Text Size : 0 + +Dual-state Button bt1 + Attributes + ID : 14 + Scope : global + Dragging : 0 + Send Component ID: on press and release + State : unpressed + Text : + Max. Text Size : 0 + +Hotspot setings_back + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + //page + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } + diff --git a/nspanel_us_land_code/weather01.txt b/nspanel_us_land_code/weather01.txt index 129a247..fd05b26 100644 --- a/nspanel_us_land_code/weather01.txt +++ b/nspanel_us_land_code/weather01.txt @@ -13,7 +13,7 @@ Page weather01 Events Preinitialize Event dim=home.brightness.val - if(home.api.val==0) + if(api==0) { page home }else diff --git a/nspanel_us_land_code/weather05.txt b/nspanel_us_land_code/weather05.txt new file mode 100644 index 0000000..a45db11 --- /dev/null +++ b/nspanel_us_land_code/weather05.txt @@ -0,0 +1,259 @@ +Page weather05 + Attributes + ID : 0 + Scope : local + Dragging : 0 + Send Component ID : disabled + Locked : no + Swide up page ID : disabled + Swide down page ID : disabled + Swide left page ID : disabled + Swide right page ID: disabled + + Events + Preinitialize Event + dim=home.brightness.val + if(api==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } + + Touch Press Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"press\"}",0 + printh 00 + printh FF FF FF + + Touch Release Event + printh 92 + prints "touchevent",0 + printh 00 + prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"release\"}",0 + printh 00 + printh FF FF FF + +Text day + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 20 + +Text loading + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 1 + +Text date + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 25 + +Text temperature + Attributes + ID : 8 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value01 + Attributes + ID : 9 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value05 + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value04 + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value02 + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value03 + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 15 + +Text value01_icon + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value02_icon + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value03_icon + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value04_icon + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text value05_icon + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture weather_icon + Attributes + ID : 3 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot weather_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + page home + +Timer swipestore + Attributes + ID : 2 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 1 + Scope: local + Value: 0 + + Events + Touch Press Event + swipestore.en=1 // Start swipestore timer + + Touch Release Event + swipestore.en=0 + // Touch has ended, x + if(tch0==0) + { + swipec=swipex-tch2 + // From Left to Right + if(swipec>swipedx) + { + page weather04 + } + // Right to Left + swipec2=0-swipedx + if(swipec100) + { + //page + } + // Down to Up + swipec2=0-swipedy + if(swipec<-100) + { + //page + } + } +