This project sends a daily text message and email alert when your iPhone gets close to your Wi-Fi network, such as when you return home. The alerts are limited to send only once a day and only during a user selected time window, such as 4-8 PM. The program is written in Python and introduces basic concepts for beginners learning to use the Raspberry Pi.
Video how-to for this project:
Step 1: Download Raspberry Pi Code For This Project
Download the code for this project here:
Step 2: Download Nmap to your Raspberry Pi
Open a terminal window on your raspberry pi (click on lxterminal on the raspian desktop) and type this to install nmap:
sudo apt-get install nmap
Step 3: Personalize the Code For Your Email Address and Phone Number
The code clearly indicates where you need to enter the following:
1. The email address that you want alerts sent to (i.e. Where you receive alerts)
2. The email address and password of the account that you want to send alerts from
3. The phone number that you want to alerts sent to. You'll need to input the appropriate email-sms gateway for this phone number, all of which are noted in the code for major cell phone providers. For instance, you would type in firstname.lastname@example.org to send a text message to phone number 202-555-1212 if that phone number is an AT&T subscriber.
4. The MAC address of the smartphone you carry with you. This is the phone that the program will constantly search for on your home network and will detect when you first return home.
Step 4: Run the Program!
Open IDLE on your Raspian desktop. Paste the code you just copied from justpaste.it into the blank window in IDLE and save the file (name it something like iphonescan.py)
Click on RUN and then click on RUN MODULE. You should see a new Python shell pop up and the program start to search for your iPhone.