| Author |  | 
      
        | GadgetGuy Super User
 
  
  
 Joined: June 01 2008
 Location: United States
 Online Status: Offline
 Posts: 942
 | 
          Several years ago Dave created an awesome Plugin for PH that monitors files for changes and then fires a ph Trigger Event.
           | Posted: July 06 2013 at 07:08 | IP Logged |   |  
           | 
 |  
 I have just completed a library of code to detect iPhones on your LAN; and to control cameras in Blue Iris security software using the json interface.
 
 To complete its smooth functioning I need to get the PH FileMonitor trigger plugin to function.  So far I have not been successful.  Since it is a quite old plugin and ph has had several significant updates since, that may be the issue.
 
 If I can get this plugin going, I will update its write up and post it along with my executables and VB .Net code.
 
 I have put the ph_filemon ocx and ini in the ph plugins folder, have successfully Registered the ph_filemon.ocx, have configured the ini file for just my single file . . .
 
 
| Code: 
 
    
    | 
      
       | [Setup] filecount=1
 
 [Files]
 file1=c:\powerhome\findMyPhone.txt
 |  |  |  
 and have configured the Setup Plugins tab with
 
 
| Code: 
 
    
    | 
      
       | ______ID_____Plugin Type____Launch Data (ActiveX Classname)____Initialization Data FILE-MONITOR......ActiveX....PH_FileMon.phfilemon......c:\pr ogram files\powerhome\plugins\phfilemon.ini
 |  |  |  
 where the "_" and "." and extraneous space junk is required because the %^$#@! image upload doesn't work on the forum anymore!  (Sorry about that).
   
 === edit
 I should have included that the Trigger is setup  on Trigger Type=Generic Plugin; Trigger ID=FILE-MONITOR; Trigger ID Number=[Any Command]; Trigger Value=[Any Option]
 
 Initially I had the last two fields set to "1" but changed to a more general when I got no triggering.
 endedit ===
 
 Has anyone had any success in getting the file monitor to work, and if so any ideas on what I might try to get mine going?
 
 The documentation (ie, the README file) is clearly incorrect and out of date in several places.  I fixed what I could, be may still be missing something.
 
 Thanks.
   
 Edited by GadgetGuy - July 06 2013 at 07:14
 
 __________________
 Ken B - Live every day like it's your last.  Eventually, you'll get it right!
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | GadgetGuy Super User
 
  
  
 Joined: June 01 2008
 Location: United States
 Online Status: Offline
 Posts: 942
 | 
          Ha!  Got it!
           | Posted: July 06 2013 at 13:16 | IP Logged |   |  
           | 
 |  
 Stew on anything long enough and eventually you'll find
 the solution!
 
 As I said in my initial post, this file monitor plugin
 dates back a few years.  Since then PH has had several
 updates, some significant.
 
 The current version of PH no longer installs in . . .
 C:\program files\powerhome
 but in . . .
 C:\powerhome
 
 Thus the Initialization Data given in the README notes,
 and what I used without thinking was the OLD, and not the
 NEW path string.
 
 Corrected the Initialization Data to . . .
 c:\powerhome\plugins\phfilemon.ini
 
 and voilá, it works beautifully, merci.
 
 Within the next day or so I  will post a collection of
 what I hope are useful executables.  That collection will
 also include various and useful enhancements from Dave.
 I  will update the associated notes to try to bring
 things up to date.
   
 The findMyPhone has really worked out nicely, as I now
 use that to determine if I have been home anytime during
 the day, and if so, setting a HOME flag that then can
 control my night lighting.  No sense in turning things on
 if not home!
   
 
 Edited by GadgetGuy - July 06 2013 at 19:46
 
 __________________
 Ken B - Live every day like it's your last.  Eventually, you'll get it right!
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Looking forward to seeing what you have developed!
           | Posted: July 08 2013 at 20:47 | IP Logged |   |  
           | 
 |  
 On the road again!!
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | GadgetGuy Super User
 
  
  
 Joined: June 01 2008
 Location: United States
 Online Status: Offline
 Posts: 942
 | 
          Using the code extensively for a week of so to wring out
           | Posted: July 09 2013 at 08:06 | IP Logged |   |  
           | 
 |  bugs.  Had a corrupted file write last night that threw
 about 200 untrapped Windows exception messages and used
 up memory on my machine!  :-(
 
 Found the cause and fixed it, but also added more robust
 error trapping.
 
 Waiting for Dave to advise how best to get code posted.
 Thinking the PH web Home page in the downloads section
 may be good but need to get it there.
 
 Hopefully in a week things will be ready.
 
 Wow!  You are on the road a lot!  I was a National Sales
 Manager for a computer company and spent on the average
 3-4 days a week traveling all over the US.  Got a bit
 weary of all that travel and sure happy when I no longer
 had to do it!!
 
 __________________
 Ken B - Live every day like it's your last.  Eventually, you'll get it right!
 | 
       
        | Back to Top |     | 
       
       
        |  |