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 6ee85f7..b971e15 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 593441f..989c0af 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ 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 64d05e8..7540398 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 79c86c9..37a5a3d 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/buttonpage01.txt b/nspanel_us_code/buttonpage01.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 a462722..812c18f 100644 Binary files a/nspanel_us_land.HMI and b/nspanel_us_land.HMI differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 983793e..35e42c8 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ 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 + } + } +