# Direct Channel Selection Using Telnet?

**URL:** <https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [February 8, 2013, 7:41pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309 "2013-02-08T19:41:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 8, 2013, 7:41pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/1 "2013-02-08T19:41:24Z")

</div>

Hey,

I see all the commands to simulate the remote control buttons over telnet, “press a” etc., but was hoping  
that there may be commands to directly select channels?

Thanks,

Carl

---

<div class="post-metadata">

**Author:** ![gonzotek](https://sea3.discourse-cdn.com/roku/user_avatar/forum.developer.roku.com/gonzotek/32/93_2.png) [@gonzotek](https://forum.developer.roku.com/u/gonzotek)\
**Post date:** [February 8, 2013, 8:01pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/2 "2013-02-08T20:01:17Z")

</div>

The telnet control interface is considered deprecated. Roku replaced it with ECP (the External Control Protocol). Using ECP, you can send a launch command with the appid of the channel you want to launch, e.g.  
[http://192.168.20.111:8060/launch/11](http://192.168.20.111:8060/launch/11)  
will launch the channel store. App ids can be obtained from several sources: through ecp, using the ‘query/apps’ command, from the developer control panel (for channels you’ve developed yourself), or from the Roku channel guide website (they’re part of the URL, when you are looking at a channel’s details, e.g. [http://www.roku.com/channels#!details/12/netflix](http://www.roku.com/channels#!details/12/netflix) ← the appid is 12).  
Here’s the documentation for ECP:  
[http://sdkdocs.roku.com/display/RokuSDK … trol+Guide](http://sdkdocs.roku.com/display/RokuSDKv48/External+Control+Guide)

You could try using telnet to ‘launch 12’(for instance), but I’m not sure if that was ever implemented before they switched to ECP.

---

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 8, 2013, 10:51pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/3 "2013-02-08T22:51:44Z")

</div>

Thanks a bunch for the info. Will give that approach a go.

Carl

---

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 9, 2013, 12:33am UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/4 "2013-02-09T00:33:10Z")

</div>

Sorry, really not too up on this type of stuff, but can the commands be sent using AppleScript, and if so  
might you have an example of how that may be done?

Many thanks,

Carl

---

<div class="post-metadata">

**Author:** ![RokuJoel](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RokuJoel](https://forum.developer.roku.com/u/RokuJoel)\
**Post date:** [February 9, 2013, 12:39am UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/5 "2013-02-09T00:39:05Z")

</div>

If you can do http POST (submit a web form) from Applescript and http GET (retrieve a web page) from Applescript then you can speak ECP to Roku from Applescript. A quick search of Google indicates that this is most likely possible.

- Joel

---

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 9, 2013, 1:02am UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/6 "2013-02-09T01:02:40Z")

</div>

Thanks Joel. I’ll check that out.

Carl

---

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 9, 2013, 1:37am UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/7 "2013-02-09T01:37:00Z")

</div>

Seems it may be better to use Python to send a Post command to Roku.

Might anyone have an example of one?

Thanks,

Carl

---

<div class="post-metadata">

**Author:** ![ckeyes888](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@ckeyes888](https://forum.developer.roku.com/u/ckeyes888)\
**Post date:** [February 19, 2013, 8:09pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/8 "2013-02-19T20:09:33Z")

</div>

Sorry, really not up on this stuff at all.

As in the post above it sounds like this command: [http://192.168.20.111:8060/launch/11](http://192.168.20.111:8060/launch/11) is exactly what I’m after  
but I have no idea how to send or execute it.

Any help greatly appreciated.

Thanks,

Carl

---

<div class="post-metadata">

**Author:** ![gonzotek](https://sea3.discourse-cdn.com/roku/user_avatar/forum.developer.roku.com/gonzotek/32/93_2.png) [@gonzotek](https://forum.developer.roku.com/u/gonzotek)\
**Post date:** [February 19, 2013, 9:09pm UTC](https://forum.developer.roku.com/t/direct-channel-selection-using-telnet/3309/9 "2013-02-19T21:09:20Z")

</div>

> “ckeyes888” wrote:  
> Sorry, really not up on this stuff at all.
> 
> As in the post above it sounds like this command: [http://192.168.20.111:8060/launch/11](http://192.168.20.111:8060/launch/11) is exactly what I’m after  
> but I have no idea how to send or execute it.
> 
> Any help greatly appreciated.
> 
> Thanks,
> 
> Carl  
> The command must be sent as a POST http request, so whatever language you’re using has to support that or be able to hook into a program (such as curl or wget) that can do that. In Remoku (the web-based Roku remote I wrote), I use hidden forms and iframes to accomplish this. In less restrictive environments, like python, you can do this more easily.  
> Here’s some info that should help if you’re using python:  
> [http://www.voidspace.org.uk/python/arti … shtml#data](http://www.voidspace.org.uk/python/articles/urllib2.shtml#data)

and if you’re using applescript:  
[http://lists.apple.com/archives/applesc … 01250.html](http://lists.apple.com/archives/applescript-users/2002/Sep/msg01250.html)

If this isn’t enough to get you started, please explain what you’re using and what specifically is hanging you up. I don’t have a Mac, so I won’t be much help if you’re doing this in AppleScript, but might still be able to make suggestions.
