Garage Door Monitor Update #2
The NodeMCU project is still chugging along. I’ve gotten more experiments done which I’ll share with you shortly. Unfortunately, all of this information has left me more indecisive of how I want things. To recap, I want to make something to be able to tell me whether or not my garage door is open or closed without going outside to check. Click here to see the first post about the project.
Problem: Is it dead or does it just like to sleep?
The problem with the NodeMCU working for a while and then giving up on life is still the big one. I’ve done a few overnight tests with a few tweaks (mostly giving it delays/time to do things) with them all resulting in entries stopping after about six hours.
When I use my bench power supply, I’m able to see how much current it’s drawing. When it’s on, it’s pulling about 69mA and peaks to about 71mA when it’s transmitting data. It doesn’t seem like much, but it registers as pulling no current on my power supply when it’s in its deep sleep. Seeing that, it’s hard not to want that sort of power saving on the final build.
More likely than not, I won’t let it go to sleep and have it on all the time. I haven’t actually tested this yet to see if it will stop working again. Stay tuned!
Experiment 1: They still can’t hear each other
I tried to get two NodeMCUs to talk to one another again but it’s still not working out. Basically, I had one that would set up as an access point with a webpage that I’d try to get the other NodeMCU to connect to and read. I could get it to connect once but then it failed at reading any data. After that, I couldn’t get it to connect to the AP NodeMCU anymore. I have no idea what changed in that time.
The alternative solution is to continue sending my data to my webhost, and then having the NodeMCU connect to a webpage I have online which will feed it the information it needs. The webpage it would connect to would give it raw unlabeled data that it knows how to decipher.
Experiment 2: Keeping it local
After banging my head for a few hours, I strayed away into another alternative, which would eliminate the second NodeMCU where I use my phone to see what the NodeMCU in the garage is up to.
It went very well since it was easy to modify the WifiAP example sketch (at least that’s what I think it’s based off of, I’ve been accidentally saving over the example sketches). I was able to see the values on my phone by visiting an IP address once I connected to the NodeMCU. However, the fact that I have to switch my wifi is a bit annoying which makes this an undesirable option. It’s still good to know I can do this though as I could use it in some other project.
So now what?
With everything in mind, I’ve got some updated objectives:
- Garage NodeMCU has a limit switch which will tell whether the door is open or not. It will connect to my webhost and send data. This NodeMCU is no longer allowed to go to sleep!
- Webhost will present the data to me on a page much like the screenshots I’ve been sharing. It will also have a seperate webpage with raw recent values.
- Inside NodeMCU will connect to my wifi network and then to that webpage with the raw recent values. It will take those values and decide what to do. (Light up an LED, make a sound after a few minutes, etc.)