away scene

Discussion in 'General Discussion' started by nagrom, Mar 22, 2011.

  1. nagrom

    nagrom

    Joined:
    Mar 14, 2011
    Messages:
    5
    Likes Received:
    0
    Location:
    sydney aust
    hey everyone, trying to create a 'away' scene on a current project, have 2 x monochrome mkII t/screens onsite, would the best approach be to create a schedule, or is there another way ? is there any literature in the forum someone is aware of detailing this ? cheers in advance
     
    nagrom, Mar 22, 2011
    #1
  2. nagrom

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    That's a pretty ambiguous request. You're going to need to provide more info before we can help you achieve what you or your client is looking for.

    For example, how is this "Away" scene set? Is it by a button press (Scene set)? Does it need to be settable from multiple devices (Scene Triggers)? Is it at a time of day (schedule)? Is it when certain conditions are true (logic)? Does it need to be editable by the end user (must be stored in Touchscreen)? etc

    Regarding literature, the PICED help file is very extensive, there's lots of useful threads on the forum (use the search function), there's Clipsal technical support if you need talking through it and, if you explain your requirements clearly, plenty of helpful people here on the forum.
     
    Last edited by a moderator: Mar 22, 2011
    Newman, Mar 22, 2011
    #2
  3. nagrom

    nagrom

    Joined:
    Mar 14, 2011
    Messages:
    5
    Likes Received:
    0
    Location:
    sydney aust
    hey newman, thanks for the reply mate, can see your point

    client has requested the 'away' scene simulate random activity typical to that of an occupied home when they are away on holidays, ie turn nominated light groups OFF/ON in various areas of the home simulating human activity ... etc. this would need to cycle for the amount of days the client is away/home unoccupied in the evening predominantly. i was thinking the way to go would be create a scene including all nominated load groups and cycle it through a schedule ? however was stumped in areas such as the hall/corridor where lights would need to turn on say every 20-30mins for a period of 5mins from the hours of 6pm - 10pm.

    triggering the scene, havent given this any thought yet, could possibly turn it on via cbus button on the BW MKII in my 'scenes' page or trigger remotely from another input unit ? need some assitance with the remote trigger if thats the case.

    the scene could again be physically turned OFF on their arrival ?
     
    nagrom, Mar 23, 2011
    #3
  4. nagrom

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The simplest way to do this is just to create a bunch of schedules that pulse groups on for different durations of time starting at a few different times. If you give all these Schedules the same Enable/Disable group you can then enable/disable all these schedules from a single C-Bus button in the touchscreen or from any other C-Bus devices. The easiest is probably a button by the front door.

    If you want to add some random-ness to the timing then you will need to use logic, not schedules. You would then enable/disable the logic modules with the Enable/Disable group instead of the schedules.
     
    Newman, Mar 23, 2011
    #4
  5. nagrom

    joshl

    Joined:
    May 25, 2008
    Messages:
    68
    Likes Received:
    0
    or have it come on via the alarm system arming (if thats a possibility), enables/disable the groups
     
    joshl, Mar 24, 2011
    #5
  6. nagrom

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    Here's the code I use in my own place..

    The Homesafe panel is configured to send Trigger Control messages at the end of the exit delay, when the system is disarmed, and when various zones become unsealed..

    The variables used here need to be declared in the "Global Variables" section.

    This is the code in "Main" to enable the "SecurityArmed" module :
    Code:
    once GetTriggerLevel("TGGeneral") = 13 {"Alarm End Exit Delay"} then
    begin
      {Initialise random times and groups}
       RandomTime1 := random ("0:30:00") + "0:10:00";
       RandomTime1a := random ("0:30:00") + "0:10:00";
       RandomTime2 := random ("0:30:00") + "0:10:00";
       RandomTime2a := random ("0:30:00") + "0:10:00";
       RandomTime3 := random ("0:30:00") + "0:10:00";
       RandomGroup1 := random (10);
       RandomGroup2 := random (10);
    
      {Turn the inside lights off}
      SetTriggerLevel("TGGeneral", "All Off");
      
    
      {Enable Security System Armed module}
      EnableModule("SecurityArmed");
    
      {Reset trigger}
      SetTriggerLevel("TGGeneral", 0);
    end;
    
    And this is the "SecurityArmed" module code :

    Code:
    {Module "SecurityArmed" - Performs random lighting actions while security system is armed to simulate occupied premises.}
    
    {Entry via front door - turn on the Entrance light}
    once GetTriggerLevel("TGGeneral") = 17 {"Front Door Open"} then
      begin
        PulseCBusLevel("WIRED", "Lighting", "Entrance", 75%, "0s", "0:05:00", 0%);
      end;
    
    {Entry via back door - turn on the family room light, but only if it's dark}
    once GetTriggerLevel("TGGeneral") = 18 {"Back Door Open"} then
      begin
        if ((Time > (sunset - "1:00:00")) or (Time < (sunrise + "1:00:00"))) then
          begin
            SetLightingLevel("Family", 100%, "0s");
          end;
      end;
    
    {Trigger Welcome Home scene and disable module when alarm is disarmed and it's dark}
    if GetTriggerLevel("TGGeneral") = 11 {"Alarm Disarmed"} then
      begin
        if ((Time > (sunset - "1:00:00")) or (Time < (sunrise + "1:00:00"))) then
          begin
            SetTriggerLevel("TGGeneral", "Welcome Home Dark");
          end;
        SetTriggerLevel("TGGeneral", "Welcome Home");
        DisableModule("SecurityArmed");
      end;
    
    {Recalculate random times and groups at 11pm each day}
    
    if (Time = "23:00:00") then
    begin
      RandomTime1 := random ("0:10:00") + "0:05:00";
      RandomTime1a := random ("0:10:00") + "0:05:00";
      RandomTime2 := random ("0:10:00") + "0:05:00";
      RandomTime2a := random ("0:10:00") + "0:05:00";
      RandomTime3 := random ("0:10:00") + "0:05:00";
      RandomGroup1 := random (10);
      RandomGroup2 := random (10);
    end;
    
    case RandomGroup1 of
      0 : Result1 := 02; {"Lounge"}
      1 : Result1 := 06; {"Family"}
      2 : Result1 := 08; {"Retreat"}
      3 : Result1 := 13; {"Bed1"}
      4 : Result1 := 26; {"Bed2"}
      5 : Result1 := 28; {"Bed3"}
      6 : Result1 := 00; {"Study"}
      7 : Result1 := 30; {"Laundry"}
      8 : Result1 := 17; {"Sink Bench"}
      9 : Result1 := 04; {"Dining"}
    end;
    
    case RandomGroup2 of
      0 : Result2 := 02; {"Lounge"}
      1 : Result2 := 06; {"Family"}
      2 : Result2 := 08; {"Retreat"}
      3 : Result2 := 13; {"Bed1"}
      4 : Result2 := 26; {"Bed2"}
      5 : Result2 := 28; {"Bed3"}
      6 : Result2 := 00; {"Study"}
      7 : Result2 := 30; {"Laundry"}
      8 : Result2 := 17; {"Sink Bench"}
      9 : Result2 := 04; {"Dining"}
    end;
    
    {Random light event #1}
    once (Time = "17:00:00" + RandomTime1) then
    begin
      PulseCBusLevel("WIRED", "Lighting", Result1, 100%, "0s", RandomTime1a, 0%);
    end;
    
    {Random light event #2}
    once (Time = "19:30:00" + RandomTime2) then
    begin
      PulseCBusLevel("WIRED", "Lighting", Result2, 100%, "0s", RandomTime2a, 0%);
    end;
    
    {Turn everything off at a random time after 10:30}
    once (Time = "22:30:00" + RandomTime3) then
    begin
      SetTriggerLevel("TGGeneral", "All Off");
    end;
    
    {If an outdoor PIR is triggered when the security system is armed, pulse an indoor group that's
     visible from the triggered area to simulate a reaction.}
    once (GetLightingState("NE PIR") = ON) then
    begin
      Delay(5);
      PulseCBusLevel("WIRED", "Lighting", "Dining", 100%, "0s", "00:11:23", 0%);
      Delay(5);
      PulseCBusLevel("WIRED", "Lighting", "Bed3", 100%, "0s", "00:06:54", 0%);
    end;
    
    once (GetLightingState("NW PIR") = ON) then
    begin
      Delay(5);
      PulseCBusLevel("WIRED", "Lighting", "Study", 100%, "0s", "00:17:21", 0%);
      Delay(10);
      PulseCBusLevel("WIRED", "Lighting", "Staisy's Room", 100%, "0s", "00:04:42", 0%);
    end;
    
    once (GetLightingState("SW PIR") = ON) then
    begin
      Delay(5);
      PulseCBusLevel("WIRED", "Lighting", "Family", 100%, "0s", "00:20:44", 0%);
      Delay(10);
      PulseCBusLevel("WIRED", "Lighting", "Retreat", 100%, "0s", "00:05:12", 0%);
    end;
    
     
    NickD, Mar 24, 2011
    #6
  7. nagrom

    nagrom

    Joined:
    Mar 14, 2011
    Messages:
    5
    Likes Received:
    0
    Location:
    sydney aust
    thanks very much for your assistance guys, ill be doing the logic course next, so will have a better understanding of logic strings you provided.

    bunch of schedules will get me out of trouble for now, thanks again, still surprised how willing you guys are to assist, nice change from some of the 'other' industry pro's, well done guys keep it up
     
    nagrom, Mar 29, 2011
    #7
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.