869 lines
24 KiB
Plaintext
869 lines
24 KiB
Plaintext
Page home
|
|
Attributes
|
|
ID : 0
|
|
Scope : local
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
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
|
|
if(boot.progress.val<100)
|
|
{
|
|
page boot
|
|
}
|
|
printh 92
|
|
prints "current_page",0
|
|
printh 00
|
|
prints "home",0
|
|
printh 00
|
|
printh FF FF FF
|
|
back_page_id=1
|
|
if(qrcode.qrcode_value.txt=="")
|
|
{
|
|
vis bt_qrcode,0
|
|
}
|
|
if(is_entitypage01>0||is_entitypage02>0||is_entitypage03>0||is_entitypage04>0)
|
|
{
|
|
vis bt_entities,1
|
|
}else
|
|
{
|
|
vis bt_entities,0
|
|
}
|
|
vis bt_utilities,is_utilities
|
|
if(display_mode==3)
|
|
{
|
|
vis left_bt_text,0
|
|
vis right_bt_text,0
|
|
}
|
|
|
|
Variable (string) lastclick
|
|
Attributes
|
|
ID : 33
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 100
|
|
|
|
Variable (string) click_comp
|
|
Attributes
|
|
ID : 38
|
|
Scope : local
|
|
Text :
|
|
Max. Text Size: 14
|
|
|
|
Text time
|
|
Attributes
|
|
ID : 3
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 5
|
|
|
|
Events
|
|
Touch Press Event
|
|
settings_timer.en=1
|
|
|
|
Touch Release Event
|
|
settings_timer.en=0
|
|
|
|
Text indr_temp
|
|
Attributes
|
|
ID : 4
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 8
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="indr_temp"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text outdoor_temp
|
|
Attributes
|
|
ID : 5
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 8
|
|
|
|
Text date
|
|
Attributes
|
|
ID : 6
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 25
|
|
|
|
Events
|
|
Touch Press Event
|
|
settings_timer.en=1
|
|
|
|
Touch Release Event
|
|
settings_timer.en=0
|
|
|
|
Text value01
|
|
Attributes
|
|
ID : 8
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 30
|
|
|
|
Text left_bt_text
|
|
Attributes
|
|
ID : 9
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 20
|
|
|
|
Text right_bt_text
|
|
Attributes
|
|
ID : 10
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 20
|
|
|
|
Text chip_relay1
|
|
Attributes
|
|
ID : 11
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip_relay2
|
|
Attributes
|
|
ID : 12
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip_climate
|
|
Attributes
|
|
ID : 13
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip01
|
|
Attributes
|
|
ID : 14
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip02
|
|
Attributes
|
|
ID : 15
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip03
|
|
Attributes
|
|
ID : 16
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip04
|
|
Attributes
|
|
ID : 17
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip05
|
|
Attributes
|
|
ID : 18
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip06
|
|
Attributes
|
|
ID : 19
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text chip07
|
|
Attributes
|
|
ID : 20
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text value01_icon
|
|
Attributes
|
|
ID : 21
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text value03
|
|
Attributes
|
|
ID : 22
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 30
|
|
|
|
Text value03_icon
|
|
Attributes
|
|
ID : 23
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text value02_icon
|
|
Attributes
|
|
ID : 24
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text value02
|
|
Attributes
|
|
ID : 25
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 30
|
|
|
|
Text wifi_icon
|
|
Attributes
|
|
ID : 26
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 5
|
|
|
|
Events
|
|
Touch Press Event
|
|
settings_timer.en=1
|
|
|
|
Touch Release Event
|
|
settings_timer.en=0
|
|
|
|
Text indr_temp_icon
|
|
Attributes
|
|
ID : 27
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="indr_temp_icon"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text bt_notific
|
|
Attributes
|
|
ID : 28
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Release Event
|
|
if(api==1)
|
|
{
|
|
page notification
|
|
}
|
|
|
|
Text bt_qrcode
|
|
Attributes
|
|
ID : 29
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Release Event
|
|
if(qrcode.qrcode_value.txt!="")
|
|
{
|
|
page qrcode
|
|
}
|
|
|
|
Text bt_entities
|
|
Attributes
|
|
ID : 30
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Release Event
|
|
if(api==1)
|
|
{
|
|
if(is_entitypage01>0)
|
|
{
|
|
page entitypage01
|
|
}else if(is_entitypage02>0)
|
|
{
|
|
page entitypage02
|
|
}else if(is_entitypage03>0)
|
|
{
|
|
page entitypage03
|
|
}else if(is_entitypage04>0)
|
|
{
|
|
page entitypage04
|
|
}else
|
|
{
|
|
vis bt_entities,0
|
|
}
|
|
}
|
|
|
|
Text button07
|
|
Attributes
|
|
ID : 31
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button07"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text meridiem
|
|
Attributes
|
|
ID : 32
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 6
|
|
|
|
Events
|
|
Touch Press Event
|
|
settings_timer.en=1
|
|
|
|
Touch Release Event
|
|
settings_timer.en=0
|
|
|
|
Text button01
|
|
Attributes
|
|
ID : 35
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button01"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text button02
|
|
Attributes
|
|
ID : 36
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button02"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text button03
|
|
Attributes
|
|
ID : 37
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button03"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text button04
|
|
Attributes
|
|
ID : 40
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button04"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text button05
|
|
Attributes
|
|
ID : 41
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button05"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text button06
|
|
Attributes
|
|
ID : 42
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="button06"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
}
|
|
|
|
Text bt_utilities
|
|
Attributes
|
|
ID : 43
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Events
|
|
Touch Release Event
|
|
if(api==1)
|
|
{
|
|
page utilities
|
|
}
|
|
|
|
Text value04_icon
|
|
Attributes
|
|
ID : 44
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 3
|
|
|
|
Text value04
|
|
Attributes
|
|
ID : 45
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 30
|
|
|
|
Text bt_icon
|
|
Attributes
|
|
ID : 46
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID : on press and release
|
|
Associated Keyboard: none
|
|
Text :
|
|
Max. Text Size : 5
|
|
|
|
Events
|
|
Touch Press Event
|
|
settings_timer.en=1
|
|
|
|
Touch Release Event
|
|
settings_timer.en=0
|
|
|
|
Picture weather
|
|
Attributes
|
|
ID : 7
|
|
Scope : global
|
|
Dragging : 0
|
|
Send Component ID: on press and release
|
|
|
|
Events
|
|
Touch Press Event
|
|
click_comp.txt="weather"
|
|
click_timer.en=1
|
|
|
|
Touch Release Event
|
|
if(click_timer.en==1)
|
|
{
|
|
click_timer.en=0
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",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
|
|
|
|
Timer settings_timer
|
|
Attributes
|
|
ID : 34
|
|
Scope : local
|
|
Period (ms): 1000
|
|
Enabled : no
|
|
|
|
Events
|
|
Timer Event
|
|
page settings
|
|
|
|
Timer click_timer
|
|
Attributes
|
|
ID : 39
|
|
Scope : local
|
|
Period (ms): 800
|
|
Enabled : no
|
|
|
|
Events
|
|
Timer Event
|
|
lastclick.txt="{\"page\": \"home\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
|
printh 92
|
|
prints "localevent",0
|
|
printh 00
|
|
prints lastclick.txt,0
|
|
printh 00
|
|
printh FF FF FF
|
|
click_timer.en=0
|
|
|
|
TouchCap swipe
|
|
Attributes
|
|
ID : 1
|
|
Scope: local
|
|
Value: 0
|
|
|
|
Events
|
|
Touch Press Event
|
|
swipestore.en=1 // Start swipestore timer
|
|
dim=brightness // Set brightness to saved value (from HA)
|
|
|
|
Touch Release Event
|
|
//New swipe
|
|
if(api==0)
|
|
{
|
|
page home
|
|
}
|
|
swipestore.en=0
|
|
// Touch has ended, x
|
|
if(tch0==0)
|
|
{
|
|
swipec=swipex-tch2
|
|
// From Left to Right
|
|
if(swipec>swipedx)
|
|
{
|
|
// Navigate back based on active status
|
|
if(is_buttonpage04==1)
|
|
{
|
|
page buttonpage04
|
|
}else if(is_buttonpage03==1)
|
|
{
|
|
page buttonpage03
|
|
}else if(is_buttonpage02==1)
|
|
{
|
|
page buttonpage02
|
|
}else if(is_buttonpage01==1)
|
|
{
|
|
page buttonpage01
|
|
}
|
|
}
|
|
// Right to Left swipe now navigates to home, looping back to the start.
|
|
swipec2=0-swipedx
|
|
if(swipec<swipec2)
|
|
{
|
|
// Navigate back based on active status
|
|
if(is_buttonpage01==1)
|
|
{
|
|
page buttonpage01
|
|
}else if(is_buttonpage02==1)
|
|
{
|
|
page buttonpage02
|
|
}else if(is_buttonpage03==1)
|
|
{
|
|
page buttonpage03
|
|
}else if(is_buttonpage04==1)
|
|
{
|
|
page buttonpage04
|
|
}
|
|
}
|
|
}
|
|
// Touch has ended, y
|
|
if(tch1==0)
|
|
{
|
|
swipec=swipey-tch3
|
|
// From Up to Down
|
|
if(swipec>100)
|
|
{
|
|
if(is_buttonpage04==1&&is_buttonpage03==1)
|
|
{
|
|
page buttonpage03
|
|
}else if(is_buttonpage04==1&&is_buttonpage02==1)
|
|
{
|
|
page buttonpage02
|
|
}else if(is_buttonpage04==1&&is_buttonpage01==1)
|
|
{
|
|
page buttonpage01
|
|
}else if(is_buttonpage03==1&&is_buttonpage02==1)
|
|
{
|
|
page buttonpage02
|
|
}else if(is_buttonpage03==1&&is_buttonpage01==1)
|
|
{
|
|
page buttonpage01
|
|
}else if(is_buttonpage02==1&&is_buttonpage01==1)
|
|
{
|
|
page buttonpage01
|
|
}
|
|
}
|
|
// Down to Up
|
|
swipec2=0-swipedy
|
|
if(swipec<-100)
|
|
{
|
|
// Navigate back up the sequence based on active status
|
|
if(is_buttonpage01==1&&is_buttonpage02==1)
|
|
{
|
|
page buttonpage02
|
|
}else if(is_buttonpage01==1&&is_buttonpage03==1)
|
|
{
|
|
page buttonpage03
|
|
}else if(is_buttonpage01==1&&is_buttonpage04==1)
|
|
{
|
|
page buttonpage04
|
|
}else if(is_buttonpage02==1&&is_buttonpage03==1)
|
|
{
|
|
page buttonpage03
|
|
}else if(is_buttonpage02==1&&is_buttonpage04==1)
|
|
{
|
|
page buttonpage04
|
|
}else if(is_buttonpage03==1&&is_buttonpage04==1)
|
|
{
|
|
page buttonpage04
|
|
}
|
|
}
|
|
}
|
|
|