How to write custom security logic

Discussion in 'C-Bus Wiser 1 Controller' started by benc43, Mar 5, 2013.

  1. benc43

    benc43

    Joined:
    Mar 5, 2013
    Messages:
    4
    Likes Received:
    0
    Location:
    Malaysia
    Hi All

    Sorry, new to all these CBus and MinderPro, but trying to write logic
    to intercept security messages and control lightings from my Wiser.

    Very appreciate it if someone can point me to some documentation
    on CBus Security Application, ie., what are the messages, etc.

    Just acquired an new Wiser and MinderPro alarm. The installer just
    install the basic and now up to me to make my investment worth

    Thanks
     
    benc43, Mar 5, 2013
    #1
  2. benc43

    kjayakumar

    Joined:
    Oct 27, 2008
    Messages:
    448
    Likes Received:
    0
    The C-Bus security application is published here:
    http://training.clipsal.com/downloads/OpenCBus/Security Application.pdf
    fyi, it was the first link in google when I searched for "C-Bus security application".

    That said, if you want to interpret C-Bus security messages in Wiser, you should use PICED Logic. I would suggest you run PICED, then click on Help->Logic. Then search for security. You'll see the various in-built System IO variables that enable you to see and control security state.
     
    kjayakumar, Mar 6, 2013
    #2
  3. benc43

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Here's a simple bit of wiser logic to get you going. When the system is armed it runs the All Off scene which turns all the lights off. (The scene is defined using the Scene Editor in PICED). When the system is disarmed it turns on the Entry light if its dark outside.

    One thing to remember is the security application does not send zone status information if the system is not armed (i.e. you can't use it to turn lights on and off as you walk around the house) as this could flood the CBus network. I'm not familiar with the MiderPro, but it may be possible to program it to send out lighting messages on zone status changes.

    Code:
    once getBoolIBSystemIO("Security Armed State") then
    begin
      SetScene("All Off");
    end;
      
    once getBoolIBSystemIO("Security Armed State") = false then
    begin
      if (time < sunrise) or (time > sunset) then
        SetLightingLevel("Entry", 100%, "4s");
    
    end;
     
    Ashley, Mar 6, 2013
    #3
  4. benc43

    slychiu

    Joined:
    Oct 26, 2004
    Messages:
    34
    Likes Received:
    0
    Location:
    Singapore
    slychiu, Mar 6, 2013
    #4
  5. benc43

    benc43

    Joined:
    Mar 5, 2013
    Messages:
    4
    Likes Received:
    0
    Location:
    Malaysia
    Thanks,

    Got a simply logic going. seems to be working fine.

    the in-builtIO security functions seem to simply read the messages from
    the bus and not care which security application, maybe that is why
    there can be only one on the bus ?!

    will try more complicated logic... good stuffs this cbus thingy
     
    benc43, Mar 6, 2013
    #5
  6. benc43

    benc43

    Joined:
    Mar 5, 2013
    Messages:
    4
    Likes Received:
    0
    Location:
    Malaysia
    But the security app does send out zone status even when the alarm is not
    armed. I notice this from the Toolkit log (realtime)
     
    benc43, Mar 6, 2013
    #6
  7. benc43

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    It looks like I should have said MOST security systems don't send zone status messages when the system is disarmed :) It appears the MiderPro does.
     
    Ashley, Mar 6, 2013
    #7
  8. benc43

    kjayakumar

    Joined:
    Oct 27, 2008
    Messages:
    448
    Likes Received:
    0
    Glad you like it. :)
     
    kjayakumar, Mar 7, 2013
    #8
  9. benc43

    slychiu

    Joined:
    Oct 26, 2004
    Messages:
    34
    Likes Received:
    0
    Location:
    Singapore

    In MinderPro you can also use Zone Responses to send commands to several Cbus group addresses when a zone is activated. You can also use logic eg When security is armed AND it is after 9 PM as conditions to determine if the lights should be switched on, and also use timers to switch them off after some tiime.

    This is an example of how MinderPro adds value to Cbus
     
    slychiu, Mar 7, 2013
    #9
  10. benc43

    benc43

    Joined:
    Mar 5, 2013
    Messages:
    4
    Likes Received:
    0
    Location:
    Malaysia
    ya, unfortunately, in MinderPro you need to buy $$ another UCM, eg., serial,
    to up/download your config file. Wiser already comes with a CNI, thus, using
    PICED you can do most logic. Thats why I decided to use the Wiser as the
    boss. Unfortunately, you cannot command the alarm panel to do things using
    logic (I wonder how the widget able to arm/disarm the panel mmm...)

    BTW, anyone knows how to input data, eg., via the iPad, into the logic
    program, eg., setting a flag or setting the sunset/sunrise time, etc.
     
    benc43, Mar 7, 2013
    #10
  11. benc43

    kjayakumar

    Joined:
    Oct 27, 2008
    Messages:
    448
    Likes Received:
    0
    I haven't checked if it is supported on Wiser. But you may want to look at something like ExecuteSpecialFunction("Security Keypad", key). You can use the systemio widgets in Wiser to take input from the UI and use the value in logic.
     
    kjayakumar, Mar 7, 2013
    #11
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.