DEV Community

Cover image for Vampiric Engineering (2/?)
Ryan Burke
Ryan Burke

Posted on • Originally published at ryanburke.io

Vampiric Engineering (2/?)

The quest to build observability tools for my own body (Part 2)

Find part 1 here

Time for integrations

Now I've got my blood glucose levels reading out to my phone every 5 minutes instead of manual pinprick tests 4 or 5 times a day which gives me so much more data to work with (and it's a lot less painful!)

Now I needed to tackle the initial features list I set out:

  1. Long-term data backups

  2. Trend reporting

  3. Web Dashboard

  4. API for the glucose level readings

  5. Hypo alerts for my partner

Now I was sure there were other diabetic developers out there working on this (because I'd met some) so there had to at least be a framework out there to help me.

Enter Nightscout

Very fortunately for me the Nightscout project had been long on a mission, to quote them.

We are compelled in the pursuit of humane and equitable application of technology to liberating people from the burden of diabetes.

Perfect! Exactly what I'd been looking for, fairly well documented, a community of developers and even better something I can give back to once I'm all settled.

Nightscout gives me some of the features I'm looking for out of the box and a fairly well configured Heroku to save me messing around with infrastructure until I'm ready (it'll be moving to AWS at some point as the Heroku free tier is being phased out this year).

Lets get it moving

Nightscout deployment

Being impatient I'll be using the preconfigured Heroku deployment the project provides and the recommended cloud hosting of MongoDB to keep the data backed up so this was all fairly straight forward (and free).

Heroku doesn't provide custom domains with SSL support on the free tier so looks like that's another task for once I move it over to AWS.

But a little bit of config plus some account set ups later and I have an API I can post glucose data to, I just needed to configure my uploader.

Uploader integration

And huzzah I have a functional dashboard, showing my entire glucose history, long term back ups of my data and an API to integrate everything else with.

Nightscout dashboard

Just one more thing I wanted before I put this down for a little bit.

Time to do something with that data

I wanted all this data so I can start to learn and improve my health with it, so I needed reporting tools and to my joy some lovely developer has built a plug in for Nightscout to give me just that.

Reports

Now with some config and some study (to understand what a bolus is) I had daily, weekly and monthly reports showing trends and stats that both me and my doctor can use.

In summary

The first hurdle of this was made infinitely more accessible thanks to a community of like minded developers I look forward to contributing back to with my AWS expertise.

All my initial features were now complete including an app that subscribes to the API and can alert my partner to hypos, all I needed was the provide the URL for my nightscout API and boom, my partner is much more at ease.

Alert app

So in the next article, we're on to the fun stuff, getting values on my watch, my i3 status bar on linux, moving to AWS, probably some custom CSS work etc. See you then!

Top comments (0)