diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index 80ed27a..931d30a 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu_code/boot.txt b/nspanel_eu_code/boot.txt index a05580a..a9d3274 100644 --- a/nspanel_eu_code/boot.txt +++ b/nspanel_eu_code/boot.txt @@ -20,6 +20,26 @@ Page boot printh 00 printh FF FF FF +Variable (int32) counter + Attributes + ID : 12 + Scope: local + Value: 0 + +Variable (string) aux + Attributes + ID : 13 + Scope : local + Text : + Max. Text Size: 10 + +Variable (string) nspanelevent + Attributes + ID : 14 + Scope : local + Text : + Max. Text Size: 100 + Text ip_addr Attributes ID : 1 @@ -120,3 +140,23 @@ Dual-state Button a01 Text : Reboot Max. Text Size : 6 +Timer timer + Attributes + ID : 11 + Scope : local + Period (ms): 65534 + Enabled : yes + + Events + Timer Event + counter.val++ + covx counter.val,aux.txt,0,0 + nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux.txt+"}" + bluep_version.txt="Retry: "+aux.txt + printh 92 + prints "nspanelevent",0 + printh 00 + prints nspanelevent.txt,0 + printh 00 + printh FF FF FF + diff --git a/nspanel_eu_code/cover.txt b/nspanel_eu_code/cover.txt index 10246df..5e930e7 100644 --- a/nspanel_eu_code/cover.txt +++ b/nspanel_eu_code/cover.txt @@ -13,14 +13,20 @@ Page cover Events Preinitialize Event dim=home.brightness.val - coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints coversetting.txt,0 - printh 00 - printh FF FF FF - page_label.txt=home.entity.txt + if(home.api.val==0) + { + page home + }else + { + coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints coversetting.txt,0 + printh 00 + printh FF FF FF + page_label.txt=home.entity.txt + } Touch Press Event coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" diff --git a/nspanel_eu_code/entitypage01.txt b/nspanel_eu_code/entitypage01.txt index 0dae56e..864e3f1 100644 --- a/nspanel_eu_code/entitypage01.txt +++ b/nspanel_eu_code/entitypage01.txt @@ -12,12 +12,19 @@ Page entitypage01 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(home.api.val==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/light.txt b/nspanel_eu_code/light.txt index 300a31c..b2c8af9 100644 --- a/nspanel_eu_code/light.txt +++ b/nspanel_eu_code/light.txt @@ -13,32 +13,38 @@ Page light Events Preinitialize Event dim=home.brightness.val - lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" - printh 92 - prints "nspanelevent",0 - printh 00 - prints lightsetting.txt,0 - printh 00 - printh FF FF FF - vis light_b_press,1 - vis lightslider,1 - vis light_value,1 - // #### OFF Button ##### - vis temp_b_press,0 - vis color_b_pres,0 - // #### OFF Value ##### - vis temp_value,0 - vis light_value_2,0 - // #### OFF Slider ##### - vis tempslider,0 - vis colorwheel,0 - // #### Hide color & temp buttons ##### - vis temp_touch,0 - vis temp_value_2,0 - vis temp_button,0 - vis color_touch,0 - vis color_button,0 - page_label.txt=home.entity.txt + if(home.api.val==0) + { + page home + }else + { + lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lightsetting.txt,0 + printh 00 + printh FF FF FF + vis light_b_press,1 + vis lightslider,1 + vis light_value,1 + // #### OFF Button ##### + vis temp_b_press,0 + vis color_b_pres,0 + // #### OFF Value ##### + vis temp_value,0 + vis light_value_2,0 + // #### OFF Slider ##### + vis tempslider,0 + vis colorwheel,0 + // #### Hide color & temp buttons ##### + vis temp_touch,0 + vis temp_value_2,0 + vis temp_button,0 + vis color_touch,0 + vis color_button,0 + page_label.txt=home.entity.txt + } Touch Press Event lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" diff --git a/nspanel_eu_code/notification.txt b/nspanel_eu_code/notification.txt index c3bf257..17ea873 100644 --- a/nspanel_eu_code/notification.txt +++ b/nspanel_eu_code/notification.txt @@ -101,6 +101,20 @@ Hotspot accept Dragging : 0 Send Component ID: disabled +Hotspot clear + Attributes + ID : 7 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot accept_hotspot + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID: disabled + Events Touch Release Event lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}" @@ -111,9 +125,9 @@ Hotspot accept printh 00 printh FF FF FF -Hotspot clear +Hotspot clear_hotspot Attributes - ID : 7 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled diff --git a/nspanel_eu_code/weather01.txt b/nspanel_eu_code/weather01.txt index b3c876c..7116f43 100644 --- a/nspanel_eu_code/weather01.txt +++ b/nspanel_eu_code/weather01.txt @@ -12,12 +12,19 @@ Page weather01 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(home.api.val==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/weather02.txt b/nspanel_eu_code/weather02.txt index dfe10b4..5f34cca 100644 --- a/nspanel_eu_code/weather02.txt +++ b/nspanel_eu_code/weather02.txt @@ -12,12 +12,19 @@ Page weather02 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(home.api.val==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/weather03.txt b/nspanel_eu_code/weather03.txt index c05f616..801cf59 100644 --- a/nspanel_eu_code/weather03.txt +++ b/nspanel_eu_code/weather03.txt @@ -12,12 +12,19 @@ Page weather03 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(home.api.val==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92 diff --git a/nspanel_eu_code/weather04.txt b/nspanel_eu_code/weather04.txt index 1def451..c097ed6 100644 --- a/nspanel_eu_code/weather04.txt +++ b/nspanel_eu_code/weather04.txt @@ -12,12 +12,19 @@ Page weather04 Events Preinitialize Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 - printh 00 - printh FF FF FF + dim=home.brightness.val + if(home.api.val==0) + { + page home + }else + { + printh 92 + prints "nspanelevent",0 + printh 00 + prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0 + printh 00 + printh FF FF FF + } Touch Press Event printh 92