Smart Tech: My Lights Blink When My Blood Sugar is Low

I have integrated my body with my smart home! I now have an automated notification system that blink my lights red 5 times when my blood sugar is too high or too low.  Let me show you…

As a person with Type 1 Diabetes, I must continually work to keep my blood sugar in a healthy range.  For various reasons, my blood sugar can become too high or too low, and I need to be aware so I can respond accordingly.

Now that I am a proud Cyborg, my Continuous Glucose Monitor (CGM) can audibly notify me when my blood sugar is too high or too low.  However, given the plethora of beeps and vibrations due to email and other technology, I am prone to ignore those alerts. I also work from home, and I am often on conference calls using headphones. Blinking my lights helps ensure I never miss an alert!

The main reasons I love this smart technology and its capabilities:

  1. I’m a nerd (Could you tell?), and I love that my world is aligning more with Star Trek!
  2. It makes living with Type 1 Diabetes a bit more worry-free. Blinking house lights are useful for both my husband and me to ensure we are notified when at critical times.
  3. It could save my life! My husband loves this aspect too. 🙂

It took me several weeks of my free time finding and reviewing documentation, participating in user groups, and trial-and-error to create this solution.  Hopefully you will find my how-to summary helpful.

 ============== HOW-TO / THE NERDY PART / THE FUN PART ==============

Thanks to my Dexcom G5 CGM and Nightscout, my blood sugar levels are continuously shared in the Cloud. My Dexcom CGM is a device connected to my body that reads the amount of sugar in my blood every 5 minutes. Nightscout is an open-source application (it’s free, with community-created enhancements) that monitors and displays that blood sugar information.

“If This Then That” (IFTTT) is an app that connects smart devices and web-based services using “If, Then” statements. For example, I use IFTTT for turning on my living room light when I come home. Here are other examples of IFTTT “widgets” I use:
D9713739-6CE0-4C3E-A9F6-B492FC74B593

IFTTT integrates Nightscout with my existing LIFX smart light bulbs. Other smart light bulbs should work too; I know of at least one person who has this solution working for Philips HUE lighting.

Following are the high-level steps to set up the solution.  The solution shares my CGM data in the Cloud, then it integrates it with my smart home.

  1. Set up Github and “fork” Nightscout to create a personal Nightscout application. Github is a code repository. Don’t worry… other nice people have already done the coding for us.
  2. Set up Heroku to host your personal Nightscout application in the Cloud. Follow the instructions on the Heroku site to create a new account. (As an alternative, I could have used Microsoft Azure for cloud hosting, but, honestly, the steps for Heroku seemed simpler!)
    • Click the “cgm-monitor” app and fill in the details.
    • In the configuration variables, enter your Dexcom G5 username and password. (That acts as “the bridge” so Nightscout can get the data.)
    • Also in the variables, turn on the relevant alarms and define the range goals (BG_TARGET_BOTTOM and BG_TARGET_TOP) and urgent points (BG_HIGH and BG_LOW). Following are my typical settings:

    B1791C5F-ED6F-4E4D-829A-1B84B4497E48

  3. Access your Nighstcout application, either through a web browser or via the Nightscout app, using your personal URL (e.g., Http://yournightscoutappname.herokuapp.com) When you first open it, it may play alerts and be out-of-date. Don’t be discouraged; just walk away. If you cross your fingers and toes just right, hopefully it all syncs correctly within a couple of hours.Note that at least one device or computer must keep an active session with Nightscout. Anyone who knows your Nightscout URL can see your blood sugar (hence, unlimited number of followers).
  4. Set up IFTTT to integrate your light bulbs with Nightscout alerts. 

I am sharing my steps in case they might be helpful to others who want to set up a similar “smart body” solution.

I’d love to hear about your DIY projects or thoughts in the Comments section below.

6 comments

  1. Hi, Libby! My husband sent me your post and I am so excited. We’ve been hooked into Nightscout since 2013, first with the cabled Android phone solution, then with the Dexcom. I set up Azure ages ago and just let it go (I don’t really use it because we use the Dexcom Share app). My husband works from home and your post prompted me to set up Heroku and get some basic integrations done. We’re ready to order the Lifx mini for our first application. We’ve also set up Alexa through IFTTT so that if he is low he can say a trigger and it will call my cell phone with a message. THANK YOU for inspiring me to revisit all of this to make our lives easier.

    • Hi Tracy!
      Thank you for your comment, and I am so happy to inspire you!
      I love the IFTTT trigger capability, an that’s a great use for it. It’s fun being creative in how we can leverage this technology. It’s nice to know that it will just keep getting better!
      Please feel free to reach out if you run into problems I might could help with. I would also love to hear from you in the future as you continue to leverage the technology… I’m sure we can continue to inspire each other.

  2. I still haven’t gotten on board yet with getting hooked up on all this technology. Maybe because I am not even 2 years diagnosed myself, maybe I’m just afraid. But it does give me hope seeing that people really like it, maybe one day I will.

  3. Now that there are no more recipes on IFTTT, does anyone know how to send a text to a phone number if blood sugar drops too low, instead of having that user install the xdrip or share client on their phone? Or send a tweet?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.