Saturday, April 21, 2012
End of Chumby?
http://www.engadget.com/2012/04/19/chumby-halts-hardware-sales-out-of-business/
http://www.pcpro.co.uk/news/374203/end-of-the-road-for-chumby
In Joel's blog he mentions two projects which may help Chumbies to stay alive after Chumby Industries shuts down the Chumby Network.
Zurk's Chumby One/Infocast 3.5 firmware
Zurk's Infocast/Chumby 8 firmware
Wednesday, October 5, 2011
TxtMsg Web Application Setup
UPDATE: The source code has been posted at https://code.google.com/p/text-message-for-chumby/.
There are three different projects which makeup the TxtMsg widget. First, there is the widget itself, then there is the configuration widget, and lastly there is the web application. This post will deal with the setup and configuration of the web application piece.
Requirements
The web application was written using C# and runs on IIS. The code is short and simple so it should be very easy to port it over to PHP or Java and host it on Apache.
- IIS Server
- Ability to set folder permissions on the server
Overview
The web application uses file storage to store messages and Chumby device information. The data should be kept in a database however I wanted to through something together quickly and make it easy for people to understand. Feel free to modify the application to use a different storage method. This entry will address the implemented file storage solution.
Steps to install on IIS
- Download and unzip the source code.
- Copy the web_TextDB folder to a location you use for your web applications.
- In IIS, create an application and set the root directory to the wwwroot folder.
- Determine what account IIS is using for the anonymous user.
- IIS 6, this will be the identity of the Application Pool
- IIS 7, this will be the also be the identity of the Application Pool however if the user is ApplicationPoolIdentity then we need the IUSR group as the ApplicationPoolIdentity is a member of the IUSR group.
- Grant the user identified in the previous step full permission to the <wwwroot>\TextMsg_Files folder.
- Restart IIS
- Edit line 50 in the <wwwroot>\App_Code\ChumbyTextMessage.cs file so the path is correct.
private const string CHUMBYDEVICEFILEPREFIX = "~/Chumby/TextMsg_Files/"; - Now you should be able to connect to the server application to generate the <wwwroot>\TextMsg_Files\DeviceList.txt” file by going to http://localhost/chumby/ChumbyServer.aspx?ChumbyName=Richard's%20Office&ChumbyID=93164D65-A1F1-1C2C-735F-099E2E5A0FF7&MaxMessages=99&MaxDays=99&UserName=&Password=&Paramaters=
- Change the URL to match your server
- Change the parameters
- ChumbyName: This is the name of the Chumby such as “Richard’s Office”.
- ChumbyID: This is a unique GUID which is generated for each device and I believe each widget.
- MaxMessages: This is the maximum number of messages to retrive.
- MaxDays: The maximum number of days to pull and display.
- UserName: Optional – Username to authenticate to the web application. (Not used in demo)
- Password: Optional – Password to authenticate to the web application. (Not used in demo)
- Paramaters: Additional parameters may be passed to the function. These are stored in an array and passed to the function.
- If successful, the TextMsg_Files folder will have the DeviceList.txt file. If you open the file in a text editor, you will observe the following information stored in it.
ChumbyID ChumbyName Added LastAccessed
93164D65-A1F1-1C2C-735F-099E2E5A0FF7 Richard's Office 10/5/2011 7:05:40 AM 10/5/2011 7:05:40 AM- ChumbyID: This is a unique GUID which is generated for each device and I believe each widget.
- ChumbyName: This is the name of the Chumby such as “Richard’s Office”.
- Added: Date & Time the chumby was added to the file. (GMT)
- LastAccessed: Date & Time the chumby contacted the server. (GMT)
- ChumbyID: This is a unique GUID which is generated for each device and I believe each widget.
- If successful, the resulting webpage will display the default message to display on the chumby device.
10/05/2011 07:05:40 How to send a Text Message <font color="#000080" size="16">Steps to send a message to this widget.</font><ul><li>Go to <font color="#0000ff"><a href="http://localhost/chumby/ChumbyAddMessage.aspx">http://localhost/chumby/ChumbyAddMessage.aspx</a></font></li><li>Select "Richard's Office" from the Chumby drop-down list</li><li>Enter your name and message</li><li>Click the "Submit" button</li></ul>
- Date (GMT)
- From
- Body
- Date (GMT)
- If you want to add a message to display on the chumby, you may go to the “ChumbyAddMessage.aspx” page. On my test server this is http://localhost/chumby/ChumbyAddMessage.aspx.
- On this page, you will see the list of chumby devices which have contacted the server. If you just set this web application up and performed the previous seps, you will only have one chumby listed which in my case is “Richard’s Office”.
- Select the chumby from the list and enter a name in the “From” textbox and a message in the “Message” textbox and click the “Submit” button.

- You will now observe a new text file in the <wwwroot>\TextMsg_Files folder with the chumby id for the file name. This is another text file which contains the information from the message.
Saturday, October 1, 2011
TxtMsg
TxtMsg was written to display simple messages on the Chumby One and Classic Chumby devices as well as the Chumby Android application. The application may be found at http://www.chumby.com/guide/widget/TxtMsg. I will be including source code for the Chumby widget as well as the web application. My hope is someone will modify the application and make good use of it. I have been thinking this may be a good widget to display messages from systems such as network centers displaying security issues however in such an environment there may be better tools to display such messages or the security environment may not allow a Chumby device in the first place.
Another use may be to display automated messages of some sort, however one must question why a user would use the Chumby when email and SMS messages may be more effective. If anyone has any other ideas, please comment and let me and others know what you think.
Overview
The TxtMsg widget grabs the contents of the webpage specified in the widget settings. It is also possible to connect to a password protected webpage by providing a username and password in the widget settings.
The web application will return a tab delimited text file to the Chumby widget with the date (GMT), sender, and message. It is possible to include some HTML however the HTML is very limited.
I will attempt to update this with more details shortly. Sorry for the delay.
Tuesday, August 23, 2011
Accelerometer
I have been thinking of doing something with the accelerometer in the Chumby but have had it as a low priority as there are never any earthquakes around here. Guess I was wrong. USGS - Virginia Earthquake
Thursday, August 18, 2011
Federation Clock v0.3
Source code for this project is at http://www.teelsys.com/Chumby/Clock_0_3.zip.
I finally got back to taking another look at the analog clock and was able to resolve the earlier issue. I was attempting to make some changes the clock based on my experience with ActionScript 3 but found that ActionScript 2 and 3 are totally different languages which seem to only share the name. Okay, there are some similarities so saying they are completely different may be over the top.
Back to the clock. I originally setout to build a simple analog clock so I could learn how to write applications for the Chumby. Since I am not a Flash Developer I do not have all of the Adobe tools to allow me to create applications so I needed to either shell out some serious money to purchase the Adobe tools or I needed to become proficient at using open source tools for Flash development. I chose the open source route and settled on FlashDevelop as my tool of choice.
Unfortunately many of the good examples I could find on Flash development were using Adobe’s tools so they were near zero help in using FlashDevelop. I was able to find enough information to actually create the first version of the clock and was pleased until I left the clock running for a period of time and noticed the hands were missing. I then realized there must be some rounding error causing the problem.
The problem was indeed a rounding error however I caused the problem by trying to make the clock run smooth and not be jerky. This go around I decided to only allow the hands to rotate in 6° steps. After running a few tests I saw that the problem was gone so the next thing I wanted to do is to make it very easy for anyone to create a custom analog clock.
The first thing that was done differently with this version is there is very little done in Main and there are several classes to allow better reuse of code. The classes are as follows:
- Clock – The main engine for the clock and the class to modify if you wish to make your own custom clock.
- clock.Clockface – Loads the background for the clock
- clock.ClockHand – A class for the individual hands of the clock
- clock.ClockHands – Packages the Hour, Minute, and Second hands of the clock together
Modifying the clock
Create or obtain an image you wish to use for the background image and resize it to 320 x 240 and reduce the file size as much as possible. Add the image to the library folder of the project and in FlashDevelop, right-click on the image file and select the “Add To Library” option. You will notice that the color of the file will change from black to blue color and there will be a checkmark next to the “Add To Library” option in the context menu.
You should should unselect any files you do not need as these increase the size of the overall swf file. (Chumby apps should be smaller than 100 KB in size.)
You will follow the same process for the hands of the clock. Consider using PNG or GIF formats for the hands of the clock and make the background transparent. This may not be necessary on all designs but will be needed for most.
Once your images have been added to the library we may use them in the code. To make use of them you will need to modify a few lines in the Clock.as file. There are 4 lines of code in the init function of the file which we need to change.
clockBackground = new ClockFace(parent, this, "library.FederationClock.jpg");
clockHand_Hour = new ClockHand(parent, this, "library.hourHand_mc.png", 8);
clockHand_Minute = new ClockHand(parent, this, "library.minuteHand_mc.png", 8);
clockHand_Second = new ClockHand(parent, this, "library.secondhand_mc.png", 35);You will need to change the file names in these lines and be certain to prefix them with “library.” If you put your images in a different folder you will need to change the name from “library.” to the name of the folder which contains the images. You may verify the name to place here if you compile the application then take a look at the Symbols included in the swf file.
For the hands, there is one more thing that we need to change. We need to specify the length of the tail on the hand. Below is an illustration showing the tail on the second hand used for the Federation Clock.
By only changing these few lines of code you may create a custom clock with your favorite background picture.
This code assumes that you want to have the hands of the clock in the center of the screen and that the x registration point for the hands is in the center. If these two assumptions are not true then you will need to make a few more modifications.
Hopefully this will help someone to get started with writing Chumby applications.
BTW: The Chumby devices are to get support for ActionScript 3 in only a few weeks. When that happens it will be a bit easier to create apps for the Chumby.
Please post comments if you find any errors or if you know a better way of doing some of the things I have done with this project.
If you use this project to make your own custom clock please make a reference to this blog in the description of your application.
Saturday, August 13, 2011
Return of the Chumby Development
It has been a while since I wrote a program for the Chumby but I have been wanting to do a bit more with it. I ordered another Chumby One so I can have one at my desk as I use my first one as an alarm clock next to my bed.
The first thing I wanted to do was to have my Chumby automatically start up with SSH and the frame buffer CGI (FBCGI) turned on automatically when the Chumby boots. After some reading on the wikis I found that I could add two files to a USB drive to get this all to work.
To start SSH on boot all that is needed is to add a blank file named “start_sshd” on the root of the USB drive. (See http://wiki.chumby.com/...) Well that was easy, now onto the FBCGI.
To get the FBCGI to start on boot requires placing a file named “debugchumby” on the root of the USB drive. Next is to add the following content and save the file as a UNIX file. What I mean by a UNIX file is that new lines use line feed character (ASCI 10) not carriage return + line feed (ASCI 13 + 10). My first attempt failed because I did not save the file in the UNIX format.
#!/bin/sh
/usr/chumby/scripts/fb_cgi.shAfter rebooting the Chumby I was pleased to see that both SSH and FBCGI were running. The reason I wanted these two running at startup is part being lazy and second to allow the use of ChumbyRun in FlashDevelop without having to remember to turn SSH on first. I also want to be able to capture screenshots without remembering to turn FBCGI on.
NOTE: Chumbyrun does not work with FlashDevelop version 4.0. What follows is the steps I took to find this out and how I worked around it. Do not waste your time installing the plugin if you have FlashDevelop 4. You have been warned.
Since my last post, I have been working on an ActionScript 3 application and have updated FlashDevelop to version 4.0.0 beta. I no longer have the Chumby template so I needed to reinstall the Chumby Template by following the directions at http://code.google.com/p/chumbydevelop/.
FYI: The path to my template ended up being C:\Program Files (x86)\FlashDevelop\Projects\060 ActionScript 2 - Chumby.
Now it is time to install the ChumbyRun Plugin. I simply followed the directions at https://developer.chumby.com/index.php/Chumbyrun. The path to my plugins for FlashDevelop was C:\Program Files (x86)\FlashDevelop\Plugins. If you have not noticed by now, I am running Windows 7 64 bit edition which is why the paths are going to C:\Program Files (x86) and not C:\Program Files.
Started FlashDevelop and found that there is a problem with the ChumbyRun plugin.
Well there appears to be a work around for this so the first thing to do is to remove the 4 files from the plugin directory. Next, I downloaded the stand alone application for Windows and ran the setup file. ChumbyRunner starts after the install and can be launched later from the Windows Start Menu by going to Start Menu > All Programs > ChumbyRunner > ChumbyRunner.
Browse to your project’s swf file in the bin folder and enter the IP Address for your Chumby. You may get your Chumby’s IP Address from the Chumby’s “Chumby Info” screen.
![]()
Click the “Run” button and you will see that the left pane has the SSH session output displayed. Shortly your application should be running on the Chumby.
Now I may get back to doing more development for the Chumby.
Thursday, March 31, 2011
Federation Clock v0.1 Error
Well my last entry showed how I created an analog clock using ActionScript. This seemed to work well and I was rather pleased with it. On the Chumby I I set the default run time to 15 seconds so that was the longest that I had it running. The other day I decided to pin the widget which leaves it running continuously. When I came back to the Chumby after an hour or so passed, I noticed the hands were missing from my clock. I then ran it on the PC and let it run for awhile and sure enough the hands of the clock started separating. Below are some images over a 6 minute interval.
I tried several things to fix it such as resetting the top left point and not calculating the rotation point and just using (160, 120) but these did not help. I really don’t know what is going on here so if you do, please help me out and post a comment with a suggestion. The only thing I can think of trying is removing the MovieClip object and adding it back again but I assume this will take more processing time and is quite wasteful. There must be a better way.