Announcement

Collapse
No announcement yet.

Trigger script on new log events

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

    Trigger script on new log events

    I need help to trigger an script when something new is written to the Homeseer log.
    I have already one script that is triggered on device status change that I have in startup.vb set this for:

    hs.RegisterStatusChangeCB("DeviceChange.vb","Main")

    That is working fine, but now I want another script that is triggered every time something is written to the Homeseer log, and also what is written.
    It seems like I could use
    hs.RegisterEventCB
    and value 2 for log changes

    But I cant get it to work, all examples I find seems also be if using external applications or plugins for Homeseer not it just want to trigger a script.
    Last edited by daniel; June 25, 2017, 03:29 AM.

    #2
    I don't think hs.RegisterEventCB works in scripts, it does in plugins (and may have done in HS2 scripts?) but the event callback is much more complex than the status change. It allows you to register for all sorts of things like device value changes, speech, string changes, telephone stuff etc.

    You'd either need to read through the log from a script which you could run on a recurring basis (although you would have a delay potentially) or look at some of the tools available, I think Jon00 has one and there are a couple of logging plugins about.

    Comment


      #3
      Have to agree with MrHappy.

      Off the shelf solution: https://forums.homeseer.com/showthread.php?t=167046
      Jon

      Comment

      Working...
      X