All posts tagged Automation

In this project we explore how to add automatic window control for a relatively cheap price to your car. I have a 2003 civic and due to its age it doesn’t have any of these features built in. It has one touch auto down for the driver window, like many cars. But I wanted auto down and auto up like luxury cars of its period. I also wanted to roll my windows up, or down, from my car’s remote/key fob. Many cars these days in the mid to high price range come with both of these features stock. Not only are these upgrade cool, but they’re useful. For one, just being able to hop out of my car, and hit lock and know that my windows will be up on their own is nice. Also on hot sunny days it’s nice to be able to crack the window an inch or two, or drop them down all the way as I approach to let the car air out.

A pleasant side effect of doing this project is it turns all of your driver side window switches into one touch auto up and auto down switches. The passenger switch will still work but won’t be automatic. IF you wanted the passenger side to be automatic, you would have to run a pair of wire from it, back to this DIE530t control unit.

4680394203_35f77a618c_zLink to the full manual:

The install is pretty simple so don’t let the instruction manual fool you. Follow the tutorial posted below. One issue with this guy’s tutorial is he decided to pop the door panel and wire this unit closer to the wires at the switch panel and motor. Although this is easier as far as figuring out which wire is which, ultimately it is completely unnecessary. When you open your door and look near the hinges you will see a black rubber tube going from the door to your car. This tube or hose contains all the electrical wiring going to your door panel. If you see my point here you will realize you can wire everything up under your drivers kicker panel behind the steering wheel. All you have to do is find where those wires coming in from that tube goes, and which wire does what. These wires are in a harness that just clips into a connector. That is where you should wire everything from. However popping the door panel to initially trace the wiring is probably the easiest thing.

zzzzzPanelIf you try this project and want to get your door panel off, do yourself a favor and invest in a panel popper. You can get these at your local automotive store, they’re cheap, and because they’re purpose built for doing just this very thing, they work like magic. It’ll look something like one of these on the right.

If you’re too cheap or impatient to get one of these, you can use a butter knife, but you’ll probably break a few tabs. But at the end of the day the door panel will probably go back on fine. They put more tabs than required for a solid fit.

My last bit of advice is instead of tying into an existing 12v source found under your dash, run a wire from the battery. You might already have a wire if you have a subwoofer/speaker amp or a carpc. I found that when I tied into an existing power source, it wasn’t delivering enough amperage, and in cold weather the window motor was under powered.

How-To install DEI530t:
How-To then install PAC TR-7:
Additional installation instructions and photos:


Videos of others who have done this project


I just wanted to do a post giving a big thanks to all those in the community. Every since I’ve posted my project on their user’s WIKI I’ve been getting steadily 10 times the traffic I used to, every day.

And I can see that many of them are also looking at my other non-Arduino projects. I would love to hear from the community and know what kind of stuff interests them.

I’ve only been using Arduino’s for a couple of months now but I’ve quickly become addicted. I have some more projects on the way…


This video below shows all the parts and how I’ve connected the servo.

This is the pull string for “manual” control

Well the fun keeps on coming, and by now you should see that the running theme in my world is many competing projects. Which is why you’ll often see me post new cool stuff before I properly tie off the loose ends with existing stuff. So for that I apologize for not completing many tutorials and postings of source code. I also have a day job you know 😛

Annnyway stand back witness a very cool project that literally took me less than an hour to prototype. And the prototype isn’t that far from the complete project. For a long time now I wanted automated window blinds, because to me, blinds are pretty useless on their own. I don’t open them when it’s sunny, and if I do, I forget to close them for privacy when it’s dark. Can’t this just happen for me? Like come on.

There are solutions available but clearly the other theme to my blog is cheap. If I had to pay for premium home automation, I simply wouldn’t do it. I may be lazy but I’m even more so cheap.

I successfully converted existing blinds in my house to automated blinds with many features for about $35-40. The blinds themselves cost about $35-40. So all in all this is a cheap upgrade for what you get.

What my blinds do (aka what sensors does it have). My window blinds will:

  • Open when it’s day light, and close when the sun goes down. This is accomplished EASILY with a $1 Light Dependent Resistor.
  • Will close partially when it’s a very hot day. Accomplished by a $1 Thermal sensor model TMP36.
  • Open or close blinds to any degree I wish using my logitech harmony remote (or any remote), accomplished by an IR Receiver for $1.
  • Open “manually” by waving hand near top of blind using a IR motion sensor

This slideshow requires JavaScript.

I am operating the blinds using a servo, which is a type of geared electric motor. They are about $9.

I’m doing this all through an Arduino, it’s cheap, super easy to use and has great tutorials for all of the features I’ve mentioned above. All I can take credit for is combining the tutorials and adding some basic logic. If you know any programming/scripting language this will probably be a breeze.

The beauty of the Arduino is you don’t need to buy all the stuff I listed, you can just pick what you need and roll with it. IF you want what I want, it’s a few bucks more here or there.

Lastly (and I’ll add better details later), I was able to do this so easily because I had room to work within the header of my blinds. I’ve watched 6 examples of similar projects online, and not to knock them, they all look ugly. Many of them have components exposed and usually this is because they are retrofitting thin, half inch, cheap blinds. And I ask why put this kind of effort and money into $10 blinds, especially if it will look harsh on the eyes after? Go get yourself some nice blinds, 2″ faux or real wood. They look good and because of the size of the blinds there is plenty of room up top to hide all your gear.

You can find my Arduino source code AND diagrams on github:

Parts List:
 - 2" Venetian Blinds (Faux or Real Wood)
 - Arduino UNO or preferably an Arduino Mini
 - Servo (Any standard RC car servo should do)
 - Photocell / Light Dependent Resistor
 - 10k resistor
 - Some wires

 - 90 Degree Servo Mount
 - TMP36
 - 38Khz IR detector

Perma Link:

More Videos Below…
Continue Reading

Well it’s been a couple months since I installed my IPcamera and linked it to my x10 door bell. It’s been pretty great. I plan to show a new refreshed video and a full introduction to the software features I use in some backend scripts and a web as well as a smartphone app that I’ve been working on.

For now I’m interested in showing my IPcamera/doorbell script I wrote for XBMC just this evening. I use XBMC on all TV’s and computer systems in my house.

This slideshow requires JavaScript.

It’s been pretty great so far at automating my media across the network and integrating my home automation notifications. I decided to write a script to send a notification to all XBMC instances when my doorbell rings and to display a live video feed of the IPcam at my porch for 10 seconds.

My particular use case was I realized when in my exercise room I will not be able to hear my doorbell over my treadmill motor and music/video playing, AND I’m probably going to be spending most of my time in that room looking at an XBMC screen. It works great, it’s very simple and it’s very cool since it pops up on any screen I have running in the house

##Deprecated Example!

#Import the XBMC/XBMCGUI modules.
import xbmc, xbmcgui, time, urllib

#inherit from WindowDialog instead of Window so that it's shown on top of
#what's onscreen instead of replacing it entirely
class CamView(xbmcgui.WindowDialog):

    def __init__(self):
        #Define image location and size
        self.image = xbmcgui.ControlImage(870, 438, 380, 253, "")

viewer = CamView()
start_time = time.time()
while(time.time() - start_time <= 14):
    #set url to ip cam image, password auth not supported 
    urllib.urlretrieve("", '/tmp/bell.jpg')
    #Define image transparency 
    viewer.image.setAnimations([('conditional', 'effect=fade start=90 end=90 time=0 condition=true',)])
del viewer


What I’ve created is a regular XBMC script like all other addons. You can get my script in ZIP format from github here,

The thread on XBMC forums for this project can be seen here:

This script can be run in the Programs menu or ideally for what I’m demonstrating here, it’s called by a command line script when it sees that my doorbell has been pressed. This is just a regular HTTP GET to your XBMC machine telling it to run the script.

Please note I’m using HTTP GET’s on XBMC 11, XBMC 12 requires an equivalent command over a json call. I’m pretty sure it’s not hard, I just don’t have that information right now.


From a linux shell you'd execute this as:

wget "http://XBMCHOSTNAME:PORT/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.RunScript(/PATH/TO/SCRIPTS/DIR/script.doorbell/";

or you can just paste this into a regular webbrowser to test.
Check out my latest post where I demonstrate this functionality as a popup in XBMC, including script source code

Check out my latest project!

I have fully installed my door bell and camera, have developed a decent looking website and html email template and configured my cellphone to make door bell dings when the message letting me know someone is at the door arrives. It was all pretty simple. I’ll be posting a video soon but currently it’s -25’C outside.

I just got my hands on a used x10 pan/tilt camera mount. With it I have retrofitted my non-pan/tilt IP camera with it and I have written a simple yet easy on the eyes web interface with live 1 frame per second(by choice) view.

Check out my latest post where I demonstrate this functionality as a popup in XBMC, including script source code

This slideshow requires JavaScript.

So what you’re seeing here is me using a Harmony remote, and a mediapc running XBMC, plus x10 Home Automation to control my Lights, Thermostat and Fireplace. The Harmony remote and my PC drive the functionality. XBMC’s Notifications via API allow on screen feed back for what commands I’m executing.

Soon I will update this page with links to illustrations, script examples and a parts list.

Parts Used:
-Logitech Harmony Remote
-X10 lights + PC Controller (any HA lights would do)
-IR543 (is an x10 IR received for the remote, but an xbmc script could do this)
Parts Used:
-Logitech Harmony Remote
-X10 Universal Module for fireplace (basically a relay switch)
-TX15B X10 thermostat (deprecated, I recommend a good WIFI thermostat)

Here are some screen shots, I’ve included a summary of most of the dialogs to give you an idea.

This slideshow requires JavaScript.

People might be interested in this x10 plugin for XBMC. It doesn't support linux services but I'm actually planning to add this to the existing script.

So you’re at the point where you want to add more functionality to your home automation system, or maybe you specifically only want a remote access Thermostat. There are a number of reasons to want this but the question is which one is the best choice? Which technology is the right choice?

Before we discuss that, I’ll list a few reasons why you might want a remotely accessible Thermostat:

  • Left for vacation, forgot to turn off heat or AC. In a pinch you can adjust this from your smartphone or a computer
  • Returning from vacation and would like to get your house to the proper temperature before you step in the door. Returning from a tropical paradise to a frigid dwelling isn’t fun.
  • You would like to record the usage of your thermostat to a file/database so that you can do a detailed analysis between usage and utilities bills. (if you’re the meticulous type)
  • You want the actions of your thermostat to be directly affected by the status of motion sensors in your house. Why heat if I’m not home? Why adhere to preprogrammed schedule if I come home early?
  • You’re not near your thermostat (perhaps on a different floor) but want to turn the heat up, or turn it down.
  • You want to extend the functionality of your thermostat by augmenting it with custom functions from a computer/server.

Now lets discuss which to choose. I for one, didn’t really do my homework before buying mine. I previously had an x10 lighting setup in my entire house so to me I thought well I have the x10 transmitter, logically I want an x10 thermostat like the one pictured here. It is an RCS tx15b. They don’t make these anymore, I purchased mine used off ebay. It works well as shown in my other videos, but there is some hackiness required to get functionality like bi-directional communication to work. It wasn’t the worst choice and will do fine for now, but ultimately for the price I paid I could have spent another $50 and got current gen technology with better features.

Aside from x10 thermostats, there are other home automation protocol controlled thermostats. Such as ones controlled by z-wave and insteon, but I recommend you avoid them all. The conclusion you should draw from this article is why hassle with proprietary protocols and the need to purchase a compatible transmitter when good ol’ WIFI will do best.

Not all WIFI thermostats are created equal

Disclaimer: I have never used any WIFI thermostat in my life. I have just read a lot in preparation for my next purchase. However statistically speaking there is a 92% chance that my opinions are facts. In the event of the other 8% please comment corrections, I’d rather be eventually right than incorrectly believe that I’m right.

  • Most WIFI t-stats do not allow you to access them via LAN, aka HTTP to an internal IP. MOST of them actually make you connect to their externally hosted site. So you’re never directly accessing the t-stat, rather the t-stat sends and receives commands to their website, and you as a client also connect to this website. This completely ruins the chance for hacking and customization. You want a t-stat that has a locally accessible web server
  • Most WIFI t-stats DO NOT offer any sort of API access, so that you can easily send commands and receive status via a custom script
  • Often from my research the more expensive thermostats are the ones that are the most locked down.

Having the above in mind my recommendation to you is to purchase a thermostat from The reason why is they satisfy all the concerns listed above.

Their thermostats offer:

  • A locally accessible web server
  • Open and full featured API access using REST (HTTP GETs)
  • Priced very reasonably.

Some might say they’re a little on the ugly side. But for the price and features I’ll take the ugly. This is the ct-30. It’s about $140 shipped and considering non-wifi thermostats with decent functionality are $100 – $300, this is a steal. The ct-80 is its big brother, it comes with many more features such as a humidistat. It’s quite a bit more expensive but I’d say worth the cash. 3M resells the ct-30, rebranded as the 3M filtrete, and honestly looks very ugly to me. I’d rather get the radio thermostat branded unit.

If you’re wondering why the API matters so much, let’s assume on Windows or preferably Linux, I want to request the thermostat’s temperature, and then send that data into a website, XBMC, a daily email report, or just log to a file or DB for statistical purposes. With a RESTful API, all you have to do is script a HTTP GET to http://IP/API?command. And the thermostat will respond with the data.

If words like API, Rest, HTTP GET and the like sound foreign to you, don’t worry it’s actually a very simple concept. The thermostat has a web server running on it, you make a request to a particular page on it’s server (via script or even browser), the server will respond with data after you make the request. This thermostat also has it’s own web user interface for configuring it. And has an iphone and android app.

My last note is you might be wondering, why do most WIFI t-stats use a hosted site instead of a local web server? The answer is ease of setup for the non-technically inclined, at the expense of flexibility. If your t-stat has a local only server, then you need to open up a port in your route/firewall and set up rules so that you can access it over the internet (aka from work, from cell phone).

So to combat this, instead of the t-stat hosting the server, the t-stat initiates an outbound connection from your home internet, to the manufacturers website, where it sends and receives data to/from that site. You then use an account you create with them to log in, view, and control your thermostat at home. This is pretty much identical to the concepts of accessing your web enabled printer over the internet if you happen to own a modern HP or Cannon printer for example.
For my uses, Yes I want to be able to access my t-stat controls from across the internet, but I also need to be able to access it directly/locally for customization.