Nest - Home Automation

Home Automation

ABOUT THE PROJECT

Being in an apartment is great and a huge step up from living in the dorms, but one thing that really started to hit the bank for our bills was our heating and cooling. With this, I thought there must be a better way to help reduce this bill.

From here, I found that that Nest (by Google) has a fairly well documented API and I could potentially turn off the heating based on a device being within range of the apartment. Utilizing a Raspberry Pi and a Python script, I found I can query the devices on the network and issue API calls.

With this, I created a Python script that would look for my phone and or my roommate’s phones on the network and turn on/off the thermostat based on if anyone was home.

This ended up working fine and well, but ended up needing tweaking in order to query the thermostat too much. I worried that too many queries could potentially have diminishing returns on the heating bill. With this, there are triple checks that make sure a device is off the network. This makes sure that if someone’s phone is rebooting, that the script won’t immediately assume that this particular person is away.

To help further reduce queries, the script will scan less when a device is home and more often when it notices that the home is empty. This then allows for the home to start warming up immediately when a device hits the network. For more information about this, feel free to get in contact with me and I’ll try my best to further explain.