Washington, NC Real Estate - A cool site with real estate information in Washington, Bath, and Belhaven, North Carolina.
Greenville, NC Real Estate - Another real estate site with information for Greenville and Winterville, NC.
Morehead City, NC Real Estate - Another real estate site with information for Atlantic Beach and Emerald Isle, NC.
Jacksonville, NC Real Estate - A real estate site with information for Jacksonville, NC and Richlands, NC and homes for sale.
|
iPhone Detection
A cool feature of my home automation system is the way my setup recognizes when I'm home. I have always hated having to get out my keys to the door, unlock it, and then disarm the security system all while holding stuff I'm carrying from the car. I began looking into ways to get MisterHouse to recognize when I have returned home automatically. The only thing I consistently carry with me is my iPhone and wallet. Since swiping a proximity card is still just as much work as getting out a key to me (not to mention I have to install a reader outside my house which is not going to look good at all), I decided against anything in my wallet to open the door.
I began looking at my phone and thought about the bluetooth interface built into it. I experimented with turning the bluetooth on and pinging the bluetooth address of the phone using a USB bluetooth adapter on my main controller. This was a great idea in theory except the short range of the USB protocol was just not sufficient enough to go all the way through the front exterior of my house. Not to mention, it's not very secure considering that the iPhone and USB bluetooth adapter are not even paired -- it's just merely seeing if that address exists at the moment. Another huge drawback to this was the battery drain on my iPhone. Those of you who own an iPhone already know that battery life is a huge issue for us that use it all day long.
It was after experimenting with the bluetooth proximity detection that I realized I was going to need something more secure and longer range. I then came up with the idea of assigning my iPhone a static IP address on my wireless network. Then, have MisterHouse setup a Network_Item that constantly tries to ping the iPhone's IP address every 5 seconds. If it finds the iPhone is available and returns the ping, it then checks the MAC address being used. If it matches, MisterHouse starts a bunch of macros that alert the house that I am home. Now, the iPhone does not keep the wireless LAN connected at all times -- only when it's awake. Two minutes after the phone has been dormant (sleep mode), it disconnects from the wireless LAN to conserve battery life. This actually works better than you would imagine. Because the phone is set to a static IP address, as soon as the phone is woken up (pressing ANY button on the phone will do this), the phone immediately recognizes that the wireless LAN is present and connects instantly. It usually takes less than a second after I hit a button on the iPhone for it to connect to the network. You don't even have to unlock the phone by sliding the bar, the phone will connect just by pressing the home button on the bottom. Once it is connected, it will wait for two minutes of inactivity for it to disconnect.
This works great because I can literally pull up in my car, reach inside my pocket and press any button on the phone, and by the time I get to the door MisterHouse already knows I'm there and authenticated me. I would say it's very secure considering that you would have to
- know what wireless LAN I use,
- know my randomly-generated security key to my wireless router using WPA2 encryption,
- know which IP address my iPhone is supposed to be set to, and
- knowing and sending from my iPhone's unique MAC address.
Of course, someone could always steal my phone -- but then again, it's easier to steal my house keys and make a copy.
|