Scene delay to then trigger another scene

Discussion in 'C-Bus Automation Controllers' started by AntDwyer3875, Mar 20, 2020.

  1. AntDwyer3875

    AntDwyer3875

    Joined:
    Jul 14, 2019
    Messages:
    7
    Likes Received:
    0
    I'm new to the NAC5500 and I know this is going to sound a bit foolish but I can't get this to work, any help would be appreciated.

    I am trying to create a "Good Night Scene".
    The objective is to turn on a few lights on low and after an extended period then turn them all off.
    Sounds simple but I can't get it to work correctly.
    I have created 2 scenes i.e. the ON and OFF sense with two triggers one to turn them on and the second which I placed in the first scene to turn them off after a period. Each of the scenes works individually but not when I put the second trigger into the first scene the lights to come on only for a second before going off disregarding the ramp up and then down setting within the scene.

    Should I be doing this some other way using scripting or similar?

    Any directions support or ideas would be appreciated.
     
    AntDwyer3875, Mar 20, 2020
    #1
    1. Advertisements

  2. AntDwyer3875

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,021
    Likes Received:
    80
    Location:
    Adelaide, Australia
    I'm not sure what you are expecting here. If you trigger the second scene from the first scene (I assume you are using the scene trigger here) then as soon as you trigger the first scene it will immediately trigger the second one. That's how scenes work. They just step through each item and send out the appropriate command. The target devices then do the ramping, not the scene. Even if you use a lighting ga as the trigger it will ignore the ramp and just trigger on the value.

    The easiest way is to create an event based script on the trigger group then in the script delay however long you want, then set the second scene. (The trigger group will trigger the first scene for you).
     
    Ashley, Mar 21, 2020
    #2
    1. Advertisements

  3. AntDwyer3875

    SgrAystar

    Joined:
    Oct 4, 2018
    Messages:
    18
    Likes Received:
    2
    When editing a scene, for each component you can choose to 'Ramp Group' or 'Pulse Group'.
    Does 'Pulse Group' do what you want to achieve?
     
    SgrAystar, Mar 22, 2020
    #3
  4. AntDwyer3875

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,021
    Likes Received:
    80
    Location:
    Adelaide, Australia
    Unfortunately the NAC/SHAC does not support pulsing groups. I think you are referring to PICED
     
    Ashley, Mar 22, 2020
    #4
  5. AntDwyer3875

    SgrAystar

    Joined:
    Oct 4, 2018
    Messages:
    18
    Likes Received:
    2
    Yes, I was.
     
    SgrAystar, Mar 22, 2020
    #5
  6. AntDwyer3875

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    51
    Likes Received:
    7
    Location:
    New Zealand
    I have been looking to this, on the NAC/SHAC there doesn't seem to be a way to do a delay() like in Piced

    if you use os.sleep() you can potentially have "multiple instances" of the same event script running
    os.sleep() dose not block the script next time the event runs it just runs the script again in parallel to an already running script.
     
    Pie Boy, Mar 22, 2020
    #6
  7. AntDwyer3875

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,021
    Likes Received:
    80
    Location:
    Adelaide, Australia
    If you don't want this behaviour just interlock it with a global variable.

    Test the var at the start of the script. If it is non zero, just exit.
    Otherwise increment it, execute the script, the set it back to zero at the end.
     
    Ashley, Mar 23, 2020
    #7
  8. AntDwyer3875

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    51
    Likes Received:
    7
    Location:
    New Zealand
    @Ashley Yes it seems this way, although i cant see a way to make a variable global and persistent?
    i will either have to use storage.get()/storage.set() to store the value or use a user parameter as a sort of system io to store the data.
    it would be nice to have a function call to see if a script assigned to an objects event is still running or not...
    for now i will persevere with storing any data i want to be global in a user parameter
     
    Pie Boy, Mar 23, 2020
    #8
    1. Advertisements

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.