Your Digital Media Has Never Looked So Good

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
 
mpoly
Topic Author
Posts: 27
Joined: Fri Mar 23, 2007 8:58 am

Yahoo! Weather for the Soundbridge

Tue Nov 06, 2007 2:06 pm

In case anyone is interested, here is a simple perl script that displays Yahoo! weather reports on the SB while it is idle.

http://www.panix.com/~mpoly/roku/RokuWeather.zip

Any bug reports will be appreciated. I've included US, Metric-English and Greek localization files - it is designed to be easy to localize in any language.

Along with the program is a simple perl module for displaying text on the SB in a blocking or non-blocking manner, and allowing the user to interact with the perl program via the IR remote.

All comments will be appreciated.

Cheers,

Michael
 
danme
Posts: 55
Joined: Wed Feb 28, 2007 8:01 am
Location: Sweden

Tue Nov 06, 2007 4:26 pm

Nice work!

I started doing something similar, also in perl, but was stumped trying to get the icons working and looking nice on the SB... :)

(Some notes for other users)
Using debian (etch), I needed to install package libxml-dom-perl (and dependencies) to get this running. Also I was a little confused first since the perl files didn't include any shebang line (=> you need to start with "perl rokuweather.pl").
 
mpoly
Topic Author
Posts: 27
Joined: Fri Mar 23, 2007 8:58 am

Wed Nov 07, 2007 6:26 am

Thanks! I'll add the shebang and better installation instructions at the next release.

Cheers,

Michael
 
diannabill
Posts: 106
Joined: Mon Oct 29, 2007 5:37 pm

Sun Nov 11, 2007 7:47 am

Sounds like a neat idea - any way to include some basic instructions for using this for newbies like me? Thanks alot
 
RokuNashville

I agree

Sun Nov 11, 2007 8:36 am

diannabill wrote:
Sounds like a neat idea - any way to include some basic instructions for using this for newbies like me? Thanks alot


Yes, basic instructions for a Newbie would help a ton. How do we get this into our Roku?

Cheers!
 
dlcrouch
Posts: 25
Joined: Thu Dec 29, 2005 7:31 am

Sun Nov 11, 2007 9:47 am

will this code work on a M500?
 
mpoly
Topic Author
Posts: 27
Joined: Fri Mar 23, 2007 8:58 am

Tue Nov 13, 2007 1:34 am

diannabill wrote:
Sounds like a neat idea - any way to include some basic instructions for using this for newbies like me? Thanks alot


This is a perl script - you will need to install perl on your machine; if you use GNU/Linux or another unix-like OS it is very likely that perl is already on your machine; for windows you can get it free from Activestate: http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca.

You may also need to install two perl modules, XML-DOM and Net-Telnet. This is done using the command "perl -MCPAN -e shell"; in Windows you can use the "ppm" command instead which has a GUI.

Extract the .zip file locally, and edit the file named 'local' to match your location, language and environment. Then run the program using "perl rokuweather.pl"

To be honest, if you are just looking to display weather on the roku, there might be easier ways - I see others in here have posted their solutions.

What makes rokuweather.pl interesting is that this is published as source code, with a library to interact (both-ways) with the Roku. With some basic programming skills you can customize it to display exactly what you want.

Cheers,

Michael
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Tue Nov 13, 2007 3:37 pm

Hm, finally pokwed with perl and cpan on the slug a little.
make isnt included in the configuration, which took me some time to realize.

So, now the programs working, but I don't see anything on the RoKu.
Are there some hooks i can check in the perl script?
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
mpoly
Topic Author
Posts: 27
Joined: Fri Mar 23, 2007 8:58 am

Wed Nov 14, 2007 12:39 am

fizze wrote:
Hm, finally pokwed with perl and cpan on the slug a little.
make isnt included in the configuration, which took me some time to realize.

So, now the programs working, but I don't see anything on the RoKu.
Are there some hooks i can check in the perl script?


To configure it, you need to edit the "local" file, and enter your Roku's IP address, your location, and your C/F temperature preference.

Also, your Roku must be in Standby mode (i.e. displaying the time). If you wish to also have it show weather while the unit is playing, let me know, I can make that an option. I just thought it would be annoying to have the weather pop up while the Roku is in use.

Finally, the weather is not displayed all the time, but only once every 60 seconds or so. You can chance that by editing the "local" file - the timing values are commented.

Cheers,

Michael
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Wed Nov 14, 2007 3:44 am

Yeah, I adjusted the IP in the file.
Btw is there a reason why hostnames dont work, just IPs?
hostnames would be a nice addition, I think.

Ok, I guess I wasn't patient enough. I just hope the slug doesn't choke on perl ;)

On a sidenote, how comes I have to do the
CPAN>o conf make /opt/bin/make
every time? How can I make that persistent? (sorry, Im a blatant perl nebwie)

edit:
Ok, now it works. Just as a notice, the local file that comes with the zip is borked, since the location is non existant. ;) Perhaps its better to set it to an existing location so people get something when they change the IP and run it.
Awesome work btw! :)
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
mpoly
Topic Author
Posts: 27
Joined: Fri Mar 23, 2007 8:58 am

Wed Nov 14, 2007 11:04 am

Hostnames should work, at least they work for me. Unless you are running a local DNS, you will need to run the roku to your /etc/hosts file. If you have router with DHCP and DNS, make sure you have the same default suffix on all three.

As for make, try setting MAKE = /opt/bin/make in your shell init....

Finally, I'm pretty sure the default location (Thessaloniki, Greece) exists, I'm looking out my window right now, and it's there! :-)

Cheers,

Michael
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Wed Nov 14, 2007 12:41 pm

Hehe, righty, well, at least yahoo weather didn't find it. ;)

Actually nice that most of the CPAN stuff seems to be working. Time to hammer in some more perl stuff. Btw yahoo thinks my town is in Italy while Im pretty sure it isnt. Che catso! :lol:
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
danme
Posts: 55
Joined: Wed Feb 28, 2007 8:01 am
Location: Sweden

Wed Nov 14, 2007 4:23 pm

Many CPAN modules exists as packages in linux distributions. So my suggestion is that you first search your distributions repository and as a second choice install them "by hand".
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Thu Nov 15, 2007 5:02 am

For real general-purpose linux flavours that may be true, but definetely not for embedded flavours like OpenEmbedded, Unslung, etc. ;)

CPAN is easy enough, just need to have "make" and no fully fledged gcc environment.
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
jgoor
Posts: 20
Joined: Sun Feb 11, 2007 2:57 pm

Fri Nov 16, 2007 1:50 am

fizze wrote:
If you wish to also have it show weather while the unit is playing, let me know, I can make that an option. I just thought it would be annoying to have the weather pop up while the Roku is in use.


Well, I am looking for something like this some time already.
The problem used to be that the RC locked up when displaying data on the Roku.
Is this fixed or is it fixable? (if fixable: would you please have a look at it? It would help me a lot)

Kind regards,
John
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7

Who is online

Users browsing this forum: No registered users and 1 guest