-
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 returns 0 treatments #38
Comments
I'm getting the exact same issue:
I'm running Nightscout in an LXD container on Ubuntu Server 22.04.5. Here is my current my.env file:
I also had to modify the /node_modules/nightscout-connect/lib/sources/glooko/index.js file according to this: function login_payload (opts) {
var body = {
"userLogin": {
"email": opts.glookoEmail,
"password": opts.glookoPassword
},
"deviceInformation": {
"applicationType": "logbook",
"os": "android",
"osVersion": "33",
"device": "Google Pixel 8 Pro",
"deviceManufacturer": "Google",
"deviceModel": "Pixel 8 Pro",
"serialNumber": "HIDDEN",
"clinicalResearch": false,
"deviceId": "HIDDEN",
"applicationVersion": "6.1.3",
"buildNumber": "0",
"gitHash": "g4fbed2011b"
}
};
return body;
} Before I got status code 422 or 401 depending on which server I used in the my.env file if I didn't changed the deviceInformation in the index.js file. Here is my output when starting Nightscout:
Anyone with a nice/cool solution? I even tried changing all API endpoints from /api/v2 to api/v2/external in the index.js file, but that didn't work. Thanks in advance. |
I've done some troubleshooting. I think it's a timestamp problem here: var lastUpdatedAt = last_glucose_at.toISOString( ); When testing in Postman I don't see where startTime nor endTime is used. So I console.log() the params and lastUpdatedAt was in fact the same time as now. Using that value didn't return anything. If I then used: var lastUpdatedAt = new Date(two_days_ago); I was able to get some treatments into Nightscout but I can see that a lot of data is still undefined. I'm no programmer so help would be appreciated. :) I will continue tomorrow or in a few days. Maybe the original developer might see the problem easier than me. I assume we get latestUpdatedAt dynamically for a reason. My initial thought was that it only gets data from when the session was started. But I tried having my Nightscout instance running and then uploaded my pump to Glooko but nothing came up in Nightscout. |
Hi,
I'm using nightscout-connect plugin to syng from glooko. Authorization is successuful but Heroku logs shows that zero treatments are returned:
2024-01-27T12:58:59.055619+00:00 app[web.1]: FETCHING
2024-01-27T12:58:59.055705+00:00 app[web.1]: GLOOKO passing batch for transforming
2024-01-27T12:58:59.055795+00:00 app[web.1]: GLOOKO data transformation complete, returning 0 treatments
What am I missing?
Thanks,
Rafael
The text was updated successfully, but these errors were encountered: