Announcement

Collapse
No announcement yet.

Pulling data from Events

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

  • Pulling data from Events

    How do you use the method 'strEventData' ?

    I need to run through the event names, find the correct events, and find the triggers for those events, but have no idea how to use the 'structure' key word.

    Thanks
    Don

  • #2
    Depending on what you need to do with the results, Jon00's 'Event List Viewer' may get you what you are looking for. Have you considered it?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.500

    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
      The issue is that I want to use the trigger data in a script to show times on a calendar that I'm trying to create.
      Don

      Comment


      • #4
        Originally posted by donstephens View Post
        The issue is that I want to use the trigger data in a script to show times on a calendar that I'm trying to create.
        The HS3 functions unfortunately expose very little in the way of event data, considerably less than HS2 did where it was almost as powerful as the device class.

        strEventData is a structure that contains the properties like the following;

        Code:
        Public Structure strEventData
            Public Event_Ref As Integer				' The event reference ID number.
            Public Event_Name As String				' The event name
            Public Event_Type As String				' The event type, if used.
            Public GroupID As Integer					' The event group reference ID number.
            Public GroupName As String				' The event group name.
            Public UserNote As String					' The user's note contents.
            Public Last_Triggered As Date				' The time the event was last triggered or 
            '									  Date.MinValue if it has not been triggerd before.
            Public Retrigger_Delay As TimeSpan			' If the event is prevented from triggering within a given amount of time,
            '									  this timespan will contain that time period.
            Public Flag_Enabled As Boolean				' True if the event is enabled for automatic triggering.
            Public Flag_Delete_After_Trigger As Boolean		' True if the event is deleted from the system after it triggers.
            Public Flag_Do_Not_Log As Boolean			' True if the event is set to not log information when it is triggered.
            Public Flag_Delayed_Event As Boolean			' True if the event was created as a result of a delayed action or trigger.
            Public Flag_Include_in_Powerfail As Boolean		' True if the event is to be included in powerfailure recovery.
            Public Flag_Security As Boolean				' True if the event trigger(s) can be modified by a random amount 
            '									  when the security feature is enabled.
            Public Flag_Priority_Event As Boolean			' True if the event is set to not have its execution queued.
            Public Action_Count						' The number of actions in this event.
            Public Actions As String()					' The list (array) of actions in action_type : action_name format.
            Public Trigger_Count As Integer				' The total number of triggers and conditions in this event.
            Public Trigger_Group_Count As Integer			' The number of trigger groups (If / Or If) in the event.
            Public Trigger_Groups As strEventTriggerGroupData()	' The list (array of structure) of triggers in each trigger group.
        End Structure
        As you can see only the last three relate to the triggers that an event may have, so all available in this structure is for you to find how many triggers your event has and how many in the if/or if groups. You do get the Trigger_Groups return (of type strEventTriggerGroupData) however that is of scarce use as all you return is an array of names of the triggers, not the actual trigger data.

        Bottom line is you can't unless Jon00's tool exposes some scripting calls or puts the data into devices.
        My Plugins:

        Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
        Yeelight 3P | Nanoleaf 3P

        Comment


        • #5
          Thanks guys.
          Don

          Comment


          • #6
            I expect you could use my Event Viewer & Documenter export to CSV & TXT function (which you can run via a script call). You could then parse one of these files (suggest CSV) to obtain the data you want.
            Jon

            Comment


            • #7
              I'm headed in that direction. I use the Event and Device viewer a lot.

              Originally posted by jon00 View Post
              I expect you could use my Event Viewer & Documenter export to CSV & TXT function (which you can run via a script call). You could then parse one of these files (suggest CSV) to obtain the data you want.
              Don

              Comment

              Working...
              X