pazaan / 600seriesandroiduploader Goto Github PK
View Code? Open in Web Editor NEWYour Medtronic 600-series pump data, direct to Nightscout
Home Page: http://pazaan.github.io/600SeriesAndroidUploader/
License: MIT License
Your Medtronic 600-series pump data, direct to Nightscout
Home Page: http://pazaan.github.io/600SeriesAndroidUploader/
License: MIT License
Use zbar to allow the app to scan a QR as generated by the Nightscout Auto Configure page
This may be a cultural thing...
"BGL" on the main display is causing some minor confusion as the more usual term in UK for blood glucose is just "BG".
However I guess terminology may vary between countries/regions.
Also should it be SGV if it's from the CGM and not BG?
When Registering with Carelink, I do not get a "wrong password" error but there are no "Registered Devices" in the list neither.
I hooked up Fiddler Proxy into my Wi-Fi connection and I could see that an SSL tunnel is created to https://carelink.minimed.eu, but I did not manage to "look inside" the Packages sent.
I suspect, that GetHmacAndKey.doInBackground returns true without setting up a new entry in the CNLConfigDbHelper somehow...? Returning false in that Method would cause the error_incorrect_password
to be shown which it does not, in my case.
Code version: commit 29f34b2 (post 0.1.1 pre 0.2.0)
An incorrect API_SECRET is a classic source of troubleshooting bugs.
Worth adding a check/warning (now that it's a field on its own)
Code version: commit 4c42c64 (master)
Environment: Sony D2303 (Android 5.1.1, API 22) Xperia M2
Within the app, Preferences displays the Current version as 03.07.15
In Android device settings, App Info, version is 1.0 (the discrepancy is a legacy issue)
Suggest for 1st alpha release both are updated to the same, new numbering scheme (LG 0.01?)
Code version: commit 4c42c64 (master)
Environment: Sony D2303 (Android 5.1.1, API 22) Xperia M2
With WiFi turned off and Mobile Data turned off, a (valid) Carelink login fails with the error message "The Username or password is incorrect".
Instead the app should give a message indicating lack of internet connectivity.
Even better, a check could be made of internet connectivity before the prompt to enter username/password is displayed.
Uploader installs without a problem. But the application does not start. I tried the debugger in Android Studio.
http://{YOUR-API-SERVER} will cause the app to crash with this:
http://{YOUR-API-SERVER}/api/devicestatus
at java.net.URI.create(URI.java:733) ~[na:0.0]
at org.apache.http.client.methods.HttpPost.(HttpPost.java:84) ~[na:0.0]
at info.nightscout.android.upload.UploadHelper.postDeviceStatus(UploadHelper.java:694) ~[na:0.0]
at info.nightscout.android.upload.UploadHelper.doRESTUploadTo(UploadHelper.java:481) ~[na:0.0]
at info.nightscout.android.upload.UploadHelper.doRESTUpload(UploadHelper.java:417) ~[na:0.0]
at info.nightscout.android.upload.UploadHelper.doInBackground(UploadHelper.java:364) ~[na:0.0]
at info.nightscout.android.upload.UploadHelper.doInBackground(UploadHelper.java:65) ~[na:0.0]
at android.os.AsyncTask$2.call(AsyncTask.java:295) ~[na:0.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:237) ~[na:0.0]
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) ~[na:0.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) ~[na:0.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) ~[na:0.0]
at java.lang.Thread.run(Thread.java:818) ~[na:0.0]
Currently only CGM values are uploaded. It would be nice to also add manual finger stick entries (as long as they have been entered into the pump).
It's actually possible to pull them straight from the CNLs BGL log (using ASTM).
We really don't need access to contacts, or the phone log 😦
Currently shows TREND.DOUBLE_UP
... to assist would be contributors
Tool chain...
Online service sign ups:
Atlassian [SourceTree], Fabric, ((Github)), Gravatar, Slack, Waffle
Code version: commit 4c42c64 (master)
Environment: AVD Nexus_5X_API_21 [emulator-5554]
Environment: Sony D2303 (Android 5.1.1, API 22) Xperia M2
Despite the presence of
<string name="app_name">NS 640g Uploader</string>
the displayed app name is "NightScout"
IMO the distinctive name is better (avoids confusion with website, distinguishes app from the Veo/530 uploader)
From @Bal00: Instead of one field in Preferences, could you provide two; one for the Nightscout URL and a second for the secret. The app could then sanitise the URL to get rid of user interpretation (remove all slashes, https, http and colon) and create the api string itself. This could massively reduce user related setup problems.
The timer for polling the pump is currently a fixed 5 minutes from when the app starts, or you press "Get Now".
It should dynamically synchronise against the last CGM time, so that you don't get things like "8 minutes ago" for a BGL, even though the pump was polled 3 minutes ago.
Would prevent potential 'future events' recorded on NS and incorrect reporting of 'age' of SG values.
640g pump has a reputation for gaining time so some users may not be aware that their pump is several-tens of minutes ahead of actual time.
Build Fails
File: Build.gradle
Line23: def process = ['sh', '-c', 'git tag -l | grep -c ".*" -'].execute().text.trim()
Results in the following error on windows:
Gradle sync failed: CreateProcess error=2, The system cannot find the file specified
Current work around is returning 1 from gitVersion()
This might be useful for trouble shooting / user support - though it's not a 'setting' as such
Currently ntermittent gaps occur in data stream if a scheduled upload fails. Implement one or two re-attempts if either pump comms or REST fails (can this be detected?). Compliments #28
Similar to decoding-contour-next-link, store the last radio channel used in the USB stick config row. This will allow us to try the last successful channel first, rather than poll all the channels every time. This should help save a bit of battery power, and time.
I can´t register a USB stick. It's my fault or application error .
The first field is the username and password of the second, right?
(Screenshot) https://drive.google.com/file/d/0B0djxvd9fF3gVDlSR3lzYVpybDg/view?usp=sharing
OK: username, password, OTG (SE Z1 Compact, os 5.1.1)
This should be updated to
YOURAPISECRET@https://YOURWEBSITE.azurewebsites.net/api/v1/
When using the uploader occasionally my pump stops receiving SG values and just displays --- on the pump display.
On the android uploader it displays
.00 mmol/L (Double down arrow)
Pump time Correct
Active insulin correct
Rate of Change: DoubleDown
None
1.Connect carelink usb to Phone
2. Confirm Values uploaded
3. Sometime later (minutes/hours) pump stops reading SG values.
4. Unplug Carelink USB and pump starts reading values again within 20 minutes.
3
When trying to register the USB stick you have to enter Carelink UserName and Password - even though the correct credentials have been inserted (tested on the carelink.minimed.eu) it says "The UserName or Password is incorrect"?
Where is the App trying to verify the credentials? Could it be because it is verifying against a ".com" server instead of a ".eu" server?
Observed in single decimal mode in mmol/l, SG value of 10 was displayed as "10" not "10.0".
Code version: Pre-release v0.1.1 commit bf69577
App version in Preferences is still listed as 0.1.0, also in Android's Settings>App info
Need to add some mechanism to auto-update both of these from build version.
For an unknown reason my rig has a lot of (DNS?) errors on REST. With the WiFi hack disabled this is generally stable, but with the WiFi hack enabled there are very frequent (often instant on start-up) crashes.
Hardware: MotoG (3rd G?)
Typical_Medtronic640gUploader.log.txt shows normal operation for my rig over a day or so (pump is often out of range during the day but always in range at night).
Wifi_Hack_Medtronic640gUploader.log.txt is downloaded an hour later when the WiFi hack was enabled at the start of the hour (around 17:30 on 20th May).
Let me know if you would like specific tests.
Wifi_Hack_Medtronic640gUploader.log.txt
Typical_Medtronic640gUploader.log.txt
Not an error in itself, but the resulting error message is not indicative of the problem at all.
(Ref issue #26 )
Add manual finger stick entries from History
A very specific flow is required (ie, plug in USB first, launch app). There are also various scenarios where one needs to click "Get Now" to get some meaningful state.
This should be a very user-friendly and intuitive flow.
There are duplicate copies of device status being uploaded, as well as more than are necessary. deviceStatus DB is 1.08MB, vs 38kB for entries. Considering that for the longest time deviceStatus contained only uploaderBattery entries, this seems very wrong.
Code version: commit 4c42c64 (master)
Environment: Sony D2303 (Android 5.1.1, API 22) Xperia M2
Start app, connect CNL, register USB stick (CareLink login), then sit and wait with no pump for several minutes....
... app crashes
Seen this a few times now, but nothing useful in the log file.
Obviously this might also occur if a user is having RF comms problems with the pump.
Code version: commit 29f34b2 (post 0.1.1 pre 0.2.0)
In logcat, pairs of battery info messages arrive from the Android device (with CNL attached) .
This may or may not be important, but seems odd
05-21 20:56:17.726 25192-25192/info.nightscout.android I/BatteryReceived: BatteryReceived
05-21 20:56:17.767 25192-25192/info.nightscout.android I/BatteryReceived: BatteryReceived
05-21 20:56:37.708 25192-25192/info.nightscout.android I/BatteryReceived: BatteryReceived
05-21 20:56:37.752 25192-25192/info.nightscout.android I/BatteryReceived: BatteryReceived
IMO an explicit "Carelink registration success" notification would be helpful, rather than just returning to app screen (unless that's happening, but so fast I can't read it)
Pre-release v0.1.0 commit f309f23
Both Matt and I have Parse error when trying to open this APK on a device
Some folks on the Nightscout for Medtronic FB group didn't see a menu icon in the app.
They resolved it by pressing and holding the context menu button to get the menu.
We need to initially update the documentation to cover this, and ideally find the cause and fix it.
Lack of device support for USB OTG is causing problems for lots of users - can we add a built-in check?
(related to #17)
What are the plans for supporting Heroku etc?
Suggested feature (0.3): Camping mode allows Pebble watch to access values directly from uploaded via Bluetooth. See https://github.com/nightscout/android-uploader/releases/tag/0.1.11-lab-camping-mode
...once we've figured it out ourselves
Integrate the OpenAPS oref-0 implementation using the v8 engine, similarly to the HAPP integration.
Since we don't have a way of determining remote temp basal command at this stage, this implementation will initially need to be based on microboluses.
@scottleibrand has pointed out that we need to understand how the predictive LGS algorithm deals with boluses
Send:
We currently have lintOptions.abortOnError set to false so we can release builds. We really need to process everything in the lint report and set it back to true (or just delete the block).
Pablo has found that if you don't use a CareLink account to upload pump data to CareLink, that the stick login/registration process fails. Perhaps it's just that the serial has to be registered by CareLink at some stage.
Code version: commit 4c42c64 (master)
Environment: Sony D2303 (Android 5.1.1, API 22) Xperia M2
After app launch "Pump time" is displaying a time-stamp even though no pump (nor CNL stick) is connected.This suggests it's picking up the Android device time.
It should display null/none for "Pump time" until it's actually received a time-stamp from the pump.
Uploader not working when the phone sleep. The uploader only work when set the phone "always on".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.