Coder Social home page Coder Social logo

pazaan / 600seriesandroiduploader Goto Github PK

View Code? Open in Web Editor NEW
189.0 189.0 314.0 5.21 MB

Your Medtronic 600-series pump data, direct to Nightscout

Home Page: http://pazaan.github.io/600SeriesAndroidUploader/

License: MIT License

Java 100.00%
android nightscout

600seriesandroiduploader's People

Contributors

fsamuelm avatar ireneusz-ptak avatar jamorham avatar jgwashburn avatar jotomo avatar mrinnetmaki avatar pazaan avatar pogman avatar shawnbissell avatar volkerrichert avatar wright-david avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

600seriesandroiduploader's Issues

BGL or BG or SGV?

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?

CareLink Login ok, "Registered Devices" empty though

Your Environment

  • Uploader Version Number: 0.2.1
  • Your Android Phone Model Name (e.g. Samsung J1 Ace): AVUS A34
  • Android Version Number (e.g. use 4.4 for 4.4.4):4.4.2
  • Network Connection at the time the issue occurred (Wi-Fi, Mobile): Wi-Fi

Brief Explanation of Issue

When Registering with Carelink, I do not get a "wrong password" error but there are no "Registered Devices" in the list neither.

Steps to Reproduce (for bugs)

  1. Open App NS 640g Uploader
  2. Click on Menu _Register Contour Next Link"
  3. Enter my Credentials (checked them with https://carelink.minimed.eu, uploaded Data there)
  4. Click on Button "Retrieve keys for USB"
  5. Wait a bit
  6. See screen with Registered Devices and a Close Button
    screenshot_2016-05-23-08-40-02

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.

Suspicion

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.

Version info - update prior to 1st public (alpha) release

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?)

CareLink login fails with misleading error message when no internet connection

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.

Sony Xperia Active ST17i, uploader does not start

Your Environment

  • Uploader Version Number: 0.1.1
  • Your Android Phone Model Name (e.g. Samsung J1 Ace): Sony Xperia Active ST17i
  • Android Version Number (e.g. use 4.4 for 4.4.4): 4.0.4
  • Network Connection at the time the issue occurred (Wi-Fi, Mobile): connect wi-fi

Brief Explanation of Issue

Uploader installs without a problem. But the application does not start. I tried the debugger in Android Studio.

https://lh3.googleusercontent.com/-ssFgXlwmHA4/Vz8DYEQHqZI/AAAAAAAAeyY/oGOhkGKhKJAuCRBAktGpaHgHSowM44OjQCCo/s2048/xperia%2Bfail.PNG

Uploader Error Code

Steps to Reproduce (for bugs)

Severity Score

App crashes if "REST API Upload" is switched on, but "Nightscout URL" is invalid.

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]

App name should not be "NightScout"

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)

Improved API string creation

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.

Synchronise polling timer to match CGM times

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.

Check reported pump time against local device time

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.

Problems trying to build with Android Studio (on Windows)

Your Environment

  • Uploader Version Number: v0.2.1

Brief Explanation of Issue

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()

Uploader Error Code

Steps to Reproduce (for bugs)

Severity Score

Store values in local database

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

Store last radio channel in the USB stick config

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.

Android uploader occasionally stops pump receiving SG values.

Your Environment

  • Uploader Version Number: v0.2.1
  • Your Android Phone Model Name: Samsung Note 3
  • Android Version Number (e.g. use 4.4 for 4.4.4): 5.0
  • Network Connection at the time the issue occurred (Wi-Fi, Mobile): Wifi
  • (if relevant) Nightscout website version (e.g. 0.8.4 Funnel cake, master / dev branch): dev

Brief Explanation of Issue

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

Uploader Error Code

None

Steps to Reproduce (for bugs)

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.

Severity Score

3

WiFi Hack causes crash

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

Initial USB stick registration flow is flaky

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.

Unnecessary amount of device status uploads

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.

App crash when connected to CNL stick (without pump in range)

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.

Device battery status arrives in pairs

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

Integrate OpenAPS

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

Add basal info uploading to Nightscout

Send:

  • Basal patterns
  • Active basal pattern from the status message
  • Temp basals from the status message
  • LGS temp basal from the status message, with a note that it was a LGS

"Pump time" is displaying a time-stamp even though no pump is connected

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

Uploader not working when the phone sleep. The uploader only work when set the phone "always on".

Your Environment

  • Uploader Version Number: 0.1.0
  • Your Android Phone Model Name (e.g. Samsung J1 Ace): Asus-Z010D
  • Android Version Number (e.g. use 4.4 for 4.4.4): 5.0.2
  • Network Connection at the time the issue occurred (Wi-Fi, Mobile): wifi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.