For whatever reason, our garage door opener doesn’t work reliably when it’s cold. Only the remotes that are inside in the warmth actually work so we have to remember to close the garage from inside the house. Sometimes it’s forgotten and the garage door is left open. There’s no way to see whether or not the door is open from inside the house. Thus, this project came to mind.
The main objective is to create a wireless way to know whether or not the garage door is open.
The plan is to use two NodeMCU boards. One inside the garage will talk to the other inside the house. The one in the garage will be connected to a limit switch which will be closed when the door is closed. The one inside the home will have some sort of indicator that will tell us whether the door is closed or not. This will likely just be a labelled LED.
These Two Don’t Like Each Other
I received the two NodeMCU boards in two weeks from China. The experiments trying to get them to talk to each other (one as an access point, the other as a client) did not work out. I went hours trying to get something going but I couldn’t, so I went back to something I knew already, which is to have it talk to some PHP code hosted on my website.
The NEW Plan
I wasn’t planning on having the internet involved but I actually think it’s going to be a better idea. This way, I can get something going with just one board and then integrate the second one into the project later. I can check the status of my garage door right from my phone’s web browser from anywhere. The future is here people!
The new plan has a couple phases.
Phase 1: Set up one NodeMCU in the garage with the limit switch. The switch will send the status to my website which I can then check to see the status of the door. I can use some PHP code to send me an email if the door has been open unusually long.
Phase 2: Have the second NodeMCU connect to my website and build hardware around it so that anyone that walks in the front door can see whether or not the door is closed.
It’s been going pretty well so far, even with it’s problems. I’ve got two limit switches sending values to a MySQL database hosted on my website. (The full process: It accesses a URL with the switch values inserted into them, and then some PHP code on that page grabs them and inserts them into the MySQL database table.)
BTW, I am using the Arduino IDE to program the NodeMCU.
I have no issues with it inserting values. The big issue I’ve been having is I haven’t gotten it running for longer than two hours at a time. I don’t know if it’s something on the server’s end or if the NodeMCU is hanging or something. It took me a while to get it to wake from deep sleep without doing something weird so I suspect it may have something to do with that. If this issue keeps going on, I may stop it from deep sleep and see how that goes. It’ll draw more energy but I’m leaning toward giving it a wall plug.
Keep Following the Project
I hope you enjoyed this first update post about my first NodeMCU project! Stay tuned for more!
If you’ve got Instagram, follow me as I’ve found it to be an easy way to share progress updates as they happen.