diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index ac66494..a409e70 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 62df725..44ae3f4 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 90e3dba..6374155 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 90f6d1a..5ab85a1 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/alarm.txt b/nspanel_us_code/alarm.txt new file mode 100644 index 0000000..a3f7116 --- /dev/null +++ b/nspanel_us_code/alarm.txt @@ -0,0 +1,505 @@ +Page alarm + 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 + { + lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "nspanelevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + } + + Touch Press Event + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Touch Release Event + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "touchevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + + Page Exit Event + home.entity.txt="" + +Variable (string) lastclick + Attributes + ID : 7 + Scope : local + Text : + Max. Text Size: 255 + +Variable (string) back_page + Attributes + ID : 8 + Scope : local + Text : home + Max. Text Size: 15 + +Variable (string) va0 + Attributes + ID : 9 + Scope : local + Text : + Max. Text Size: 10 + +Text page_label + Attributes + ID : 1 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Alarm Control Panel + Max. Text Size : 25 + +Text icon_state + Attributes + ID : 6 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text :  + Max. Text Size : 10 + +Text bt_home_text + Attributes + ID : 11 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Home + Max. Text Size : 10 + +Text bt_home_bri + Attributes + ID : 12 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_away_text + Attributes + ID : 14 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Away + Max. Text Size : 10 + +Text bt_away_bri + Attributes + ID : 15 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_night_text + Attributes + ID : 17 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Night + Max. Text Size : 10 + +Text bt_night_bri + Attributes + ID : 18 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_vacat_text + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Vacaation + Max. Text Size : 10 + +Text bt_vacat_bri + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_bypass_text + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Bypass + Max. Text Size : 10 + +Text bt_bypass_bri + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_disarm_text + Attributes + ID : 26 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Disarm + Max. Text Size : 10 + +Text bt_disarm_bri + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_home_icon + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_away_icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_night_icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_vacat_icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_bypass_icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_disarm_icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Picture alarm_exit + Attributes + ID : 4 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_home_pic + Attributes + ID : 10 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_away_pic + Attributes + ID : 13 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_night_pic + Attributes + ID : 16 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_vacat_pic + Attributes + ID : 19 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_bypass_pic + Attributes + ID : 22 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Picture bt_disarm_pic + Attributes + ID : 25 + Scope : local + Dragging : 0 + Send Component ID: disabled + +Hotspot alarm_back + Attributes + ID : 5 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Press Event + if(back_page.txt=="buttonpage01") + { + page buttonpage01 + }else if(back_page.txt=="buttonpage02") + { + page buttonpage02 + }else if(back_page.txt=="buttonpage03") + { + page buttonpage03 + }else if(back_page.txt=="buttonpage04") + { + page buttonpage04 + }else + { + page home + } + +Hotspot bt_home + Attributes + ID : 34 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_away + Attributes + ID : 35 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_night + Attributes + ID : 36 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_vacat + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_bypass + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_disarm + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Timer swipestore + Attributes + ID : 3 + Scope : local + Period (ms): 50 + Enabled : no + + Events + Timer Event + swipex=tch0 + swipey=tch1 + +TouchCap swipe + Attributes + ID : 2 + 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.HMI b/nspanel_us_land.HMI index c5607da..9431f36 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 7d7160c..49c60b8 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ diff --git a/nspanel_us_land_code/alarm.txt b/nspanel_us_land_code/alarm.txt index fa3922e..a3f7116 100644 --- a/nspanel_us_land_code/alarm.txt +++ b/nspanel_us_land_code/alarm.txt @@ -18,37 +18,37 @@ Page alarm page home }else { - alarmsetting.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "nspanelevent",0 printh 00 - prints alarmsetting.txt,0 + prints lastclick.txt,0 printh 00 printh FF FF FF } Touch Press Event - alarmsetting.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 - prints alarmsetting.txt,0 + prints lastclick.txt,0 printh 00 printh FF FF FF Touch Release Event - alarmsetting.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" + lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}" printh 92 prints "touchevent",0 printh 00 - prints alarmsetting.txt,0 + prints lastclick.txt,0 printh 00 printh FF FF FF Page Exit Event home.entity.txt="" -Variable (string) alarmsetting +Variable (string) lastclick Attributes ID : 7 Scope : local @@ -91,7 +91,7 @@ Text icon_state Text bt_home_text Attributes - ID : 14 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +101,7 @@ Text bt_home_text Text bt_home_bri Attributes - ID : 15 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -109,19 +109,9 @@ Text bt_home_bri Text : Max. Text Size : 4 -Text bt_home_icon - Attributes - ID : 16 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 10 - Text bt_away_text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +121,7 @@ Text bt_away_text Text bt_away_bri Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -139,19 +129,9 @@ Text bt_away_bri Text : Max. Text Size : 4 -Text bt_away_icon - Attributes - ID : 21 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text :  - Max. Text Size : 10 - Text bt_night_text Attributes - ID : 24 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +141,7 @@ Text bt_night_text Text bt_night_bri Attributes - ID : 25 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -169,14 +149,124 @@ Text bt_night_bri Text : Max. Text Size : 4 -Text bt_night_icon +Text bt_vacat_text + Attributes + ID : 20 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Vacaation + Max. Text Size : 10 + +Text bt_vacat_bri + Attributes + ID : 21 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_bypass_text + Attributes + ID : 23 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Bypass + Max. Text Size : 10 + +Text bt_bypass_bri + Attributes + ID : 24 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_disarm_text Attributes ID : 26 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text :  + Text : Disarm + Max. Text Size : 10 + +Text bt_disarm_bri + Attributes + ID : 27 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 4 + +Text bt_home_icon + Attributes + ID : 28 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_away_icon + Attributes + ID : 29 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_night_icon + Attributes + ID : 30 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_vacat_icon + Attributes + ID : 31 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_bypass_icon + Attributes + ID : 32 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : + Max. Text Size : 10 + +Text bt_disarm_icon + Attributes + ID : 33 + Scope : local + Dragging : 0 + Send Component ID : disabled + Associated Keyboard: none + Text : Max. Text Size : 10 Picture alarm_exit @@ -188,54 +278,45 @@ Picture alarm_exit Picture bt_home_pic Attributes - ID : 13 + ID : 10 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_away_pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 23 + ID : 16 Scope : local Dragging : 0 Send Component ID: disabled -Dual-state Button bt_disarm +Picture bt_vacat_pic Attributes - ID : 10 + ID : 19 Scope : local Dragging : 0 Send Component ID: disabled - State : unpressed - Text : Disarm - Max. Text Size : 10 -Dual-state Button bt_vacations +Picture bt_bypass_pic Attributes - ID : 11 + ID : 22 Scope : local Dragging : 0 Send Component ID: disabled - State : unpressed - Text : Vacations - Max. Text Size : 10 -Dual-state Button bt_bypass +Picture bt_disarm_pic Attributes - ID : 12 + ID : 25 Scope : local Dragging : 0 Send Component ID: disabled - State : unpressed - Text : Bypass - Max. Text Size : 10 Hotspot alarm_back Attributes @@ -265,73 +346,103 @@ Hotspot alarm_back Hotspot bt_home Attributes - ID : 17 + ID : 34 Scope : local Dragging : 0 - Send Component ID: on press and release + Send Component ID: disabled Events - Touch Press Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_home\", \"value\": \"press\"}",0 - printh 00 - printh FF FF FF - Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_home\", \"value\": \"release\"}",0 + prints lastclick.txt,0 printh 00 printh FF FF FF Hotspot bt_away Attributes - ID : 22 + ID : 35 Scope : local Dragging : 0 - Send Component ID: on press and release + Send Component ID: disabled Events - Touch Press Event - printh 92 - prints "nspanelevent",0 - printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_away\", \"value\": \"press\"}",0 - printh 00 - printh FF FF FF - Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_away\", \"value\": \"release\"}",0 + prints lastclick.txt,0 printh 00 printh FF FF FF Hotspot bt_night Attributes - ID : 27 + ID : 36 Scope : local Dragging : 0 - Send Component ID: on press and release + Send Component ID: disabled Events - Touch Press Event + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_night\", \"value\": \"press\"}",0 + prints lastclick.txt,0 printh 00 printh FF FF FF +Hotspot bt_vacat + Attributes + ID : 37 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 - prints "nspanelevent",0 + prints "localevent",0 printh 00 - prints "{\"page\": \"alarm\", \"component\": \"button_night\", \"value\": \"release\"}",0 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_bypass + Attributes + ID : 38 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 + printh 00 + printh FF FF FF + +Hotspot bt_disarm + Attributes + ID : 39 + Scope : local + Dragging : 0 + Send Component ID: disabled + + Events + Touch Release Event + lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" + printh 92 + prints "localevent",0 + printh 00 + prints lastclick.txt,0 printh 00 printh FF FF FF