jespin3
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2016
03:25 PM
Scripting for Roku
Hello, I just want to apologize ahead of time for my noob-ness. This is my first post.
I am wondering if Rokus can respond to script commands.
I came across this post during a search. This user wrote a script to effectively implement a two minute skip.
https://forums.roku.com/viewtopic.php?f ... 21#p529958
I would like to pick anyone's brain on this. Apparently TCL/TK was used; https://www.tcl.tk/
Ultimately, I would want to see if it's possible to automatically restart a TV stream after it gets stuck (and stays) on the "Loading... please wait" screen.
I am wondering if Rokus can respond to script commands.
I came across this post during a search. This user wrote a script to effectively implement a two minute skip.
https://forums.roku.com/viewtopic.php?f ... 21#p529958
I would like to pick anyone's brain on this. Apparently TCL/TK was used; https://www.tcl.tk/
Ultimately, I would want to see if it's possible to automatically restart a TV stream after it gets stuck (and stays) on the "Loading... please wait" screen.
6 REPLIES 6
jespin3
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
12:34 PM
Re: Scripting for Roku
Ok I found the commands, which does some of the things I am looking for. I am currently playing around with them.
https://sdkdocs.roku.com/display/sdkdoc ... trol+Guide
Edit:
So basically I want to write a script that will refresh/reboot my current streaming TV channel.
However I want to expand this.
Then re-launch this channel
https://sdkdocs.roku.com/display/sdkdoc ... trol+Guide
Edit:
So basically I want to write a script that will refresh/reboot my current streaming TV channel.
curl -d '' http://172.16.1.173:8060/launch/11?contentID=27536 #ID for CBS News, 172.16.1.173 is my Roku IP
sleep 1
curl -d '' http://172.16.1.173:8060/keypress/Select
However I want to expand this.
curl http://172.16.1.173:8060/query/active-app #Pull current channel thats running
Then re-launch this channel
curl -d '' http://172.16.1.173:8060/launch/11?contentID=27536 #Where 27536 is what was pulled from active-app
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
12:56 PM
Re: Scripting for Roku
"jespin3" wrote:
Then re-launch this channelcurl -d '' http://172.16.1.173:8060/launch/11?contentID=27536 #Where 27536 is what was pulled from active-app
To re-launch you'll need this:
curl -d '' http://172.16.1.173:8060/keypress/Home
curl -d '' http://172.16.1.173:8060/launch/27536
There is a problem further down the road though: there is no way to detect when channel [gets stuck (and stays) on the "Loading... please wait" screen."]
jespin3
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
08:53 AM
Re: Scripting for Roku
"EnTerr" wrote:"jespin3" wrote:
Then re-launch this channelcurl -d '' http://172.16.1.173:8060/launch/11?contentID=27536 #Where 27536 is what was pulled from active-app
To re-launch you'll need this:curl -d '' http://172.16.1.173:8060/keypress/Home
curl -d '' http://172.16.1.173:8060/launch/27536
There is a problem further down the road though: there is no way to detect when channel [gets stuck (and stays) on the "Loading... please wait" screen."]
I appreciate the reply! At this point I have an expectation of my Roku getting stuck at the Loading... please wait screen periodically. I'm going to attempt to have the current channel that's playing refresh the stream regardless if stuck or not.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
08:57 AM
Re: Scripting for Roku
I'd suggest that you may be approaching this wrong. Getting stuck at loading is not a normal situation and in the vast majority of channels it doesn't happen. I've never heard of another developer who felt they needed to do something like this. There may be some issue that causes your server to stop delivering data to the Roku. Restarting the stream in that case seems like a band-aid solution, while figuring out the actual communication problem seems more appropriate.
--Mark
--Mark
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
10:56 AM
Re: Scripting for Roku
I think "power user" and not "app developer", @RokuMarkn.
I doubt @jespin3 is the developer of #27536 (CBS News). Seems trying to MacGyver workaround for 3rd party channel hang-ups.
I doubt @jespin3 is the developer of #27536 (CBS News). Seems trying to MacGyver workaround for 3rd party channel hang-ups.
jespin3
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
11:38 AM
Re: Scripting for Roku
"EnTerr" wrote:
I think "power user" and not "app developer", @RokuMarkn.
I doubt @jespin3 is the developer of #27536 (CBS News). Seems trying to MacGyver workaround for 3rd party channel hang-ups.
EnTerr, you are correct. I am making an attempt at a work-around.
RokuMarkn, I'm kinda tapped on my network hangup issues. I've been down that path already. I am okay with a band-aid solution through emulating remote control commands.
My knowledge of programming and scripting is very basic, so I'm making an attempt to get up to speed. This is stuff I'm interested in anyways so it doesn't hurt to give it a shot!
Essentially, I am trying to figure my way through what I want my program to do;
Search for Roku on the network and determine it's IP. Store IP.
Query what channel that's currently on display. Store app-ID.
query/active-app
Re-launch the stored app-ID
launch/11?contentID=14'
At a set interval, keep relaunching current appp-ID
Basically I just want to keep my Roku playing TV all day without needing to babysit it.