Your Digital Media Has Never Looked So Good

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
 
SoxFan1966
Posts: 15
Joined: Tue Nov 20, 2007 7:25 am
Location: Charlton, MA

Tue Nov 20, 2007 7:29 am

I've got this working for my location (displays the weather info when in standby mode). However, how do I terminate the Perl Script so that when the computer that is running this shits down the Roku doesn't get locked up with the lastl ine of the weather display?
 
nelsonpj
Posts: 11
Joined: Sun Oct 09, 2005 5:31 am

Works Great!

Wed Dec 05, 2007 9:37 am

Thanks for the script! This was EXACTLY what I was looking for. It's been working well for me for a week or two now.

I'm serving my Roku M1001 with an old PC running WinXP/iTunes - so this was perfect for me. All I wanted was a simple program to serve weather to my Roku when it was idle. I've tried some of the other solutions posted in this forum, but they were too complicated because they also catalog songs, remotely control the Roku, etc - which I don't need.

Plus this script is unobtrusive to the Roku's operation. The weather displays when the Roku is "off" (idle) - and when I turn on the Roku with the remote, the weather turns off and I can select songs as I usually do. When I'm done with the Roku and turn it off, the weather starts displaying again. Perfect! Some of the other solutions I've tried require you to press an addditional key to turn off the weather display and then press the power button, which was quite annoying, and didn't work well with my programmable Harmony remote.


PS: To help anybody else installing this on Windows: after installing PERL (as per the insructions in another posting, including installing the two additional required PERL libraries) and then editing the *.pl file with WordPad to update with my weather location, I couldn't figure out how to actually run the PERL script. It took me a while to realize that I simply had to double-click on the "*.pl" file! This pops up a DOS-styled box. If you close this box, it stops the script and whatever was displayed on the screen of the Roku "sticks" until I restart the script (or the Roku). Minimizing the box to the task bar still allows the script to run.
 
SoxFan1966
Posts: 15
Joined: Tue Nov 20, 2007 7:25 am
Location: Charlton, MA

Terminating the script cleanly

Wed Dec 05, 2007 9:56 am

As the previous poster mentions, the script runs great. However, if the machine running the script shutsdown or hibernates then the display on the Roku becomes frozen displaying the weather.

Is there a way to get the script to exit cleanly?
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Tue Dec 25, 2007 5:51 pm

Hello,

This may be what I was looking for. I want to display some wheather data and local temperature on my soundbrigde when in standby mode. Currently I have problems to download the ZIP file - I will try it tomorrow again.

What ipkg`s do I need on my Slug to run a/this perl script?

happy xmas
Goemon
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku
Image
[/url]
 
molivier
Posts: 2
Joined: Thu Dec 27, 2007 8:00 am

problems with xml::dom

Thu Dec 27, 2007 8:06 am

This sounds very cool, would love to get it working. I installed ActivePerl and config'd local file. Also managed to install net-telnet via ppm but xml-dom didn't show up there as an option. XML-DomHandler did, but that didn't meet the need. So I went to cpan command prompt and ran "install xml::dom", and that appeared to install it, but still getting this runtime error:

>perl rokuweather.pl
Can't locate XML/DOM.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at rokuweather.pl line 9.
BEGIN failed--compilation aborted at rokuweather.pl line 9.

There is a Dom.pm in my C:\Perl\cpan\build\XML-DOM-1.44-LozUMp\lib\XML so maybe it's a path issue.

please advise. also, sounds like people love this extension... would be great to beef up the doc for the faint of heart :)

thx,
-M
 
Haggis
Posts: 11
Joined: Thu Dec 27, 2007 7:32 pm

Thu Dec 27, 2007 7:35 pm

I had the same problem. After fighting with it for a bit, I went back to the ActiveState web site and installed version 5.8 instead of the newer 5.10 (uninstalled 5.10 first).

After doing this, you will see the required packages in ppm.
 
molivier
Posts: 2
Joined: Thu Dec 27, 2007 8:00 am

Fri Dec 28, 2007 11:56 am

Haggis wrote:
I had the same problem. After fighting with it for a bit, I went back to the ActiveState web site and installed version 5.8 instead of the newer 5.10 (uninstalled 5.10 first).

After doing this, you will see the required packages in ppm.


Thanks, Haggis, that worked like a charm!

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

Mon Dec 31, 2007 1:18 am

Goemon wrote:
Hello,

This may be what I was looking for. I want to display some wheather data and local temperature on my soundbrigde when in standby mode. Currently I have problems to download the ZIP file - I will try it tomorrow again.

What ipkg`s do I need on my Slug to run a/this perl script?

happy xmas
Goemon


Browse this thread from page one. ;)
I've got this running on the slug no alright. You need to install make, automake, perl etc.
You need make because some modules are only obtainable via CPAN. It might take a while on the slug though. So be patient :)
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Another perl scrit for Yahoo Weather on the Roku Soundbridge

Tue Jan 08, 2008 2:35 pm

Hello Michael and everybody else,

inspired from your application and angry about myself (did not get CPAN to work :evil: ) i had a look to perl and thought it might not be too difficult to do it with out the XXX::XXX modules. The next days turned out be productive :D and here is my version of Yahoo! Weather on the Roku Soundbridge

some screenshots: Tools4Roku
download t4roku.zip

I have plans to add more services to it... maybe eMail notification, access to the "alarm" and "sleep" function from the remote ... when? only time will tell.

All comments will be appreciated :) I think my perl code is pretty ugly, but it works. Another thing is that the icon draw sub is very :!: slow. Do you have any idea to make it faster?

that's it for now
CU Goemon
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku

Image

[/url]
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Tools4Roku - update

Sat Jan 12, 2008 1:48 pm

Hello,

I did some modification to the script. Now weather information is shows up in standby mode and can also be activated when the soundbridge is running. Just press the MENU (small house) three times. Go back to normal function by pressing MENU again, or EXIT or POWER.
With UP and DOWN you can select the weather display mode from: (1) just today (2) today and tomorrow (3) only time.

There is also a new download link, as the other was often blocked. Here is the brandnew Tools4Roku homepage with the download:
http://billiatjapan.netfirms.com/Tools4Roku/

Also I figured out how to start the script at boot time in my uNSLUng server. I created a new file called "S80rokuweather" in the "/etc/opt/init.d" folder. The file contains the line
perl /mypathtoroku/t4roku.pl &

(Edit "mypathtoroku" to the location on your server!). Than I made this file executable by entering
chmod 711 /etc/opt/init.d/S80rokuweather

That's it. The Slug will start all files in thois folder at boot time. So as long as the Slug runs, your SB will turn into a weather display :)

I've one problem where I need your help. If the network connection gets lost or the SLUG is shut down, the roku display freezes during weather display. So I need some save KILLing (during shutdown and reboot) for the perl srcipt at least.

Any comments or bug reports are welcome.

CU
Goemon
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku

Image

[/url]
 
Haggis
Posts: 11
Joined: Thu Dec 27, 2007 7:32 pm

Sat Jan 12, 2008 8:21 pm

Goemon,

I like the way your script shows the current weather all the time, and the forecast is available as needed by remote. I was in the process of converting the original script to do this. I find this a lot more usable than constantly changing between current and forecast.

I had to modify yours since I have a M1001 with a 16 row display. I changed the fonts and Y offsets, and got rid of the icons. The only real problem is that Yahoo Weather always shows "Not Available" for the current weather conditions in my city for some reason. This is problem with the source, not your script (the web site is the same). I was going to look into changing the source, but haven't got around to it.

Anyway, I just wanted to say thanks for your script. I really like the layout you did with the large font for the current temperature, and the smaller font for the text.
 
elnjensen
Posts: 2
Joined: Sat Jan 12, 2008 10:34 pm

Please post the changes to the script

Sat Jan 12, 2008 10:37 pm

I had to modify yours since I have a M1001 with a 16 row display. I changed the fonts and Y offsets, and got rid of the icons.


Haggis, could you post your changes? That would be great for those of us with M1000/M1001's that would like to use this.

Goemon, thanks for the script! I really appreciate your work.
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Roku with different display resolution?!?!

Sun Jan 13, 2008 2:59 am

Hello,

I wasn't aware that there are Rokus with different display resolution :shock:

How many pixel has your model? 16 x 140 :?:

Is there any way to read it from the device? Any fancy RCP command available?

Have a nice weekend
Goemon
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku

Image

[/url]
 
Haggis
Posts: 11
Joined: Thu Dec 27, 2007 7:32 pm

Re: Roku with different display resolution?!?!

Sun Jan 13, 2008 8:11 am

Goemon wrote:
Hello,

I wasn't aware that there are Rokus with different display resolution :shock:

How many pixel has your model? 16 x 140 :?:

Is there any way to read it from the device? Any fancy RCP command available?

Have a nice weekend
Goemon


The M1001 screen is 16x280.

Regarding a RCP command, the RCP Specifications manual states the following in regards to GetDisplayData (page 90):
ISSUE:
There is no current way via RCP to determine the format of the data returned by GetDisplayData without just calling it and dynamically sensing the data return type. As an alternative, applications can connect to the unit’s shell console (via a telnet/TCP connection to port 4444) and call the ‘displaytype’ shell command. The following table indicates the types and dimensions of each type based on the return value of the displaytype shell command:
Displaytype result Type Dimensions
Copyright© 2006-2007 Roku, LLC Page 91 www.rokulabs.com
LCD Character 40 x 2
String Character 40 x 2
Small VFD Bitmap 280 x 16
Small VFD Direct Bitmap 280 x 16
Small and Tall VFD Direct Bitmap 280 x 32
Large VFD Bitmap 512 x 32


So it sounds like you can do an RCP GetDisplayData and check the size of the data returned, or you can use the telnet method.

elnjensen,
Let me make my changes to the latest version, and I'll post them. Also, so far, I only changed the Y offset. There can probably be some tweaks done to the X offset because I removed the icons. I wasn't sure how much I was going to work on this due to Yahoo always having incomplete data for my city.
 
Haggis
Posts: 11
Joined: Thu Dec 27, 2007 7:32 pm

Sun Jan 13, 2008 10:15 am

I posted my version at http://members.shaw.ca/rmk/t4roku-m1001.pl

Changes:
- Converted text to english
- Changed fonts and Y offsets for 280x16 display
- Removed drawicon calls

Ideas for future versions:
- Add condition text to forecast (since the icons aren't there in my version)
- Create 16x16 icons. I would probably only use this for the current conditions, rather than the forecast. I would also look into displaying the icon after the text is displayed so the user doesn't have to wait for the icon to draw to get the info.
- Tweak X offsets to account for missing icons
- Display wind chill/feels like temperature.

Goemon,
When I press menu 3 times, the Soundbridge becomes unresponsive for a while.

BTW, for those of you on Windows, put wget.exe in the t4roku folder. You can download it here: http://pages.interlog.com/~tcharron/wgetwin.html
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7

Who is online

Users browsing this forum: No registered users and 3 guests