-
Notifications
You must be signed in to change notification settings - Fork 138
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
mmconnect and 770g in US #11
Comments
@gotpancreas a new login method was introduced in the EU during the summer and it was solved very soon, the mmconnect was modified. However there was a small bug in the code, which caused an error in NS if there was a temporary error in CareLink EU. It seems to me, that the same new authentication method was also introduced in the US and thus the mmconnect is not working anymore for US. @bewest based on this issue and other FB posts in CGM in the Cloud it seems to me that the authentication for CareLink was changed in the US to the same as in the EU. Could you please modify the |
Interesting. Fantastic, that actually might make things a bit simpler. Regarding parameters, we/I really need them to be able to be passed in. If you audit the code you'll see that I added some code to inspect and reconstruct URLs based on parameters that are either dynamically generated or passed in at use/run-time. One of the reasons this is important is testing, but another is to safely enable "multitenant" use, where one long lived process might be responsible for validating credentials for many users across the world, and similar use cases where a single process wants to call these functions with slightly different parameters. |
Please see for patches to help fix this issue. |
Howdy all, we've had some success with updates on this. The most recent version released contains updates to better handle the undocumented changes from Medtronic. There are some lingering issues having to do with whether or not IP addresses from shared cloud environments, such as Heroku remain blocked due to past activity. The resolution in these circumstances is to obtain a new IP address. |
I tried running mmconnect on a Linux PC. I am accessing a Carelink EU account tied to my daughters 780G pump.
After that it just sits there and no data is displayed in NS. |
Yes, if you are familiar with environment variables, you can set |
OK, thanks. I must have missed this.
But the official Carelink Connect App shows correct data. Any idea? |
26860131 minutes are 51 years, so it looks like CareLink reports timestamp of 1970 (unix epoch time 0). |
Maybe this is related to this comment and the data from the 780G uploaded with the Minimed Mobile app can actually not be retrieved with the mmconnect plugin. |
Hi there. I'm just confirming the same thing that @ondrej1024 reported. I'm on a 770g in the US and I'm also seeing the "Stale CareLink data..." message as well:
Also similar to ondrej1024, I'm seeing accurate and up-to-date data in the Minimed Mobile app (iOS) and on CareLink Connect via web: In case it's helpful, I also get the following result if I change the value of "STALE_DATA_THRESHOLD_MINUTES" in transform.js to something greater than the value shown in the "Stale CareLink data..." error above (in this example, I used "STALE_DATA_THRESHOLD_MINUTES = 27860280"):
It looks to me like the pump time is being reported differently than we're interpreting it? Please excuse me if this isn't a useful contribution - I'm still quite new to all of this and am simply trying to help get to the bottom of this. If there's anything further that I can do to help the cause, please advise. |
So just to be clear, I'm still a little confused.
If the data is not visible in Medtronic's own web based display, we might have to pursue options other than this bridge. |
Yes, in my case the 770g connects via BLE to Minimed Mobile app (for me, this is on an iPhone) which then uploads the data to CareLink in real-time (or near real-time).
Yes, the web portal reflects the same real-time data that the app shows (which is also the same as my pump shows). I can't personally speak for the 780g, but Medtronic has implied that the 770g and 780g use the same hardware (MMT-1880) and that the only difference is software. That is to say, that I should (in the future) be able to update my pump with new software in order to upgrade it to 780g. This hardware commonality leads me to believe that they are quite likely to behave similarly. @bewest - I will email the HAR file to you since I think it likely contains personally identifiable information. |
The way I understand it, this is how the data flows via the Medtronic infrastructure: The Minimed Mobile app sends new sensor and pump data every 5 mins to the Cloud which can be downloaded and displayed by the Carelink app. However I am not able to see any data on the web portal. I tried this with a web browser both from a PC and Android phone. When going to the "Connect" tab, this message is displayed: |
Interesting... this is different than what I'm experiencing. @ondrej1024, it looks like you might be logging in to CareLink Web with a Care Partner account and not the main patient account? The reason I think this is because the icon in the upper right of your screenshot appears different than in my screenshot - and I've seen the same icon as you have whenever I log in using a Care Partner account. I don't know for certain that this would make a difference, but I'm curious to see if using the main patient account would at least let you see Connect data on the web. To help with clarity, here's what I'm experiencing: Model: 770g I have never seen the message in CareLink web that says "Please download the mobile application...". In a previous post, you mentioned that you're using a 780g and in the EU, and I'm trying to understand whether we're seeing differences because 1) the type of account you're using, 2) location/server (EU), or 3) you're using a 780g. I wonder if this is simply a privacy/GDPR thing? That is to say that it's working for me in the US, but Medtronic doesn't allow this function for EU users because of privacy laws in the EU? |
You are right, when I took the screenshot I was using a Care Partner account. But I have also tried with the patient account and it does not make any difference. I suspect it could also be a question of the combination of browser and operating system and only a few combinations are allowed. I have tried both Firefox and Chromium on Ubuntu and I get a warning that this is not supported but it let's me log in anyway. There is a report here that it was seen working only from a mobile phone browser and not from desktop PC. Really confusing 😕 What OS and browser are you using? |
I'm having success using Chrome v87.0.4280.141 on Windows 7 and Windows 10, and also using MS Internet Explorer v11.0.9600 on Windows 7. |
Now I tried using a user agent switcher with Firefox, posing as a Chrome browser on Windows 10. But that doesn't change the fact that there is no real time data shown on the Carelink site for my account. So there must be some other criteria as you wrote earlier. I guess it would be really helpful to find out what interface the Carelink Connect app is using to retrieve the data from the Cloud. Probably a proper REST API, unfortunately not documented anywhere. |
No indeed wouldn't be documented but if you inspect and follow that page you should see the GET calls and maybe some POSts. because we need only what we see in the website for US. So in fact they could find the corresponding rest calls that are happening from the site --> Carelink Cloud. |
Two different things happen with the 7X0G, every 5 minutes a subset of data is uploaded to the cloud, in the US it can be viewed with mobile browser (Safari...) by logging into patient or caregiver account and it looks (almost) identical to what you see in the app. Every 24 hours all of the data that was uploaded from the 670G is uploaded, it can only be viewed by a computer (not mobile browser) by logging into the same portal as above. After login there are 2 different redirects /home for desktop and something different for Mobile which is also different in EU vs. US. My guess is in EU you would have to mimic whatever Browser ID the App is sending. |
Perhaps related to the original problem posted in this thread, I'm having trouble logging in to Carelink. Turning off quiet mode, it looks like we're using the EU URL but I'm based in the US. I've tried with the environment variable MMCONNECT_SERVER absent and set to "US", with no visible difference. Log showing failed logins: I am able to log in to the Carelink website myself using Chrome and can see current data as I would expect. Any ideas what I could be doing wrong? Thanks! |
@theNateAllen yes. This probably needs better documentation, but please use |
I've noticed that
Hope this helps. |
Thanks @bewest, that got me going. I'm now stopped by the stale data error reported above. Let me know if capturing my network traffic while viewing the Carelink site would be useful. |
Is 770g working in other countries or just broken in US? Are other pumps working or broken? It looks like there is an issue with at least getting US data, although looking to confirm what is working vs not. As I'm digging through the HTTP traces, I'm pretty impressed with Medtronic's system here.
|
In the US, role can be |
I see: there are patient roles and then "Care Partner" roles. Care partner roles must post their authorized role and username to the |
The patient is the person with the pump and running the MiniMed App what uploads some data every 5 minutes and complete data every 24 hours, they authorize Caregivers ("Care Partner") who run a different App each with their own users ID and Password. |
@paul1956 yes, in addition there seem to be a whole host of rules attached to these roles. I can see at least This is part of what confuses me, there is a way to link different accounts together for the purposes of sharing. It looks like the minimum path in order to "share with yourself" is to create both carepartner credentials as well as patient carelink credentials. It's important to note that these credentials require different behaviors. mmconnnect only works with "patient carelink credentials", and doesn't yet know how to use carepartner credentials. It looks like the self-patient carelink credential access is mediated by installation of the mobile and linking the new carepartner account to an existing careportal patient account. According to the youtube video, a similar flow is required for each carepartner. There are other rules as well, it looks like the countrycode matters quite a bit: the patient careportal and carepartner accounts must share the same countrycode. Medtronic only supports Followers inside the same country. Finally, the new Carelink interfaces include mock or stub responses on some endpoints, it looks like specifically aimed at preventing things depending on the results from crashing while yielding no data. We'll need continued analysis to really gather the full requirements. Right now it looks like the most reliable mechanism is going to be:
It looks like an approach like this should work more consistently without worrying as much about which credentials are used, so long as the countrycode matches. Unfortunately, attempting all country codes could result in locking accounts or worse, so users will need to know and correctly indicate the countrycode of the original patient account at multiple points in the workflow. |
@bewest : I'm triying from UE (ES - Sapin) and cannot get data . The login seems correcta, but the minimed-connect-to-NS can't fetch data from Carelink Server . How can I help you with this issue? Regards ! ! |
HI, I am not extremely experienced publishing things in GitHub but I have uploaded here my small personal project, to sync carelink connect with your nightscout site. It's a SAM app you can deploy using SAM from AWS. The project should be covered with the AWS free tier. So you will need an AWS account to deploy the sync app. Just give a try and give me feedback please. https://github.com/amspoke/java-carelink-lambda |
As of today (after months trouble free of exercise) my carelink-python-client does not connect to the Carelink server anymore. I get the following error message:
Anyone here noticing similar issues ? Medtronic might have done some changes 😟 |
FWIW, I am looking for help moving the logic for plugins like this to https://github.com/nightscout/nightscout-connect. The benefit of nightscout-connect is that features added there will not require changes in Nightscout core. |
I'm having the same issue but I can access to carelink.minimed.eu when it's not working usually this site it's not working also |
Carelink Web site and the Carelink connect app are working fine for me. That's what's worrying me. |
They are working for me too now. It's still just nightscout that is having the issue. :( |
Is xdrip carelink follower also having issues? |
@bewest Yes, xdrip is not working for me |
Update HTTP headers used in the request, it seems that Medtronic has put the old ones on banned requests list ? :) |
Now I have defined the commonHeaders as empty. This gets carelink-python-client back online. 😃 Will update the repo tomorrow. I guess the other programs have to be updated accordingly. |
@ondrej1024 I am not sure about removing all browser headers is a good idea. In both xDripCareLinkFollower and CareLinkJavaClient the client behaves during login as a browser. Since Medtronic must keep CareLink accessible via browser, this method should work even if it needs to be changed or updated over time. But if you use pure HTTP client it can be easily detected and blocked. |
@benceszasz Yes, I agree with that. Remains to find out what are the headers that are accepted at the moment. |
@ondrej1024 the ones in my previous comment are working fine with my xdrip and in java client. |
@benceszasz OK, great. Although, at the moment, even with the old headers things are working again. 🙄 |
@ondrej1024 and @benceszasz I can confirm it's also working again for me... |
Thanks guys for your great job!! |
@mattster98 you are able to select from multiple patients in CareLink? |
Yes - after I log in, I get a new page (/app/linking) with the option to select the patient at the top. I only have one patient, but I have to select it to proceed. The username of that patient is what is in the patientId field in the message calls. That new page makes a call to https://carelink.minimed.com/patient/m2m/links/patients I think this is what you are asking for - let me know if you need more. :) |
I hard coded the patient ID into the message request and have data again, so that seems to be the main issue. I tried to add a parameter for it as a config/env var but I don't know what I'm doing so I haven't managed to get that to work yet. |
@mattster98 are you using 770G? What is the URL that you have used successfully to retrieve data from CareLink with patient ID hardcoded (you can replace the actual patient ID for privacy, I am just curious about the url structure)? |
Yes. I didn't change the URL anywhere in the code, just added that new parameter. From the logging I have, it's hitting: Honestly after you select the patient on the new screen, the carelink interface looks exactly the way it did before. I think that new /app/linking page that makes the call to patients is the only new stuff. |
Which parameter have you added and to what? |
Not sure if you can see this: 0700ef4 That was my attempt to add the parameter. The username is still the carepartner account, but I added the patient ID which is the patient account username. Edit to be clear: this change doesn't work because I couldn't figure out how to plumb a new env variable from my docker config into this code.. this was just my initial plan. I ended up replacing the new parameter with just "mypatientusername" just like the role parameter looks. Here's a screenshot of the change in case that link doesn't work. |
There is not a list of patients from the server, the Carelink Connect client requires you know it and it saves it locally to present the list. If you think about it you are logging in with one ID and could be following 5 people that may not know each other (think about a school nurse). |
@paul1956 , I provided the call and response [above] (#11 (comment)) from the server that provides what looks like a json formatted patient list. I only have one patient but I'm sure after you connect with multiple it lists them and you can choose from there. This information is on my carelink account and is provided by the server, not on any client since I'm just using the web interface there. |
Hi, guys! As far as I see there's a lot of investigation about how to get info from 7xxG pump. But what about sending commands to it? AccuChek Guide Link glucose meter as well as transmitters can at least send glucose level to a pump. Does this protocol allow full control? The reason is that sometimes it may be difficult to get the pump when it's under several layers of clothes. |
Not sure whether this is the right place to post (I’m new to GitHub), but I’ve been trying to set up a new NS instance to connect with my 770g via CareLink and the MiniMed Mobile app. I’ve got NS working fine, but there mmconnect portion seems to be returning a 404 error and I’m not able to see any SGV or pump data in NS. I’ve confirmed that the data appears in CareLink as expected and that my CareLink credentials are correct in mmconnect as well. The login page for CareLink US has recently changed, so I’m wondering if it uses a different server than before (or a problem similar to this)? I’ve read discussion about issues with CareLink EU as well, but not so much about US. I’m happy to provide logs, do testing, or whatever I’m capable of to help this project and make it work!
Thanks for all this community has done so far, and thanks in advance for your help!
The text was updated successfully, but these errors were encountered: