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:
- I’m a nerd (Could you tell?), and I love that my world is aligning more with Star Trek!
- 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.
- 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:
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.
- 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.
- Create a new account at http://www.github.com
- Search for and “fork” the cgm-remote-monitor application using these instructions: http://www.nightscout.info/wiki/welcome/monitor-cgm-web#github
- Click on the purple button “Deploy to Heroku” button. This takes you to the Heroku site.
- 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:
- 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).
- Set up IFTTT to integrate your light bulbs with Nightscout alerts.
- Set up LIFX bulbs and app. (I had already done this step… I love my smart color lights.)
- Download and install the If This Then That (IFTTT) app on my iPad. (I had already done this step too… I love IFTTT!)
- In IFTTT, configure Webhooks. In Nightscout, enable “maker” and add the key in the MAKER_KEY. See more detailed instructions at: http://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/ifttt-integration.html#ifttt-setup-for-phones and http://www.nightscout.info/wiki/labs/ifttt-integration)
- Create an IFTTT widget with the logic to blink or “breathe” one or more of my smart lights red (or any color) when my blood sugar is too high or too low. See video below for a sample configuration.
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.