Constant Glucose Monitor API

Yes, but ultimately, the data needs to be sent up to the cloud as it is being retrieved from the sensor - it's the API that simply filters out the last 3 hours. I don't know, just saying there may be undocumented APIs - a gray area too, from a TOU point of view.

Im sure anything’s possible but it’s probably not a gray area from the FDA’s perspective, though.

Sorry, was thinking Dexcom, they do not provide real time values (although I have not inspected their API much) - Libre3 actually provides real time data - what they don't provide is the last 20 minutes in the graph (history) - that is to say, any read of graph will provide one value per 5 min for last 12h, except last 20 minutes which are missing, plus the current value - for the sake of automating this into hubitat, I chose to expose the current value only - not even reading the graph from their API.

3 Likes

What I'm doing is using librelink to pass the data to a nightscout instance running in docker.

Then I was using the nightscout API via Python to update my light, etc.

Now I'm using nodered instead to call the API and then update the light. You could also do whatever other automations you want there.

Right now I'm messing with pushing my Google places days, Fitbit data, and cgm data into a GPT to correlate places I've been (restaurants), activity, and glucose.

1 Like

the Freestyle Libre driver available via HPM does away with nightscout and python and all, links directly to LinkUp to give you minute updates.

3 Likes

I have the Dexcom Master as well as the dexcom device driver loaded. I was able to go to the Dexcom developer site and get a US App Client ID and a secret and enter them into the Dexcom Master. I created a device using the dexcom device driver, but the device doesn't even seem to be trying to connect. Any ideas on what I am missing? When I click "get Dexcom Auth Token" from the master, it pops open a tab on the Dexcom web site telling me that "The client application is not known or is not authorized". I'm confused.

Pretty much have walked away from this code as Dexcomm won’t allow me to get closer than 3 hour old data, but the Master should create the device based on what it receives back from the API.

1 Like

@thebearmay I have tried to use this integration with the Dexcom G7. I registered for an API account over on Dexcom. I created a client ID and an App client secret over on Dexcom.

I also contacted Dexcom and they authorized my application for personal use. My redirect API is 129 characters and is a "cloud.hubitat" URL which doesn't really appear to embed the client ID or secret within it, so I am a bit confused. Since the redirect is longer than 128 characters I created a "Redirect Override" URL with a short name and verified that the short name is working. If I call the short name in the web browser, I get a "200" response and the long URL is being translated properly.

However, if I click "Get Dexcom Auth Token" a new web tab pops open from "uam1.dexcom.com" and the message is "The client application is not known or authorized". Can you suggest what I am missing or doing incorrectly?

I also created a Dexcom device with type "Dexcom Glucose Monitor" and so far it has no data which is not a surprise considering that it does not appear that the Master app is connecting to the API correctly.

Did you enable Oauth on the app? If the app is successful in authorizing it will create the device after you successfully login at Dexcom from inside the app.



What about connecting to sugarmate instead? It seems to get data from Dexcom with only a very short delay. I have it connected to Alexa so I can say, “Alexa, what’s my sugar level” and it will me near real time numbers from my G7 through sugarmate.