The home fencing dilemma

Building a bot that controls lights, music, and possibly more, I’m facing an interesting dilemma.

One of the coolest things I’d like to make it perform is to shut down all the appliances when I leave the house and welcome me when I’m back.

The action of recognising when someone gets in or out of home is called “home fencing”.

There are several ways to implement such feature and after a few days of research, I’m still not sure which one is the best to implement.

GPS fencing

It’s possible to tap into my phone’s position and once defined the geographic locations of the house, it would trigger events when entering and exiting. The primary trade-off is the battery of the phone. To perform a proper GPS fencing, it’s required to keep the location services of the phone always active, with an excessive battery consumption.

WiFi fencing

When the phone gets home, it connects automatically to my wifi, so it would be possible to establish my presence depending on such connection. It can happen at link layer when the phone connects to the wifi, or at IP level, where the phone becomes available with an assigned IP address.

Unfortunately, again for energy efficiency, the iPhone does not keep a permanent connection to the wifi if it’s not operated for a long time. So when the phone is on charge all night long, it disconnects from the wifi, and it can be taken as me leaving the house. Same happens when I pick the phone in the morning, it would be understood as me coming back.

Bluetooth fencing

I could equip the bot with a Bluetooth interface and use the discovery feature to assess which devices are around. Having a 10m radius (a little more if just discovering), and living in a small apartment, it could work. I could also use my Apple Watch as discoverable device, being visible to a Bluetooth low energy interface.

I’m currently testing a few options, but it’s an interesting dilemma, so if you have any good idea, please leave a comment and I’ll take it into serious consideration.

 


Posted

in

by

Comments

2 responses to “The home fencing dilemma”

  1. effemmeffe Avatar

    I use llama on my android that monitors the gsm cell in use. It needs training to recognize the home location by the few cells used, but after a few hours of training it works.
    I also keep my gps always on and on my android the battery consumption is not such a problem.
    Or you can use one rfid tag on the entrance door to perform actions when the phone passes near it.

  2. Beau Lebens Avatar

    I haven’t seen that much drain on GPS always-on with an iPhone. I use an app called Beecon which always has it running (at least enough to do a geo-fence) and didn’t really notice any difference from my normal usage.

Leave a Reply

Your email address will not be published. Required fields are marked *