Announcement

Collapse
No announcement yet.

Event_Group_Info_All

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

  • madmellow
    replied
    Interesting discovery

    I just put those three lines of code in one of my brain-dead plugins (in the INITIO step )and it works like a charm. I was running it as a remote PI in VS2015.

    Leave a comment:


  • madmellow
    replied
    This is not with TenScripting, and this is the entire script. It is test.vb which is run from a manual-trigger event.

    I noticed a Bugzilla report on this from years ago, tagged as HOLD, which I updated.

    Thanks for looking...you must not sleep much more than I do.

    Leave a comment:


  • mrhappy
    replied
    Originally posted by madmellow View Post
    I've cut-n-paste the code from above (shown below) and am getting an error I've never seen before

    Warning VB.Net script exception(0), re-starting: Object reference not set to an instance of an object.

    The the script appears to restart but never stop (have to restart HS) to make it go away.

    Here's the code

    For Each singleEvent As HomeSeerAPI.strEventData In hs.Event_Info_All
    hs.WriteLog("EventList", "event name : " & singleEvent.Event_Name)
    Next

    Any ideas?
    Is this through TenScripting or some other method, are you able to post your exact script (if there is more) in case it is something else causing the issue.

    Leave a comment:


  • madmellow
    replied
    Getting strange error here

    I've cut-n-paste the code from above (shown below) and am getting an error I've never seen before

    Warning VB.Net script exception(0), re-starting: Object reference not set to an instance of an object.

    The the script appears to restart but never stop (have to restart HS) to make it go away.

    Here's the code

    For Each singleEvent As HomeSeerAPI.strEventData In hs.Event_Info_All
    hs.WriteLog("EventList", "event name : " & singleEvent.Event_Name)
    Next

    Any ideas?

    Leave a comment:


  • Megaman
    replied
    That's a shame, I used the script to sort events by date/time, so I could see the events that were upcoming for any given day.
    Arrgghhhhh....

    Leave a comment:


  • mrhappy
    replied
    I don't think you can just looking at the documentation - does not appear to be exposed in the structure http://www.homeseer.com/support/homeseer/HS3/HS3Help/streventdata.htm

    Leave a comment:


  • Megaman
    replied
    I'd like to be able to get the event trigger days/time, is this possible?
    I've done this in a HS2 script, now trying to convert to to HS3.

    Thanks

    Leave a comment:


  • mrhappy
    replied
    Originally posted by mwaite View Post
    Yeah I get that. What I don't get is why it isn't available? HS is loading a web page to present the Events, so why not expose this? In HS2 there were methods of documenting your Events. You could even print-out the full Events web page. In HS3 there is nothing. No way to have a report/view of all events and their properties/elements. With almost 300 events, many of them fairly lengthy, I just want a documented backup that I can read. If an event gets accidentally deleted, must I restore an archive database to view it? Seems short-sighted in my opinion. (Just ranting - )
    Don't get me wrong I completely agree and I believe it was actively discussed somewhere about this. On the other hand I know why they have designed it this way and can see where there are benefits compared to the much easier methods in HS2. I guess you would end up calling into each plugin in turn (on an account of it not being stored in the DB) and providing the trigger/sub trigger number to the TriggerFormatUI / ActionFormatUI to retrieve the string that HS displays in the events page. They are public functions and depending on how the plugin is written you may be able to query these yourself albeit I don't know whether you can get the TANumber/SubTANumber from the event scripting functions to put into those functions though.

    Leave a comment:


  • mwaite
    replied
    Originally posted by mrhappy View Post
    if you mean the device values that may be used as the trigger then no you can't get them, triggers/actions do not even have to be stored in the HS DB any more and if they are they can be complex object types you can't decode.
    Yeah I get that. What I don't get is why it isn't available? HS is loading a web page to present the Events, so why not expose this? In HS2 there were methods of documenting your Events. You could even print-out the full Events web page. In HS3 there is nothing. No way to have a report/view of all events and their properties/elements. With almost 300 events, many of them fairly lengthy, I just want a documented backup that I can read. If an event gets accidentally deleted, must I restore an archive database to view it? Seems short-sighted in my opinion. (Just ranting - )

    Leave a comment:


  • mrhappy
    replied
    Originally posted by mwaite View Post
    I just completed a script to report all events. I was really disappointed to see the function hs.Event_Info_All does not expose the actual values in the structure. Pretty much makes the report useless. Does anyone know if this is possible?

    I've attached the script. Remove the .txt from the filename. Configure the first four lines, run it in an event.

    (and fyi, I used Tenscripting to create/test.)
    if you mean the device values that may be used as the trigger then no you can't get them, triggers/actions do not even have to be stored in the HS DB any more and if they are they can be complex object types you can't decode.

    Leave a comment:


  • Megaman
    replied
    Got it working

    Code:
            For Each singleEvent As HomeSeerAPI.strEventData In hs.Event_Info_All
                hs.WriteLog("EventList", "event name : " & singleEvent.Event_Name)
            Next

    Leave a comment:


  • mwaite
    replied
    I just completed a script to report all events. I was really disappointed to see the function hs.Event_Info_All does not expose the actual values in the structure. Pretty much makes the report useless. Does anyone know if this is possible?

    I've attached the script. Remove the .txt from the filename. Configure the first four lines, run it in an event.

    (and fyi, I used Tenscripting to create/test.)
    Attached Files

    Leave a comment:


  • mrhappy
    replied
    I'm not sure on that one, could be a Tenscripting issue because it works run alone if you check by running it normally. I don't use Tenscripting to know though...

    Leave a comment:


  • Megaman
    replied
    Hi @mrhappy,

    Getting an error with the below

    Code:
    Dim ListOfEvents() As strEventGroupData = hs.Event_Info_All
    Error:
    Error 5 Value of type '1-dimensional array of HomeSeerAPI.strEventData' cannot be converted to '1-dimensional array of tenScripting3.ListUpcomingEvents.strEventGroupData' because 'HomeSeerAPI.strEventData' is not derived from 'tenScripting3.ListUpcomingEvents.strEventGroupData'. C:\Users\user\Desktop\misc\tenScripting3\tenScripting3\Upcom ingEvents.vb 41 51 tenScripting3

    Leave a comment:


  • Megaman
    replied
    Originally posted by mrhappy View Post
    Would run through the events and put the names into the logs if that is a help...
    Perfect, exactly what I needed, thanks!!

    Leave a comment:

Working...
X