ChumbyOrbiter

From LinuxMCE
Revision as of 11:45, 10 July 2008 by DarrenMason (Talk | contribs)

Jump to: navigation, search

This page details how to get an Orbiter running on a chumby...

What is a Chumby? Have a look here for the details but basically it is an internet device that is designed to sit on a bedside table or something and feed you information in the form of widgets..

Anyway, the widgets that run on this device are flash programs(movies) and there is a version of flashplayer lite on the device.

I figured that this device should be able to act as an orbiter so have developed a flash based orbiter to do just that.

Rather than implement an orbiter in flash I have taken the much easier path of implementing an alternate client to the proxy orbiter. This is the same orbiter that is utilised by the web based orbiter. It works by getting the orbiter display rendered into a bitmap which is then retrieved from a server. Mouse click events, or in this case touches on the screen, send back the co-ordinates of the event to the server and this interacts with the orbiter as if it had received the mouse event itself. A new screen is rendered and the client can retrieve it from the server. There is also a regular refresh that retrieves the latest image from the server so that events happening elsewhere in the system that cause orbiter changes can be displayed on the client.

So all that needs to run on the chumby (or any flash player for that matter) is a fairly lightweight flash movie. It uses a config file to allow the server details to be configured.

To install, firstly you will need to get the "SWF" file and a config file onto the chumby. The way I have been doing this is to run the sshd (see the chumby wiki for details) and scp the files over to the chumby /tmp directory. This is a fairly temporary measure and ideally it should be stored on a flash drive which plugs into the back of the chumby.

If sshd is running the you should be able to copy files using scp quite easily (use the root user with no password)

Once you have the file there then you need to create a config file. I usually find that this is easier to create on my dev machine and scp it over as well.

Firstly, if you havn't already - make sure that you have a web obiter installed and running correctly. Most of the config can be taken straight from the web client itself.

You will need to create a file called FlashOrbiter.conf and have it in the same directory as the FlashOrbiter.swf file. It will contain the following variables in a URL encoded format; userID : this is the numeric id of the user logged in pass : MD5 encoded version of the users password installationID : Numeric identifier for your installation deviceID : Numeric ID of the proxy orbiter device baseurl : URL of pluto admin for your system

So the file might look something like this

userID=1&pass=12345654231&installationID=12345&deviceID=64&baseurl=http://192.168.0.1/pluto-admin/

To find out these values for your installation do the following; login to the web based orbiter and once it is up and visible do "view source" on the page. There a few spots in the page source that will show a string very similar to that above. It will have all the values except the baseurl. Copy this string into your conf file (starting at the userID part and ignoring any command bits at the end. Then add the baseurl part (which you would use to get to web admin) and you should be set.

To run the orbiter, I currently ssh to a terminal on the chumby (details on chumby wiki) and do the following sequence; 1. Stop the existing control panel using "stop_control_panel" 2. Run the Orbiter using "chumbyflashplayer.x -i FlashOrbiter.swf" 3. Use it :) 4. Exit it from the command line where you started it with Ctrl-C (exit button doesn't work at the moment)

Known Issues 1. Exit button doesn't work. Don't know why, tried a few things already. 2. Error handling is pretty poor. Most of the time if it is not working you will still get the last image displayed. It just won't change to a new screen on refresh. 3. I have had an error come up with mysql running out of connections. This seems to be a problem with proxyorbiter or the php scripts on the server. Needs investigating. Fix by restarting mysql on core.

Download File:FlashOrbiter.swf.jpg by doing save as and removing the ".jpg" extension.