The use of the ESP8266 in the world of IoT

User avatar
By appiotm
#54550 Hi, I'm new to ESP8266 and Arduino in general, I've been playing around and testing, mostly based on sketchs and code found online and modifying it according to my necessities and my still very limited knowledge of the matter.

Problem:
Garage door often left open.

Idea:

Two ESP8266, ESP "A" in garage connected to a reed switch mounted on the door. ESP "B" inside the house connected to a, let's say, buzzer.

When the door opens, the reed switch activates A -> A sends a signal to B -> B activates the buzzer.

Questions:

Given that I can ping and control A from inside the house thru my wifi (easy led switch test via webserver (thru nodeMCU firmware on A), is my idea feasible?

In case it is, would two ESP8266-01 be good for the job?



I'm studying the LUA language and I'm at a very early stage in understanding the potientalities of the ESP8266 (so far I only installed, on one the two I have, the nodeMCU firmware and the mentioned test along with a couple others) so I'd also appreciate a lot to be addressed to the right learning material to turn this idea into an actually working thing.

Thank you in advance for any asnwer and suggestion.
User avatar
By eduperez
#54581 Unless A needs to powered by batteries, I am sure you will find tons of examples of code that does pretty much what you need; does not seem too complex for someone capable of connecting the dots and asking the right questions.
User avatar
By faxMan
#55041 That sounds cool, i was thinking of using the radio comms instead of wifi but using wifi would also allow for remote monitoring from anywhere. So i think wifi is the way to go. Think of your inside alarm unit as the BUZZER server and the door switch as the client. Perhaps you can use an interrupt line to wake up the client, ping the server and sleep back down, to save power. I'm new too though so take my advice with a few grains of salt.
User avatar
By faxMan
#55042 unless you just wanted it to alert your phone or send you an e-mail then you would just need one ESP8266. I have bunny detector that alerts me from the garden with an esp and pir.