Call My Nana: Danielle Leong Sets Up Life Saving Voice Reminders For Her Grandma With Twilio

The following post was written by Danielle Leong Front End Web Developer at Twilio, and wonderful grand-daughter to her dear Grandmother.

My grandmother is 92 years old. She has 6 children and 11 grandchildren (not counting the furry, four-legged ones). She was on the first women’s basketball team in San Francisco, served on the city’s Grand Jury, and was an avid swing dancer. She’s still fiercely independent, and insists on living in her own home without any assistance. She is, in short, a badass.

Being 92 has its drawbacks, though. “I have so many pills to take,” she sighs. “Thirteen pills every day! And one very special one on Sundays.” She shows me three massive, color-coordinated pillboxes, each labeled with the day of the month. “My daughter labels these each week,” she says proudly. She doesn’t remember which ones do what, but she knows it’s important to take them at the proper time each day. But with so many to take, it’s hard not to get overwhelmed and forget to stick to the schedule. Enter Twilio.

IMG_3303.jpg

When I started at Twilio, I thought this would be the perfect opportunity to build a reminder system for my grandma. Using a simple PHP app hosted and scheduled on Heroku, Call My Nana calls my grandma every day at 10am and plays an mp3 of my voice reminding her to take her medication. On Sundays, she hears a slightly different recording to remind her to take her special osteoporosis medication.
The code is adapted from the Twilio Call Request demo found in the docs with some logic to play a slightly different message on Sundays.
Reminder Php

 

Reminder.xml

 

To run this you’ll also need this handy helper library for Heroku. I used this to help set up a job scheduler on Heroku running my reminder.php code at 10am for a daily call.

IMG_3305.jpg

The app is still running after nearly 650 daily calls. They’ve become the highlight of my grandma’s mornings. “Every morning, your call wakes me up” she giggles to me. “And I remember to take my pills!”

After nearly two years of daily reminders, neither she nor the app have shown any signs of slowing down. Honestly, who has time for that?