ESP8266 Phone Text/Email Alert

Place your projects here
Post Reply
Zim
Posts: 281
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 256 times
Been thanked: 128 times

ESP8266 Phone Text/Email Alert

Post by Zim »

Mice in your parked RV can be a problem, especially when they go undetected when you are not around.
No, this is not a joke. Sending text messages and emails was not easy until Annex was born.
With just a few lines of code and a gmail account, ESP8266 can send you text and email warnings so you
can remove the decaying mouse before smell....and find the hole! Can also be retrofitted to any trap
No 3rd party required!!!! (you must turn on less secure apps in your gmail account, so create a new one just for this)
If you are sending a text, you will need to know the receivers carrier so you can use the appropriate domain name. find it here: https://computer.howstuffworks.com/e-ma ... mputer.htm
My example is @msg.telus.com
500.jpg
20200129.jpg

Code: [Local Link Removed for Guests]

'Annex Code
EMAIL.SETUP "smtp.gmail.com", 465, "whoever@gmail.com", "password"
PRINT EMAIL ("whoever@gmail.com", "4037672441@msg.telus.com", "Mice", "Mouse trap has been tripped")  ' this sends a text
PRINT EMAIL ("whoever@gmail.com", "John@Yahoo.com", "Mice", "Mouse trap has been tripped")     ' this sends an email
PAUSE 10000   'stays awake for 10 seconds, so you can catch it before sleep to edit it, if needed...
SLEEP 10     'goes into deep sleep until reset, to save battery
Yes! thats all! gotta love it! LOL
Battery life is many years if its not tripped, because there is no parasitic drain.
The trap holds the switch open....
You do not have the required permissions to view the files attached to this post.
Post Reply