maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   chumby (https://talk.maemo.org/showthread.php?t=11803)

zeez 2007-11-22 13:17

Re: chumby
 
Actually the customizations are parameters that have to be parsed from the xml file and then passed to the flash file. It is very likely that a bunch of stuff doesn't work bc i have just tested like 4-5 widgets. Take a look at the code & the xml file to see what's wrong or post your channel here (or at least the xml file of it)

andyfromtucson 2007-11-22 17:40

Re: chumby
 
I looked at your PHP code and I see how its supposed to work, but for some reason the $name and $value variables don't seem to be getting the the values of the <name> and <value> widget parameters on lines 105 and 106 of your PHP.

Here is the XML from one widget that isn't getting its parameters:

−<widget_instance>
−<widget>
<name>NOAA Weather (US)</name>
−<description>
Current weather conditions and forecasts for the United States, courtesy of the National Oceanic and Atmospheric Administration.
</description>
<version>1.3</version>
<mode time="15" mode="default"/>
<movie href="/xml/movies/E3791136-9AB6-11DB-AC1C-0030485A78AA" contenttype="application/x-shockwave-flash"/>
</widget>
<mode time="15" mode="default"/>
−<widget_parameters>
−<widget_parameter id="9BCAD208-98ED-11DC-87B3-0030488E34F8">
<name>zipcode</name>
<value>85750</value>
</widget_parameter>
</widget_parameters>
</widget_instance>

And here is the relevant part of the page source when I view the PHP page with a browser:

src="http://www.chumby.com/xml/movies/E3791136-9AB6-11DB-AC1C-0030485A78AA" FlashVars="=&=&=&" pluginspage="http://www.macromedia.com/go/getflashplayer"

It looks like the PHP code is looping through the widget parameters but just inserting nulls for the parameter names and values, as shown by FlashVars="=&=&=&"

Here is my profile link: http://www.chumby.com/xml/virtualpro...2-0030488E34F8

technut 2007-11-22 18:00

Re: chumby
 
I am working on adapting the standard "virtual chumby" to fill the screen of the IT. It does work with parameters, timings etc.

It's not perfect, but have a look at
http://technut.canada.googlepages.com/chumby.html
on your IT. You need to be in fullscreen and turn off "Fit to width".

I'm still tinkering, need to mask the sides off... works in FF and IE but not completely in MicroB yet. Haven't tried Opera.

zerojay plans to host Chumby pages at Jablet in future, and will set one up for you now by request (post #15 in this thread).

For more info on the jablet.net version, see
http://jablet.net/forum/viewtopic.php?t=2&start=9

andyfromtucson 2007-11-23 11:34

Re: chumby
 
Quote:

Originally Posted by zeez (Post 98688)
Actually the customizations are parameters that have to be parsed from the xml file and then passed to the flash file. It is very likely that a bunch of stuff doesn't work bc i have just tested like 4-5 widgets. Take a look at the code & the xml file to see what's wrong or post your channel here (or at least the xml file of it)

I figured out how to change your php code so it passed the parameter properly for my one widget with a single parameter. See below. Of course my revised code probably won't work right when there are multiple parameters for a single widget.

for ($j=0;$j<sizeof($a['profile']['widget_instances']['widget_instance'][$i]['widget_parameters']);$j++)
{
$name = ($a['profile']['widget_instances']['widget_instance'][$i]['widget_parameters']['widget_parameter']['name']['value']);
$value = ($a['profile']['widget_instances']['widget_instance'][$i]['widget_parameters']['widget_parameter']['value']['value']);
$param = $param.$name.'='.$value.'&';
}

zeez 2007-11-23 11:36

Re: chumby
 
If i can find the time, i'll update the code and also add the timer stuff... we'll see :)

andyfromtucson 2007-11-30 13:20

Re: chumby
 
Quote:

Originally Posted by zeez (Post 98969)
If i can find the time, i'll update the code and also add the timer stuff... we'll see :)

Zeez: I played with the code a bit more and found that my revision posted above doesn't work when a widget has multiple parameters, and your original version doesn't work if there is only one single parameter for a widget. Trouble is, I can't figure out how to test for the number of parameters a widget has because this:

sizeof($a['profile']['widget_instances']['widget_instance'][$i]['widget_parameters']['widget_parameter']

Seems to return the correct number of widget parameters only if there are more than one widget parameter. If there is a single widget parameter (like for the NOAA weather widget) it returns 3.

Any insight would be appreciated.

technut 2007-11-30 19:55

Re: chumby
 
See my post #23. It's quite usable and supports all parameters.

Syntra 2007-12-15 07:28

Re: chumby
 
Heh, no updates in awhile makes me sad.

(oh man, i wonder if i use digg.....)

technut 2007-12-15 08:41

Re: chumby
 
I've been exchanging email with the Chumby folks trying to convince them to offer a version of Virtual Chumby with no outer case graphics. I'd say my odds are about 50/50 at the moment... there is some hesitation on their part. And they're very busy, so it takes awhile for them to respond. But I haven't given up yet.

collin 2007-12-17 14:54

Re: chumby
 
Btw. I have allready written a nicely working chumby emulator using MozEmbeded (on the Desktop). I'll happily share all the code (python).

It basically works like this:
1) wget CHUMBY_CHANNEL_URL (somebody allready posted something like this in this thread).
2) parse the channel XML file
3) show first widget as specified in the channel XML file
4) show second widget, ... show last widget, check if XML was changed
if yes goto 1, else goto 3


All times are GMT. The time now is 20:39.

vBulletin® Version 3.8.8