Announcement

Collapse
No announcement yet.

[plugin] Network Monitor Plugin Discussion

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

    [plugin] Network Monitor Plugin Discussion

    I have taken some of the scripts and ideas from the site for monitoring network status and disk space usage and built a plugin that incorporates both in an ActiveX EXE that hopefully won't slow down HomeSeer when performing these checks.

    It's available in the updater and is free. I'm also planning on making it open source, so anyone who wants to make updates, bug fixes or enhancements is welcome to contact me for the code. I would ask that we try to keep it "checked in" so that there aren't a bunch of different versions. We'll work it out as it goes if there's any interest..

    From the readme:
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Version 1.0.0 (6/18/2003)
    ============================================================ ===================
    Changes in this version
    ============================================================ ===================
    * Initial Release.

    This plugin is an attempt to remove some of the process load the hs.ping function
    and the disk space monitoring script posted by htsource could cause if run as
    HomeSeer events. The ActiveX plugin uses winsock library calls for pings and
    simply moved the script code into the plugin (with an extra check to make sure
    the device is online before trying to check).

    The plugin is free, the source code is open (although I'd like to manage it by
    "checking it out" to people who want to make mods so we don't get a million
    versions.. we'll see how it works out).

    ============================================================ ===================
    TO DO
    ============================================================ ===================
    * Change devices to true IO devices managed by the plugin
    * Add "Check Status" and "Check Disk Space" buttons to each device (would be better with enhancement to hs so ButtonPress knows which device called it...)
    * Web interface for displaying network status and drives (and their stats) per device
    * Documentation<HR></BLOCKQUOTE>

    #2
    Steve,

    I could provide the source to you from my DooNetwork plugin if you think it would make your network plugin better. I have no time to contribute other than what I have already written(which I have been running myself with no changes for many months). Email me if you are interested.

    Jim Doolittle
    Jim Doolittle

    My Twitter
    My Hardware & Software

    Comment


      #3
      Where is the ReadMe file? I don't see how to configure the plug-in. I see the settings option on the top menu, but I don't know what I'm supposed to do.
      Thanks.

      Dan-O
      Dan-O
      HomeSeer contributor since summer 1999, yes 1999!

      Comment


        #4
        That was a bit short-sighted of me

        The basic premise (in this version) is that you already have device setup that represent the computers (or other networked equipment) that you want to monitor. On the devices tab, select those devices from the list on the left and click the "&gt;" to move them over to the list of "monitored" devices.

        Then you can double click on a device (I expected you to simply read me mind, apparently! Sorry..) and tell it what drives to monitor and what device codes to use (it will create them for you if they don't already exist), as well as threshholds for each device for triggering any "low disk space" events you might have created.

        On an event definition, there are triggers for "device online", "device offline", "low disk space" and "no longer low disk space" (they only fire when it changes).

        There is an action tab that lets you say what to do (ping or check disk space) so you can setup a recurring event to ping and another event to check disk space.

        There are also conditions you can attach to other events for "online", "offline", "low disk space", and "ok disk space".

        Hope that clarifies the incredibly vague and non-intuitive nature of the plugin setup. I guess I started doing it just for myself and when I decided to clean up the rough edges I didn't think about instructions!

        Comment


          #5
          Worked first try... Good job.

          How hard would it be to add monitoring when strange MAC addresses were detected? This would be useful for detecting WarDrivers. HS could give a warning on the house speakers and shutoff the power to the access point. "It would also let you know when to walk out on the porch with your shot gun... "

          When you become reluctant to change, thank about the beauty of autumn.
          ________
          THE YAZIDI BRANCH OF YAZDANISM DICUSSION
          Last edited by Jerry Coleman; May 15, 2011, 10:45 PM.

          Comment


            #6
            Jerry,
            I do this already with my wireless access point and VBS. HomeSeer speaks "WireLess Alert!". It also lets me know that a puter has dropped off of the wireless. Most wireless access points have a "page" for Active Mac Address's. Easy to script into with hs.geturl....JG

            [This message was edited by Jebus on Sat, 21 June 2003 at 11:42 PM.]
            HS2PRO - Ocelot, SecuIR, Secu16, Attendence Management Alarm Interface, X-10, LCD Studio VFD Display, 3 Apexis IP Cams, Custom Software Interfaces, GMQ Geiger Graphing
            HS3PRO - Testing

            Comment


              #7
              Jebus,

              Would you be willing to share your script? I'm not much of a programmer, but I'm okay if I have something to reference with...

              Thanks,
              Jerry

              When you become reluctant to change, thank about the beauty of autumn.
              ________
              INFANTS ZOLOFT
              Last edited by Jerry Coleman; May 15, 2011, 10:45 PM.

              Comment


                #8
                Itz for a Network Everywhere Wireless Access Point. You just have to bring up your page in a browser and note the url. Then just put it in the script where itz bold. You will see where I hold the active mac address's in hspi_doonetwork.ini for reference. I have an event that runs the script every 5 min.

                Then if for whatever reason I get an alert, I use the ClearAlert.txt in another event to manually reset the alert.

                Please note the spaces in hs.geturl string to keep those nasty emoticon gremlins from showing their ugly heads!.......JG

                '####Begin MacAlert.txt#######

                sub main()
                Dim Alog, LastT, ThisT
                Alog = hs.GetURL("username : password @ ipaddress","/wacttab.htm",true,Port#)
                Alog = Replace (Alog, chr(9), "",1,-1,1)
                Alog = Replace (Alog, chr(10),"",1,-1,1)
                Alog = Replace (Alog, chr(13), "",1,-1,1)
                Alog = Replace (Alog, "Wireless Active MAC Table", "",1,-1,1)
                Alog = LTrim (Alog)
                Alog = RTrim (Alog)

                LastT = hs.getinisetting("WireLess","Table","","hspi_doonetwork.ini" )
                ThisT = hs.getinisetting("WireLess1","Now","","hspi_doonetwork.ini")
                If ThisT = LastT then
                'hs.speak "ok"
                hs.setdevicestatus "w30", 3
                hs.setdevicestring "w30", "&lt;img src='online.gif'&gt;" & " OK"

                else
                hs.setdevicestatus "w30", 2
                hs.setdevicestring "w30", "&lt;img src='offline.gif'&gt;" & " Alert" & now
                hs.writelog "Wireless Alert!", Alog
                hs.speak "wireless network alert!"
                end if

                if hs.isoff ("w30") then
                hs.SaveINISetting "WireLess","Table", Alog,"hspi_doonetwork.ini"
                else
                end if
                end sub

                '####End MacAlert.txt#######

                '####Begin ClearAlert.txt#######

                sub main()
                Dim Alog
                Alog = hs.GetURL("username : password @ ipaddress","/wacttab.htm",true,Port#)

                Alog = Replace (Alog, chr(9), "",1,-1,1)
                Alog = Replace (Alog, chr(10),"",1,-1,1)
                Alog = Replace (Alog, chr(13), "",1,-1,1)
                Alog = Replace (Alog, "Wireless Active MAC Table", "",1,-1,1)
                Alog = LTrim (Alog)
                Alog = RTrim (Alog)


                hs.setdevicestatus "w30", 3
                hs.setdevicestring "w30","OK"

                hs.SaveINISetting "WireLess1","Now",Alog,"hspi_doonetwork.ini"
                hs.SaveINISetting "WireLess","Table",Alog,"hspi_doonetwork.ini"

                end sub

                '####End ClearAlert.txt#######
                HS2PRO - Ocelot, SecuIR, Secu16, Attendence Management Alarm Interface, X-10, LCD Studio VFD Display, 3 Apexis IP Cams, Custom Software Interfaces, GMQ Geiger Graphing
                HS3PRO - Testing

                Comment


                  #9
                  Thanks Jebus, I can't wait to get this working...

                  Steve... Could you add in the network monitor plug-in a place where we could add our WAP?

                  Maybe their could be a drop down box that would let you choose the type of WAP you had. "Example... Linksys.WAP, COMPAQ.WAP, 3COM.WAP, CISCO.WAP??? Once someone had a network monitor WAP script wrote, they could post it for others with the same WAP. The html should be pretty stable from not changing as long as the WAP was the same model.

                  After this was all put together, one could add an event that once an invalid MAC was sensed on the network, hs could handle it anyway the user wanted it to.

                  Jerry

                  When you become reluctant to change, thank about the beauty of autumn.

                  [This message was edited by Jerry Coleman on Sun, 22 June 2003 at 01:34 AM.]
                  ________
                  AnnyAngel
                  Last edited by Jerry Coleman; May 15, 2011, 10:45 PM.

                  Comment


                    #10
                    Jerry,
                    Please note that the page will be in a different format with another WAP. You will have to change the strings for the replace functions. You page may have more or less extra text in it. In my case it is a very simple page to parse out the text I wanted after hs.geturl stripped out the html. The trim functions are to strip out all the blank spaces. Otherwise the ini file gets pretty messy..JG
                    HS2PRO - Ocelot, SecuIR, Secu16, Attendence Management Alarm Interface, X-10, LCD Studio VFD Display, 3 Apexis IP Cams, Custom Software Interfaces, GMQ Geiger Graphing
                    HS3PRO - Testing

                    Comment


                      #11
                      I'm going over to the Server to play around with your Plug-in. Thanks for the info!

                      Feature requests?
                      I let the router assign IPs to all except my HS server. Any way to have HS look for machine names instead of IP's? (besides the obvious answer to lock in my IPs)
                      Thanks.

                      Dan-O
                      Dan-O
                      HomeSeer contributor since summer 1999, yes 1999!

                      Comment


                        #12
                        If you don't provide an IP address, it will look by name.

                        Comment


                          #13
                          OK, Cool. Thanks for pointing it out.

                          How often does the plug in check devices? I have had my server running for about 10 minutes now and none of the devices have updated.

                          Next question...
                          Do all the devices have to be the default 'computer' device type? Reason I ask is that I have created several device, one for the router, each computer and the Audreys, but I have labeled them as different device types. For instance, the router is a Router device type, the Audreys are TouchScreen device types. Am I doing something wrong?

                          Sorry for asking so many questions, but I do thank you for your help.

                          Dan-O
                          Dan-O
                          HomeSeer contributor since summer 1999, yes 1999!

                          Comment


                            #14
                            Dan-o

                            Looks like you have to create an event. The Plug-in created a new tab on the event setup screen.

                            Tyke

                            Comment


                              #15
                              Tyke's right - I set it up as an action so you'd have all the controls and options that HomeSeer gives you to manage the event. I have mine ping all devices every 15 minutes and check disk space once an hour.

                              The plugin doesn't care about the "device type"; it expects you to tell it which specific devices to monitor.

                              Comment

                              Working...
                              X