Topic: Flash-based Chumby OS

A large endeavor I've started to work on is a Flash-based OS for Chumby.
Nothing super-fancy, just basic functions for stuff that is just so basic (calculator), to things that would take advantage of Chumby's features (Paint? Games?).

Its meant to be used alone, (As in the only widget on the channel), and it functions similarly to the current "Flash OS" on the chumby, as it gets the "Widgets" or "Programs" remotely.


If you'd like to help program the main OS section, please post saying you do. If you want to develop "programs" for it, they need to be 320x200, 12FPS, and the .FLA is always appreciated.

For the Chumby people out there, this isn't meant to replace your system, its just designed to get some more features out of the Chumby that we can't currently get. (ie: A calculator widget would be great, until it cycles out in the middle of a computation...)

Re: Flash-based Chumby OS

Yes.. i do Zachninme smile

Re: Flash-based Chumby OS

We have no objections.

Re: Flash-based Chumby OS

So, you want to work on the actual OS.
Right now, its at a point where the work can't be split. So, it might be a good idea to start work on some 320x200 "Programs".

A Calculator would be a nice start :-)
Also, if you can post a SWF of your game thats scaled down to the 320x200, that would also be helpful smile

Re: Flash-based Chumby OS

If you want to see what I have so far:
http://zbanks.mine.nu/chumbyos/ChumbyOS.fla
In that directory, you can see the .swf's I made for it so far.

If you improve it, either re-post the .fla, or just say what you did.

Sorry for ugly images, I drew them myself with the mouse tongue, and the ugly code, I've been layering code on without planning, I'll probably tidy it up later.

Re: Flash-based Chumby OS

After playing around with this, I've realized theres more potential if I work off building something similar to the current control panel, but with more functionality. (Going from 50% Computer and %50 chumby to %90-100 Chumby), would be more useful.
I'd stop work on the 320x200 widgets, the new one will just use widgets everyone's already uploaded.

7 (edited by zachninme 2007-06-01 07:07:04)

Re: Flash-based Chumby OS

Its been awhile, but heres some code that will gather all the widgets for a selected user's channel:

(Its a proof of concept, please don't put this on a Chumby!)

// Define username and channel wanted:
//Could determined by Chumby Settings
var userid:String = "YOUR_USER_ID";
var channel:String = "Default";
//end predefined
channel = channel.toUpperCase();
chumbysite = "http://www.chumby.com/xml/users/"+userid;
//Create the Widget object that stores widget information:
widgets = new Array();
var currentwidget = 0;
//XML defines
//user XML feed
userXML = new XML();
userXML.ignoreWhite = true;
userXML.onLoad = userLoad;
//profile
proXML = new XML();
proXML.ignoreWhite = true;
proXML.onLoad = proLoad;


//XML Load functions

function userLoad(){
    var usernode:XMLNode = userXML.firstChild.firstChild;
    prosnode == null;
    i = 0;
    while (prosnode == null && i<15){
        i++;
        if(usernode.nodeName.toUpperCase() == "PROFILES"){
            prosnode = usernode.firstChild;
        }else{
            usernode = usernode.nextSibling;
            
        }
    }
    proURL == null;
    i = 0;
    while (proURL == null && i<15){
        i++;
        if(prosnode.attributes.name.toUpperCase() == channel){
            proURL = prosnode.attributes.href;
        }else{
            prosnode = prosnode.nextSibling;
        }
    }
    proXML.load("http://www.chumby.com"+proURL);
}


function proLoad(){
var widgetnodes:Array = proXML.firstChild.lastChild.childNodes;
for(i = 0; i<widgetnodes.length; i++){
    widgets[i] = new Object();
    widgetnode = widgetnodes[i];
    widgets[i]['widget_instance_XML'] = widgetnode.attributes.href;
    widgetnode = widgetnode.firstChild.firstChild;
    //following is looped ALL HARD-CODED!
    widgets[i]['name'] = widgetnode.nodeValue;
    widgetnode = widgetnode.nextSibling;
    //
    widgets[i]['description'] = widgetnode.nodeValue;
    widgetnode = widgetnode.nextSibling;
    widgets[i]['version'] = widgetnode.nodeValue;
    widgetnode = widgetnode.nextSibling;
//Unsaved node: protection
    widgetnode = widgetnode.nextSibling;
    widgets[i]['widget_time'] = widgetnode.attributes.time;
    widgetnode = widgetnode.nextSibling;
//Unsaved node: access
    widgetnode = widgetnode.nextSibling;
    widgets[i]['author'] = widgetnode.nodeValue;
    widgetnode = widgetnode.nextSibling;
//Unsaved node: category
    widgetnode = widgetnode.nextSibling;
    widgets[i]['image'] = "http://www.chumby.com"+widgetnode.attributes.href;
    widgetnode = widgetnode.nextSibling;
//Unsaved node: template  (what does this even do?)
    widgetnode = widgetnode.nextSibling;
    widgets[i]['swf'] = "http://www.chumby.com"+ widgetnode.attributes.href;
    widgetnode = widgetnode.nextSibling;
    widgets[i]['rating'] = widgetnode.attributes.rating; //currently unused
    widgetnode = widgetnode.parentNode.nextSibling.nextSibling
    widgets[i]['time_user']= widgetnode.attributes.time;
}
//Phew! All done!
//You now have an array, widgets, with all the widget info you'll need!
}


//Let's start 'er up!
userXML.load(chumbysite);

It'll create an array, "widgets", that has all the info you'll ever need for each widget. (Starting with widget[0])
Hopfully, the names for the items in the array are descriptive enough. widget_instance_XML does NOT need to be called, as there is already all the info right here. All you really need is widget_time, and swf. Now that I think about it, I forgot the parameters tongue

Make sure when you use this, you don't create memory leaks!

EDIT: I've used this to create a very quick code that allows me to cycle the widgets of any given channel. I'm rather embarrassed by its poor quality , and has leaks, so I'm not letting it run  any more than necessary tongue But it works!


EDIT2: I forgot to bleep out my User Id big_smile

Re: Flash-based Chumby OS

Actually, I wouldn't count on that /users/ URL working for very long - since it's not used by the device, it's likely to go away at some point.

9 (edited by zachninme 2007-06-01 07:06:21)

Re: Flash-based Chumby OS

As it just did tongue

Normally, I'd get all mad and start thinking you're trying to defer me, but thankfully, there are references to the other profiles IN each profile XML file big_smile

Re: Flash-based Chumby OS

You probably shouldn't count on any of that stuff working long-term - there's a lot of shuffling of the XML going on, and services being split off into other servers that is likely to destroy any investment you've made on conforming to that particular XML structure.

It has nothing to do with you - it's all about laying the server groundwork for production chumbys.

Just a friendly warning - don't want you to get upset when we pull the rug out.

Re: Flash-based Chumby OS

I'm okay tongue
Luckily, its not actually a *huge* change, and it ended up being much easier.

Do you plan on always having an XML structure, however? I guess you kind of have to, in order for flash to access it, but I guess there is probably some other way.

I don't mind moving things around/adding more checks anyway big_smile

Re: Flash-based Chumby OS

Ok, wondering why the official Chumby OS is not being made open source as well?  Nice though that you can over-ride it with the USB stick method.  Is there a security risk with providing the .fla for the Chumby Inc. version of the Chumby OS?

* *  **   ***     ***** Joseph Gray Grauwald Creative *****     ***   **  * *

13 (edited by zachninme 2007-06-04 04:33:43)

Re: Flash-based Chumby OS

(Sorry about that intrusion on your thread)

They ditched /users/, so now I have to get all the profiles from the references in /profile/ (Each one references all the others).

The problem is, they reference a private version, and I can only access the public one. I've found that the discrepancies are only in 3-4 digits. Its killing me tongue



EDIT: I hate calling it an OS tongue The original project could be considered an OS, at least a desktop interface + window manager, but right now, I'm trying to create a open-source, alternative Control Panel.

Re: Flash-based Chumby OS

There really is no "Chumby OS" - it's just a Control Panel, which is currently a rather complex Flash 6 movie. Pretty much everything interesting is handled by external scripts or the documented ASnative() calls - even more so on Ironforge.

We haven't made any particular decision one way or the other on whether *our* Control Panel wil be Open. The Foo/Katamari Control Panel is pretty much frozen, and the Ironforge Control Panel is in active development, which is why zachinme is seeing things change around on the server as we tighten up the protocols.

The execs will have to make the call on the Control Panel's source availability, and you're certainly welcome to lobby Steve Tomlin on the topic - one issue, of course, is that it incorporates our branding and logo, and it's not exactly in our interest to have a bunch of mutilated, partially functional Control Panels out there with our logo all over them, misrepresenting the performance or behavior of the genuine product.

The Control Panel, like many complex Flash movies, is also very sensitive to the machine on which it's built - it requires certain commercial fonts and other resources to be available.  I think at this point, only a couple of machines are configured to build it properly.

Of course, nothing's stopping anyone from doing what zachinme is doing.

Re: Flash-based Chumby OS

As I said in my last post, this isn't really an OS, so is there a way the title could be changed to "Open-source Chumby Control Panel Replacement" or something?

Re: Flash-based Chumby OS

The branding portion of it makes perfect sense, as Chumby Inc. is for profit, even though it's making an open-source device.  Brand control will always be an issue, with well-meaning fans butchering the logo on their mySpace page or what-not though. 

Perhaps a solution then could be to create a generic, open, control panel sans branding and commercial fonts.  However, for the geeks out there who would actually bother to customize the thing Zachninme's ground work will be just as useful.

Cheers,
-Joe

* *  **   ***     ***** Joseph Gray Grauwald Creative *****     ***   **  * *

Re: Flash-based Chumby OS

In my opinion, an open-source CP would be kind of cool for people such as myself who can customize the look and feel of it to their liking. As suggested above by grauwald, it would be a good selling point for users to be able to open up a base .fla file and tweek it any way they'd like.

Re: Flash-based Chumby OS

I guess one thing I should make clear is that our intent is that chumby be "hackable", not entirely "open" or "free" in the purest sense.  Many companies erect technical and legal barriers to prevent modifications of their products, but we've made no such effort, and have, in fact, enabled such efforts.

That means that some portions of the system are closed, but replaceable but someone with reasonable skills.  However, one way we made it hackable is by using a *lot* of Open and Free software, all of which is available for modification and reuse.

So, we've made the system such that you can create your own Control Panel and use it instead of ours, but doesn't necessarily mean that the source for our Control Panel will be published.  It remains to be seen if we'll publish a "generic" Control Panel for people to riff.

If we gave you *everything* on a silver platter, it wouldn't really be "hacking" now, would it?

Re: Flash-based Chumby OS

Does anyone know what happened with this?
I noticed that zachninme hasn't posted in a long time.

Re: Flash-based Chumby OS

thinkquick wrote:

Does anyone know what happened with this?
I noticed that zachninme hasn't posted in a long time.

An even longer time now! tongue

Linux Guy - Occasional Chumby Hacker

Re: Flash-based Chumby OS

Here are a few pieces of information that may be helpful:

http://wiki.chumby.com/mediawiki/index.php/ChumbyNative

http://forum.chumby.com/viewtopic.php?pid=23564#p23564

Cheers.

Re: Flash-based Chumby OS

I'm returning to work in something similar, is that project still running?

Re: Flash-based Chumby OS

There's probably a dozen or so people here who have considered writing a replacement control-panel.  When I looked into it, I found a pretty high barrier to entry in that the current control panel provides a number of services that would take a bit of work to recreate.   Ideally, the current control panel would be split into a number of self contained units, for example: alarm-configuration, night-mode, wifi-setup, channel-select, music-player, etc.  The control-panel movie would serve mainly as a controller to switch between the units.  This could lower the entry cost since someone could just work on replacing the part they're interested in. 

I believe the best outcome would be achieved if the Chumby developers collaborated with the community to create refactorings that are folded into the official control-panel.  I'm not sure how this would look with the current closed-source CP.  If Duane or someone at Chumby Inc had ideas of what would be needed initially to open up the CP to, say, support plug-in modules, there would probably be someone here interested in helping out.