iPhone Home Controller - Project 1 v1.2

We have upgraded version 1.1 with a re-vamp of the AJAX form submit. Goodbye jQuery (for now). I was able to get all the same functionality (and more) out of a smaller script that required no additional JavaScript library to be available for it to work. Now, when a light is turned on/off, the form is posted with AJAX and then the appropriate style of light icon is pulled up and replaces its opposite. The script I made for this purpose is a bit repetitive and therefore bigger than I think it needs to be, but it works so I am happy with that for now. If anyone can suggest a better way to code this please let me know.
Another change in this version is the addition of a MySQL database to hold the status of the lights. This allowed me to combine the on and off buttons on all the lamps and pull in the current status of the lights when the page is first loaded (the rest is handled by the above mentioned script). It was fairly simple to set up the database and with a few tweaks to the PHP.ini file, I was up and running.
We are going to be starting a similar project with the same interface but a Basic Stamp and Parallax PINK server as the base so stay tuned for that. Until then, if you would like you can download the iPhone Home Controller v1.2 PHP, JavaScript and HTML files using the link in the sidebar to the right. Don’t forget that you will also need the iUI.js file found here. Peace!
Tags: AJAX, automation, iphone, itouch, JavaScript, MySQL, PHP, x10

3 Responses to “iPhone Home Controller - Project 1 v1.2”
November 28th, 2007 at 5:04 pm
[...] Original post by chuck [...]
December 22nd, 2007 at 4:42 pm
[...] but a Basic Stamp and Parallax PINK server as the base so stay tuned for that…. source: iPhone Home Controller - Project 1 v1.2, iPhone Home [...]
June 1st, 2008 at 2:50 pm
Way back in the days of my “then” brand new 48K Apple][ PLUS, I wrote an Applesoft Basic program for my dad to randomly control the on/off states of the lights while we took a trip to California, using X10 Modules & X10 controller board. So this is the kind of stuff that brings up fond memories.
I have Project 1 v1.2 working through the interet using:
iPhone
at&t DSL Dynamic IP service
2wire 1800HG wireless gateway
DynDNS account
DynDNS Updator (running as a service)
Windows XP PC
Abyss Web Server X1 (v 2.5)
Project served by host using SSL and
password protection over internet.
Note: Abyss (running as a service) is
easier to use than Apache.
MySQL (running as a service)
PHP 5
Leave a Reply