Results 1 to 8 of 8

Thread: Action on multiple events

  1. #1
    Join Date
    Dec 2014
    Posts
    14

    Default Action on multiple events

    I would like to trigger an action when two specific events arrive. My remote sends favorite channel events in pairs.

    I have searched but only found a reference to BuildString from a long time ago. I tried it in Girder 6 but I get an error "BuildString.lua:45: attempt to index field 'Publisher' (a nil value)"

    If there a more current way to do this with version 6?

    Thanks.

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    Add a macro event to that action, then add the required events to that macro. Does that make sense?
    Ron
    No support through PM

  3. #3
    Join Date
    Dec 2014
    Posts
    14

    Default

    Thanks Ron, it seems to work fine with the macro event. I had actually tried that but had another issue which caused a glitch. All good now.

    While on this topic. Is there a way to adjust the timeout (if there is one) between events which trigger the marco event? In other words will the macro event trigger when for example two events are defined and there is say a 10 second time gap between them? Or is there a timeout from the time one of the two events is detected?

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    There is a timeout yes (5000 ms). It's currently not exposed to the UI, I will add that. If you need to change the value you could go in to the GML and change the "MultiEventTimeOut" parameter.
    Ron
    No support through PM

  5. #5
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    findControl is used a few times in the plugins included with Girder. You can look at the example, globalcache, telldus,... etc.
    Ron
    No support through PM

  6. #6
    Join Date
    Dec 2014
    Posts
    14

    Default

    Thanks Ron. 5000 is too long for my case and I will get false triggers due to residual past events. I use the favorite channel feature to do random stuff on my Harmony and it works by sending 2 digit numbers. If I press buttons a few seconds apart (which happens) I get random stuff happening. I suspect this is because some previous digits are still present (5000 ms timeout).

    Sorry but one more question. I am new to Girder and am not quite clear on how to change MultiEventTimeOut. Can I presume this is a global parameter and I can simply set it in my gml when I initialize?

    Thanks,
    Bill

  7. #7
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    MultiEventTimeOut (in milliseconds) is a parameters on the MultiEvent tag in the GML file. You can find your GML files in <APPDATA>\Local\Promixis\Girder 6\

    here is a snippet from a GML of mine.

    Code:
       <Command Name="Event Router Action" Identifier="2">
        <EventString IrStr=".*" Name="Match all PIR-1 and PIR-4 events" Invert="0" UseRegExp="1" Device="123" Identifier="3" KeyMod="0" AntiRepeat="0"/>
        <MultiEvent Name="New Macro Event" Identifier="4" MultiEventTimeOut="5000"/>
        <ActionType>4</ActionType>
        <ActionSubType>34</ActionSubType>
    edit: I'll try to have this exposed in the UI for the next release.
    Last edited by Ron; January 20th, 2015 at 03:34 PM.
    Ron
    No support through PM

  8. #8
    Join Date
    Dec 2014
    Posts
    14

    Default

    Perfect tank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •