Chumby Property Dictionary
Widgets are passed a set of properties on the _root timeline about the Chumby such as its name, the current channel, the Chumby user, the music source, information about the clock, and so forth. These are set by the control panel before each and every widget runs. The current parameters are described below.
Contents
_root
The following are properties of _root explicitly set by the Chumby Flash environment.
_chumby_chumby_*
_chumby_chumby_id
A hash of the GUID of the chumby device. The GUID is unique, and so is the hash. This could be used as a unique key for an external database.
Example: _root["_chumby_chumby_id"]=466FA71A-B376-CA53-702F-04816B2B987
_chumby_chumby_name
The name you associated with your Chumby. This can be changed though the My Chumby web page
- Available on the virtual Chumby, but the value is "Virtual Chumby".
_chumby_clock_*
_chumby_clock_format
- valid values are 12 and 24
_chumby_firmware_*
_chumby_firmware_version
The current firmware version.
- 733
_chumby_hardware_*
_chumby_hardware_version
The current hardware version.
- 3.7 (please edit in your version if it is different)
_chumby_instance_*
_chumby_instance_url
- URL of service which the configuration widget uses to load and/or send widget parameters. The widget uses a different URL if it needs to send new parameter values; see _chumby_widget_instance_href
- See Data Persistence
_chumby_music_*
_chumby_music_properties
The contents of the file /var/run/btplay.properties; this is a "properties" file of "name=value" pairs used to identify the currently playing song. Since this information is derived from the ID3 tags in the currently playing file, the information may or may not be present.
This value is set when the user has selected a music source from the control panel.
My Music Files Example:
_chumby_music_properties=Tags/Title=Nuages Tags/Artist=Mark O'Connor's Hot Swing Trio Tags/Album=Hot Swing! Tags/Year=2001 Tags/Comment= Tags/Genre=Jazz Tags/Index=2 ReplayGain.TrackGain=-350 _chumby_music_source_state=<mp3files/> _chumby_music_source_label= _chumby_music_source_name=My Music Files _chumby_music_source_selector=mp3files
Pandora Example:
_chumby_music_properties=Tags/Title=3015176163719572068? version=4&lid=728576&token=juTuAdB0mFZBW%2FjqYRr9pQ7 bh90oj3PLFBGmjBd8D7tt%2FmHQ5%2FWNxkxel9C3TDiN85Uml UFY6tYIOKbtpGy%2FqX2e%2Fgal4DMQSEZfjgy1wb5u1Dkcixcw 1Cq344EFapEi33RW%2F%2BCyyESPD8sXdwP9QoiAVN25G4386t X6tYmFLQAkqVKWLTaK8pTpYbdyr%2Fs
Shoutcast Example:
_chumby_music_properties=Tags/Title=Electric Skychurch - Creation ICY/notice1=
This stream requires <a href="http://www.winamp.com/">Winamp</a>
ICY/notice2=Firehose Ultravox/SHOUTcast Relay Server/Linux v2.6.0
ICY/name=Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] Tags/RadioName=Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] ICY/genre=Ambient Chill Tags/Genre=Ambient Chill ICY/url=http://somafm.com ICY/pub=1 ICY/metaint=16384 ICY/br=128
_chumby_music_source_*
_selector | _name | _state | _label |
---|---|---|---|
cbspodcasts | CBS Podcasts |
<item> <id>1</id> <name>Eye to Eye</name> <description>Hear newsmakers in their own words as Katie Couric picks the hottest interview of the day.</description> <url>http://www.cbsnews.com/common/includes/podcast/podcast_kceye_1.rss</url> <image_url>http://content.chumby.com/podcast/cbs/image/1</image_url> </item> |
Eye to Eye: Sadr City |
chumbcast | blue octy radio |
<station channels="2" samplerate="44100" lc="1" ct="WERS - Emerson College" genre="Independent" br="128" id="30" mt="audio/mpeg" name="WERS- Emerson College" /> |
WERS - Emerson College |
directurl | My Streams |
<stream url="http://www.wbur.org/listen/feed/shoutcast.pls" id="a234a514-a483-4cd7-1869-46061aa805fc" mimetype="audio/x-scpls" name="WBUR" /> |
WBUR |
iheartradio | iheartradio (beta) | KISS 108 | |
ipod | iPod |
<playlist id="1" trackcount="13" fullTrackCOunt="13"> <name>Bruce Springsteen</name> </playlist> |
Streets of Philadelpha |
mediafly | Mediafly Podcasts |
<channel slug="history and culture" name="history and culture" /> |
US Job Losses; Dr King---s Dream; Primary News |
mp3files | My Music Files |
<mp3files/> |
(an empty string) |
noaa | NOAA Radio by Wunderground |
<stream> <station_id>reif|139|2532</station_id> <location>Denver, CO</location> <callsign>KEC76:162.55</callsign> <url>http://audioplayer.wunderground.com:80/reif/Denver.mp3</url> </stream> |
KEC76:162.55 Denver, CO |
nytpodcasts | New York Times Podcasts |
<item> <id>25</id> <name>Front Page</name> <description>James Barron summarizes the top headlines every weekday morning.<>Schedule: Mon - Fri</description> <url>http://www.nytimes.com/services/xml/rss/nyt/podcasts/frontpage.xml</url> <image_url>http://content.chumby.com/podcast/ny_times/image/25</image_url> </item> |
NYT Front Page for 04/05/2008 |
pandora | Pandora Radio | 108382803930576642 | Structures From Silence |
shoutcast | Shoutcast |
<station lc="4311" ct="Ulrich Schnauss - Never Be The Same" genre="Ambient Chill" br="128" id="841" mt="audio/mpeg" name="Groove Salad: a plate of ambient beats and grooves. [Soma FM]" /> |
Groove Salad: a plate of ambient beats and grooves. [Soma FM] |
sleepcast | Sleep Sounds |
<station channels="2" samplerate="44100" lc="1" ct="Waves - WhiteNoise247.com" genre="White Noise" br="128" id="71" mt="audio/mpeg" name="Waves - WhiteNoise247.com" /> |
Waves - WhiteNoise247.com |
slimserver | SlimServer |
<slimserver ip="172.25.251.11"/> |
Streaming from 172.25.251.11 |
- These parameters are not updated during the widget's run-time.
_chumby_music_source_state
- Only set when music is playing
- XML: Contains the properties of the current music selection, with the exception of Pandora.
- the name of the entity changes depending on the music source.
_chumby_music_source_label
- Only set when music is playing
- Contains the name of the current playing
_chumby_music_source_name
- Only set when music is playing
- The name of the music source, such as "Radio Free Chumby" or "Mediafly Podcasts."
_chumby_music_source_selector
- Only set when music is playing
_chumby_profile_*
_chumby_profile_id
A hash of the GUID used to uniqely represent the current channel. This can be used as a key for an external database.
_chumby_profile_name
The name of the current channel.
- Available on the virtual Chumby.
_chumby_software_*
_chumby_software_version
The current software version.
- 1.6.0
_chumby_timer_*
_chumby_timer_expires
This value is the time (milliseconds after the epoch) when the current widget will expire, or -1 if the current widget is pinned. Unlike most of the other parameters, this value will be updated while a widget is running This will happen if the user interacts with the widget by pinning it or touching the screen.
You can get the current time in the same format as _chumby_timer_expires value by using the getTime() method of Date, as in:
var myDate:Date = new Date(); var expires:Number = _root["_chumby_timer_expires"]; if ( expires == -1 ) { trace ("ya pinned me!"); } else if ( expires - myDate.getTime() < 10000 ) { trace("less that ten seconds to go..."); }
_chumby_user_*
_chumby_user_id
A hash of a unique ID (GUID) assciated with you. This is separate from your user name. This is meant to uniquely identify the user and allow a developer to use it as a key for an external database.
_chumby_user_name
Your user name, that is, the account which with you registered your Chumby.
- Available on the virtual Chumby.
_chumby_widget_*
_chumby_widget_done
- Cooperative mode; setting it to true signals the widget is done
- See Cooperative Mode
- Available (and visible) in the Virtual Chumby
_chumby_widget_name
The name of the current widget, as given during configuration time.
_chumby_widget_test
? (Please fill in what this is for)
- Available in the Virtual Chumby with the value iof false
_chumby_widget_instance_*
_chumby_widget_instance_count
The number of widgets in the current channel.
_chumby_widget_instance_href
- URL of service which the widget uses to send widget parameters. The configuration widget uses a different URL if it needs to send new parameter values; see _chumby_instance_url
- See Data Persistence
_chumby_widget_instance_id
A unique identifier (GUID) given your widget.
- I think this is updated whenever a widget is updated...
- When a configuration widget calls getURL(), this is passed along via the query string.
_chumby_widget_instance_index
The current widget's position within the list of widgets in the current channel. This starts with 0, not 1.