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

CareLinkFollower - v11 data endpoint outside US #3859

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

benceszasz
Copy link
Contributor

Issue
The old cloud data endpoint no longer works outside the US, so the new v11 data endpoint must be used in the EU for 7xxG pump users . The data structure of the new data endpoint is different from the previous one, so the data structure must be extended and modified while maintaining compatibility with the old cloud data structure and also with the one used by the standalone sensors.

Solution
Implementation of the new v11 cloud data endpoint:

  • replace endpoint in case of EU with v11 endpoint
  • new and modified structures
  • create new date correction logic for the new data structure (dates have no timezone)
  • update data processing for new structures
  • add JsonAdapter and structures to proguard

Testing
I have tested it with all kinds of accounts (patient, carepartner) with different devices (standalone CGM and 7xxG pump) in every region (EU,US) on different phones and it is was working fine without any errors and was stable.
Additionally, other EU pump users have also checked the new version and found it to be working properly:
#3855 (comment)

Implementation of new v11 cloud data endpoint:
- replace endpoint in case of EU with v11 endpoint
- new and modified structures
- update data processing for new structures
- add JsonAdapter and structures to proguard
@benceszasz
Copy link
Contributor Author

There may still be room for improvement and fine-tuning, but without v11 endpoint support, 7xxG pump users will not be able to use CareLink Follower in the EU.

@Navid200
Copy link
Collaborator

Thanks a lot

Copy link
Collaborator

@jamorham jamorham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, many thanks for updating this.

@jamorham jamorham merged commit 6ce7387 into NightscoutFoundation:master Jan 18, 2025
1 check passed
@kukuchta
Copy link

kukuchta commented Jan 18, 2025

This new endpoint could be possibly derived from the discovery API endpoint. In the JSON loaded from https://clcloud.minimed.eu/connect/carepartner/v11/discover/Android/3.2 there is a field:
"baseUrlCumulus":"https://clcloud.minimed.com/connect/carepartner/v11"

It is used this way in alternative Carelink python client from Ondrej Wisniewski.

But it is also v11 for US region.

@benceszasz
Copy link
Contributor Author

This would require significant changes, as the application configuration is currently loaded and used by the CareLinkAuthenticator class. This would need to be outsourced to make it generally available.

@kukuchta
If you have time, I'd be happy to leave this up to you :)
I've gone a little overboard with this now.

@kukuchta
Copy link

Sure, I will try to follow up with this when I have some free time.

I have to finish my current idea for 780G first:
Screenshot_2025-01-14-21-47-03-33_2dd2c1bcb8f659cd696bcba2072f751b.jpg

Sadly I think it does not fit the official version anymore, I had to adjust some of the tables in xDrip database a bit.

Sorry for off-topic😉

@benceszasz
Copy link
Contributor Author

benceszasz commented Jan 18, 2025

Very nice 🙂
I have added basal using APStatus in the CareLinkDataProcessor, but never had time to finish it. I had two issues and never had time to finish it:

  1. manual basal data: detect start and end of manual basal, amount and time for the basal entries (small basals are not divided into 12 equal amounts)
  2. upload basal to Nightscout from APStatus

@jcsupelano
Copy link

Sure, I will try to follow up with this when I have some free time.

I have to finish my current idea for 780G first: Screenshot_2025-01-14-21-47-03-33_2dd2c1bcb8f659cd696bcba2072f751b.jpg

Sadly I think it does not fit the official version anymore, I had to adjust some of the tables in xDrip database a bit.

Sorry for off-topic😉

Hi @kukuchta, do you think would it be possible for me to try the version shown in your screenshot. I just think it's amazing. Cheers

@kukuchta
Copy link

Sure, its here: https://github.com/kukuchta/xDrip/releases/tag/2025.01.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants