Esp32-open close door alarm

Hi. I cant find how to make a simple a door controller:
if someone open the door show me it a notification on my cell phone…
THanks for a tip.

Simple way…
Attach a reed switch to a GPIO pin and GND and monitor that pin with either an interrupt or pilling it with a timer. When it goes LOW then send an alert. You may need to denounce your switch contacts in software.

More elegant way…
Use a 433MHz wireless door switch, the type you get with alarm systems. Attach a 433MHz receiver to your MCU and when it receives the code from the door switch send a notification.
You can add many more switches to doors and windows if you wish, and each one will have a unique code, which can be used to send different notifications.

Pete.

I was also really anxious about it, as I also wanted to set up such a “system” , however I could not do it for a while. Then someone told me about the 433MHz wireless door switch, and you know what?! I am really impressed by it. It works perfectly, even though it took me a while to set it up. I could not figure out how to attach the 433MHz receiver to the MCU. However, right now it works perfectly, in a tandem with the warehouse door alarms. Yeah, yeah, I am kind of a paranoid when talking about the self security.

It depends what type of 433MHz receiver you have.
If it’s something like this…
image
Then it will have a VCC, GND and Data pin.

The Data pin will connect to a GPIO and work with the RV-switch library to decode the data.

Pete.