Announcement

Collapse
No announcement yet.

Run events Sychronously

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run events Sychronously

    I know when homeseer runs an event from another event it does not wait for the called event to finish. I have a situation where I would like the called event to finish without waiting as set amount of time ( I want the event to continue as soon as the called event is finished) . Is there any way to do this

  • #2
    The only general way I can think of to do this is to use a script and the scripting function (hs.TriggerEventAndWait) that will pause the script until the event finishes.

    Is there an easy way to determine that the called event is complete? If so, you might be able to use that.

    Can you explain your events in more detail? That might help.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      I've got the same type of question on serialization/parallelizaton of actions within an event.
      For example, I have three ACTIONS in an event:

      THEN turn on outside door lights
      THEN take a picture from camera and download it to HomeSeer PC (<= this calls another event, which then runs an external script)
      THEN send an email containing the picture

      Does HomeSeer do any parallelization when running the actions in the same event, or will it run them sequentially, one after the other?
      I've had to add waits between the actions above. Otherwise, the picture may not be bright enough or the email tries to attach a picture but the previous event hasn't finished taking the picture. I can add waits, but I need to make the waits extra long to ensure that the 3 actions are done one after the other. I'd prefer not to have waits and just make sure the 3 actions are always called in order.

      Is there a way to ensure sequential calling of actions without having to add waits?

      Comment


      • #4
        Originally posted by randman View Post
        Is there a way to ensure sequential calling of actions without having to add waits?
        HS runs event actions in parallel unless you use the delayed event action option or Wait action. AFAIK there is no way to tell HS explicitly to run event actions in sequence.

        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

        Comment


        • #5
          yeah I ran into this sort of issue recently. Ultimately my band-aid solution was to move the pieces that needed to be run sequentially, from my script, even though they didn't all need to be run from a script. So in your case, I would ditch the fist action (turn on the outside door lights), and have the lights triggered directly via the script that gets run via the second action. That way you can control the serializing...

          Comment


          • #6
            Okay, thanks. Would be nice if there were an event option to enforce sequential behavior... Anyway, I moved the emailing of the picture in the same script that takes the picture, so at least that will always be sequential. I'd rather not have to move turning on the lights to the script as well (makes script less generic), so I'll just put a wait after turning on the lights.

            Comment


            • #7
              If you want it to be generic as in one script for multiple scenarios in your environment, set the devices to be passed into the script by the event. (And pass in any other things that are unique). Then one script can service any number of events.....

              Comment

              Working...
              X