In this project you will be able to create a fully functioning alarm system. It alerts you via text message whenever the sensor gets tripped. Let's look at what you need to put in the code.
First you will need your phone "e-mail" address. Carriers have a system in which someone can text you via email. Here is a list of some of the most common carriers' phone addresses:
- AT&T: number@txt.att.net for a normal text message (SMS), or number@mms.att.net for a multimedia message (MMS)
- Verizon: number@vtext.com for both SMS and MMS messages
- Sprint PCS: number@messaging.sprintpcs.com for both SMS and MMS messages
- T-Mobile: number@tmomail.net for both SMS and MMS messages
- Virgin Mobile: number@vmobl.com for both SMS and MMS messages
Just replace the TO portion with your phone address. Now onto the Gmail user portion. The "GMAIL_USER" is going to be your Gmail account email address. Then put in for "PASS" your password. If you want to be more secure, you can set up an application-specific password in your Google Account Settings. Now load the code into your Raspberry Pi and enter: "sudo python the/file/location". That's it! Now you can have a cheap security system in under 30 minutes! If you're feeling extra ambitious, change the code to where it takes a picture with the Pi-Cam. I would really like to see what can be done with that. Thanks!
Comments