-
Notifications
You must be signed in to change notification settings - Fork 35
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
[GLOOKO] Problem with nightscout-connect using European Glooko account #14
Comments
Hi, I also had some issues getting the eu servers to work and in the end, the following config worked for me. It seems like there's yet another server for germany / france so I had to replace
|
2023-08-08T06:34:49.820874039Z stdout F FRAME ERROR Thank you very much for your reply. With the server you indicated, it shows a 401 error (invalid credentials). The credentials are correct. I think the server in Spain must be a different one. Thank you very much. |
You should be able to find out the correct url if you log into the glooko website and check the network tab of the browser's developer tool. There should be a bunch of requests going towards glooko's server. |
I add an analysis of a Glooko web login, in case it helps. I have hidden some data. <title>LogbookWeb</title> <script type="text/javascript" nonce="xxxx"> window.env = {"process.env.NODE_ENV":"production","apiUrl":"https://eu.api.glooko.com","auditApiUrl":"https://eu.audit.glooko.com","gladUrl":"https://eu.glad.glooko.com","popInsightsUrl":"https://eu.analytics.glooko.com","insuletUrl":"https://eu.middleware.glooko.com","glookoUploaderOsxUrl":"https://download.diasend.com/update/GlookoUploader.pkg","mellitusHealthUrl":"/api/v2/partners/mellitus_health","academyUrl":"https://academy.glooko.com/diasend/auth","regionalJoinUrl":"https://eu.join.glooko.com","popInsightsApiUrl":"https://eu-api.analytics.glooko.com","brazeWebSDKUrl":"sdk.fra-02.braze.eu","brazeWebSDKApiKey":"6ce27393-4f6a-41e5-a38c-4a38179ead20","graphsBetaUrl":"https://global.betagraphs.glooko.com"} </script> <script type="text/javascript" nonce="xxxx"> window.api_server_url = "https://eu.api.glooko.com"; window.sessionId = "xxxx"; window.logbook_web_session = "xxxx"; window.application_version = "23.3.0.1"; </script> <script src="/assets/application-0f4f8fb0974795e0ab7f8211326e867a2fcef6e3b1869a71ed11fef712ddc3b7.js" type="text/javascript" integrity="sha256-7u6yyGtDWp65r5FqfGAfdEEB4fE9f4UJsi2M1hLgMD8="></script> <script src="/assets/analytics/page_load-3eb51b8d2e1ba584f54206a1c6b511461c0c10d278d7f1d61f3278d91bc67313.js" type="text/javascript" integrity="sha256-PJVD7RgoMWXcganna1BJO/dQ0Br7bcgj6+2L3g/Vhrs="></script> <script type="text/javascript" nonce="xxxx"> document.createElement('header'); document.createElement('hgroup'); document.createElement('nav'); document.createElement('menu'); document.createElement('section'); document.createElement('article'); document.createElement('aside'); document.createElement('footer'); window.I18n_locale = "es"; window.I18n_default_locale = "en"; window.I18n_available_locales = ["de","en","fr-CA","el","es-US","tr","hr","en-GB","fr","es","it","fi","sk","pl","nl","sv","da","cs","nb-NO","pt-PT","ar"]; window.RailsToClientConstants = { email_path: "/email", edit_user_registration_path: "/users/edit", language_path: "/language", signed_in_by_token: "false", create_pdf_target: "_blank" }; </script> <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" integrity="sha384-B1miHxuCmAMGc0405Cm/zSXCc38EP5hNOy2bblqF6yiX01Svinm1mWMwJDdNDBGr" crossOrigin="anonymous"></script> <style id="clearly_highlighting_css" type="text/css">/* selection */ html.clearly_highlighting_enabled ::-moz-selection { background: rgba(246, 238, 150, 0.99); } html.clearly_highlighting_enabled ::selection { background: rgba(246, 238, 150, 0.99); } /* cursor */ html.clearly_highlighting_enabled { /* cursor and hot-spot position -- requires a default cursor, after the URL one */ cursor: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--cursor.png") 14 16, text; } /* highlight tag */ em.clearly_highlight_element { font-style: inherit !important; font-weight: inherit !important; background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--yellow.png"); background-repeat: repeat-x; background-position: top left; background-size: 100% 100%; } /* the delete-buttons are positioned relative to this */ em.clearly_highlight_element.clearly_highlight_first { position: relative; } /* delete buttons */ em.clearly_highlight_element a.clearly_highlight_delete_element { display: none; cursor: pointer; padding: 0; margin: 0; line-height: 0; position: absolute; width: 34px; height: 34px; left: -17px; top: -17px; background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--delete-sprite.png"); background-repeat: no-repeat; background-position: 0px 0px; } em.clearly_highlight_element a.clearly_highlight_delete_element:hover { background-position: -34px 0px; } /* retina */ @media (min--moz-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) { em.clearly_highlight_element { background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/[email protected]"); } em.clearly_highlight_element a.clearly_highlight_delete_element { background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/[email protected]"); background-size: 68px 34px; } } </style> <style>[touch-action="none"]{ -ms-touch-action: none; touch-action: none; }[touch-action="pan-x"]{ -ms-touch-action: pan-x; touch-action: pan-x; }[touch-action="pan-y"]{ -ms-touch-action: pan-y; touch-action: pan-y; }[touch-action="scroll"],[touch-action="pan-x pan-y"],[touch-action="pan-y pan-x"]{ -ms-touch-action: pan-x pan-y; touch-action: pan-x pan-y; }</style> <script type="text/javascript" nonce="xxxx"> window.analyticsUser = {"glooko_code":"eu-west-1-violet-cambridge-5967","user_id":"xxxx","patient_glooko_code":null,"patient_id":null,"primary_authorized_site_id":null,"provider_group":null,"provider_group_sites":[]}; window.user_type = "Patient"; window.patient = "eu-west-1-violet-cambridge-5967"; window.current_user_glooko_code = "eu-west-1-violet-cambridge-5967"; window.Users = { patient: { first_name: "xxx", last_name: "xxxx", guid: "xxxx", date_of_birth: "XXXX-09-16T00:00:00Z", timestamps: {"pump":"2023-08-08T15:49:34.222Z","cgm_device":"2023-08-08T15:49:35.000Z"} }, current_user: { guid: "xxxx", user_type: "Patient" } }; </script> <script nonce="xxxx"> var pendoData = { visitor: { id: "xxxx", // Required if user is logged in glooko_code: "eu-west-1-violet-cambridge-5967", provider_group_site_id: "", provider_group_site_name: "", pgs_diasend_migration: false, pgs_diasend_migration_clinic_admin_name: "", pgs_diasend_migration_clinic_transmitters: [], pgs_diasend_migration_clinic_uploader: false, pgs_academy: false, provider_group_name: "", primary_authorized_site_id: "", primary_authorized_site_name: "", primary_authorized_site_group_name: "", provider_group_sites: [], subscription_model: "", features: [], auth_code: "", application_name: 'LogbookWeb', application_version: "23.3.0.1", device_id: "server", domain: "https://eu.my.glooko.com", glooko_language: "es", user_type: "Patient", diabetes_type: "type_1", user_diasend_migration: true, user_diasend_connected_apps: [], used_diasend_uploader: false, synced_in_the_last_month: "true", user_cloud_connections: [], available_cloud_connections: ["DEXCOM_ACCOUNT","INSULET_OMNIPOD_5_CLOUD","OMNIPOD_DASH_CLOUD"] }, account: { id: "", provider_group_site: "", subscription_model: "" } }; for (var key in pendoData.visitor) { if (Object.prototype.hasOwnProperty.call(pendoData.visitor), key) { if (pendoData.visitor[key] === '') pendoData.visitor[key] = 'not_defined'; } } for (var key in pendoData.account) { if (Object.prototype.hasOwnProperty.call(pendoData.account), key) { if (pendoData.account[key] === '') pendoData.account[key] = 'not_defined'; } } // because this api is unversioned we are not implementing SRI on it in the first round // See the ticket for context (function(apiKey){ (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=[]; v=['initialize','identify','updateOptions','pageLoad'];for(w=0,x=v.length;w <script src="/webpack/production/vendor.7e4d63ef4f701529c19a.js"></script> <script src="/webpack/production/navigation.7e4d63ef4f701529c19a.js"></script> <script src="/webpack/production/devices.7e4d63ef4f701529c19a.js"></script>
Para proteger su privacidad, se ha cerrado automáticamente su sesión por inactividad. |
I have the same issue. Snipplet from container manager / docker on my Synology (sorry for the strange encoding):
|
I have the same problem, my variables are as follows: CONNECT_SOURCE = glooko This results in a status code 422 Same for CONNECT_GLOOKO_SERVER = de-fr.api.glooko.com
|
Would someone be willing to send me an email at |
Also struggling with CONNECT_GLOOKO_SERVER = de-fr.api.glooko.com and getting 422 status code if the right email and password is used, 401 with incorrect login. I am little bit confused about the API. Question to the people which are able to use this: Are you a "normal" glooko user or registered developer? (regardless of region) |
I could help. But as mentioned, I have a more complicated setup: my nightscout installation is on a docker on my synology NAS - I do not have direct access to the installation, only via installing an updated docker image and setting the config values. |
I am stuck here. Was somebody able to use this on the de-fr servers from glooko? |
I am not aware of anybody from EU. On the other hand: if somebody is able, would he / she check issues on Github? |
Hi @burnedikt , do you happen to know details about server / env settings for Scandinavian users (Norway / Sweden)? Thanks! |
@bjornoleh tried your settings, still the same error :( |
Those were not my settings, I was replying to the post by burnedikt :-) |
If you are logged into the Glooko web interface, you can use the browser inspector and network tools to see which servers are being used. We can add that information to the repository here. |
Thanks! I did have a go at that, but didn’t quite know my way around the source inspector in Chrome. I am trying again now. I am seeing: https://eu.my.glooko.com @bewest , Anything else I should look for? |
Hey there, I did some reverse engineering and found this deviceInformation fields, and signing in works for me with these values (via eu.api.glokoo.com):
The only field actually needed is applicationType, which can be "kiosk" or "logbook" - both work. @bewest ^^ |
And we have a winner here! Thanks! :-) I am using the values you send, did some random deviceId and serialNumber instead the above in your example. Then with: export CONNECT_SOURCE=glooko (for germany) I am now able to get values from glooko and feed them to nightscout. At least current glucose level and basal seem to work at first glance. Thanks again. |
Where do I put the values? Where can I insert them? I am using a docker image for nightscout on Synology. |
Along with other configuration variables, probably in docker-compose.yml or similar |
At the moment: This is hard coded in lib/sources/glooko/index.js, so you need to edit the source. In the long term: To be able to use configuration variables the source must be patched accordingly to allow this. I am quite busy now - maybe can provide a PR in the next 2 week for this. If somebody has some more time to work earlier on this: Please feel free. This will help all of us. |
Just tried it with nightscout version "15.0.2 head", as it is, no modfications. Works fine with glooko Account from Germany. Used the following variables: ENABLE=careportal basal food iob bwp cage sage iage bage pushover pump cors cob bridge Boluscalc connect It only retrieves the bolus (carbs and insulin) and basal, no cgm data. But that is fine for since I get those from xdrip companion. |
Just tried - used the posted settings - still 401 error (authentification) :( |
Same here. Did forget I had xdrip running - so the cgm was indeed coming from xdrip instead from glooko. Did not find I way to retrieve the cgm data via api so far. So at the moment:
|
Looks, that the folloging changes helps:
|
Next good news: It's running with zehnBE changes. |
I'd like to point out one more time, that each user should configure a different deviceId and serialNumber (and maybe also the device), so glooko can't filter out these requests as easy. |
@Heiner1 Is the Patch still working for you? I think I might be doing something wrong. No requests are being sent to de-fr.api.glooko.com at all. I have connect enabled and use nightscout-latest-dev and the patched nightscout-connect version. What else could I have forgotten? 'nightscout-connect capture' at least provides the personal data such as name and date of birth |
Good idea! But before the content was only "deviceModel": "iPhone"; @AlexM4H Yes it's still working; unfortunately I have nightscout running at 10be, so I've limited overview about zehnBEs server configuration. If you're living in Germany you should also ask funkstille, because he was not forced to change "deviceInformation“. Maybe it has something to do where servers are located, he uses railway. |
Thx a lot. I will asked him. I used a docker image on a hetzner cloud server. |
Yes, but then you could remove all of that data, except for applicationType , which s the only required field. (So there would be no improvement in regards to detection by glooko, but also no unnecessary stuff.) |
It seems to be a bit more complicated. In my case, the data is transferred from CamAPS to Glooko. The bolus rates are also included in the Glooko reports. However, they may not be transferred via the API. I will take a closer look tomorrow. |
My Nightscout is running on Northflank. I just forked the repository and used Buildpack to build a container. As a result, nightscout-connect is only included as a Nightscout plugin. |
Same issue here. Created a PR for the patch above (#31) I've replaced the 2 IDs by a function that generates the IDs at random. Extra info: |
Thanks, looking good! Has anyone experimented with other values? For example, it might be nice to attribute |
I am able to get data with the patch and feed it to nightscout - however I am only getting bolus/basal/carb values but no values from CGM. It this working for somebody? |
No CGM is not working / supported so far. If you are using camAPS you can use xDrip in companion mode for CGM. |
What is the graph API (v3) command all about? I found it commented out in the source code. |
...so this is it? What's needed to get this going? |
I'm using NS 14.2.6 image on Docker with Portainer on a Raspberry Pi 4 . Where do I put the information to get glooko working please ? |
I am trying to connect to a European Glooko account from Spain, and I get an error when connecting. Here are the logs from Nightscout:
2023-08-05T18:23:30.513865455Z stdout F MiniMed Connect not enabled
2023-08-05T18:23:26.821569259Z stdout F Executing setupMMConnect
2023-08-05T18:23:26.821517826Z stdout F Dexcom bridge not enabled
2023-08-05T18:23:25.015052031Z stdout F Executing setupBridge
2023-08-05T18:23:24.819624981Z stdout F }
2023-08-05T18:23:24.819622748Z stdout F kind: 'glooko'
2023-08-05T18:23:24.819620799Z stdout F baseURL: 'https://eu.api.glooko.com';,
2023-08-05T18:23:24.819619004Z stdout F glookoTimezoneOffset: -7200000,
2023-08-05T18:23:24.819617002Z stdout F glookoPassword: '',
2023-08-05T18:23:24.819614804Z stdout F glookoEmail: '*@gmail.com',
2023-08-05T18:23:24.819612086Z stdout F glookoServer: 'eu.api.glooko.com',
2023-08-05T18:23:24.819609229Z stdout F glookoEnv: 'eu',
2023-08-05T18:23:24.819593054Z stdout F INPUT PARAMS { kind: 'glooko' } {
2023-08-05T18:23:24.819203689Z stdout F GLOOKO using ms offset: -7200000 2
2023-08-05T18:23:43.195213184Z stdout F }
2023-08-05T18:23:43.195211094Z stdout F response: [Object]
2023-08-05T18:23:43.195208838Z stdout F request: [ClientRequest],
2023-08-05T18:23:43.195206737Z stdout F config: [Object],
2023-08-05T18:23:43.195204564Z stdout F code: 'ERR_BAD_REQUEST',
2023-08-05T18:23:43.195202226Z stdout F at processTicksAndRejections (node:internal/process/task_queues:83:21) {
2023-08-05T18:23:43.195199974Z stdout F at endReadableNT (node:internal/streams/readable:1358:12)
2023-08-05T18:23:43.195195974Z stdout F at Unzip.emit (node:events:525:35)
2023-08-05T18:23:43.19519297Z stdout F at Unzip.handleStreamEnd (/workspace/node_modules/nightscout-connect/node_modules/axios/dist/node/axios.cjs:2989:11)
2023-08-05T18:23:43.195188961Z stdout F at settle (/workspace/node_modules/nightscout-connect/node_modules/axios/dist/node/axios.cjs:1909:12)
2023-08-05T18:23:43.195184914Z stdout F data: AxiosError: Request failed with status code 422
2023-08-05T18:23:43.195180833Z stdout F type: 'AUTHENTICATION_ERROR',
The text was updated successfully, but these errors were encountered: