CGM is primarily used by Type 1 Diabetics to monitor their blood sugar levels in real-time. There are a couple of threads dedicated to getting CGM data into HA (And there are some discussions in those threads around automation).
But, I wanted to start a new thread dedicated to using that data. I plan to update this thread as I discover new ways to utilize my data in HA. My first project is to begin graphing data in a useful way to keep an eye on my blood sugar level.
I came across the mini-graph-card custom Lovelace card and thought this would be a good place to start. It allows you to generate some pretty nifty graphs for displaying CGM data. I’ve been playing with it for 30 min or so and this is what I’ve come up with so far:
Wow. Nightscout is still around? I assumed it would go away when the FDA alllowed the CGM companies to send the data to phones. I am happy to see it is still being used!
I contributed to the Nightscout project in the summer of 2014, when my neighbor asked me to setup a Nightscout website for them to monitor their young son’s CGM numbers. I made lots of user interface contributions (mobile friendly, settings menu so users could change settings easily on the front end, and other usability improvements), and I started the API.
Hey Bryan_Fleming! Thank you for all of this information!!! I had setup my son’s Dexcom through HA some time ago, but never this neatly and cleanly. I have adopted your code, and am looking at your mini graphs and I will be pulling them in toofor sure! Can you post code for the other graphs above? Also, I get the CGM direction data item, but what is the CGM Trend? Are they redundant?
Here you go, this is the full code for the Lovelace page I used in my example above. This also includes an update that displays the time since the last API poll. Take a look at THIS post if you are interested in implementing that.
So I was very inspired by what you are all doing here. I tried everything out and got a bit frustrated at home assistants sensor based input. As a sensor, if there isn’t a constant feed, it will show you a straight line which is kind of meh.
So I am making a very customizable, animated and minimal graph card using amcharts and pulling data directly from nightscout. This also gives me complete control over how it looks and what I can put on it. Will release the card soon. It looks a bit like this right now:
I will do one for insulin and carbs, one for sugar levels and one that combines both. Let me know if any of you would want to use this and if you have any suggestions?
Hi, I’m also using Nightscout to monitor my daughter CGM data. I haven’t used HA to automate this info just yet. But anyway, I wanted to thank the OP, @Bryan_Fleming, @lukevink and all of you to post about your findings. Fully appreciated!! Thank you!
A tip for medtronic pumpers! For anyone who is also using a 600 series medtronic - I highly suggest getting a raspberry pi and doing this:
I use a 670g and quickly realised using an android phone wasn’t the most… continuous idea. You basically have to charge it every day which defeats the purpose. Ideally you want your home just to sense your sugar level and be done with it. So I have now switched to using a raspberry pi, with windows IOT and a spare meter. This is the most continuous solution I have found so far for the 600 series.
For anyone using a tandem pump - I envy you. Someone tell them to launch it already in the netherlands
If he did, the batteries to keep if running more than a day would be pretty heavy/bulky compared to a phone. I assume he’s using it as a base station. But would be interested in some details,
Feestyle libre is convenient to carry, uses nfc but stores 8hrs of data (pros/cons)
Yeah I have a freestyle libre with a miaomiao2. The freestyle nfc’s to the miaomiao and the miaomiao bluetooths to the phone. That way I get CGM (5 minute intervals). And if you are out of range of your phone (or it is flat) it catches up via the data stored on the libre. My phone lasts 2-3 days on a charge and I leave it on even when charging. It charges next to my bed so it stays in touch with miaomiao except when in a different room.
The phone uploads to nightscout. HA downloads from nightscout.
Hi @nickrout you are using exactly the same setup as my daughter (Free+miaomiamo+nightscout+no_pump), although she does not use miaomiamo always although I would like her to do so (she’s 15 now). BTW, what software do you use for getting data from miao miao and uploading it to Nightscout, maybe Glimp??
Hey there so no. The intent was to have a continuous solution that I didn’t need to charge or do anything to. I was using an android phone and charging it each day, but that was silly. So I switched to a raspberry pi uploader which was tricky to install but finally got it working. Now it works like a charm
The intent was to have something permanently at home that I don’t carry around with me. My Medtronic pump has the graph on it anyways.