Raspberry PI Code

A project log for Stupid Simple Alert Watch

A TI ez430 Chronos watch is the perfect platform for an emergency alert device for an ill family member...

ogdentoogdento 02/17/2020 at 00:230 Comments

The raspberry pi is responsible for sending email notification(s) when an alert event is received from the watch.  I booted up a fresh install of Raspbian and created an ~/alerter folder to house my code.

Inside the ~/alerter folder is an script that runs at startup to listen for chronos events, and it is based on the following code:

When an "S1" button press is received, alerter executes which calls a function in to actually send the email. The recipients are hard-coded in uses the smtplib, MIMEMultipart and MIMEText libs to handle sending - more info and instructions can be found here:

I set up a special gmail account for sending the alert emails and the information for that account is stored in a settings.ini file. The destination addresses can be any valid email address... I'm using a destination address from my mobile phone provider that converts the email to sms, so I get a text message when there's an alert.

To run the script at startup, I modified the /etc/rc.local file with the following line: python /home/myrpi/alerter/