Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to sync blood sugar data as well? #16

Closed
JMPZ11 opened this issue Oct 7, 2021 · 5 comments
Closed

Possibility to sync blood sugar data as well? #16

JMPZ11 opened this issue Oct 7, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@JMPZ11
Copy link

JMPZ11 commented Oct 7, 2021

Hello! Thanks for this tool, its pretty awesome!

I was just wondering - Is it possible to also sync the blood sugar data, and calibrations?

I enter my calibrations on the pump, and they don't seem to show up in the Dexcom data - only t:connect.

If the data is available, could you point me in the right direction and I could try to do it myself?

Thanks!

@jwoglom
Copy link
Owner

jwoglom commented Oct 7, 2021

Adding this functionality to be synchronized would definitely be possible, as BG data (CGM and manually-entered) is exposed via the API!

The tconnectws2 therapytimeline2csv endpoint returns blood sugar reading data from t:connect. The existing WS2Api#therapy_timeline_csv() method returns a readingData key which should contain a list of Python dicts containing the available BG data: https://github.com/jwoglom/tconnectsync/blob/master/tconnectsync/api/ws2.py#L63

IIRC, there is a field inside there that denotes whether the reading is from a manually entered BG (from the bolus screen) or CGM. If you're referring to G5/G6 calibrations I'm unsure where those go exactly, I suspect they'd be included here however (I have a G6 and don't need to calibrate).

We should add whether to upload BG data to Nightscout behind a flag, since many folks (myself included) already use xDrip to sync CGM data into Nightscout and/or already input manual BG/calibration data in xDrip or nightscout directly.

@JMPZ11
Copy link
Author

JMPZ11 commented Oct 7, 2021

Thanks for following up!

I also have G6, but I got a box of bad sensors - two in a row from the same box (in very different sites) have been providing dangerously terrible data to the pump, and the pump has been trying to kill me as a result LOL. Since I just got a replacement two days ago, I suspect they will want more proof this time... so removed xDrip, installed the Dexcom app thinking they could look in clarity, but as I mentioned, Dexcom only sees calibrations entered in their app.

So yes my use case is very atypical ATM 😝 I agree about the flag - most people already have the sugar from other sources. Whenever Tandem fixes the constant t:connect logout issue on android... if this ran every minute (or 30 seconds if you wanted to go all Nyquist on it LOL) theoretically it could be a single source for all the data... sure seems cleaner in my mind!

That is, t:Connect -> Nightscout -> xDrip et al... I know Nightscout is designed to aggregate sources and everything, but something about a single stream is very appealing to me 😁

Thanks again, hopefully I can find some time to have a look

@jwoglom
Copy link
Owner

jwoglom commented Oct 7, 2021

Whenever Tandem fixes the constant t:connect logout issue on android...

This is so irritating. And you can't even downgrade to an older version of the app to try and resolve it since login is broken on version < 1.5 🙃

Not sure how much hope I should put into their upcoming phone bolus implementation being good if they can't even get login sessions right...

@jwoglom
Copy link
Owner

jwoglom commented Oct 24, 2021

@JasonJShuler Please take a look at in-progress: support BOLUS_BG and CGM features which provides an initial implementation for this feature, specifically via two "synchronization features" (BOLUS_BG and CGM). More details are in the commit description.

You can try this out by setting ENABLE_TESTING_MODES=true and running tconnectsync with e.g. --features BASAL BOLUS IOB BOLUS_BG CGM. Just be warned, there are likely bugs.

@jwoglom jwoglom added the enhancement New feature or request label Oct 28, 2021
@jwoglom jwoglom added this to the Collect All Pump Data milestone Dec 24, 2021
@jwoglom
Copy link
Owner

jwoglom commented Jun 11, 2023

Closing this issue since there is supported cgm and bolus synchronization in tconnectsync. Open a new issue if you experience problems.

@jwoglom jwoglom closed this as completed Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants