No announcement yet.

repeat event 10 times

  • Filter
  • Time
  • Show
Clear All
new posts

    repeat event 10 times

    what would be the easiest way to have an event (triggered by a sensor) repeat about 10 times every 30 seconds and then stop and reset itself?


    What is the nature of the event you want to repeat? Can you describe it in more detail?
    I'm not clear about what you mean by "10 times every 30 seconds and then stop and reset itself". Do you mean that something will happen 10 times, then after 30 seconds there will be 10 more, repeating every 30 seconds? For how long?
    Or do you mean that it will repeat every 30 seconds for a total of 10 times over 5 minutes?

    If the latter, then one option would be to create a virtual device: VD1.
    To start your repeat pattern, you'd run an event with two actions. One turns the device on. The other turns it off after a delay of 5 minutes.
    Your repeat event would have a repeating trigger, every 30 seconds and a condition that VD1 is on.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti


      Another way to do it (assuming the second case of every 30 seconds, 10 times):


      If <whatever triggers the sequence to start>
      Set counter X to 0
      Run EventB


      If Manually Triggered
      Do whatever needs to be done
      Wait 30 seconds
      If Event Conditions are true, run EventC


      If Manually Triggered
      And if Counter X is less than 10
      Increment counter X
      Run event EventB


        Event #1
        - Sensor X is your input
        - for the action, choose 'Control a Timer', then choose 'Create/Edit Timers' and create a timer named MotionX Timer. Then select action 'Restart Timer'.

        IF Sensor X changes and become Motion
        THEN Start Timer MotionX Timer

        Event #2
        - for the trigger (IF), choose 'A recurring trigger happens', then choose 'The event will automatically trigger every...' and set the time to 30s
        - for the condition (AND IF), choose 'A Timers Value is...' then choose 'A Timer's Value is less than...'. Select MotionX Timer and set the time to 5m, 0s

        IF The event will automatically trigger every 30s
        AND IF MotionX Timer's value is less than 5m, 0s
        THEN (do what you want to do)