First thing’s first, I have an atom based in-dash car PC as demonstrated here. What’s going on here, is when I come home, my car will detect my home WIFI connection. When this happens, and I turn my car off, instead of simply going to sleep, it will connect to my home computer and perform an rsync of all new mp3’s from my computer to my car. When this is done, my car PC will then go to sleep. I have a safety in place which will automatically stop the rsync and go to sleep after 20 minutes. That way if something goes wrong such as poor wifi signal causing crawling speeds, my carpc doesn’t stay on all night and drain my car battery.

Now the key here is how to execute these actions. On linux, or at least on ubuntu, there is a script called /etc/acpi/powerbtn.sh. This script gets run when you push the computer’s power button, a.k.a when I turn my car off.

IF you use linux, then using the actions I described below, it’s a pretty trivial task to write these actions into powerbtn.sh yourself. And it’s probably better to rather than to reuse my case specific code.

Actions:

  • When powerbtn.sh run, query if the SSID of your home network is present
  • IF not, then sleep
  • IF so, then connect to this network
  • Mount a network share to your MP3 folder
  • Use sleep, or at, a timestamp comparison, or some other method to count down from X minutes.
  • Perform an rsync with the arguments of your choosing
  • Then sleep

As shown in other posts here’s the latest progress in my home made automation app. It ties x10 and other technologies together. I decided to write my own because I didn’t see anything that did exactly what I wanted. Not to discount other great apps, open remote and iphc for example.

I’m using typical HTML5 with jquery. So basic HTML, javascript and PHP skills and only a few lines of code are required to get to where I want.

If anyone wants the source let me know.

You can find the original post with more information here

A home automation App that I am developing in HTML5

Update with additional info

This slideshow requires JavaScript.

The plan for this app is to not only have an access anywhere, dynamic webUI, but to have an application on my phone, tablet(s) that feel native. Of course I’ll be using HTML5 with Jquery, I’ll also be using Webworks for the phone/tablet app.

Demonstrated in these videos:

  • Thermostat, capable of adjusting temperature and mode.
  • Fireplace control, mostly to be able turn off if paranoid.
  • Generic House Timer, which activates x10 door chimes. Good for various uses.
  • And of course lights. Currently I’m using a heavily modified version of iPHC(iPhone Home Controller). I will be writing this lights portion from scratch to suit my needs better.

Tools like this rely heavily on backend scripts I have running on my Linux server at home. However the concepts behind these scripts are very simple using the CLI interface on an x10 CM15a. The software/daemon I chose to use is Mochad.
In conclusion I’d like to drop a little disclaimer here. The UI is obviously a work in progress and I’m focusing on functionality first. Cleaning it up and making is look pro is an easier task.

Another video that’s a little blurry.