1 (edited by bobsz 2012-03-17 18:57:29)

Topic: Help adding offline widgets with my low skill level

I used songmaster's method to download a couple of widget files to try to add to Zurk's firmware. (Used wget, even that was new to me.) They seem to be in the right format, eg a clock widget produced a 167 kb file called C3274E1A-050E-11DE-B045-001B24F07EF4. But now I have no idea  how to integrate it into the firmware. Any simple suggestions? I did download and learn to use EditPad, and can see how to modify some of zurk's included widgets. But as for adding widgets, it may be beyond me. Hopefully, I'm just missing something obvious.

I know zurk's work is a good surival plan, and he came up with it fast, and it works. Has anybody else come up with anything other than zurk's solution? I seem to remember maybe Duane and Doktor Jones mentioning things a way back. (But I know a lot has changed since then!) I'm hoping for a "Chumby on a stick" with maybe some kind of graphic interface for changing things- probably impossible Well, at least I'm learning a lot thanks to this forum. Thanks to all who are still here helping. I sure hope the Chumby servers keep pumping away!

Re: Help adding offline widgets with my low skill level

I just tried working on my problem again, but it got worse off. I saw my 167 kb file is a lot bigger than any of the files in zurk's "www" folder. Now I'm not sure if I'm even downloading the right stuff.

3 (edited by zurk 2012-03-18 08:55:41)

Re: Help adding offline widgets with my low skill level

easiest way is to download ALL your widgets at once.
firstly, put all the widgets you want in ONE channel. delete off all your other channels. then play that channel.
then run the following commands while sshed into the chumby.
stop_control_panel
start_control_panel
you will see a whole bunch of scrolling. press cntrl C after the channel starts playing. this will stop the output. wget the profile file by reading through the output. a profile file is a list of widgets in a channel. see www/xml/profiles or lighty/html/xapi/device/show depending on whether you have a chum 1 or 8.
then copy the file to your PC and open it in a text editor like wordpad.  copy any urls you see into another text editor window. replace any instances of http:// with file:// like you see in my original profile file.
wget the entire list of URLs and dump them in the www folder. there is a bunch of hex strings as you pointed out. there are 3-4 files for each widget you need to get.
once you have the widget files and the profile youre done. reboot the chumby and it should run fine.

edit: graphical interface would be really easy. hopefully someone with more time can do this and post it up or do a simple tutorial. unfortunately i dont want to invest more time into the platform. my firmware gives me all i need to run all 3 of my chumbies fine regardless of the state of chumby.com so there is no need to spend more effort on a dying platform. thems the breaks. i dont even have any chumbies activated anymore (deactivated chumbies work fine with offline firmware) or a chumby.com account. only my forum account is left.

Re: Help adding offline widgets with my low skill level

@zurk, thanks for the quick reply. I'm really glad you're still on the forum. I'll have to do some learning before I can try your method, but I sure appreciate it. I should have started learning more about SSH, using Putty, etc back in December, when we all saw what was happening. Hopefully, I can do that when Chumby's servers are still rolling. Regardless, your V5 can fill my basic needs as it is, especially for the music. Thanks for all your work.

Re: Help adding offline widgets with my low skill level

The widgets in your channel are downloaded to the chumby & popped into /tmp, the file order is the channel order.

Might be easier than fiddling with wget.

more info here: http://forum.chumby.com/viewtopic.php?pid=40848#p40848

Re: Help adding offline widgets with my low skill level

@servalan & everyone Thanks. And I found your related posts and links. But I'm missing one very *basic* thing: how do I find my way into the files in /tmp? I can view the contents of /tmp via SSH, but I don't know how to "explore" the contents, or how to extract the files. Thanks for your updated .zip 'ware on another forum, at least I can understand the contents of that.

Re: Help adding offline widgets with my low skill level

bobsz wrote:

@servalan & everyone Thanks. And I found your related posts and links. But I'm missing one very *basic* thing: how do I find my way into the files in /tmp? I can view the contents of /tmp via SSH, but I don't know how to "explore" the contents, or how to extract the files. Thanks for your updated .zip 'ware on another forum, at least I can understand the contents of that.

Explore - use the 'ls' command e.g.

chumby:/tmp/widgetcache# ls -l
-rw-r--r--    1 root     root         3850 Mar 23 23:26 3DF40584-AFB0-11DD-9D56-001E681DFAC2
-rw-r--r--    1 root     root        22119 Mar 23 23:28 FB10FEA8-0054-11DD-A3D2-001635C47868

You can then copy the widgets to /mnt/usb/www (where the mini web server lives on my usb stick) or scp them to your main computer.

e.g.

chumby:/tmp/widgetcache# cp 3DF40584-AFB0-11DD-9D56-001E681DFAC2 /mnt/usb/www/internode.swf

From my desktop computer - copying the contents of the /tmp/widgetcache on the chumby to local disk:

$ scp -r root@192.168.1.23:/tmp/widgetcache/ widgetcache/
root@192.168.1.23's password: 
C6A03AEE-47DA-11DD-A42E-001E681DFAC2     100%   56KB  56.2KB/s   00:01    
D8C5BB3E-54F6-11DE-BC6B-001B24F07EF4     100%   89KB  89.2KB/s   00:00    
FB10FEA8-0054-11DD-A3D2-001635C47868     100%   22KB  21.6KB/s   00:00    
widgetcache.xml                          100%  614     0.6KB/s   00:00    
3DF40584-AFB0-11DD-9D56-001E681DFAC2     100% 3850     3.8KB/s   00:00    

I use the cygwin environment under windows to give me a unix like environment: bash shell, ssh, find, etc...
http://www.cygwin.com/

Re: Help adding offline widgets with my low skill level

For those doing this - the widgets are cached in /tmp/widgets on Classic only.  For the other devices, they're cached in /mnt/storage/widgets.

Re: Help adding offline widgets with my low skill level

Duane wrote:

For those doing this - the widgets are cached in /tmp/widgets on Classic only.  For the other devices, they're cached in /mnt/storage/widgets.

Is that true for the infocast 8 as well? I don't see a widgets directory in /mnt/storage.

Re: Help adding offline widgets with my low skill level

its way easier to use wget.
the cache doesnt have the nice widget thumbnails etc.
wget url downloads the url and saves it to the current directory . its that simple.

Re: Help adding offline widgets with my low skill level

zurk wrote:

its way easier to use wget.
the cache doesnt have the nice widget thumbnails etc.
wget url downloads the url and saves it to the current directory . its that simple.

I was doing that until I ran into this url from my own widget in the profile that I downloaded:
<template href="/xml/configs/41A11366-D99D-11DF-8904-0021288E720C"/>

I would appreciate it if someone could either tell me how to download this specific template file or answer my original question.

Thanks.

Re: Help adding offline widgets with my low skill level

yup. you just delete that line off from your xml file. problem solved.

Re: Help adding offline widgets with my low skill level

The URL you need to find, in the log of the start script, looks like:
    http://xml.chumby.com/xml/profiles?id=C9....

Even if it truncated, you should be OK.

If you want to download all the widgets on your channel, then save they item from wget to myprofile.xpl and then
you can use this python script:



import os
import xml.etree.ElementTree as ET
tree = ET.parse("myprofile.xml")
print tree.find("widget_instances/widget_instance/widget").attrib.get("id")
widgets = tree.findall("widget_instances/widget_instance")
for w in widgets:
    x= w.find("widget")
    wname= x.findtext("name")
    conf= x.find("template").attrib.get("href")
    flash= x.find("movie")
    wname = wname.replace(" ","_")
    print wname, conf, flash.attrib.get("href")
    os.system("mkdir "+wname)
    os.system("cd "+wname+'; '+ "wget '"+flash.attrib.get("href")+"'; "+ "wget '"+conf+"'")

Re: Help adding offline widgets with my low skill level

dudek - have a look at http://xml.chumby.com/xapis/catalog with your python script.

Re: Help adding offline widgets with my low skill level

Quick question... what are the old IPs for Chumby.com?  Per what Blue Octy said, the old servers are actually still there up and running through the 28th, meaning two things...

1) I'm guessing if we do the reverse thing of trying out the stub beta (i.e. modifying our hosts file to now point to the original IPs instead of the stub IPs which are now 'live') we can use our devices for another week while we figure out things like Zurk's offline ROMs.  But more importantly...

2) I didn't even know this change was coming (!!) so I haven't grabbed all of the widgets I was using as a back-up!  I know there's the tool wget, but again, I'd need to point it at the Chumby servers before they go dark to grab the widgets themselves, which it now looks like I have an eight-day window to achieve.

Also, just my 2c worth, I too would gladly pay a few bucks a month if it would help get the service back to what it was.  I'd pay even more ($5-10) if the devices could be upgraded to use HTML5, QT or something... anything but Flash!  (Couldn't stand writing in it!!)