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
            if(api==0)
            {
                page home
            }else
            {
                printh 92
                prints "nspanelevent",0
                printh 00
                prints "{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
                printh 00
                printh FF FF FF
                vis bt_home,0
                vis bt_away,0
                vis bt_night,0
                vis bt_vacat,0
                vis bt_bypass,0
            }
        
        Touch Press Event
            printh 91
            prints "touchevent",0
            printh 00
            prints rand,0
            printh FF FF FF
        
        Touch Release Event
            printh 91
            prints "touchevent",0
            printh 00
            prints rand,0
            printh FF FF FF
        
Variable (string) lastclick
    Attributes
        ID            : 3
        Scope         : local
        Text          : 
        Max. Text Size: 255
    
Variable (string) back_page
    Attributes
        ID            : 4
        Scope         : local
        Text          : home
        Max. Text Size: 15
    
Variable (string) code_format
    Attributes
        ID            : 29
        Scope         : local
        Text          : 
        Max. Text Size: 15
    
Variable (string) entity
    Attributes
        ID            : 30
        Scope         : local
        Text          : 
        Max. Text Size: 100
    
Variable (string) code_arm_req
    Attributes
        ID            : 31
        Scope         : local
        Text          : 
        Max. Text Size: 1
    
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                 : 2
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_home_text
    Attributes
        ID                 : 6
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Home
        Max. Text Size     : 22
    
Text bt_away_text
    Attributes
        ID                 : 8
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Away
        Max. Text Size     : 22
    
Text bt_night_text
    Attributes
        ID                 : 10
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Night
        Max. Text Size     : 22
    
Text bt_vacat_text
    Attributes
        ID                 : 12
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Vacation
        Max. Text Size     : 22
    
Text bt_bypass_text
    Attributes
        ID                 : 14
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Bypass
        Max. Text Size     : 22
    
Text bt_disarm_text
    Attributes
        ID                 : 16
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : Disarm
        Max. Text Size     : 22
    
Text bt_home_icon
    Attributes
        ID                 : 17
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_away_icon
    Attributes
        ID                 : 18
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_night_icon
    Attributes
        ID                 : 19
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_vacat_icon
    Attributes
        ID                 : 20
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_bypass_icon
    Attributes
        ID                 : 21
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Text bt_disarm_icon
    Attributes
        ID                 : 22
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Associated Keyboard: none
        Text               : 
        Max. Text Size     : 10
    
Picture bt_home_pic
    Attributes
        ID               : 5
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Picture bt_away_pic
    Attributes
        ID               : 7
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Picture bt_night_pic
    Attributes
        ID               : 9
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Picture bt_vacat_pic
    Attributes
        ID               : 11
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Picture bt_bypass_pic
    Attributes
        ID               : 13
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Picture bt_disarm_pic
    Attributes
        ID               : 15
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
Button button_back
    Attributes
        ID               : 32
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
        State            : unpressed
        Text             : 
        Max. Text Size   : 3
    
    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               : 23
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_home_pic.pic=44
            bt_home_text.bco=65024
            bt_home_text.pco=0
            bt_home_icon.bco=65024
            bt_home_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Hotspot bt_away
    Attributes
        ID               : 24
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_away_pic.pic=44
            bt_away_text.bco=65024
            bt_away_text.pco=0
            bt_away_icon.bco=65024
            bt_away_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Hotspot bt_night
    Attributes
        ID               : 25
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_night_pic.pic=44
            bt_night_text.bco=65024
            bt_night_text.pco=0
            bt_night_icon.bco=65024
            bt_night_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Hotspot bt_vacat
    Attributes
        ID               : 26
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_vacat_pic.pic=44
            bt_vacat_text.bco=65024
            bt_vacat_text.pco=0
            bt_vacat_icon.bco=65024
            bt_vacat_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Hotspot bt_bypass
    Attributes
        ID               : 27
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_bypass_pic.pic=44
            bt_bypass_text.bco=65024
            bt_bypass_text.pco=0
            bt_bypass_icon.bco=65024
            bt_bypass_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Hotspot bt_disarm
    Attributes
        ID               : 28
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
    
    Events
        Touch Press Event
            bt_disarm_pic.pic=44
            bt_disarm_text.bco=65024
            bt_disarm_text.pco=0
            bt_disarm_icon.bco=65024
            bt_disarm_icon.pco=0
        
        Touch Release Event
            lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
            printh 92
            prints "localevent",0
            printh 00
            prints lastclick.txt,0
            printh 00
            printh FF FF FF
        
Timer wakeup_timer
    Attributes
        ID         : 33
        Scope      : local
        Period (ms): 100
        Enabled    : yes
    
    Events
        Timer Event
            if(dim<brightness)
            {
                dimdelta=brightness-dim
                dimdelta/=10
                if(dimdelta<1)
                {
                    dimdelta=1
                }
                dim+=dimdelta
            }else
            {
                wakeup_timer.en=0
            }
        
