In-built System IO : Security Armed Level Name

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Josh, Jan 16, 2008.

  1. Josh

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    If the system is armed *from* the C-Touch, it would be using the "Arm System" command, and it should be shown in the log.

    If the system is armed from the system's own keypad, this is independent of C-Bus, so (probably) the first thing C-Bus knows about it is when it sees the "System Armed" message. I suspect this how the logs presented have been generated.

    Unfortunately this is not the way the Security Application is defined, although I can see how it would be a reasonable assumption to make.

    The arm levels defined for the "Arm System" (which is a request), and the levels defined for the "System Armed" (which is a notification) are different.

    The "Arm System" message defines the requested levels as you describe, but the levels defined for the "System Armed" message are :

    $00 = disarmed
    $01 = fully armed (typically used for ?away? modes)
    $02 = partially armed (typically used for ?home? modes)
    (Optional) $03 ? $7F = other arm sub-types, manufacturers discretion
    $80 ? $FF = reserved

    The reason for this is that different panel manufacturers support partial arming in vastly different ways. What would work for one panel will be wrong for another.

    For better or for worse, the value used by PICED etc for the "Name" comes from the arm level in the "Arm System" command. Perhaps this needs to be changed to faithfully report the arm level reported in the "System Armed" command (note however that the Name would correspond to the arm levels defined for the "System Armed" command, not the ones defined in the "Arm System" command as you are expecting...ie you would just get something like "Disarmed", "Armed", "Armed (Partial)", and "Armed (Special)".

    Nick
     
    NickD, Feb 17, 2010
    #21
  2. Josh

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    290
    Likes Received:
    1
    Location:
    South Africa
    One final comment from my side. From the helpfile the following is true:

    Variable Name: Security Armed Level

    Usage:
    0 = disarmed
    1 = "away mode"
    2 = "night mode"
    3 = "day mode"
    4 = "vacation mode"
    255 = "highest mode"

    Type: Integer
    Settable: No

    I assume everyone who posted on this thread assumed that this variable will indicate the Arm Level of the security panel. It would have been great if it worked liked that but it will probably be something more generic like Nick suggested.

    Granted, everyone needs to be kept 'happy' BUT have any of the other security guys posted something similar? I doubt if they can determine their Arm level as well, so like us, they probably us a permanent workaround as well. Saying that, doesn't it suggest something that everyone is using a workaround to determine their panel Arm Level?

    Even CyTech changed their firmware, as a Beta, to try and get this working correctly.

    Just some food for thought...
     
    Ingo, Feb 17, 2010
    #22
  3. Josh

    Josh

    Joined:
    Aug 25, 2004
    Messages:
    242
    Likes Received:
    0
    Location:
    Pretoria, South Africa
    I agree with you in full Ingo.
     
    Josh, Feb 17, 2010
    #23
  4. Josh

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    Update

    With the recent update to PICED 4.8.2 and the corresponding updates to the various C-Touch firmware, we have changed the behaviour of some of the Security-related System IO.

    The "Security Armed Level" now faithfully reports the level code which is sent by the panel in the "System Armed" command, where previously it relied on the level from the "Arm System" command.

    The "Security Armed Level Name" now reports the names as defined in the Security Application documentation for the "System Armed" command :

    0 = Disarmed
    1 = Fully Armed
    2 = Partially Armed
    Other = Armed Custom

    Codes 0x03 - 0x7F are defined as manufacturer defined. The comfort panel seems to use some of these.

    If you want more information about the mode your panel has armed in, and these new inbuilt names for the armed level don't suit you. You can still "roll your own" names with a little logic code..

    If for example you know that your panel is using the code 0x03 in the System Armed message as "Day Mode", then you can create your own string system IO variable to display "Day Mode" when the "Security Armed Level" is equal to 3.

    The following should give you the general idea....

    Code:
    once (GetBoolIBSystemIO("Security Armed State") = true) then
      begin
        temp := (GetIntIBSystemIO("Security Armed Level");
        if (temp = 3) 
          begin
            SetStringSystemIO("Panel Armed Level", 'Day Mode');
          end
        else if (temp = 4) 
          begin
            SetStringSystemIO("Panel Armed Level", 'Night Mode');
          end
        else if (temp = 5) 
          begin
            SetStringSystemIO("Panel Armed Level", 'Confused');
          end
      end;
    
    once (GetBoolIBSystemIO("Security Armed State") = false) then
      SetStringSystemIO("Panel Armed Level", 'Disarmed');
    
    Hope this alleviates some of the confusion and lets you achieve your desired result.

    Nick
     
    Last edited by a moderator: Mar 31, 2010
    NickD, Mar 31, 2010
    #24
  5. Josh

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    290
    Likes Received:
    1
    Location:
    South Africa
    Just last night I upgraded to PICED 4.8.2 and saw that it now gives me the actual level of the security panel. I wasn't sure if this was a fluke but now I know I can trust and use it as per NickD's suggestion.

    Thanks guys.

    Ingo

    PS. Here is my complete code for Comfort/Minder Pro systems. I created an Int called ComfortStatus and a UserSystemIO variable (Security Armed Level Name) to write to.

    Just remember the 'once' statement will only work once there is a change so arm/disarm the system once and from there it will work fine.
     
    Last edited by a moderator: May 30, 2011
    Ingo, Mar 31, 2010
    #25
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.