Short Description

ScoutX is an app to notify your preferred emergency contacts in case your blood glucose values from Nightscout are out of range. ScoutX uses the Vonage messages and voice APIs and is written in Flask.

If your blood sugar values are out of range (significantly low or high), you will get a phone call alerting you and reading your blood glucose over the phone. In the event of not answering the call your preferred emergency contact(s) will receive an SMS notifying them you are out of range.


I have type 1 diabetes. With all the amazing open source initiatives, this is a good way to notify my contacts should I become unresponsive due to my blood sugar being too high or too low. All the data comes from my Nightscout dasbhoard. If you want to check my blood glucose values in real time go to

I have learned so much throughout this year and it’s definitely a privilege to be able to help the DIY diabetes community. This is the community that saved me from having to wake up everyday at 2am, the people who helped me handle calculating ratios etc.

When a person is diagnosed, doctors just give you a sliding scale and you have to figure out your ratios through a trial and error basis. This can cause a lot of horrible lows, until you figure out the right amount of insulin to take. And even then, this constantly changes so we are never in full control. Now with all these monitoring tools we can prevent lows/highs which are dangerous (you can die) and stay within range for most of the time.

Nightscout Dashboard

Although the initial state of this app is very basic, it's work in progress and you're more than welcome to contribute. The idea is to add more configuration options and improve the UI.

Scout Dashboard


This project has evolved a lot since it was first developed. The current roadmap includes the following:

βœ… Available

🚧 Work in progress

Send SMS to get BG Data

The endpoint defined to manage the SMS Webhook is: /webhooks/inbound-messages

To guarantee the functionality of the integration, users have to send the following message to the number associated with the application -> "Nightscout return the latest blood glucose level entry"

Deploying to Heroku

Before you start deploying your App using the Heroku Deploy Button, you need to get the following:

Two of these credentials could be filepaths, but this is not useful at the moment of deploying the application from a repository because of security reasons. That's why we are going to pass the nexmo application private key in a single line as a environment variable and the firebase database secrets also as a JSON string in a single line.

Download your private key file from the communications dashboard and run the following command in your terminal:

awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' ./private.key

This command is going to retrieve the private key in a single line.

For the firebase secrets json file just put the content in a single line. Copy and paste it in the FIREBASE_PRIVATE_KEY field. The content sould look like this:

  "type": "xxxxx",
  "project_id": "xxxxx",
  "private_key_id": "xxxxx",
  "private_key": "xxxxx",
  "client_email": "xxxxx",
  "client_id": "xxxxx",
  "auth_uri": "xxxxx",
  "token_uri": "xxxxx",
  "auth_provider_x509_cert_url": "xxxxx",
  "client_x509_cert_url": "xxxxx"

You may configure whether you want to use the Vonage API or the Twilio API using the USE_TWILIO field.

When clicking on the the deploy button:


You will see something like this:

Heroku deploy

Giving Thanks

Thanks to @melveg for his continued support and contributions to this project πŸ’œ

Thanks to @mariacarlinahernandez for the SMS to get BG Data feature πŸ’œ

Thanks to @vmalepati1 for adding Twilio support and Whatsapp messages πŸ’œ

Thanks to @whitep4nth3r for the awesome website and all her support. Follow her on twitch and twitter πŸ’œ

I'm super honoured for all the support and help from The Nightscout Foundation, Parley Labs and Helium - Making it possible to get the necessary equipment to assemble more trackers and test connectivity with #ThePeoplesNetwork. From the bottom of my heart: thank you!


All contributions are welcome. Make sure you follow the code of conduct in this repository.