Event script for roller doors

Discussion in 'C-Bus Automation Controllers' started by kojobomb, Jan 13, 2022.

  1. kojobomb

    kojobomb

    Joined:
    May 27, 2019
    Messages:
    71
    Likes Received:
    6
    Location:
    Possum Brush
    Im trying to place a script for roller door control.
    I have an ELV output unit connected to 3 x roller door controllers 1 output to each "Up" and "Down".
    I would like to setup the ELV outputs as "momentary" like a "bell press".
    I have been trying to write a script to return the level back to zero after "3 seconds".
    The script I've written has saved with no "errors" but no action happens.
     

    Attached Files:

    kojobomb, Jan 13, 2022
    #1
  2. kojobomb

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    248
    Likes Received:
    31
    Location:
    New Zealand
    I wouldn’t advise to use os.sleep() it is non blocking
    So you can end up with several instances of the same script running in parallel.

    what is the function dosomething() doing?

    what are you trying to achieve? Eg do you need a button on a vis page to operate each door?
    Or do you need cbus input device to operate it?
     
    Pie Boy, Jan 13, 2022
    #2
  3. kojobomb

    kojobomb

    Joined:
    May 27, 2019
    Messages:
    71
    Likes Received:
    6
    Location:
    Possum Brush
    I would like all 6 outputs from the ELV once change of state reaches level 255 after delay of 2-3s level returns back to zero.
    Im using a trigger group in the shac visualisation to provide a "down" level 0, "stop" level 2 or 1%, and "up" level 255 to active the ELV outputs but they need to be in a "bell press or momentary" output not a latched output.
    Was trying to script the ELV output group to return to level"0" after a couple of seconds.
     
    kojobomb, Jan 13, 2022
    #3
  4. kojobomb

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    248
    Likes Received:
    31
    Location:
    New Zealand
    Ok do you have 2 relay Chan for each roller door, one for up, one for down, when they are off they are roller door is stopped?

    you could make vis element to be bell press, although this way user would need to hold button down for the duration of up/down cycle.

    do you also need cbus input device to operate the same rolller doors
     
    Pie Boy, Jan 13, 2022
    #4
  5. kojobomb

    kojobomb

    Joined:
    May 27, 2019
    Messages:
    71
    Likes Received:
    6
    Location:
    Possum Brush
    Yes 2 relay channels per door.
    Momentary latching of 1st channel will send the door closed
    momentary latching of 2nd channel will send the door open
    momentary latching of both channels will stop movement.

    In shac visualization trigger group has 3 x levels open/stop/close all working from 2 relay channels (instead of 3 channels).

    I've managed to complete a working script that fulfills the need to convert relay output from latching to momentary.

    value=GetCBusLevel('0', '56', '30')


    if (value==255) then sleep(2.5) SetCBusLevel(0, 56, 30, 0, 0)
    end


    now the problem that has arisen is that when script returns cbus level back to zero the active Icon in visualisation returns to idol state due to "indicator kill" returned to trigger group.
    Is there a way to work around this so that the "Active Icon" will stay active to indicate last movement direction of door?
     
    kojobomb, Jan 13, 2022
    #5
  6. kojobomb

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,521
    Likes Received:
    173
    Location:
    Adelaide, Australia
    The PulseCbusLevel command will do all the work for you :)

    Just create a new cbus group that you will set to ON to open then door and OFF to close the door.
    In an event script, when the value is 255, pulse the open relay, and when it's zero, pulse the close relay.
     
    Ashley, Jan 13, 2022
    #6
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.