Jump to content
dynamitemedia

SSDP to my Roku

Recommended Posts

dynamitemedia

i am trying to ping my roku to see if its online so i can send some remote commands to it via telnet...

what i have so far is this BUT its not coming back anything:

#include <AutoItConstants.au3>
#include <Constants.au3>


$getInfo = _GetDOSOutput("M-SEARCH * HTTP/1.1" & @CRLF & "HOST: 239.255.255.250:1900" & @CRLF & "ST:roku:ecp" & @CRLF & "MAN:""ssdp:discover""" & @CRLF & "MX:10" & @CRLF & @CRLF)
ConsoleWrite($getInfo  & @CRLF)


Func _GetDOSOutput($sCommand)
    Local $iPID, $sOutput = ""
    $iPID = Run('"' & @ComSpec & '" /c ' & $sCommand, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)
ConsoleWrite($iPID  & @CRLF)
    While 1
        $sOutput &= StdoutRead($iPID, False, False)
ConsoleWrite($sOutput  & @CRLF)
        If @error Then
   ConsoleWrite("you have a error"  & @CRLF)
            ExitLoop
        EndIf
        Sleep(10)
    WEnd
    Return $sOutput
 EndFunc   ;==>_GetDOSOutput

Also all the info i want is returned the IP address that should come something back like this:
 

Location: http://192.168.1.134:8060/

any idea(s) what i am doing wrong here? 

 

Share this post


Link to post
Share on other sites
water

 

any idea(s) what i am doing wrong here?

Yes, you are posting in the wrong forum ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
dynamitemedia

oops where should i go?    i didn't think it was a Gui question...

Share this post


Link to post
Share on other sites
water

Ask a Mod to move it to the General Help and Support forum.

The Example Scripts forum is "A forum to share your cool scripts, User Defined Functions and AutoIt-based applications with others."


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
dynamitemedia

thanks it is connected i just cant seem to figure out how to find the IP /Location of it...

Share this post


Link to post
Share on other sites
xseekx

If the Roku is on your local network, you can navigate to your router configuration page in the browser, It is possibly 192.168.1.1, Then if you navigate to DHCP client table, you may be able to find the IP of your Roku.

Share this post


Link to post
Share on other sites
dynamitemedia

yeah i want it in my script so i do not have to do all that... I know it can be done just not sure if i am having a firewall issue or a error in my code 

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

×