Announcement

Collapse
No announcement yet.

Jon00 Event Viewer & Documenter for HS3

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

  • avpman
    replied
    Originally posted by jon00 View Post
    Looks like you are talking about the HS4 version? Yes that has been updated to V1.0.2. You just replace the script file (in the scripts folder).
    Thanks, Jon. I made a donation on your website.

    Leave a comment:


  • jon00
    replied
    Looks like you are talking about the HS4 version? Yes that has been updated to V1.0.2. You just replace the script file (in the scripts folder).

    Leave a comment:


  • avpman
    replied
    Originally posted by jon00 View Post
    Thanks. The issue was caused by the <> which was being interpreted as an html tag and breaking the rest of the line. V1.0.12 on my site resolves this issue.
    Hi Jon, Great work as always. Without having to reinstall everything, is there one or more files that can be installed? I'm using V 1.0.1

    Leave a comment:


  • jon00
    replied
    Thanks. The issue was caused by the <> which was being interpreted as an html tag and breaking the rest of the line. V1.0.12 on my site resolves this issue.

    Leave a comment:


  • mterry63
    replied
    jon00, I've run into something odd with the event viewer on HS3. I have an event triggered once each minute, and 3 immediate script lines. The third line doesn't appear completely when listing events with this utility.

    Here's the event in HS3:

    Click image for larger version

Name:	Untitled.png
Views:	162
Size:	47.4 KB
ID:	1483644

    Here's the event as listed in your Event Viewer. Note that the 3rd immediate script line stops at DeviceValue(1928) and doesn't show the rest of the command.

    Event Name: HW-Layer Light Sensor Update
    Event Group: Abstration Layer Updates
    Event Enabled: False
    Event Type:
    Event Voice Command:
    Event ID: 207
    Event Group ID: 1049483746
    Event Last Ran: 7/11/2021 9:45:14 PM
    Event Elaspsed: 0d 0h 7m 54s
    Event User Notes:

    Event Triggers & Conditions:
    IF The event will automatically trigger every 1m, 0s
    THEN Execute the command: &nIf(((hs.DeviceValue(1928) And (2^0)) > 0), hs.SetDeviceValueByRef(1929, hs.DeviceValue(1887),True),False) and wait for the command to finish before continuing , and also only allow one instance of the script to run at a time.
    THEN Execute the command: &nIf(hs.DeviceValue(1928) = 2, hs.SetDeviceValueByRef(1929,(hs.DeviceValue(1128)*40),True), False) and wait for the command to finish before continuing , and also only allow one instance of the script to run at a time.
    THEN Execute the command: &nIf(hs.DeviceValue(1928) and wait for the command to finish before continuing , and also only allow one instance of the script to run at a time.
    Event Options:
    Priority Event: False
    Security (Randomize Time Triggers): False
    Include in Powerfailure Recovery: False
    Remove This Event After Triggering: False
    Include As Voice Command: False
    Do Not Log This Event: True
    Cannot Re-Run for: 0 Days 0 Hours 0 Minutes 0 Seconds
    -----------------------------------------------------

    I've deleted the 3rd line, confirmed in the Event Viewer, and readded the line and it always comes back the same. Any ideas? AFAIK this third line executes fine when the device value isn't equal to 3.

    Strange. I noticed this when I failed to find the event by searching for the Event name in the 3rd line "Light Sensor Failure Pushover Message".

    Leave a comment:


  • jon00
    replied
    All I can suggest is that the HS database got corrupted at some time......

    Leave a comment:


  • simonmason
    replied
    Thanks - this pulled up a delayed event that I found in the event group orphans. There were two other delayed events in there that were old - from last year. I deleted all three and lo and behold everything works.

    So - the question is, how is this happening? But it is awesome to actually figure out what is causing the problem.

    Click image for larger version

Name:	Screen Shot 2021-04-14 at 8.43.41 AM.png
Views:	146
Size:	87.4 KB
ID:	1468681

    Leave a comment:


  • jon00
    replied
    14a1 determines that it is erroring on an event group name. The event group name is substituted with ???? which you should be able to search for to determine more clues.

    Leave a comment:


  • simonmason
    replied
    Great, downloaded and ran it. The server is still in the problematic state. Now the Event viewer page does load (and all of the dropdown appear to have populated correctly) and it writes this to the log:

    Error in Main Block 14a1: System.NullReferenceException: Object reference not set to an instance of an object. at scriptcode74.VBWrapper.Main(Object MyData)

    That doesn't seem to provide any more light on the subject? Perhaps this is more meaningful to you but seems very similar to the error that I got before on the screen? Thanks.

    Leave a comment:


  • jon00
    replied
    I had actually added the extra debug code etc so you can download V1.0.11.1 now. There are no other changes. This is for the HS3 version only.

    Leave a comment:


  • simonmason
    replied
    jon00 My line of investigation into logging did not work out. I had assumed that the server was getting backed up and causing the issue. But after checking the logs I don't see anything unusual happening other than this.

    So I am back at square one again. It would be great if you could create a version that outputs more information about the error. It appears to be a state that the server gets into that is resolved by restarting the server. Sorry for asking for this, it is purely by coincidence that the event viewer gave me a line of investigation but this could be hugely helpful. Thanks.

    Leave a comment:


  • simonmason
    replied
    Thinking out loud - the restart may not be "fixing" the issue, just flushing everything out. For example, if you had a situation where a script or an event was stuck in a loop, and the system starts throwing errors, then this might eventually resolve itself or restarting the system would clean everything out. This is sort of the situation I see where the JSON commands start to work again (sometimes) after a while.

    So this got me thinking, and I decided to start increasing the log level - starting with events. Immediately I saw the "dropping event callbacks error". So I investigated further and narrowed it down to two plugins. I have disabled them for now.

    Is it possible that the system was getting backed up and therefore other things were failing? I will monitor it for a while to see if this is the case.

    It was very kind of you to suggest an enhanced error level for your event viewer. I may still take you on that offer but let me see how this goes for now. Thanks.

    Also, interestingly, the "dropping event callbacks error" only shows when debug level 2 is set. I swear that error message used to show up in the normal log?

    Leave a comment:


  • jon00
    replied
    You have seen the error as displayed in the log. That is an error from reading the database. The fact that it goes away when restarted is puzzling.

    I can increase the error trapping to determine whether it is the name, group or enabled/disabled causing the issue and perhaps substitute the values with ??? which you can then use to locate the event.

    Leave a comment:


  • simonmason
    replied
    jon00 Thanks for the update. This is very insightful. Since I have been getting nowhere with HS support to diagnose this particular issue, care to hazard a guess at what is going wrong here? Does the Event Viewer have any sort of log output that could point to where the problem is happening? Thanks.

    Leave a comment:


  • jon00
    replied
    As far as I can tell, the error has nothing to do with JSON. The code that produced the error is Iterating through all the Homeseer events on your system to get its name, group and to see if it is enabled. It's obviously come against something it does not like and bummed out. I can only assume that JSON fails because of the same issue internally.

    Leave a comment:

Working...
X