Announcement

Collapse
No announcement yet.

Jon00 File Watcher for Homeseer 3 & Homeseer 4

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

    #31
    That sounds very feasible. The plugin will continually try to reconnect to HS3. Not sure I can do much about a memory leak as this uses the standard HS3 connection routine.
    Jon

    Comment


      #32
      A few questions:
      1) Is there a way to slow down how often the plugin checks for connectivity? I just shutdown HS3 for a couple minutes and saw the plugin's memory footprint go from 9MB to 13MB.
      2) Is there a way to limit how often it writes to the error log? It was writing that same set of out-of-memory entries many times per second (that's how the error log ended up at 6GB - I'm not sure how large it would have gotten had I not noticed).
      3) Is there a way for the process to be automatically killed once it encounters that out of memory condition? Even if it can't be done within the plugin itself, is there some other Windows way to monitor and kill it, if necessary?
      4) What about killing the plugin when HS3 shuts down? Could I modify the shutdown script? Likewise, is there a reason for starting up the plugin in the Windows startup folder as opposed to launching it when HS3 starts up? Sorry - I'm still new to HS3.
      Thanks

      Comment


        #33
        Your suggestions are just workarounds due to the same issue (memory leak) which I'm positive was not there when this was first written. Let me take a look at this over the weekend so that I can investigate further.
        Jon

        Comment


          #34
          Cool - thanks. I'm not software guy so I can't offer real help.

          Comment


            #35
            Originally posted by fcol View Post
            I just updated HS3 to .312 and therefore also updated Filewatcher by copying the DLL files into the C:\Jon00FileWatcher folder. That's when I noticed the Jon00FileWatcherlog.txt file had swelled to 6GB. The file is so large I could only open it using "Large Text Files Reader." Anyway, this is what was showing up in the first few thousand lines:

            Any idea what happened? HS3 and my Win10 system (16GB RAM) kept running fine since this happened starting on 2/13. But the error log was being rewritten that entire time until I killed Jon00FileWatcherHS3.exe as part of the HS3 upgrade. process. Ironically, I was using Filewatcher to monitor the jon00dbchart error log from swelling. I'm not sure how I should monitor Jon00FileWatcherlog.txt from going haywire...

            Thanks!

            Current Date/Time: 3/1/2017 6:01:46 PM
            HomeSeer Version: HS3 Standard Edition 3.0.0.312
            Operating System: Microsoft Windows 10 Pro - Work Station
            System Uptime: 0 Days 0 Hours 30 Minutes 4 Seconds
            IP Address:
            Number of Devices: 157
            Number of Events: 117
            Available Threads: 800

            Enabled Plug-Ins
            3.0.0.24: EnvisaLinkAdemco
            3.0.0.68: HSTouch Server
            3.0.0.13: ImperiHome
            0.0.0.25: Pushover 3P
            3.0.2.8: SDJ-Health
            3.0.3.3: Tasker Plugin
            3.0.1.87: Z-Wave
            Please try V1.0.3 on my site. Hopefully this will have fixed any memory leaks when Homeseer is not running.
            Jon

            Comment


              #36
              Is it possible for the plugin to monitor a directory? This is what I'm looking to do:

              Watch a video recording folder, and when any new file appears and is NOT increasing in size for x seconds (the recording system writes to the file until complete) then trigger an event with the file name?
              RJ_Make On YouTube

              Comment


                #37
                You should be able to monitor all files with the same file extension by using a wildcard i.e. c:\Movies\*.MP4

                The plugin will keep triggering (set by the re-trigger time setting) whilst the file is being written but you would have to sort out the logic once the file is complete and then stops triggering. Can't help with the filename as written.
                Jon

                Comment


                  #38
                  Great app!
                  What is the unit for the ReTriggerTime?
                  I was guessing milliseconds, but get triggers more of than the minute I want.

                  Comment


                    #39
                    Originally posted by Bobone View Post
                    Great app!
                    What is the unit for the ReTriggerTime?
                    I was guessing milliseconds, but get triggers more of than the minute I want.
                    From the docs:

                    ReTriggerTime="<optional time in Milliseconds before retrigger can occur>"

                    By default, Retriggering cannot reoccur until 2000mSecs (2 Seconds) has elapsed.

                    You can override this by entering the delay in milliseconds here.

                    Example:

                    ReTriggerTime="5000"
                    Jon

                    Comment


                      #40
                      Hi Jon,
                      I'm using the File Watcher to monitor some config files. I have had some times (following an improper shutdown) when the config file loses most of its content. Some of these config files (Mark Sandler's Insteon, BLDSC) have normal and modest changes. So I was wondering if File Watcher could be modified to only trigger when the file size has changed by a certain percentage. For example, changes under 10% won't trigger, but changes greater than 10% would trigger.

                      Comment


                        #41
                        Originally posted by jono View Post
                        Hi Jon,
                        I'm using the File Watcher to monitor some config files. I have had some times (following an improper shutdown) when the config file loses most of its content. Some of these config files (Mark Sandler's Insteon, BLDSC) have normal and modest changes. So I was wondering if File Watcher could be modified to only trigger when the file size has changed by a certain percentage. For example, changes under 10% won't trigger, but changes greater than 10% would trigger.
                        No, it can only monitor a change in the file, not its size. I expect additional code could be added to do this but my spare time will need to be used to upgrade some of my existing HS3 offerings to also work under HS4.
                        Jon

                        Comment


                          #42
                          Originally posted by jono View Post
                          Hi Jon,
                          I'm using the File Watcher to monitor some config files. I have had some times (following an improper shutdown) when the config file loses most of its content. Some of these config files (Mark Sandler's Insteon, BLDSC) have normal and modest changes. So I was wondering if File Watcher could be modified to only trigger when the file size has changed by a certain percentage. For example, changes under 10% won't trigger, but changes greater than 10% would trigger.
                          OK, I've had a look and have updated this to include this feature plus some other changes to make it more flexible. Are you willing to test once I have updated the documentation etc?

                          Jon

                          Comment


                            #43
                            Originally posted by jon00 View Post

                            OK, I've had a look and have updated this to include this feature plus some other changes to make it more flexible. Are you willing to test once I have updated the documentation etc?
                            Absolutely! Thank you Jon!

                            Comment


                              #44
                              Originally posted by jono View Post

                              Absolutely! Thank you Jon!
                              Sorry, this took much longer than expected. I decided to give this a major overhaul with many more features. I'll send you a PM shortly with a download link.
                              Jon

                              Comment


                                #45
                                Version 1.1.0 is now available.

                                Please see the updated first post on this thread regarding its capabilities: https://forums.homeseer.com/forum/3r...-2-3#post82733

                                This is a major upgrade with many more features to improve flexibility and has been tested in HS4.

                                Note: If updating from 1.0.X, please read the documentation as additional files need to be added/copied.

                                As usual, it can be downloaded from my site. Click on my banner below for access.
                                Jon

                                Comment

                                Working...
                                X