Your Digital Media Has Never Looked So Good

 
S4Tech
Topic Author
Posts: 3
Joined: Mon Oct 19, 2015 10:38 am

Accessing Roku Device from Web Application

Mon Oct 19, 2015 11:11 am

Hello,

I am attempting to use the External Control Protocol to connect to my home Roku device from my externally hosted web application. I am attempting to retrieve the list of applications installed on the device, using "http://my.device.ip:8060/query/apps", where "my.device.ip" is replaced with the actual device ip address. I keep getting a "Connection Timed Out Error" from my web application; however, when I call the exact same URL from curl, "curl http://my.device.ip:8060/query/apps", I see the expected results. Can someone tell me what I am doing wrong and why I keep getting a connection time out from the web application? I am thinking this is somehow related to security and firewalls, etc., but I don't know how to resolve it. Has anyone been able to get past this issue?

Thanks!
 
sjb64
Posts: 108
Joined: Thu Apr 16, 2015 1:13 pm
Location: Memphis, TN

Re: Accessing Roku Device from Web Application

Mon Oct 19, 2015 11:23 am

Your Roku device is very probably running on a NAT'ed IP (192...) that isn't visible outside your router, and therefore not visible to your "external" web app. You'd have to put your Roku on a static IP visible to the outside world, with all the associated security implications.
FlixRaider channel
 
S4Tech
Topic Author
Posts: 3
Joined: Mon Oct 19, 2015 10:38 am

Re: Accessing Roku Device from Web Application

Mon Oct 19, 2015 11:52 am

Yes, my IP address does start with "192.." so that must be the problem. Well then, I don't really understand the benefit of the External Control Protocol if external web applications can't communicate with the Roku device without jumping through a lot of hoops. I guess I will have to rethink the design on the web application I am trying to build.
 
belltown
Posts: 1465
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: Accessing Roku Device from Web Application

Mon Oct 19, 2015 12:17 pm

S4Tech wrote:
Yes, my IP address does start with "192.." so that must be the problem. Well then, I don't really understand the benefit of the External Control Protocol if external web applications can't communicate with the Roku device without jumping through a lot of hoops. I guess I will have to rethink the design on the web application I am trying to build.

Generally, ECP is used for applications that are external to the Roku as opposed to external to the network. For example, remote control smartphone applications used to control a Roku that is on the same local network. Web applications should be able to communicate with a Roku using ECP without "jumping through a lot of hoops" if they are on the same local network as the Roku.

Even though your web application is hosted remotely, is it being run (from a web browser) by a device on the Roku's local network, or are you trying to access your Roku from a remote location?

There's nothing to stop you using ECP to control a Roku on a different network. However, the network's firewall has to be configured to allow that. By default, this is not usually the case otherwise anyone, anywhere in the world, would have access to a user's Roku. Many routers have a port forwarding option you can use to forward remote requests for a specific port (8060) to a specific local device (192...).
https://github.com/belltown/
 
S4Tech
Topic Author
Posts: 3
Joined: Mon Oct 19, 2015 10:38 am

Re: Accessing Roku Device from Web Application

Mon Oct 19, 2015 1:57 pm

That is very good information to know. Yes, my web application is running from a web browser on my laptop that is connected to the same network as the Roku device. When I call the URL from curl/terminal window, I get the expected results but from my web application, I get a connection timeout.
 
belltown
Posts: 1465
Joined: Thu Dec 09, 2010 1:43 pm
Contact:

Re: Accessing Roku Device from Web Application

Mon Oct 19, 2015 1:59 pm

How exactly are you trying to access the Roku from your web application?
https://github.com/belltown/

Who is online

Users browsing this forum: No registered users and 3 guests