Jump to content

SSDP to my Roku


Recommended Posts

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? 

 

Link to comment
Share on other sites

 

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...