Chumby tricks

From Chumby Wiki
Jump to: navigation, search

NOTE - this page is for Ironforge/Falconwing and Silvermoon production chumby devices - for Foo/Katamari alpha prototypes, please see Chumby Tricks for Foo/Katamari

NOTE - the bulk of these tips and tricks are unofficial hacks and are not officially supported by the company. Use them at your own risk!

Many of these tips and tricks require creating a text file for a script - the chumby, being a Linux-based device, requires that these scripts have UNIX-style line endings (in particular, linefeeds). For Linux users, this is easy - just use your favorite editor. For Macintosh users, the standard TextEdit application will do nicely if you use it in plain text mode. For Windows, we recommend EditPad Pro.

The chumby also has a lightweight version of vi built in.

Contents

  • 1 Hidden screen in Control Panel
  • 2 Open a secure shell (SSH) console on the chumby
    • 2.1 Enabling a password for SSH - the easy way
    • 2.2 Enabling a password for SSH - the hard way
      • 2.2.1 ...on Ironforge
      • 2.2.2 ...on Falconwing and Infocast 3.5
  • 3 Music customizations
    • 3.1 Streaming from an mp3 server (shoutcast / icecast / etc.)
    • 3.2 Streaming music from SlimServer to chumby
    • 3.3 Streaming music from Nicecast
    • 3.4 Streaming music from GNUMP3d
    • 3.5 Streaming XM Satellite Radio
    • 3.6 Streaming SIRIUS Satellite Radio
      • 3.6.1 Install uSirius
      • 3.6.2 Install TVersity
      • 3.6.3 Install XAMPP
      • 3.6.4 Downloading the PHP Script
      • 3.6.5 Set up in the Chumby
    • 3.7 Changing the order of music sources
  • 4 Built in web server
  • 5 Alarm customizations
    • 5.1 Custom alarm sounds
    • 5.2 Custom alarm actions
    • 5.3 Custom alarm ring screen
  • 6 Boot up, default screen, control panel customizations
    • 6.1 Customizing the opening animation
    • 6.2 Your own splash screens
      • 6.2.1 Bootloader Screens
      • 6.2.2 Kernel Screen
      • 6.2.3 Init Script Screen
    • 6.3 Using a custom Control Panel
  • 7 Scheduled tasks, auto-execution of tasks
    • 7.1 Launching sshd at startup
    • 7.2 Entering Night Mode Automatically
    • 7.3 Run processes on start-up
    • 7.4 Running something at boot without debugchumby (IronForge Chumby Classic ONLY)
    • 7.5 Run processes on Log In
  • 8 Make your chumby click when you touch the screen
  • 9 Mount NFS partitions
  • 10 Screwed up your touchscreen calibration?
  • 11 Use wired Ethernet
  • 12 Use wifi protected by a capture page
  • 13 Mixing local widgets into a channel
  • 14 Initiating a channel change
  • 15 Using a browser to see what's on your chumby
    • 15.1 Starting via the command line
    • 15.2 Starting via the control panel
    • 15.3 Accessing the contents of the frame buffers
  • 16 Configure your chumby to connect wirelessly through a Macintosh laptop
    • 16.1 MacOS X Settings
    • 16.2 chumby settings
  • 17 Adding a Virtual Chumby to a Facebook Profile
  • 18 Adding a Virtual Chumby to an iGoogle page
  • 19 Clock overlay
  • 20 Sending events to the Control Panel
  • 21 Setting up an adhoc wifi network
  • 22 Enabling and disabling the wireless connection
  • 23 Using Chumby with Arduino
  • 24 Other, more complicated customizations

Hidden screen in Control Panel

spacer spacer spacer

  1. Open the Control Panel, select "Settings", then "Chumby Info"
  2. Tap the small "pi" symbol in the upper right corner
  3. You'll see buttons to perform the following actions:
    SSHD 
    launches the builtin Secure Shell Daemon
    FILES 
    opens up a simple file system browser
    REBOOT 
    reboots the chumby device
    FB CGI 
    Enable frame buffer access (/dev/fb content) via cgi
    OFF 
    turns the chumby off

spacer

  1. Open the Control Panel
  2. Tap the "Insignia" logo in the upper left
  3. Tap the "pi" symbol in the upper right of the gray area
  4. You'll see buttons to perform the following actions:
    SSHD 
    launches the builtin Secure Shell Daemon
    QUIT 
    quits the Flash Player
    REBOOT 
    reboots the chumby device
    FBCGI 
    enables frame buffer access (/dev/fb content) via cgi
    XHAIRS 
    toggles on/off a small crosshairs cursor
    OFF 
    turns the chumby off
    REPAIR SAFE MODE 
    allows recovery of the Special Options mode from USB
    DEL PHOTO CACHE 
    clears the internal cache of photos
    DEL THUMB CACHE 
    clears the internal cache of photo thumbnails
    DEL STORED PHOTOS 
    clears the photos stored internally
    DEL STORED VIDEOS 
    clears the videos stored internally

Open a secure shell (SSH) console on the chumby

spacer spacer spacer spacer

  • Start sshd using the hidden Control Panel screen
  • Using an SSH client (Windows users can use PuTTY, Mac/Linux users can use ssh from a terminal window), log in as the user root with no password. e.g.
    ssh 192.168.1.100 -l root
  • Note: the IP is visible from the Chumby Info screen as well as the hidden Control Panel screen
  • You should get a big ASCII chumby logo

Enabling a password for SSH - the easy way

In software version 1.0.7 (at least) the passwd command is built-in. So setting a password should be as easy as mounting the root filesystem read/write (per notes below) and typing

passwd root

It should be noted that there is another account called "default" which also has no password.

Enabling a password for SSH - the hard way

Instructions for enabling password SSH differ depending on your Chumby model, but for each you will need to connect to your Chumby via SSH.

...on Ironforge

spacer

The contents of /etc is about 170K, so if you want to waste that much space on your /psp jffs2 partition, you can get password protected SSH on your chumby without even using an external USB script using these instructions:

Make a directory on /psp to hold /etc and copy the original contents of /etc to your directory:

mkdir /psp/etc
cp -rd /etc/* /psp/etc

Generate an md5 hash of a password. The easiest way to do this is use openssl:

openssl passwd -1

The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:

Password:
Veriying - Password:
<DISPLAYED_HASH>

Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.

Edit the /etc/shadow file and add a password hash to the "root" line. Here is a sample before and after:

before after
root::10933:0:99999:7::: root:<HASH_GOES_HERE>:10933:0:99999:7:::

Then simply mount your new writable /etc directory over the old /etc directory:

mount -t loop -o bind /psp/etc /etc

Note: When chumby performs a software update, it will update /etc, but may not update /psp/etc. If you experience frequent software update messages, despite having successfully updated, then you may need to update your /psp/etc. To do this, backup your shadow file, copy the /etc to /psp/etc as explained above, then copy your shadow file back to /psp/etc


...on Falconwing and Infocast 3.5

spacer spacer

Generate an md5 hash of a password. The easiest way to do this is use openssl:

openssl passwd -1

The -1 (one) argument indicates that the MD5 based BSD password algorithm 1 should be used. It will look like this:

Password:
Veriying - Password:
<DISPLAYED_HASH>

Note: Chumby expects the hash in the form: $1$abcdefgh$morehash, where $1$abcdefgh$ is the seed. This is the MD5 based BSD password algorithm 1 that is used in the chumby shadow file.

SSH to your chumby and mount your root filesystem as read-write:

mount -o remount,rw /

Edit the /etc/shadow file with your favorite editor and add a password hash to the "root" line. Here is a sample before and after:

before after
root::10933:0:99999:7::: root:<HASH_GOES_HERE>:10933:0:99999:7:::

Re-mount your root filesystem as read-only:

mount -o remount,ro /

That's it!

Note: When chumby performs a software update, it will probably over-write your custom "/etc/shadow" file.

Music customizations

Streaming from an mp3 server (shoutcast / icecast / etc.)

NOTE: this functionality is now available in the Control Panel, under Music->My Streams

  1. Connect to your Chumby via SSH as mentioned above.
  2. In your command line, enter btplay internet.radio.station.url:port/stream.mp3 and press return. Be sure to replace the address with the complete address of the internet radio station.
  3. Enjoy the streaming music.
  • To stop playback press ctrl+C.
  • To adjust volume run chumby_set_volume 100 where the 100 can be 0-100.
  • Stream pitch too high? try btplay --output=alsa:plug:dmixer internet.radio.station.url:port/stream.mp3

Streaming music from SlimServer to chumby

(NOTE - except for installing SlimServer on your computer, the following steps are not longer required for Control Panel 2.6.70 or later - SlimServer is now available as a music option from the "Music" button)

Stream music from your computer to your chumby using SlimServer!

  • Download and install SlimServer www.slimdevices.com/su_downloads.html on your computer.
  • Use a Unix-style line-end compatible(linefeeds rather than carriage return line breaks) text editor (TextEdit for Mac, EditPad Pro for Windows) to create a file called "debugchumby" (no extension).
  • Insert the following code into the file, making sure the line break is Unix-style (in EditPad Pro use "Convert" > "To Unix LF")
  #!/bin/sh
  btplay ip.of.your.server:9000/stream.mp3 &
  • Verify the IP address is the IP address of the computer that SlimServer is running on.
  • Save the file to a USB flash drive, insert into your chumby, and reboot.
  • Play your music via the SlimServer web interface, and music should play through the chumby's speakers.
  • Enjoy!

Here is a step-by-step guide for setting up Live 365 to stream to the Chumby:

First steps before you ever go near the Chumby:

  • Download and Install Slimserver
  • After installing, start Slimserver (On Mac OS X you'll do this from your Mac System Preferences)
  • Wait a moment or two and then click the "Web Access" button on the preference panel. It will fire up your browser and take you to the setting panel (displayed in your web browser).
  • I did very little here. I went to the Live 365 screen and input my Live 365 ID and password. Though you do very little here, you will need to come back to this Slimserver controls screen later.

To find the IP address of your Mac: I found the easiest and most reliable way to do this was going back to system preferences, and clicking on "Sharing." On the Sharing screen I clicked "Web Sharing" it displayed my machine's IP address. I then unchecked it, because I really did not want to do this. I only used it to find my IP address.

On the Chumby:

  • Go to control panel
  • Go to Music
  • Go to My Streams
  • Set up a new stream
  • Enter the URL: the-IP-address-you-wrote-down-for-your-machine:9000/stream.mp3
  • The type of stream is an mp3

On your Mac:

  • Go back to the Slimserver screen on your browser (or via the system preference panel in system preferences for Slimserver click the "Web Access" button again
  • Go to the Live365 (or whatever the source of music is). Click your preset station. Click "play"

Streaming music from Nicecast

spacer spacer spacer

Nicecast is a music broadcast system for the Apple Macintosh published by Rogue Amoeba. To stream music from that program to your chumby, try the following steps:

  • Start the Nicecast application on your host machine
  • Start broadcasting - if you're serving your iTunes music, be sure to select some music and hit "play" in iTunes
  • Open the "Nicecast Server" window from the "Window" menu.
  • Note the "Address" (four numbers separated by periods) and "Port number" (probably 8000) fields
  • On the chumby, select "Music", then "My Music Streams".
  • Hit the "New" button.
  • Tap the "URL" text block(should say "")
  • Enter the string address:port number substituting the address and port number from step 4 above, then press the enter key on the lower right
  • Set the name of the stream to "Nicecast", if you like
  • Tap "DONE"
  • Select the item in the list of streams, then hit the play button.

You should get the music - if not, you may have to open and forward a port in your firewall corresponding to the port in step 4 (you'll need to find out how to do this for your router). If you know the LAN IP address of your computer (probably something like 192.168.1.100), you can also use that for the address instead of opening a port.

Streaming music from GNUMP3d

See GNUMP3d.

Streaming XM Satellite Radio

spacer spacer spacer

To stream XM Radio to your chumby, you will need a couple pieces of software: uXM & TVersity. TVersity is media streaming software that can play audio/video from an RSS feed. uXM will be necessary to get xml feed for TVersity. This solution is for Windows. Special thanks to Chumby Forum member SlvrEagle23 for coming up with a solution to stream Sirius to the chumby, which made streaming XM possible. Hopefully, we'll see SlvrEagle23's solution on here soon. In the meantime for you Sirius folks, you might be able to do the same thing with uSirius.

TVersity

  • Download and install TVersity (it installs as a service on your machine)
  • It should start running as a service after you install it, if not select Advanced->Start Sharing
  • Go to the Settings Tab and under the General settings, set the "Media Playback Device" to "MP3 Audio Device" and Click Save at the bottom of the screen.
  • Next, select the Media Library Settings and change the "Media Library Refresh" to 0 hours so that it will not automatically refresh. Click Save at the bottom of the screen. This is important or TVersity will generate new channel URLs which would need to be edited n the Chumby.
  • Click Transcoder. Set the radio button to "Always". Leave the other settings as is and click Save.
  • Click Internet Feeds and enter "0" for "Maximum number of items to show per feed:" Click Save.

uXM

  • Download and install uXM. It should start after it installs. It will give you an error that it could not start because it's missing login information.
  • Click Settings...Enter your XM Subscription login information and click OK.
  • Click Start
  • Click URLs
  • Select the "Feeds" Tab. The "-All Categories-" Category didn't work for me, but each of the individual categories did. Select one of the categories, for example Decades. It will generate a URL. Copy this URL.
  • Go to TVersity and click the "Sharing" Tab.
  • Click the green + button to "Add Podcast/RSS Feed->Add Audio Podcast/Feed...
  • Paste the URL into the Audio Feed field. Give it a title (in this example "XM Decades")
  • Select the Advanced button and make sure the Transcode is set to Always" Click Submit

OK, we're almost ready to enter the information into My Streams on the Chumby. We just need to get the channel URL.

  • Use firefox or other RSS Reader. In firefox go to the TVersity server (ip-of-computer-running-tversity:41952/lib/) The port 41952 is the default port for TVersity (you may need to allow it in your firewall).
  • Click the "Audio(x)" link then "Internet Audio(x)" then "Audio Feeds (x)"
  • Your presented with the XM feeds you setup in TVersity. Select one of the feeds (Decades).
  • Copy the link location (the URL) of the channel you want (XM 8 - The 80s)
  • You could enter this URL into the My Streams of your chumby, but it's over 200 characters. So generate a TinyURL.
  • Go to your chumby and access the My Streams feature.
  • Enter your stream's name and the tinyurl generated. Select MP3 for type and click submit.
  • Push play and you should be hearing XM streamed to your Chumby.
  • Repeat for your other streams.

Streaming SIRIUS Satellite Radio

With a little clever work, it is possible to add SIRIUS Satellite Radio streams to your Chumby's "My Streams" list. Like any other streams, they can then be played in the background at any time, set as the audio for alarms, and more. This solution was originally submitted to this forum thread.

Here's the software you'll need to make it work:

  • uSirius (for generating audio streams from Sirius)
  • TVersity (for converting the streams into streaming MP3s)
  • XAMPP for Windows (for creating easy station URLs for Chumby to use)

Currently, this solution is only supported on computers running Windows XP/Vista and sitting on the same network as the Chumby. If your Chumby is connecting across the Internet to the host computer, be advised that some ISPs and/or firewalls may interfere with this process.

Note: An alternative solution has been posted above for XM users. While this hasn't been tested for SIRIUS subscribers yet, it may remove the need to install XAMPP and set up the PHP script. Additionally, the developer of uSirius is working to integrate a large portion of this process into the software itself, after which these instructions will be updated.

Install uSirius

  • Download and install uSirius from the link above.
  • Provide uSirius with any configuration options necessary. Currently, you will only need to enter your sirius.com username and password. For most users, you will not need to change any other options.
  • If uSirius doesn't start automatically, click "Start" on the main window to start it. You will see a message like "Listening at xxx.xxx.xxx.xxx on port 19080." Take note of the numbers where the "x"es are in that message. This is the IP address of your computer, which you will use later.
  • Set uSirius to start up on your computer automatically when you log in. Usually, this means clicking and dragging the uSirius icon into the "Startup" folder on the start menu, though this could be different for your computer, and there are other ways of accomplishing this.

Install TVersity

  • Download and install TVersity from the link above.
  • TVersity should automatically start its sharing service. If not, click the "Advanced" menu, then click "Start Sharing".
  • Click the "Settings" tab at the top of the TVersity window. The very first option on the page will be "Media Playback Device". From the list of drop-down options, select "MP3 Audio Device". This will force TVersity to change the way it streams audio to the Chumby, avoiding some of the more pesky issues with playback. Scroll down and click "Save".
  • Still inside the "Settings" tab, click the "Transcode" button on the left to bring up the transcoding options. In the "When to Transcode?" section, choose "Always". Scroll down and click "Save".

Install XAMPP

  • Download and install XAMPP from the link above.
  • When asked for a location to install XAMPP, leave the default location (C:\xampp) if at all possible. If you change this location, modify the instructions accordingly.
  • You will be asked which applications you would like to start as a service. Check the "Apache" box, and leave the others (MySQL, etc.) unchecked.
  • From the same computer, check to make sure this page works: localhost/ - if not, XAMPP messed up somewhere. Make sure Apache is started and working.

Downloading the PHP Script

  • The PHP script depends on the Zend Framework to read the RSS feed provided by uSirius. Download the Zend Framework, unzip it somewhere temporarily, and open the folder where it was extracted. Inside the main "ZendFramework" folder, you will find a folder named "library". Open it, and click and drag the "Zend" folder inside it over to C:\xampp\htdocs.
  • Download this PHP file (check some random unreferenced forum thread) and save it as music.php in C:\xampp\htdocs. Open it with a text editor like Notepad, and change the $my_ip line to the IP address of your computer, which you noted above as the one uSirius was listening on. Save the file.

Set up in the Chumby

  • Go to the Control Panel of your Chumby, and click "Music" to open the music menu. From the location options, choose "My Streams".
  • To add a new SIRIUS station, click "New".
  • For the URL, enter: your-computers-ip/music.php?s=xx (where "your-computers-ip" is the IP address you wrote down a few steps back, and "xx" is the SIRIUS station number you want to hear, i.e. 1 for Sirius Hits 1 or 36 for The Beat).
  • Give the stream a title that corresponds to the station, i.e. "Sirius Hits 1". For stream type, select "PLS". Save the stream.
  • Repeat the steps above for each new SIRIUS station.

Changing the order of music sources

spacer spacer spacer

Starting with Control Panel 2.8.36, it is possible to reorder the music source list. To do this, one creates a file called "/psp/music_order", which contains a list of music source selectors, one per line for the order in which the sources are to be listed. Any sources not listed will be appended to the end of the list in the original order. You will need to reboot or restart the Control Panel for the changes to take effect. The selectors are:

  • pandora - Pandora
  • shoutcast - SHOUTcast
  • mediafly - Mediafly Podcasts
  • iheartradio - iheartradio
  • nytpodcasts - New York Times Podcasts
  • chumbcast - blue octy radio
  • sleepcast - Sleep Sounds
  • cbspodcasts - CBS Podcasts
  • internode - Internode Radio
  • noaa - NOAA Radio by Wunderground
  • ipod - iPod
  • directurl - My Streams
  • fmradio - FM Radio
  • slimserver - Squeezebox Server
  • mp3files - My Music Files

For instance, to move My Streams, Pandora, and blue octy radio to the top of the list, you'd make the file "/psp/music_order" with the contents:

directurl
pandora
chumbcast

Built in web server

spacer spacer spacer spacer

On startup, the chumby launches a small HTTP server on port 80 (note for Infocast only - this is not on by default and must be started from a debugchumby script), which displays wireless statistics information - to view this page, get the IP of the chumby from the Settings->Chumby Info screen in the Control Panel, and type ip.of.the.chumby/ into a browser. You can see the network statistics from ip.of.the.chumby/cgi-bin/wifi and you can see memory statistics from ip.of.the.chumby/cgi-bin/memstats.

You can add CGI scripts to this webserver:

  • Open a console on the chumby using SSH
  • create a directory at /psp/cgi-bin
  • add your CGI scripts there
  • Make sure CGI scripts have execute permissions (chmod +x script_Name)

You can now access those scripts using the URL ip.of.the.chumby/cgi-bin/custom/name_of_your_script

For a more complete web server, see Chumby as a web server.

Alarm customizations

Custom alarm sounds

spacer spacer spacer

If you don't like the sound of the builtin alarms, you can override them with your own MP3 audio files

  • Get a USB flash drive, and copy your MP3 file to the top level
  • To override alarm 1, rename the file alarm1.mp3
  • To override alarm 2, rename the file alarm2.mp3
  • ...or to override both, rename the file alarm.mp3 - the individual files will override this one.
  • Plug the USB flash drive and boot your chumby - when an alarm goes off, it will use your files instead of the built in sounds

Starting with Control Panel 2.6, you can also set different alarms sounds for each day of the week - name your alarm MP3 files as alarmmon.mp3, alarmtue.mp3, etc.

Custom alarm actions

spacer spacer spacer

When an alarm fires off, the Control Panel will look for script /mnt/usb/post_alarm_action_N where N is a one-based index of the alarm. If not present, looks for /mnt/usb/post_alarm_action. If either present, it will be executed when the corresponding alarm is stopped by the user.

Custom alarm ring screen

spacer spacer spacer

When an alarm rings with the dismissal screen active, the users is presented a screen with

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.