Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Router Traffic Monitor Plugin for Homeseer 2.0

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

  • Router Traffic Monitor Plugin for Homeseer 2.0

    I am in the process of writing a plugin for Homeseer 2.0 that will monitor the traffic on your router (if you have one).

    In order to be able to use this plugin, your router must have logging capability and be able to send the logging to a specific computer (ie: your Homeseer computer)

    I have it working for my Linksys WRT54G router. The Linksys WRT54G router does not normally log to a specific computer so I have replaced the firmware on the router with the HyperWRT 2.0 (http://www.hyperwrt.org) firmware, which allows for this. If you have a Linksys WRT54G router and want to do this, I can provide the instructions for it. I am not sure about other routers.

    I have also wrote a stand-alone VB.Net application that will log the messages from your router to a log file so that if you want to use the plugin in HS 2.0, you would need to get your router configured to log to your HS computer and then run the Router Logger stand-alone app and then send me the output log file (along with the name of the router) so that I can add the parsing routines to the plugin for your router. Each router is different so it will take some time to get all of the router log formats. Some routers might not be able to participate in the plugin.

    The plugin currently has its own trigger type and you can specify different triggers for events. For example, you could setup an event to let you know when a certain remote ip address site was visited. You could also set up an event to trigger when a certain range of local port numbers are used, etc.

    The plugin gives you the option of logging all router messages to a database and also has the option of auto purging the messages based on a number of days.

    I have not had a chance yet to write a help document for it, but I am trying to collect different router message formats to add to the plugin (if people are interested).

    If there is interest in this, please reply and let me know and I will attach the stand-alone application that will get the format of the router messages so I can add your router to the plugin.
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

  • #2
    I have a LinkSys BEFSR41. Be glad to run your app to grab the files for you.
    --
    Jeff Farmer
    HS 3, HSPhone
    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

    Comment


    • #3
      Jeff,

      Here is the app. The log file will be located in the folder where the app is run from.

      Let it run for a while so there is enough data to look over.

      Let me know if you have any questions.
      Attached Files
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


      • #4
        I've got the Linksys WRT54G router and just flashed my firmware. I would like to try your plugin.
        Thanks,

        T.
        _________________________________
        Staying on the cutting edge is EXPENSIVE :D

        Comment


        • #5
          Got it installed and running. Should get lots of traffic. I have 4 kids that go to a virtual school and my wife is taking online classes, so lots of traffic from my house.
          --
          Jeff Farmer
          HS 3, HSPhone
          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

          Comment


          • #6
            If you have a Linksys WRT54G or WRT54G/S and have flashed your firmware with the HyperWRT firmware (v3.01.3), you can do the following to enable logging.

            1. Go into your router in Internet Explorer
            2. Click on Administration, then click on Log
            3. Click Enable and click Save
            4. Click on Management
            5. Scroll down to Startup & Firewall Scripts section
            6. Click on Startup button (a window will pop up)
            7. Enter the following code into the Startup window:

            PHP Code:
            sleep 2 
            /sbin/klogd 
            /sbin/syslogd -R xxx.xxx.xxx.xxx
            echo "#!/bin/sh" > /tmp/loggit.sh 
            echo "while true" >> /tmp/loggit.sh 
            echo "/usr/bin/killall -9 klogd" >> /tmp/loggit.sh 
            echo "sleep 1" >> /tmp/loggit.sh 
            echo "/sbin/klogd" >> /tmp/loggit.sh 
            echo "sleep 960" >> /tmp/loggit.sh 
            echo "done" >> /tmp/loggit.sh 
            chmod 700 
            /tmp/loggit.sh 
            /tmp/loggit.sh 
            Replace xxx.xxx.xxx.xxx with the IP address of the computer you want the logging to go to (your HS PC)

            8. Click Save
            9. Click on the Firewall button (a window will pop up)
            10. Enter the following code into the Firewall window:

            PHP Code:
            /usr/sbin/iptables -R INPUT 7 -j logdrop 
            /usr/sbin/iptables -R INPUT 1 -j logdrop -m state --state INVALID 
            11. Click Save
            12. Done

            Then you can use my Router Logger app on port 514 to see the Router messages.
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


            • #7
              I have not decided yet whether the plugin will be FREE. I have put a lot of work into it so far. I am still thinking about it.
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


              • #8
                Do you plan on having triggers?

                I can see it now.

                Trigger: outgoing url = cheatcodes.com

                Action: Speak Boys Room - Get away from the games sites and get back to school.

                --
                Jeff Farmer
                HS 3, HSPhone
                My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                Comment


                • #9
                  Jeff,

                  The plugin is still a work in progress. I do have triggers for the plugin. I have attached a screen shot of what the triggers look like. There is currently Equal To, Not Equal To, Greater Than, Less Than and In The Range.

                  The router only gives out the IP address of the traffic (source and destination) and I am still working on the best way to resolve the ip addresses to a web address.

                  So currently I have to setup the trigger so that if the Destination IP Address is Equal To XXX.XXX.XXX.XXX, do some action.

                  UPDATE: I may have just thought of another way to do this. I will try it out first
                  Attached Files
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                  • #10
                    Hmm, ultra log also supports syslog logging. Looks like I'll have some competition :-)
                    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                    Comment


                    • #11
                      Wow, blade, this looks really cool.
                      John
                      Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
                      Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
                      HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
                      Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3

                      Comment


                      • #12
                        Hi,

                        I'd be very interested in this plugin too.

                        I have a Linksys BEFSR81 V3 - it has its' own remote logviewer software which you can use to capture it's real-time logging. It generates two files, an incoming and an outgoing traffic. Would you like me to send you some sample files?


                        Cheers,


                        Steve

                        Comment


                        • #13
                          Originally posted by steve-l
                          Hi,

                          I'd be very interested in this plugin too.

                          I have a Linksys BEFSR81 V3 - it has its' own remote logviewer software which you can use to capture it's real-time logging. It generates two files, an incoming and an outgoing traffic. Would you like me to send you some sample files?


                          Cheers,


                          Steve

                          Sure. If you want to attach them here, that would be great!
                          Cheers,
                          Bob
                          Web site | Help Desk | Feature Requests | Message Board

                          Comment


                          • #14
                            Originally posted by Blade
                            Sure. If you want to attach them here, that would be great!
                            Done

                            Steve
                            Attached Files

                            Comment


                            • #15
                              Originally posted by steve-l
                              Done

                              Steve

                              Steve, are you able to forward the logging of the router to a specific computer on your LAN. You will need to be able to do this in order for the plugin to work.
                              Cheers,
                              Bob
                              Web site | Help Desk | Feature Requests | Message Board

                              Comment

                              Working...
                              X