Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
belltown
Roku Guru

Re: Command line Editing in Console?

Thanks for the tip on the 'from ... import' statement, EnTerr. It would seem very appropriate in that case. I remember coming across it, but didn't look into it further as I'd already got my basic imports working.

I've been looking into doing a GUI debugger wrapper. It has a lot more potential than my Python attempt (in addition to the command history and logging: multiple tabs for different Rokus/ports, discovering the Rokus on the network, a drop-down menu listing all the Roku ports, a clear-screen key, ... -- probably stuff that Eclipse already has, if I hadn't given up on trying to get it working).

I've never thought that Roku needed a full-blown IDE, although I haven't personally worked on anything that I thought would benefit from that. A "Roku IDE" would probably have to be platform-independent, which is what Eclipse claims to be -- if you can get it to work. If I was really interested in such a project, I'd probably write a Visual Studio extension, since that's what I've been using for most of my development recently.
0 Kudos
renojim
Community Streaming Expert

Re: Command line Editing in Console?

belltown, I finally got around to trying your Windows Roku Debugger. This is fantastic! You are my hero. :mrgreen: <- green with envy. I was going to put in a request for command recall, but then I thought I'd take a look at the code and try to add it myself as a small contribution. If that's your first attempt at Python coding, I'm very impressed. I've been futzing around with Python for years (mostly modifying others' code) and I couldn't begin to put something like that together. Anyhoo, I realized you're using the Windows console somehow and command recall is already built in. Just type a few characters of the command you want to recall and press F8. I don't find the two windows aspect much of an issue at all. It takes a little getting used to and I did find myself looking at the wrong window a few times, but I'm sure the more I use it the less that will happen.

My sincere thanks!
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
belltown
Roku Guru

Re: Command line Editing in Console?

"renojim" wrote:
I realized you're using the Windows console somehow and command recall is already built in. Just type a few characters of the command you want to recall and press F8.

Thanks, JT. I had no idea that F8 would give you command-completion in the Windows console. I also just discovered that F7 will give you a pop-up list showing all your previous commands; you can scroll though with the up/down keys and pick the one you want.
0 Kudos
renojim
Community Streaming Expert

Re: Command line Editing in Console?

Ah, I forgot about F7. I've been using the JPSoft command line replacement products since the DOS days. I've never understood why everyone doesn't just use the up/down arrows for command completion like they've been doing for decades (I'm looking at you bash!).

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Komag
Roku Guru

Re: Command line Editing in Console?

I really like the GUI belltown, used it a few hours today, so clean and simple and WAY better that using Eclipse just for command line!!! :oops: :mrgreen:

So far it works great (install was tricky with my anti-virus)
0 Kudos
belltown
Roku Guru

Re: Command line Editing in Console?

My graphical interface to the Roku Debugger is now available for public use. It's called PurpleBug. You can find it here: http://belltown-roku.tk/PurpleBug

Hopefully, Windows users will find it useful. Just click the "Install PurpleBug" button to download the installer. Be advised that it may not install if your anti-virus protection is turned on. You may need to disable anti-virus protection before you run the installer. The same applies whenever a new update is to be installed. Apart from that, let me know if you have any problems with it.

PurpleBug features multiple tabs allowing multiple simultaneous debug sessions to different Rokus and ports. There's a drop-down menu for the Roku ports in case you forget which port the screensaver runs on, for example. The Rokus on your network should be discovered automatically, so you don't have to type in the IP address each time; just click the device you want to debug. In the command window, the up/down keys can be used to cycle through your command history. The tab key can be used to cycle through commands starting with characters already typed on the command line. You can also define 10 shortcuts for commonly used debugging commands. The Rokus' output windows have an unlimited size and can also be logged to a file. You can choose whether or not the output windows scroll automatically, and whether or not line wrapping is enabled. There are also Clear Screen and Clear Line keys.
0 Kudos
TheEndless
Channel Surfer

Re: Command line Editing in Console?

"belltown" wrote:
My graphical interface to the Roku Debugger is now available for public use. It's called PurpleBug. You can find it here: http://belltown-roku.tk/PurpleBug

Hopefully, Windows users will find it useful. Just click the "Install PurpleBug" button to download the installer. Be advised that it may not install if your anti-virus protection is turned on. You may need to disable anti-virus protection before you run the installer. The same applies whenever a new update is to be installed. Apart from that, let me know if you have any problems with it.

PurpleBug features multiple tabs allowing multiple simultaneous debug sessions to different Rokus and ports. There's a drop-down menu for the Roku ports in case you forget which port the screensaver runs on, for example. The Rokus on your network should be discovered automatically, so you don't have to type in the IP address each time; just click the device you want to debug. In the command window, the up/down keys can be used to cycle through your command history. The tab key can be used to cycle through commands starting with characters already typed on the command line. You can also define 10 shortcuts for commonly used debugging commands. The Rokus' output windows have an unlimited size and can also be logged to a file. You can choose whether or not the output windows scroll automatically, and whether or not line wrapping is enabled. There are also Clear Screen and Clear Line keys.

Brilliant! Thanks, belltown! For some reason, it wasn't able to discover any of my Rokus automatically, but manually typing in the IP address worked fine. Any chance of adding support for specifying the font and size and/or sharing the source code, so we can extend the functionality ourselves?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
belltown
Roku Guru

Re: Command line Editing in Console?

"TheEndless" wrote:
Brilliant! Thanks, belltown! For some reason, it wasn't able to discover any of my Rokus automatically, but manually typing in the IP address worked fine. Any chance of adding support for specifying the font and size and/or sharing the source code, so we can extend the functionality ourselves?

Not sure why it couldn't discover your Rokus. I'm sending out the following SSDP Discovery request and listening for responses:

string ssdpRequestString = "M-SEARCH * HTTP/1.1\r\n" +
"HOST:239.255.255.250:1900\r\n" +
"MAN:\"ssdp:discover\"\r\n" +
"ST:roku:ecp\r\n" +
"MX:2\r\n" +
"\r\n";


The source code is embarrassingly horrible right now. It's written in C# and was my first attempt at a XAML/WPF project. I'm sure it would give anyone else headaches trying to figure it out. I will take a look at changing the font and font size, however.
0 Kudos
EnTerr
Roku Guru

Re: Command line Editing in Console?

"belltown" wrote:
Not sure why it couldn't discover your Rokus. I'm sending out the following SSDP Discovery request

You are sending/listening over UDP i hope?
Sorry, don't mean to offend but just noticed the ECP doc says "using the http protocol to 239.255.255.250 port 1900" which is... well, arguably wrong. But misleading for sure, since SSDP is not HTTP per se, it's HTTPU (http-like over UDP). Also, put space after the colon (key: value)
0 Kudos
belltown
Roku Guru

Re: Command line Editing in Console?

"EnTerr" wrote:
"belltown" wrote:
Not sure why it couldn't discover your Rokus. I'm sending out the following SSDP Discovery request

You are sending/listening over UDP i hope?
Sorry, don't mean to offend but just noticed the ECP doc says "using the http protocol to 239.255.255.250 port 1900" which is... well, arguably wrong. But misleading for sure, since SSDP is not HTTP per se, it's HTTPU (http-like over UDP). Also, put space after the colon (key: value)

Yes, definitely using UDP (a Datagram Socket as Windows calls it). I see what you mean about the Roku docs. The SSDP specs describe it as " A multicast discovery and search mechanism that uses a multicast variant of HTTP over UDP".

It works fine discovering my Rokus, and I know at least one other person whose Rokus were also discovered. So far, TheEndless is the only one who's reported a problem with the discovery mechanism. I will add a space after each colon for the headers, although it seems to work for me without them, and technically they're not required, just "preferred", whatever that means. One thing I wasn't really clear about was the "MX" header; I wasn't sure whether to leave it out, or if using it, what value to use for it. Maybe his devices are taking longer to respond to the SSDP requests, due to the number of devices, or network configuration, or something. I did notice during my own testing that there were times when one or more Rokus did not always respond to SSDP requests. I'd try again later then every device responded.
0 Kudos