Uncategorized

I’ve been gone for a while and now I’m back. I’ve noticed there’s a severe lack in good (and good looking) software for modern DIY home automation. In this post I’m throwing up some screen shots of a software suite that I’m currently working on. I’m focusing on my thermostat, motion sensors and lights. And getting them to eventually work together.

Considering I see a lot of impressive thermostats and various home automation products being built from scratch using Arduinos and the like, it’s a shame that none of them have a particularly good software user interface. I was in the same boatand thought, “why shouldn’t we all have a pleasant home automation interface?” I plan to put the code I’m working on up on Github as open source so that others can use this in their projects if they like, or even contribute improvements.

If you’ve created your own Arduino thermostat, this app is for you.

This software platform has been designed so that none of the protocol specifics matter to the user interface. It’s completely abstract, so if I want to use X10 or Zwave or Arduino or Philips or whicheverproducts in my home, I don’t have touch the UI code. What I have to do is configure the devices in the database, and write a “protocol translator” for the device. In other words, if I bought a new thermostat (or made one) and it had a completely different protocol/API, all I would have to do is write a basic shell script to sit between my core software and the thermostat, translating commands to API calls. Probably sounds more complicated than it is.

This slideshow requires JavaScript.

I was previously managing the thermostat and motion sensors through some ugly shell scripts. I’ve moved both over to a mysql database for configuration and state, with an HTML5 front end and some basic shell scripts to interface with the hardware. I think by decoupling these three tasks it will make it easy to shim in other protocols and hardware down the road.

In the motion sensors app, I can now get a very good idea of what each sensor is doing, making the set up and troubleshooting of sensors easy. This app shows me which zones see motion in green, dormant zones in grey. I can click a zone button to disable motion detection in that particular zone. It tells me how long it’s been since it has last seen motion . It also shows me the number of “hits” behind the main text.

When a sensor is triggered, it will run a related macro for it, to say turn on lights on that room, or whatever. The macros are just a series of basic shell scripts.

The back end service for motion detection compares the last time a zone saw motion to a timeout which can be a hard set number or perhaps a dynamic number based on “hits” of activity seen in that zone recently. An exponential push-back on the timeout. When the timeout is exceeded a macro is run to turn things like lights off or maybe adjust my thermostat. Maybe auto-arm the alarm when all zones are dormant and it’s during work hours.

Speaking of alarm, it also acts like an alarm system now. When enabled, triggered zoIMG_00001485nes show up in red on the UI. The back end servertakes photos from my cameras, emails me the photos, and plays a siren and flashes all of my lights on and off in my house. It’s pretty cool considering it was a $0 feature add.

All of the data is maintained in the same database as the thermostat app. I plan to write something to use this motion data to dictate thermostat functions, so that it will operate similar to a nest thermostat.

This slideshow requires JavaScript.

The thermostat app provides your typical thermostat functions. This interfaces to an x10 thermostat which I don’t recommend. But it would easily work with any WIFI thermostat with an open API or a home made thermostat with an Arduino or Raspberry Pi.

This app also pulls data from yahoo’s weather API and logs it to the database. So now I can correlate external weather to internal thermostat usage over the years. Possibly use that data and compare it to my Utility bills.

The image in the background updates dynamically and is animated.

With both apps, it updates status changes from the back end service quickly. So changes made on one client(phone) reflects to other clients almost immediately. This is great for multi-user homes.

Also these apps automatically scale for mobile or desktop view. Meaning I only have to maintain one code line. The cool part about this is it will act as an end to end solution. It will work and look good on desktops, tablets (maybe on a wall), and phones.

I’ll post my software publicly when I have modified it for easier distribution. If you’re interested in working with it or possibly adding to it, send me your github information.

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: http://www.directed.com/guides/manuals/ig/accessories/N530T_1-00.pdf

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: http://home.comcast.net/~c_wrzesniewski/windowsmod.htm
How-To then install PAC TR-7: http://www.rx8club.com/series-i-do-yourself-forum-73/diy-auto-up-down-windows-factory-key-fob-168029/
Additional installation instructions and photos: http://forums.clubrsx.com/showthread.php?t=177722

Parts:

Videos of others who have done this project

I’ve had a few people ask me to clarify where the servo actually goes. And as I stated before I planned to do a full, start to finish video tutorial. I still will, but I lied on the timeline. It’s summer, I’m a home owner with many things to do, and I’m a beer drinker with many women to slur at. This blog will be more lively in the winter.

Anyway this blog post with be a live document where I will continue to add more how-to details on the blinds project. I’ve decided to start a new post because my original one was getting very long.

Tutorial #1 – Where does the servo go?

Taken from a photo that a viewer sent me, I’ve updated it with the latest in computer graphics to demonstrate that in my case I had to remove the manual crank, shorten the rod (mine was plastic) and hot glue the servo into one of the spools.

My question/advice was to see if you can turn the rod, by hand, with the manual crank still in place. Is there resistance? If so that means the crank needs to be removed. It’s pretty easy; in my case it’s just held in by clips. Looks the same in this guy’s case too.

20130611_115856One issue with this guy’s set up is where the green arrow is pointing, you can see that the rod is what rests on the brackets/holders. But in my set up, the spool (metal drum.. plastic in my case) has a lip on each end and this is what rests on the holders. So, this guy will have to be innovative to get this to work and I look forward to seeing photos of how it’s accomplished.

 

p.s. I’ve been super negligent in my task of offering a tutorial of this. I just haven’t built anymore yet.