Topic: XboxMediaCenter widget

A quick introduction: I'm a web developer (java, jsp, javascript etc) living in the UK. I've been following the Chumby project since Kevin Rose showed his FooCamp prototype on Diggnation about 18months ago. I tried the Nabaztag but was really disappointed with how it worked - but the Chumby seems to address all the issues I had with it. I registered for the Chumby insider release but found out they couldn't yet be shipped to the UK so a few days ago I bought one from the US on eBay.

I'm also a big fan of the open source XboxMediaCenter (XBMC) project (a fantastic media player for the original Xbox), so decided to have a go at writing a widget to display the tracks in the XBMC "now playing" queue. To do this, I've written an asp script which sits on the XBMC web server and dynamically generates an RSS feed of the track in the queue each time it's accessed (I think there's probably a more efficient way to do this with a python script, but this is just a prototype for now). I've then created a Flash widget for the Chumby - ActionScript compiled using FlashDevelop and MTASC - that retrieves the RSS file and displays the artist name and track title. You can see my widget running in the virtual chumby here: droza.net/chumby. I don't know for sure whether it works on a real Chumby as I haven't received mine yet. Also this prototype is accessing a fixed rss file on my public webserver as my Xbox web server isn't exposed to the public internet.

I've never written any kind of Flash before, so this is really just for my own curiosity at this stage but I'd like to extend it so that it displays the album art for the currently playing track and eventually add controls so that I can adjust the Xbox volume and skip tracks etc so that the Chumby becomes a remote display/controller for XBMC. It also needs error checking, and a config app for the rss url.

I managed to get the ActionScript compiling to swf pretty easily but had trouble getting it to run in the virtual chumby: I wasted a lot of time because I assumed it was a problem with crossdomain.xml but it turned out to be to do with the way I created the text controls. Strangely, it ran fine in the preview on the MyChannels page, but not in the virtual chumby. I have to thank "raff" for the FlashDevelop template and the pointers in this thread that got me on the right lines.

If anyone has any comments/suggestions about my widget, please let me know in this thread.

Re: XboxMediaCenter widget

I was hoping someone would come up with an XBMC widget because I am a big fan of XBMC as well.

I have a chumby and XBMC. If you'd like, I can test your widget for you.

I'll definitely be keeping my eye on the development of this widget.

Re: XboxMediaCenter widget

ragendem: I need to create a version where the IP address of the xbox is configurable so that it will work on a real xbox with any IP address range or can be pointed at a static file for testing (it's currently hardcoded to read a file off my public web server). I'll have a look at how to create a config app and let you know when I have something that you could try.

Re: XboxMediaCenter widget

I, too, am a fan of XBMC. I believe you can fully control XBMC through the web, and a Chumby applet that did that would be fantastic!

Re: XboxMediaCenter widget

Well my Chumby arrived on Friday and I'm pretty impressed so far. I've tried out my XBMC widget and got it working with a hardcoded url to the RSS file on the Xbox.

I've got a couple of issues though so would appreciate if anyone can help out...

1) I'm using a TextField to display a list of track titles. I have the 'html' property set to true an am using an 'img' tag to display the cover image for the first track in the queue. This works fine when I run the swf file standalone from FlashDevelop, and works when I run it in the VirtualChumby but doesn't display the image on the real Chumby (the text displays fine). Any ideas where there's this difference?

2) I need to write a configuration app for the widget so that the user can specify the IP address of the xbox. I had a look on the wiki and the source code for samplebanner_config but so far haven't been able to get this working in ActionScript. Can anyone point me at an ActionScript example/tutorial?

Re: XboxMediaCenter widget

1) Flash Lite only supports a small subset of the HTML tags in TextFields.  The IMG tags is unsupported.

2) If you look on the "discussion" page for the Simple Banner page on the wiki, there's more information about how configuration works, including some Actionscript.

Re: XboxMediaCenter widget

Thanks for pointing me at the discussion page, Duane. I've now got a rudimentary config app working (with hardcoded values, but it submits back to chumby.com, and the widget can retrieve the values successfully). In the next couple of days I'll work at enhancing this with user editable fields and fixing the image loading. Hopefully by then it will be usable and I can publish it for people to try.

Re: XboxMediaCenter widget

Sweet. I'm looking forward to this.....

Re: XboxMediaCenter widget

A quick progress update: I've got the basic functionality working - the widget now shows the artist and title for the top 3 tracks in the playlist (I might display more if I can figure out how to put scrollbars on the textfield) and displays album art for the first one. I've also added four buttons in the top-right to control play, pause, previous and next so you can have basic control of the xbox from the chumby.

I now need to add in some error checking - if the xbox isn't turned on it just hangs waiting for a response. Also, I've somehow broken it in the VirtualChumby and I've no idea what I've done so I need to do some more investigation.

Hopefully by the end of the week it will be in a state where I can ask other people to give it a try.

Re: XboxMediaCenter widget

Through the XBMC web interface, one can actually queue up media to play. Is it possible to do so through your widget, or is it only a "now playing" dashboard kind of thing?

Thanks again for your work on this - I'm really looking forward to checking it out.

Re: XboxMediaCenter widget

This widget is now live in the "Entertainment" category. More info (screenshot/video) and instructions on how to add the required functionality to XBMC are here: http://droza.net/blog/2008/02/24/xbmchumby/

It's only "now playing" and basic control for play, pause and skip at the moment. Although definitely possible I'm not sure the Chumby would make a great interface for queuing up new tracks and searching by album/artist etc (it'd also be way beyond my current ActionScript skills!).

One issue I'm aware of is that when you skip a track it doesn't update the list of upcoming tracks or the album art. I haven't been able to figure out why this doesn't work - it works fine when I run the flash in standalone mode on my PC, just doesn't work on the chumby. Also, skip tracks doesn't work when XBMC is in "party mode" but I think this is an issue with XBMC as skipping tracks doesn't work from the built-in web interface in party mode either.

Re: XboxMediaCenter widget

I can't seem to get this to work, whenever I save the settings having entere my Xbox's IP, I get taken to a page that doesn't exist on the Chumby webosphere. Any thoughts?

Have set it up according to instructions as per here: http://droza.net/blog/2008/02/24/xbmchumby/

Re: XboxMediaCenter widget

If anyone is still interested in developing this widget further or just wants to take a look at the FlashDevelop project, I've uploaded the code to sourceforge. See the project page here: https://sourceforge.net/projects/xbmchumby/ or my post here: http://droza.net/blog/2008/11/04/xbmchu … ow-public/