ESP8266, NodeMCU, and my garage

The remote on one of my garage doors stopped working. Coincidentally, right around that time Trung mentioned the ESP8266, a very cheap (around $3) Chinese chip with built-in WiFi and a bunch of GPIO. Also, there’s a project called NodeMCU around this chip, which puts a Lua interpreter on it.

What does this all mean? That with very little investment and some time, I can create a small circuit that connects to the motor of my garage door so I can control it from my iPhone.

Long story short, I went through several different versions of boards with the chip. I started with the super cheap but barebones ESP-01 but using that required too many extra things (USB-Serial adapter, 3.3 V power supply, more wiring). I finally settled on the official NodeMCU devkit, which is extremely nice. I hadn’t done any electronics in many years, but that went well.

Official-original-only-V2-not-V3-Esp8266-NodeMCU-v2-Lua-WIFI-network-development-kit-board-based
NodeMCU devkit. It’s very nice because the built-in USB port provides power and to-serial conversion. Just pop it on a breadboard.

I ended up writing a general purpose web server for NodeMCU: the Open Source and creatively named nodemcu-httpserver. The garage door opener software is just a small web application running off the chip itself. It’s one of the demos I packaged with the server.

FullSizeRender 5
My garage door opening circuit. Almost as elegant and dense as the insides of an Apple Watch. I used zip ties to attach everything to the lid of an H-E-B tupperware. A couple of relays act as the push-buttons that control the garage door motors.
IMG_4123
This is what the “app” looks like. It’s a simple web page served from the chip. When you push a button, it opens the corresponding garage door.

Without further ado, the video:

The nodemcu-httpserver project I started has gotten some traction. The server, while limited (the chip has very little memory), works relatively well. It’s pretty cool to see that other people are using the software and starting to contribute. And it’s making rounds:

  • It was mentioned in this tutorial online, screenshots and all!
  • On this Russian website, people are probably mocking my coding.
  • On Slide 7 of this presentation there’s a screenshot of an early version of the Garage Door application.
  • Artem Pastukhov, who has been one of the most knowledgeable contributors to nodemcu-httpserver and the NodeMCU firmware itself, posts about a little app he did for nodemcu-httpserver here.

 

8 thoughts on “ESP8266, NodeMCU, and my garage”

  1. Hey man, I’m here at the beach and can’t keep from reading your stuff.. Hha good article not bad for your degree 😉 (I.S.E.)

  2. This is awesome. I just ordered a chip and want to try this out. I’ve never done this kind of thing before. Could you go into a little detail on the wiring or point me to some resources? What those other chips are exactly, I’m not sure how your “relays” are working with the garage and the chip? How to know what pins on the nodemcu board to use and why. Etc.

  3. Most of garage doors already have relay, so you probably need only a ESP8266 and connect it to the door rely, Right ?

    1. What do you mean “connect it to the door”?
      The ESP8266 as GPIO pins that can drive very little current and only at 3.3V from its ground. What relay on the garage doors are you talking about and how would you be connecting things?

    2. Dear Marcos,

      Very good project. I need help. Could you help me. I want to upload my nodemcu. but I haven’t do it yet. I use windows pc and ESPlorer. I want to control my mobile phone web browser. Thank you for help. Best regards.

    3. This blog is not going to be a good source of support. There are definitely better places. That said, I use ESPlorer on Mac for debugging. But for uploading the code I always use nodemcu-uploader which is a Python script. For compiling the firmware I use the excellent online service http://nodemcu-build.com.

Leave a Reply