Jump to content
Sign in to follow this  
ConsultingJoe

Comcast Signal Monitor

Recommended Posts

ConsultingJoe

**TESTERS NEEDED

Please, let me know what you think.

WHAT DO THESE NUMBERS MEAN

Posted ImagePosted Image

Required:

  • Comcast Broadband
  • Surfboard Modem
  • HTTP.au3
  • IE.au3
  • Autoit Beta
#include <HTTP.au3>
#include <IE.au3>
#include <GuiConstants.au3>
$title = "Comcast Signal"
;Verify modem is present
Ping( "192.168.100.1", 100 )
If @error Then
    MsgBox(0, $title, "Error locating modem at 192.168.100.1")
    Exit
EndIf

;Verify modem by page title
$ie = _IECreate( "192.168.100.1", 0, 0 )
$pagetitle = _IEPropertyGet ( $ie, "title" )
_IEQuit( $ie )
If $pagetitle <> "Modem Configuration: Status - Connection" Then
    MsgBox( 0, $title, "Error, Incorrect modem. Sorry" )
    Exit
EndIf

Global $snr, $downpower, $uppower
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ; turn themes off for colors
$Form1 = GUICreate($title, 200, 180, 193, 115)
$snr_label = GUICtrlCreateLabel( "Loading", 8, 20, 55, 17 )
$snr_progress = GUICtrlCreateProgress(65, 20, 127, 17, 0x1)
GUICtrlSetData( -1, 100 )
GUICtrlSetColor( -1, 0x00ff00 )
$downpower_label = GUICtrlCreateLabel( "Loading", 8, 59, 55, 17 )
$downpower_progress = GUICtrlCreateProgress(65, 59, 127, 17, 0x1)
GUICtrlSetData( -1, 100 )
GUICtrlSetColor( -1, 0x00ff00 )
$uppower_label = GUICtrlCreateLabel( "Loading", 8, 97, 55, 17 )
$uppower_progress = GUICtrlCreateProgress(65, 97, 127, 17, 0x1)
GUICtrlSetData( -1, 100 )
GUICtrlSetColor( -1, 0x00ff00 )
GUICtrlCreateLabel("Signal To Noise Ratio", 8, 3, 182, 17, $SS_RIGHT)
GUICtrlCreateLabel("Downstream Power Level", 8, 41, 182, 17, $SS_RIGHT)
GUICtrlCreateLabel("Upstream Power Level", 8, 79, 182, 17, $SS_RIGHT)
$reset_button = GUICtrlCreateButton("Restart Modem", 8, 120, 89, 23, 0)
$restore_button = GUICtrlCreateButton("Restore Defaults", 104, 120, 89, 23, 0)
$modem_button = GUICtrlCreateButton("Modem Config", 8, 150, 89, 23, 0)
$refresh_button = GUICtrlCreateButton("Refresh", 104, 150, 89, 23, 0)
GUISetState(@SW_SHOW)
update()
AdlibEnable( "update", 3000 )
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $refresh_button
            update()
        Case $reset_button
            If MsgBox( 4, $title, "Are you sure you would like to restart your modem?" ) = 6 Then ResetReq()
        Case $restore_button
            If MsgBox( 4, $title, "Are you sure you would like to restort your modem to factory defaults?" ) = 6 Then RestoreReq()
        Case $modem_button
            Run(@ComSpec & " /c " & 'start http://192.168.100.1', "", @SW_HIDE)
    EndSwitch
WEnd

Func update()
    If GetStatus() = 1 Then
        GUICtrlSetData( $snr_label, $snr )
        GUICtrlSetData( $downpower_label, $downpower )
        GUICtrlSetData( $uppower_label, $uppower )
        $snr = StringFormat( "%.1f", $snr )
        $downpower = StringFormat( "%.1f", $downpower )
        $uppower = StringFormat( "%.1f", $uppower )
        If $snr < 30 Then
            GUICtrlSetColor( $snr_progress, 0xff0000 )
        ElseIf $snr < 33 And $snr > 29 Then
            GUICtrlSetColor( $snr_progress, 0xffff00 )
        Else
            GUICtrlSetColor( $snr_progress, 0x00ff00 )
        EndIf
        $snr = Round(($snr/60)*100)
        If Abs($downpower) > 10 Then
            GUICtrlSetColor( $downpower_progress, 0xff0000 )
        ElseIf Abs($downpower) < 5 And Abs($downpower) > 10 Then
            GUICtrlSetColor( $downpower_progress, 0xffff00 )
        Else
            GUICtrlSetColor( $downpower_progress, 0x00ff00 )
        EndIf
        $downpower = 100-(Abs($downpower)*9)
        If Abs($uppower-45) > 10 Then
            GUICtrlSetColor( $uppower_progress, 0xff0000 )
        ElseIf Abs($uppower-45) < 5 And Abs($uppower-45) > 10 Then
            GUICtrlSetColor( $uppower_progress, 0xffff00 )
        Else
            GUICtrlSetColor( $uppower_progress, 0x00ff00 )
        EndIf
        $uppower = 100-(Abs($uppower-45)*9)
    Else
        $snr = "NO"
        $downpower = "MODEM"
        $uppower = "DETECTED"
        GUICtrlSetData( $snr_label, $snr )
        GUICtrlSetData( $downpower_label, $downpower )
        GUICtrlSetData( $uppower_label, $uppower )
    EndIf
    GUICtrlSetData( $snr_progress, $snr )
    GUICtrlSetData( $downpower_progress, $downpower )
    GUICtrlSetData( $uppower_progress, $uppower )
EndFunc


Func GetStatus()
    $ie = _IECreate( "http://192.168.100.1/RgSignal.asp", 0, 0 )
    $table = _IETableGetCollection ($ie, 2)
    $table = _IETableWriteToArray ($table)
    If IsArray($table) Then
        Global $downpower = StringReplace( $table[1][5], "The Downstream Power Level reading is a snapshot taken at the time this page was requested. Please Reload/Refresh this Page for a new reading", "" )
        Global $snr = $table[1][3]
        $table = _IETableGetCollection ($ie, 3)
        $table = _IETableWriteToArray ($table)
        If IsArray($table) Then
            Global $uppower = $table[1][3]
        EndIf
        _IEQuit($ie)
        Return 1
    Else
        _IEQuit($ie)
        Return 0
    EndIf
EndFunc

Func ResetReq()
    $soc = _HTTPConnect("192.168.100.1")
    If @error Then MsgBox( 0, $title, "Error opening socket" )
    _HTTPPost("192.168.100.1", "/goform/RgConfig", $soc, "RestoreFactoryDefault=0&ResetReq=1")
    If @error Then MsgBox( 0, $title, "Error at POST request" )
    _HTTPClose($soc)
EndFunc

Func RestoreReq()
    $soc = _HTTPConnect("192.168.100.1")
    If @error Then MsgBox( 0, $title, "Error opening socket" )
    _HTTPPost("192.168.100.1", "/goform/RgConfig", $soc, "RestoreFactoryDefault=1&ResetReq=0")
    If @error Then MsgBox( 0, $title, "Error at POST request" )
    _HTTPClose($soc)
EndFunc
Edited by CyberZeroCool

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
ConsultingJoe

What, no one has Comcast?

Posted Image


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
ConsultingJoe

Comon people, I can't believe no one has comcast and this modem.


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
PartyPooper

Believe it, I have a similar modem but not Comcast.

Edited by PartyPooper

Share this post


Link to post
Share on other sites
ConsultingJoe

Believe it, I have a similar modem but not Comcast.

Aww, thats bogus.

Larry lives in a few miles away from me, if hes has high speed it would be comcast.


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
ConsultingJoe

Script Updated, Check first post.

Added modem verifier.


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
ConsultingJoe

Could this be changed to netgear, belkin etc?

This is for a modem only. and not all modems will tell you the signal status. Edited by CyberZeroCool

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
NELyon

Sorry, i litterally got rid of comcast yesterday :)

Maybe i should have seen this sooner.

Share this post


Link to post
Share on other sites
ConsultingJoe

Sorry, i litterally got rid of comcast yesterday :)

Maybe i should have seen this sooner.

Aww, too bad

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
ssubirias3

Comon people, I can't believe no one has comcast and this modem.

Just found your script today and I had started working on a similar script, too funny! My surfboard uses signal.html not RgSignal.asp. Perhaps have the script check one of the version numbers on the help page to determine if the script should use .asp or .html links.

Software Version: SB5100-2.3.2.5-SCM01-NOSH

Hardware Version: 1

MIB Version: II

GUI Version: 1.0

VxWorks Version: 5.4

Edit: The other thing I'd suggest adding is the MAC and Serial numbers since anytime I've called Comcast to report a problem they always ask for this information. Also I had planned to bring in the last 5 log entries into a listview along with some other features. Thanks again for sharing the idea and code!

Edited by ssubirias3

Share this post


Link to post
Share on other sites
ConsultingJoe

Just found your script today and I had started working on a similar script, too funny! My surfboard uses signal.html not RgSignal.asp. Perhaps have the script check one of the version numbers on the help page to determine if the script should use .asp or .html links.

Edit: The other thing I'd suggest adding is the MAC and Serial numbers since anytime I've called Comcast to report a problem they always ask for this information. Also I had planned to bring in the last 5 log entries into a listview along with some other features. Thanks again for sharing the idea and code!

Thanks.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites
NELyon

Talk about unlucky.

I am getting comcast CABLE back, but not internet :)

Share this post


Link to post
Share on other sites
Gestalt

I have Comcast, but I have a Linksys modem, not the Surfboard.

Share this post


Link to post
Share on other sites
drummerdude

I have, what can i help you with?

Share this post


Link to post
Share on other sites
PerryRaptor

It works!

If you make the colored scale bars reflect yellow for low, green for acceptable, and red over limit would be nice.

Edited by PerryRaptor

Share this post


Link to post
Share on other sites
Gradius

Fixed some bugs and now is compatible with Motorola.

Tested on SB5101 modem.

Software Version: SB5101-2.4.1.6-SCM02-NOSH

Hardware Version: 1

MIB Version: II

GUI Version: 1.0

;
; Cable Modem Signal v0.1c
; Fixed some bugs and made it compatible with Motorola Cable modems
; by Gradius ~ 31/05/2008 ~ 11:30h am (GMT-4)
;
#include <HTTP.au3>
#include <IE.au3>
#include <GuiConstants.au3>
$title = "Cable Modem Signal v.1c"
;Ask for modem
Ping("192.168.100.1",100)
If @error then
    MsgBox(0, $title, "Error, modem not found (or disconnected) at 192.168.100.1")
    Exit
EndIf

;Verify modem by page title
$ie = _IECreate("192.168.100.1",0,0)
$pagetitle = _IEPropertyGet ($ie,"title")
_IEQuit($ie)
If $pagetitle <> "Modem Configuration: Status - Connection" then
    MsgBox(0, $title, "Error, incompatible device. Sorry.")
    Exit
EndIf

Global $snr,$downpower,$uppower
DllCall("uxtheme.dll","none","SetThemeAppProperties","int",0); turn themes off for colors
$Form1 = GUICreate($title,220,180,193,115)
$snr_label = GUICtrlCreateLabel("Loading...",8,20,55,17)
$snr_progress = GUICtrlCreateProgress(65,20,147,17,0x1)
GUICtrlSetData(-1,100)
GUICtrlSetColor(-1,0x00ff00)
$downpower_label = GUICtrlCreateLabel("Loading...",8,59,55,17)
$downpower_progress = GUICtrlCreateProgress(65,59,147,17,0x1)
GUICtrlSetData(-1,100)
GUICtrlSetColor(-1,0x00ff00)
$uppower_label = GUICtrlCreateLabel("Loading...",8,97,55,17)
$uppower_progress = GUICtrlCreateProgress(65,97,147,17,0x1)
GUICtrlSetData(-1,100)
GUICtrlSetColor(-1,0x00ff00)
GUICtrlCreateLabel("Signal to Noise Ratio",8,3,182,17,0)
GUICtrlCreateLabel("Downstream Power Level",8,42,182,17,0)
GUICtrlCreateLabel("Upstream Power Level",8,80,182,17,0)
$reset_button = GUICtrlCreateButton("Restart Modem",18,120,89,23,0)
$restore_button = GUICtrlCreateButton("Restore Defaults",114,120,89,23,0)
$modem_button = GUICtrlCreateButton("Modem Config",18,150,89,23,0)
$refresh_button = GUICtrlCreateButton("Refresh",114,150,89,23,0)
GUISetState(@SW_SHOW)
update()
AdlibEnable("update",3000)
While 1
;Verify if modem is online on every update
    Ping("192.168.100.1",100)
    If @error then
             MsgBox(0, $title, "Error, modem offline and/or disconnected !")
      Exit
    EndIf
;end of verify routine
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $refresh_button
            update()
        Case $reset_button
            If MsgBox(4, $title, "Are you sure you would like to restart your modem ?") = 6 then ResetReq()
        Case $restore_button
            If MsgBox(4, $title, "Are you sure you would like to restore your modem to factory defaults ?") = 6 then RestoreReq()
        Case $modem_button
            Run(@ComSpec & " /c " & 'start http://192.168.100.1', "", @SW_HIDE)
    EndSwitch
WEnd

Func update()
;Verify if modem is online on every update
    Ping("192.168.100.1",100)
    If @error then
             MsgBox(0, $title, "Error, modem offline and/or disconnected !")
      Exit
    EndIf
;end of verify routine
    If GetStatus() = 1 then
        GUICtrlSetData($snr_label,$snr)
        GUICtrlSetData($downpower_label,$downpower)
        GUICtrlSetData($uppower_label,$uppower)
       ;$snr = StringFormat("%.1f",$snr)
       ;$downpower = StringFormat("%.1f",$downpower)
       ;$uppower = StringFormat("%.1f",$uppower)
        If $snr < 30 then
            GUICtrlSetColor($snr_progress,0x0000ff)
        ElseIf $snr < 33 and $snr > 39 then
            GUICtrlSetColor($snr_progress,0xffff00)
        Else
            GUICtrlSetColor($snr_progress,0x00ff00)
        EndIf
       ;$snr = Round(($snr/60)*100)
        If Abs($downpower) > 10 then
            GUICtrlSetColor($downpower_progress,0xff0000)
        ElseIf Abs($downpower) < 5 and Abs($downpower) > 10 then
            GUICtrlSetColor($downpower_progress,0xffff00)
        Else
            GUICtrlSetColor($downpower_progress,0x00ff00)
        EndIf
        $downpower = 10-(Abs($downpower)*9)
        If Abs($uppower-45) > 10 then
            GUICtrlSetColor($uppower_progress,0x0000ff)
        ElseIf Abs($uppower-45) < 5 and Abs($uppower-45) > 10 then
            GUICtrlSetColor($uppower_progress,0xffff00)
        Else
            GUICtrlSetColor($uppower_progress,0x00ff00)
        EndIf
       ;$uppower = 100-(Abs($uppower-45)*9)
    Else
        $snr = "NO"
        $downpower = "MODEM"
        $uppower = "DETECTED"
        GUICtrlSetData($snr_label,$snr)
        GUICtrlSetData($downpower_label,$downpower)
        GUICtrlSetData($uppower_label,$uppower)
    EndIf
    GUICtrlSetData($snr_progress,$snr)
    GUICtrlSetData($downpower_progress,$downpower)
    GUICtrlSetData($uppower_progress,$uppower)
EndFunc


Func GetStatus()
    $ie = _IECreate("http://192.168.100.1/RgSignal.asp",0,0)
    $table = _IETableGetCollection ($ie,2)
    $table = _IETableWriteToArray ($table)
    If IsArray($table) then
        Global $downpower = StringReplace($table[1][5], "The Downstream Power Level reading is a snapshot taken at the time this page was requested.  Please Reload/Refresh this Page for a new reading.", "")
        Global $snr = $table[1][3]
        $table = _IETableGetCollection ($ie,3)
        $table = _IETableWriteToArray ($table)
        If IsArray($table) then
            Global $uppower = $table[1][3]
        EndIf
        _IEQuit($ie)
        Return 1
    Else
        _IEQuit($ie)
        Return 0
    EndIf
EndFunc

Func ResetReq()
    MsgBox (0, $title, "Restarting Modem...")
    $soc = _HTTPConnect("192.168.100.1")
    If @error then MsgBox(0, $title, "Error while opening socket !")
    _HTTPPost("192.168.100.1", "/goform/RgConfig", $soc, "DhcpServer=0&saveChanges=1&ResetReq=1")
    If @error then MsgBox(0, $title, "Error at POST request !")
    _HTTPClose($soc)
    Exit
EndFunc

Func RestoreReq()
    MsgBox (0, $title, "Restarting Modem...")
    $soc = _HTTPConnect("192.168.100.1")
    If @error then MsgBox(0, $title, "Error while opening socket !")
    _HTTPPost("192.168.100.1", "/goform/RgConfig", $soc, "RestoreFactoryDefault=1&ResetReq=0")
    If @error then MsgBox(0, $title, "Error at POST request !")
    _HTTPClose($soc)
    Exit
EndFunc

Enjoy!

Gradius

Edited by Gradius

Share this post


Link to post
Share on other sites
theguy0000

I have comcast, but the modem says Arris, and doesn't look like the picture... It's for Digital Voice too.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites
PartyPooper

Links to where we can find HTTP.AU3 and IE.AU3 might help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×