Alarm Control Panel with PIN (#982)
Implements an Alarm Control Panel page on NSPanel. Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66 Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227 Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672 Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612 Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490 Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718
This commit is contained in:
@@ -55,32 +55,32 @@ Page alarm
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 7
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 8
|
||||
ID : 6
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) code_format
|
||||
Attributes
|
||||
ID : 34
|
||||
ID : 31
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -93,7 +93,7 @@ Text page_label
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 6
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -103,7 +103,7 @@ Text icon_state
|
||||
|
||||
Text bt_home_text
|
||||
Attributes
|
||||
ID : 11
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -113,7 +113,7 @@ Text bt_home_text
|
||||
|
||||
Text bt_away_text
|
||||
Attributes
|
||||
ID : 13
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -123,7 +123,7 @@ Text bt_away_text
|
||||
|
||||
Text bt_night_text
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -133,7 +133,7 @@ Text bt_night_text
|
||||
|
||||
Text bt_vacat_text
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -143,7 +143,7 @@ Text bt_vacat_text
|
||||
|
||||
Text bt_bypass_text
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -153,7 +153,7 @@ Text bt_bypass_text
|
||||
|
||||
Text bt_disarm_text
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -163,7 +163,7 @@ Text bt_disarm_text
|
||||
|
||||
Text bt_home_icon
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -173,7 +173,7 @@ Text bt_home_icon
|
||||
|
||||
Text bt_away_icon
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -183,7 +183,7 @@ Text bt_away_icon
|
||||
|
||||
Text bt_night_icon
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -193,7 +193,7 @@ Text bt_night_icon
|
||||
|
||||
Text bt_vacat_icon
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -203,7 +203,7 @@ Text bt_vacat_icon
|
||||
|
||||
Text bt_bypass_icon
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -213,7 +213,7 @@ Text bt_bypass_icon
|
||||
|
||||
Text bt_disarm_icon
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -223,56 +223,56 @@ Text bt_disarm_icon
|
||||
|
||||
Picture alarm_exit
|
||||
Attributes
|
||||
ID : 4
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_home_pic
|
||||
Attributes
|
||||
ID : 10
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_away_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_night_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_vacat_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_bypass_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_disarm_pic
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot alarm_back
|
||||
Attributes
|
||||
ID : 5
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -298,7 +298,7 @@ Hotspot alarm_back
|
||||
|
||||
Hotspot bt_home
|
||||
Attributes
|
||||
ID : 28
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -312,7 +312,7 @@ Hotspot bt_home
|
||||
bt_home_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -322,7 +322,7 @@ Hotspot bt_home
|
||||
|
||||
Hotspot bt_away
|
||||
Attributes
|
||||
ID : 29
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -336,7 +336,7 @@ Hotspot bt_away
|
||||
bt_away_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -346,7 +346,7 @@ Hotspot bt_away
|
||||
|
||||
Hotspot bt_night
|
||||
Attributes
|
||||
ID : 30
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -360,7 +360,7 @@ Hotspot bt_night
|
||||
bt_night_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -370,7 +370,7 @@ Hotspot bt_night
|
||||
|
||||
Hotspot bt_vacat
|
||||
Attributes
|
||||
ID : 31
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -384,7 +384,7 @@ Hotspot bt_vacat
|
||||
bt_vacat_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -394,7 +394,7 @@ Hotspot bt_vacat
|
||||
|
||||
Hotspot bt_bypass
|
||||
Attributes
|
||||
ID : 32
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -408,7 +408,7 @@ Hotspot bt_bypass
|
||||
bt_bypass_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -418,7 +418,7 @@ Hotspot bt_bypass
|
||||
|
||||
Hotspot bt_disarm
|
||||
Attributes
|
||||
ID : 33
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -432,7 +432,7 @@ Hotspot bt_disarm
|
||||
bt_disarm_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
@@ -440,60 +440,3 @@ Hotspot bt_disarm
|
||||
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(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Variable (string) aux
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) value
|
||||
Attributes
|
||||
@@ -106,7 +106,7 @@ Text pin
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text t1
|
||||
Text title
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
@@ -296,7 +296,7 @@ Button benter
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
aux.txt="{\"domain\": \"keyb_num\", \"key\": "+key.txt+", \"value\": "+value.txt+", \"entity\": \""+entity.txt+"\", \"base_domain\": "+domain.txt+"\"}"
|
||||
aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
|
||||
Reference in New Issue
Block a user