Hi - just wanted to share something that might be helpful to others. Our daughter was diagnosed with Type 1 diabetes just about one year ago, so on some level we’ve all been re-learning how to live a relatively normal life while managing blood glucose levels.
Some really amazing technology exists to help with that, including continuous glucose monitors (CGMs). My daughter’s CGM, a Dexcom G7, makes real-time readings visible on her own device, and on smartphones for my wife and I via a manufacturer-built “Follow” app - but nowhere else that’s real-time. Their website only shows lagging reporting, and just isn’t designed for a quick “what’s her blood glucose level” check - so keeping a close eye on that number means constantly having my smartphone up and nearby with the screen on.
I thought it would be really convenient to have that reading right on the panel of my computer screen - and it turns out that’s possible with open source projects that all already existed!
First was the pydexcom project, which found a way to use the same API that feeds the manufacturer’s smartphone app, in a Python script:
Then, there was already a Plasma widget published that ran a command and placed that command’s output directly onto the panel:
So with that widget pointed at a script in my home directory that outputs the latest reading, I was able to get this - the number is the most recent blood glucose reading in mg/dL, and the arrow is the current trend:
Hopefully that helps someone else out there who’s either managing their own diabetes, or caretaking for others.
