Topic: Configuration on Chumby

Is there any reason why configuration isn't allowed via the Chumby itself? It seems awkward to have the widget pop up and say "go to the web to configure".

Digging around some, it looks like I might be able to be evil and post the XML to the same URL a config widget does from the web. (I can make it up, I think, since I have the instance ID and the powers of reverse engineering.) I'm guessing that'd be frowned on, though.

Re: Configuration on Chumby

It's actually OK for the widget to perform its own configuration, by performing the same operations as the configuration widget. That's totally up to the widget author - some widgets already do that today, and there's nothing "evil" about it.

There's no "reverse engineering" needed, since the protocol is encapsulated in the Simple Banner example source code.

Many configuration widgets, however, seem to require some sort of text input, and many require access to external websites.

Re: Configuration on Chumby

Perhaps I screwed up, but it didn't seem like _root._chumby_instance_url was set on widgets being run on the chumby. (And that's what I'm supposed to post to, right?)

Re: Configuration on Chumby

I believe in the widget, it's called "_chumby_widget_instance_href".

Re: Configuration on Chumby

Aha! Cool!

Are there docs anywhere on what variables are set magically?

Re: Configuration on Chumby

The wiki documents most of them.

If you want a complete list:

for (i in _root) {
   trace('_root['+i+'] = '+_root[i]);
}

The beta Control Panel provides quite a few more values than the release version.

Re: Configuration on Chumby

Thanks for the help Duane. I'm new to actionscript/flash/etc so I have a bit of lore to learn.

I dumped the vars that I'm getting. (I'm using the beta control panel). This is from a slightly modified version of the simplebanner_config app.

2008-01-15 23:13:35 TRACE: _root[gotParameters] = [type Function]
2008-01-15 23:13:35 TRACE: _root[_chumby_exit] = [type Function]
2008-01-15 23:13:35 TRACE: _root[_chumby_set_widget_parameters] = [type Function]
2008-01-15 23:13:35 TRACE: _root[_chumby_got_widget_parameters] = [type Function]
2008-01-15 23:13:35 TRACE: _root[_chumby_get_widget_parameters] = [type Function]
2008-01-15 23:13:35 TRACE: _root[$version] = FL 8,1,52,0
2008-01-15 23:13:35 TRACE: _root[_chumby_clock_format] = 12
2008-01-15 23:13:35 TRACE: _root[_chumby_chumby_id] =
2008-01-15 23:13:35 TRACE: _root[_chumby_chumby_name] = Shannon
2008-01-15 23:13:35 TRACE: _root[_chumby_profile_id] = 6fadf64a-9048-199e-4911-c46681741db1
2008-01-15 23:13:35 TRACE: _root[_chumby_profile_name] =
2008-01-15 23:13:35 TRACE: _root[_chumby_user_id] = 68b329da-9893-e340-99c7-d8ad5cb9c940
2008-01-15 23:13:35 TRACE: _root[_chumby_user_name] = posniewski
2008-01-15 23:13:35 TRACE: _root[_chumby_widget_name] = Test config save
2008-01-15 23:13:35 TRACE: _root[_chumby_widget_instance_href] = http://xml.chumby.com
2008-01-15 23:13:35 TRACE: _root[_chumby_widget_instance_id] = 82927A26-C402-11DC-BDDC-0016353BC7CC
2008-01-15 23:13:35 TRACE: _root[_chumby_widget_instance_count] = 1
2008-01-15 23:13:35 TRACE: _root[_chumby_widget_instance_index] = 0

From reverse engineering the configuration app when run from the web site, _chumby_instance_url (which is what is used for saving and loading the parameter XML in simplebanner_config) is

http://www.chumby.com/xml/widgetinstance/34A084C8-C0D0-11DC-A5CC-001635C47868

So, it doesn't appear as if _chumby_widget_instance_href is what was expected. (When run on the beta chumby, at least.)

If I build the address by hand ("http://www.chumby.com/xml/widgetinstance/"+_root[_chumby_widget_instance_id]) then everything seems to work.

Re: Configuration on Chumby

Aha! Here's the dump from the release control panel. It looks correct. So, maybe this is a bug in the beta control panel.

2008-01-15 23:31:00 TRACE: _root[gotParameters] = [type Function]
2008-01-15 23:31:00 TRACE: _root[_chumby_exit] = [type Function]
2008-01-15 23:31:00 TRACE: _root[_chumby_set_widget_parameters] = [type Function]
2008-01-15 23:31:00 TRACE: _root[_chumby_got_widget_parameters] = [type Function]
2008-01-15 23:31:00 TRACE: _root[_chumby_get_widget_parameters] = [type Function]
2008-01-15 23:31:00 TRACE: _root[$version] = FL 8,1,52,0
2008-01-15 23:31:00 TRACE: _root[_chumby_chumby_name] = Shannon
2008-01-15 23:31:00 TRACE: _root[_chumby_user_name] = posniewski
2008-01-15 23:31:00 TRACE: _root[_chumby_widget_name] = Test config save
2008-01-15 23:31:00 TRACE: _root[_chumby_widget_instance_href] = http://xml.chumby.com/xml/widgetinstances/82927A26-C402-11DC-BDDC-0016353BC7CC
2008-01-15 23:31:00 TRACE: _root[_chumby_widget_instance_id] = 82927A26-C402-11DC-BDDC-0016353BC7CC