Announcement

Collapse
No announcement yet.

Jon00 Homeseer Log Monitor for Homeseer 3

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

  • Jon00 Homeseer Log Monitor for Homeseer 3

    This unmanaged plugin utility allows you to monitor the Homeseer log for defined string(s) and then trigger events and/or scripts when these are detected.

    Supports Regular Expressions for complex search criteria.

    Various trigger methods available:

    » Instant detection.
    » Number of detection instances within a timed period.
    » Multiple different detected triggers within a timed period.
    Last edited by jon00; September 8th, 2018, 05:17 AM.
    Jon


  • #2
    Jon, I'm getting the same error with the log monitor as I am with the WhoIs script.


    May-07 14:09:38 Error Exception in GetLogDetail_Real: Input string was not in a correct format.
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


    • #3
      Hi,
      I have a problem:
      I have installed HS3 Log Monitor Utility.

      I created 2 triggers:
      ------------------------------------------------------------------------------------
      [Trigger1]
      HSLogging=1
      SearchType=""
      SearchMessage="connected"
      UseRegex=0
      WatchPeriod=0
      TriggerCount=1
      ReTriggerPeriod=1
      EventTrigger=Pushover Android client verbunden
      ScriptTrigger=
      HSLogTriggerText=
      Logging=0

      [Trigger2]
      HSLogging=1
      SearchType=""
      SearchMessage="disconnected"
      UseRegex=0
      WatchPeriod=0
      TriggerCount=1
      ReTriggerPeriod=1
      EventTrigger=Pushover Android client getrennt
      ScriptTrigger=
      HSLogTriggerText=
      Logging=0
      ------------------------------------------------------------------------------------
      If the word "connected" occurs in the HS3 log, [Trigger1] runs OK.
      If the word "disconnected" occurs in the HS3 log, also [Trigger1] runs but it should be
      [Trigger2].
      Where is the issue ?
      Is it because of the word "disconnected" contains the letters "connected" ?

      How to resolve this ?

      I've tryed " connected" (with a space) but it also doesn't run.

      Regards, Fischi

      Comment


      • #4
        Rather than:

        SearchMessage="disconnected"

        Try:

        SearchMessage="disconnecte"
        Jon

        Comment


        • #5
          It also doesn't work.

          Fischi

          Comment


          • #6
            In terms that it does not pick up the word disconnected?
            Jon

            Comment


            • #7
              It seems so...... very curious .

              Comment


              • #8
                It may be a bug....Not sure when I can look at this.
                Jon

                Comment


                • #9
                  This is now fixed in V1.0.2.
                  Jon

                  Comment


                  • #10
                    Problem getting a test to run

                    Just trying to capture an event when a device connects to the HSTouch Server.

                    However, nothing ever shows up in the log no script runs

                    The ini trigger1 is setup as:

                    [Trigger1]
                    HSLogging=1
                    SearchType=""
                    SearchMessage="%CONNECTED%"
                    UseRegex=1
                    WatchPeriod=0
                    TriggerCount=1
                    ReTriggerPeriod=1
                    EventTrigger=
                    ScriptTrigger=iThingTest.vb
                    HSLogTriggerText="iThing Connected"
                    Logging=1

                    HS Logfile looks like:

                    Restarted Homeseer...
                    ---
                    Dec-12 10:41:32 AM Jon00_HSLogMon Version 1.0.2
                    Dec-12 10:41:32 AM Jon00_HSLogMon Connected to Homeseer
                    ---
                    Dec-12 10:42:21 AM HSTouch Server Connecting speaker client to HomeSeer IP 127.0.0.1
                    Dec-12 10:42:21 AM HSTouch Server Client iPhone (xxx.xxx.xxx.2/xxxxx) named iPhone has CONNECTED.
                    Dec-12 10:42:20 AM HSTouch Server Opening connection from:xxx.xxx.xxx.2/xxxxx


                    Am I missing something simple?

                    Thanks for any help!

                    Lee

                    Comment


                    • #11
                      Try:

                      [Trigger1]
                      HSLogging=1
                      SearchType="HSTouch Server"
                      SearchMessage="CONNECTED"
                      UseRegex=0
                      WatchPeriod=0
                      TriggerCount=1
                      ReTriggerPeriod=1
                      EventTrigger=
                      ScriptTrigger=iThingTest.vb
                      HSLogTriggerText="iThing Connected"
                      Logging=1
                      Jon

                      Comment


                      • #12
                        No change

                        More details:
                        I'm running HS on a Windows 7 64 Bit machine
                        Install path is:
                        C:\Program Files (x86)\HomeSeer HS3\
                        INI file (Jon00HSLogMonitor.ini) is in:
                        C:\Program Files (x86)\HomeSeer HS3\Config

                        Content of vb file is currently:
                        Public Sub Main(parms as object)
                        hs.writelog ("Test", "ERROR")
                        End Sub
                        Last edited by LCrawfo; December 12th, 2014, 02:02 PM.

                        Comment


                        • #13
                          Sorry for the delay. I needed time to test.

                          I really do not know what can be wrong. It all seems to works fine here:

                          I placed a script in the scripts directory called iThingTest.vb with the following code:

                          PHP Code:
                          Public Sub Main(parms as object)
                          hs.writelog ("Test""ERROR")
                          End Sub 
                          I used the following settings:

                          [Trigger1]
                          HSLogging=1
                          SearchType="HSTouch Server"
                          SearchMessage="CONNECTED"
                          UseRegex=0
                          WatchPeriod=0
                          TriggerCount=1
                          ReTriggerPeriod=1
                          EventTrigger=
                          ScriptTrigger=iThingTest.vb
                          HSLogTriggerText="iThing Connected"
                          Logging=1

                          I then ran the following as an immediate script command: from a temporary event:

                          PHP Code:
                          &hs.writelog("HSTouch Server","I am CONNECTED"
                          The result is per the attached screen shot.
                          Attached Files
                          Jon

                          Comment


                          • #14
                            Hmm... it seems like it is not reading the log file at all

                            I tried the same thing and I get nothing after the execution of the Immediate Script Command in the log:

                            Dec-14 12:06:10 PM HSTouch Server I am CONNECTED
                            Dec-14 12:06:10 PM System Control Panel Immediate Script: &hs.writelog("HSTouch Server","I am CONNECTED")

                            The LogMonitor seems to load from the startup script ok.
                            using: hs.Launch (hs.GetAppPath & "\Jon00LogMonitorHS3.exe","","",0)

                            I can see the process running in task manager using 0 cpu and 7,008K of memory. And when I shut down HomeSeer it ends properly.

                            I wonder if it can't see the config file (\Config\Jon00HSLogMonitor.ini) or log file for some reason... or something along those lines? Not sure that makes any sense the other plugins are reading their config files OK.

                            Comment


                            • #15
                              It does seem strange. Usual question...what version of HS3 are you running?
                              Jon

                              Comment

                              Working...
                              X