Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in the 'discovery subcommand to find Roku Devices #5

Closed
heathdbrown opened this issue Nov 7, 2023 · 5 comments · Fixed by #6
Closed

Add in the 'discovery subcommand to find Roku Devices #5

heathdbrown opened this issue Nov 7, 2023 · 5 comments · Fixed by #6

Comments

@heathdbrown
Copy link
Owner

heathdbrown commented Nov 7, 2023

Add in the SSDP 'find' capability for the Roku Device

To query for a Roku device IP address, send the following HTTP request to 239.255.255.250 port 1900:

M-SEARCH * HTTP/1.1
Host: 239.255.255.250:1900
Man: "ssdp:discover"
ST: roku:ecp

Expected repsponse:

HTTP/1.1 200 OK
Cache-Control: max-age=3600
ST: roku:ecp
Location: http://192.168.1.134:8060/
USN: uuid:roku:ecp:P0A070000007
@heathdbrown heathdbrown changed the title Add in the SSDP 'find' capability for the Roku Device Add in the 'discovery subcommand to find Roku Devices Nov 7, 2023
@heathdbrown
Copy link
Owner Author

heathdbrown commented Nov 11, 2023

@heathdbrown
Copy link
Owner Author

@heathdbrown
Copy link
Owner Author

Might need to add in a platform check for Windows or Linux as the socket bind operation needs UAC for admin privileges.

@heathdbrown
Copy link
Owner Author

heathdbrown commented Nov 11, 2023

I am using the SSDP library and wrapped the discover function with logic to check for windows and it triggers the UAC, however, I am still getting the OSError: [WinError 10022] An invalid argument was supplied

A similar issue was found on the SSDP library github
codingjoe/ssdp#85

@heathdbrown
Copy link
Owner Author

Using the tuple solution in the previous comment:

 connect = loop.create_datagram_endpoint(PrintSSDMessageProtocol, family=family, local_addr=(bind, 6666))

heathdbrown added a commit that referenced this issue Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant