I recently moved to a new home and I now have 2 garage doors to control instead of one.  So I decided to revamp my garage door home automation project by using the Spark Core.  This is a fascinating device as it is designed to connect to the Spark.IO cloud service without doing a lot of coding to maintain the connectivity to the cloud.  The default firmware in the device allows you to remotely connect to it and invoke functions, expose variables to the cloud service as well as perform pub/sub between devices.  Make sure you check out their website to gain a better understanding of all the capabilities of this small packaged IoT controller.

My goals in this project was to achieve the following:

  • know when either garage door is opened or closed.
  • remotely close or open the garage door.
  • have the door automatically close when I go to bed.
  • keep track of how long it takes to open/close the garage door.
    • if the door starts to take longer to open and close this might be a sign that it needs maintenance.
  • automatically open the garage door when I arrive home.
  • automatically close the garage door when I leave my home.
  • notify me when the door needs maintenance because it has been opened/closed so many times.
  • monitor the temperature and humidity in the garage.
  • monitor the garage for motion when the security system is on.
  • notify me that I left the door open after a specific time of night.

That is certainly a large number of goals and I don’t intend to complete all of them initially but you kind of get the idea of what the possibilities are.

Initially I intended to do all of this for 2 garage doors with one Spark Core, but after thinking about it a bit it made more sense to use at least two Spark Cores

One thing I decided to do right off the bat is to make sure I have enough sensors that could determine when the door was opened and when it was closed.  I have seen other remote garage door projects that simply have one sensor that detects if the door is closed or not.  I wanted more inputs so that I could time how long it took for a door to complete it’s open or close command.  I want to keep track of this in order to determine if the door will need maintenance when it starts to take longer to open or close.  I can also gather a little more analytics around the timing of the door command and the temperature in the garage.  I don’t know if I will use this more detailed information for anything or not but I thought it would be fun to play around with.

So I will have 2 magnetic reed switches that I plan on placing on the door track to determine if the door is closed or opened.  The status of the door will be 5 different states: opened, closed, opening, closing and unknown.  The unknown state will only be for when neither of the sensors are triggered and the device doesn’t know if the door was previously opened or closed.  I have most of the code written to handle the basic door operations and I will be sharing that code in a future post.

So stay tuned on future posts on this topic as I move forward with it.  Please feel free to give me feedback or ask questions on items I haven’t clarified very well.  I am very interested in anyone’s thoughts on the Spark Core as well as home automation in general.

I gave a talk at the Raleigh Code Camp called "What can I do with a Raspberry PI". The slide deck is attached to this post for those of you that attended.

Raspberry PIv2.pptx (6.67 mb)

I am presenting two sessions in the Raleigh Code Camp 2013 Builder Faire track on November 9th.  The first session is called Building a cloud enabled home security system Part 1 of 2 (the presentation).  The second session is Building a cloud enabled home security system Part 2 of 2 (the lab).  You really need to come to both sessions as the first session explains what you will be building in the second session.  Yes I said that right, if you attend the second session you will be building a Netduino based security system that connects to Windows Azure.  Check out the project website for more details at Cloud Home Security.

I hope to see you there!!