Skip to content

Instantly share code, notes, and snippets.

@drio
Last active August 29, 2015 14:22
Show Gist options
  • Save drio/96b360bbdcf065f49d7d to your computer and use it in GitHub Desktop.
Save drio/96b360bbdcf065f49d7d to your computer and use it in GitHub Desktop.

Notes on using a Raspberry Pi as a thermostat

Here you have some notes and comments on my experiences when setting up a raspberry pi as a thermostat.

I'll expand the document as more questions arise, but I will keep it short initially.

Materials

There are great starting kits out there, like this one. Notice that's a Pi2 (yeah! I have to try one of those).

But we want to use the GPIO to control an external device. In my case I use it to remotely open my garage door and as a thermostat. For those, we want a few extra things:

  • GPIO to Breadboard Interface Board
  • Ribbon cables
  • Breadboard
  • Resistors
  • leds
  • relay

TODO ...

Playing with a LED to understand the GPIO ports

TODO

The thermostat connections

If you open your current thermostat, you'll see a bunch of cables connected to a "patch panel".

Specifically for me (A honeywell device), the first two entries are for the power. The last ones are for activating the heat, air conditioner and fan.

If you want to test this, use a ribbon cable and connect any of the power entries to the air conditioner (Summer time here :)). When you do that, you should hear your air conditioner start. Don't turn it on and off too quickly, I am not sure why but it is not a good idea.

Now, what we want to do is to control that with our pi. Something like this:

power --------------------
                          |------|Relay|--------| GPIO PI
air conditioning entry ---

Now, from the pi, we can turn on and off a particular GPIO pin which will in turn tell the relay to open or close the circuit. When close, we will activate the air conditioner, when open, we will disable it.

Once you control that, the sky is the limit.

References

  1. My garage door source code
  2. Garage Door opener
  3. Open Nest
  4. Temperature check
  5. Video Camera screenshots

-drd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment