Tuesday, September 18, 2012

Further Optimizations to Presence Detection using Sockets

As I've gone over in past posts, I've got my OpenWRT running some pretty basic presence detection for when my wife and I come and go. My plan is to eventually use this information to do things like adjust the thermostat, or enable an IP camera so we can keep an eye on things when we're both away.

However, for now, all it's doing is keeping a log of when we come and go, until I am satisfied with the general software architecture of my system. So basically, I've had it working for a while now, but have kept changing the mechanism to what I feel is a little cleaner, and learning a bit along the way.

This time? Sockets!

Thursday, September 13, 2012

Optimizing the Presence Detection with SNMP

So now, as described in this post, I've got some rudimentary presence detection going, and can generate events when my wife and I (or rather, our phones) come and go. However, I felt like the ssh-based method I was using was a bit of a kludge, and I really wanted a better way to go about it.

At some point in the past few weeks, I read a bit about SNMP, or Simple Network Management Protocol. It's not really all that simple. From what I read, however, it looked like a pretty useful way to get information from a device, and I stumbled across a few posts mentioning that it could be extended, like this one.

OpenWRT for Presence Detection

If there's one thing any home automation system needs, it's presence detection. I had a few thoughts on how I wanted to accomplish this, though. My first was tracking the cars in the garage using active RFID. I was recommended something like this as an easy way to get started. I figured I'd put one of the transmitters in each car, hook the receiver up to the Raspberry Pi, and whenever there was activity on the serial port, I would know which car had just arrived.

Of course, my wife burst my bubble when she very astutely pointed out: "What happens when we both go someplace in one car and leave the other one home?" I then tried to make the RFID idea work by suggesting she carry the transponder in her purse, and I'd carry the other in my pocket, but I really didn't want one more thing to carry around with me.

Which is when I realized: I already carry a computer with me all the time, my smartphone.

Wednesday, September 12, 2012

Some History

I honestly can't even remember what it was that first sparked this idea. It was probably a few things. We're moving from an apartment into a new house soon, and (of course) the new house is wired with Cat5e Ethernet, so clearly I had no choice but to make sure my hardware all supported these blinding new speeds.

Accompany me, if you will, on a short trip down memory lane...

Hello, World

So I recently started looking into doing some basic home automation tasks, mostly as an excuse to get to play with new toys and learn new languages and programming techniques.  It struck me that as I work my way through some problems, it might be helpful to document my process a little.  This way,

  1. I can look it up later if I forget something, and
  2. I might show up in a random Google search for help a dozen years from now.  
Incidentally, if that's how you found me, and the year is 2024 and humanity has been subjugated by the machines, well I'm sorry, but chances are my information is way too old to be relevant to you, so you should just hop back in your flying car and move along.  Give your robot overlords my best.

Anyone else, welcome, and hopefully you see something here that interests you.