Constant Glucose Monitor API

https://developer.dexcom.com/home

I am not a developer. Does this API site from Dexcom allow an integration opportunity with dexcom constant glucose monitor series 4-7? Like I could commission one.

Being a Diabetic, waking up in the middle of the night in the 40 glucose range is not fun at all and life threatening. A integration to automate lights or alarm, notification, Alexa or something could save a life.

3 Likes

Looks like a "simple" REST API so it shouldn't be too difficult. I'll start looking at the Developer requirements today, and if I don't see anything that looks to be a major barrier should be able to start working on a prototype next week.

1 Like

Apparently Dexcom is the cheaper CGM solution that also is covered by Medicare. Could potentially be a lot of users. I will beta test anything that allows me to wake up the next morning.

1 Like

Another popular device is the Freestyle Libre 2. It looks like it also has an API.

3 Likes

I know someone who would be very, very grateful of this.

Watching with interest.

2 Likes

I would be interested also. My wife uses the G7.

2 Likes

If I had diabetes I’m not sure I would feel comfortable relying on a DIY home automation system, in particular including any link in the chain that’s cloud-dependent like Alexa, to warn me of hypoglycemic episodes.

I would advise the same to my patients.

As a diabetic, you rely on the management plan, your endo, and FDA approved products. This would not change that.

6 Likes

Agreed. This however would be an excellent addition.

3 Likes

not familiar with Dexcom but I'd be surprised they don't have some function available in a phone app already... my wife uses the Libre 2 mentioned above and the app on her iPhone alerts her (usually wakes me first, then I wake her) if range is too low

1 Like

IT does as app notifications or email. The API from my limited knowledge looks like it grabs from the Dexcom server as one of your authorized connections. The liability and managment remains with the companies app, product and FDA approved system.

This would just allow us to have a trigger and same data within Hubitat to do other things. Like an added reassurance, not the sole indicator.

Ok gotcha - I was just referring to the phone app not API

This is the device which my friend has been provided with on prescription

Is there an integration?

Looking into it.

2 Likes

Ace. Thank you.

Working through the initial authorization exchange with them at the moment - they weren't expecting to have an OAuth token on the redirect URI. If they can't handle that, the error message does give me the code from them that I need, but it would be a manual cut/paste which I'd like to avoid if we can.

4 Likes

Got past the authorization exchange and am getting valid responses from their sandbox, but the data is sparse, and the code is still a little rough at this point (think pre-Alpha).

3 Likes

Progress is progress.

Good job.

1 Like

I have everything working, but when I asked Dexcom to allow access to data not in the Sandbox I received this message:

I wanted to highlight to you that Dexcom API data is provided on a 3 hour delay - the data is not available in real-time for you to take immediate action on (e.g. light color change, etc.). Dexcom does not publicly provide real-time data.

To me that sounds like this integration will be of limited value; however, if anyone wishes to use it the code is at:

App - https://raw.githubusercontent.com/thebearmay/hubitat/main/dexcom/dexMaster.groovy
Device - https://raw.githubusercontent.com/thebearmay/hubitat/main/dexcom/dexGluMon.groovy

I have requested that they consider providing a more real time API, but am not hopeful on the response.

2 Likes

I would guess doing so invites a whole other level of scrutiny from, among others, plaintiffs’ lawyers. There’s always someone that will allege some harm was caused by a drug/device maker’s decision…

1 Like