Open PieterGit opened 8 years ago
I think it's caused by the fact that the CARELINK_JSON_BASE_URL gives a 404 on the European site. Is it also possible to use the CSV download option? According to Firefox I think it's possible to download the CSV with (Cookie and customerID blanked out
curl "https://carelink.minimed.eu/patient/main/selectCSV.do?t=11" -H "Host: carelink.minimed.eu" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8" -H "Accept-Language: nl,en-US;q=0.7,en;q=0.3" --compressed -H "Referer: https://carelink.minimed.eu/patient/main/reports.do" -H "Cookie: XXX" -H "Connection: keep-alive" --data "report=11&listSeparator="%"2C&customerID=XXX&datePicker2=01-12-2015&datePicker1=12-01-2016"
Good idea, thanks for looking into this. It would be possible to use the csv, though the logic in transform.js would need to be totally different for that data source.
Does the csv include Connect pump status data like active insulin, reservoir, battery, etc., or is it only SGV records?
If it's just SGVs, I wonder if it would make more sense to write something new based on @bewest's https://github.com/bewest/mmcsv. It seems like you would just need to run that regularly and then transform the SGV entries into Nightscout entries (and probably do some cleanup like adding timezone).
Is there a CareLink Connect tab at the top of the EU portal?
Last I heard, the Connect hadn't been officially released in EU. If that isn't part of the site, that explains why there's no JSON endpoint to get the data. If it's there, maybe it just uses a different URL? Is there a reason you can't use or register an account on the US site?
I've been using this with Azure for Nightscout and have SGVs running great (thank you!), but I'm wondering how I get to see other values such as active insulin, reservoir level, battery levels, etc. on the Nightscout website. Do I need to change my Mongo setup, or are there more plugins to add to Azure?
My Mongo collection data example (shown below) shows the data:
{
"_id": {
"$oid": "56f9131336f7e2bcf915f950"
},
"date": 1459163911941,
"dateString": "2016-03-28T11:18:31.941Z",
"type": "carelink_raw",
"data": {
"lastSensorTSAsString": "Mar 28, 2016 22:09:00",
"lastSensorTS": 0,
"bgunits": "MMOL_L",
"medicalDeviceTimeAsString": "Mar 28, 2016 22:12:00",
"kind": "Main",
"version": 1,
"currentServerTime": 1459163923146,
"lastConduitTime": 0,
"lastConduitUpdateServerTime": 1459163911941,
"lastMedicalDeviceDataUpdateServerTime": 1459163911941,
"firstName": "
If you switch to the dev branch of cgm-remote monitor and set the environment variable DEVICESTATUS_ADVANCED="true"
, you can view pump reservoir and battery level with the pump
plugin, and pump-reported IOB with the iob
plugin. You can set alerts for the reservoir and battery level, too.
How to run dev branch: https://github.com/nightscout/cgm-remote-monitor/wiki/Deploy-a-test-branch
Plugin details: https://github.com/nightscout/cgm-remote-monitor/tree/dev#pump-pump-monitoring
OK thanks. I'm a bit uncomfortable running the dev branch just in case something is broken as development is going on. When will these changes be folded into the Master?
The beta just started last week, so shouldn't be long. You can use the dev branch to run a second instance of cgm-remote-monitor if you don't want to mess up your main installation.
http://nightscout.github.io/pages/test-beta/?branch=0.9-beta2
PROBLEM SOLVED: For EUROPEAN (!) server, follow this "guide":
Edit your
node_modules/minimed-connect-to-nightscout/transform.js
file and replace the content of the parsePumpTime
function with the following:
return Date.parse(timestamp);
node_modules/minimed-connect-to-nightscout/carelink.js
file and then search and replace “minimed.com
” with “minimed.eu
” (without the quotes, obviously!)That's all, folks! Bogdan
is it possible to use this uploader for nightscout with the european portal? i noticed the URL of Carelink website is hardcoded and cannot be set to https://carelink.minimed.eu.
I replaced the URL in carelink.js to carelink.minimed.eu, but I get errors in Nightscout. timestamp1 Logging in to Carleink timestamp2 POST https://carelink.minimed.eu/patient/j_security_check ... MiniMed Connect error: Error: read ECONNRESET
Can I help you to make this uploader also work for European Carelink users?