Git Product home page Git Product logo

dm2nsc's Introduction

dm2nsc

Data conversion tool for uploading Diabetes-M log data to Nightscout.

Install python3 requirements with pip install -r requirements.txt, update and rename secret.py-example to secret.py, and run getdata.py (potentially as a cronjob).

dm2nsc's People

Contributors

jwoglom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dm2nsc's Issues

REST API upload

Hi there,

How would you advice to upload this data with the REST API?
<mysecretapikey>@http://<name-of-my-raspberry>:1337/api/v1/

Thanks in advance

UTC time format

Any way to get it to write to the mongodb using UTC time? for some reason i cannot get xdrip to sync down from nightscout an entry that isnt in UTC time

usage instruction

Hi,
can you make instruction how to use the script?
I use Diabetes-M and xdrip+ via nightscout and want to use sync them. There is now nightscout sync to Diabetes-M, but looking for another direction as well which would be very helpful.

Login fails

Hello,

I understand this script is now 3 years old but it solves an issue i'm experiencing.

It looks like diabetes:m has changed their addresses or is no longer allowing logins via this api.

I'm not sure which.

If i change the login address to https://analytics.diabetes-m.com/login i can login

I can't work out what address to use for the entries page.

do you still have this script working for you?

Thanks for your attention.

heroku timeout after 30 secs

It seems like the script is not working for me as it takes too long.
heroku closes the connection after 30 seconds and you cant change this timeout as its strictly set by heroku: https://devcenter.heroku.com/articles/request-timeout

Is there a chance to either add a "Transfer-Encoding: chunked header" or separate the script into threads and have the import run in the background and post something to the server every few seconds so the connection keeps open?

Blood glucose: different units in Nightscout depending on entry composition

Hi,

Imported blood glucose readings get different units in Nightscout depending on entry composition (combination of BG, insulin and carbs). When an entry contains blood glucose readings only, the BG value is reported as mg/dL, but should be in mmol/L. The values are correctly positioned on the curve, only the numbers in the textboxes are wrong.

I use mmol/L as BG units in both Diabetes:M and Nightscout.

Example (please see uploaded image for details):

BG Check entry with blood glucose only:
Reads 148 [mg/dL]
Should read 148/18 = 8,2 [mmol/L]
With entries consisting of any combination of BG + insulin or carbs, the text is correct.

It seems the problems are independent of whether the entries are classified as "BG Check" or "Meal Bolus", and this designation seems somewhat random.

I managed to fix this by messing with getdata.py. I believe line 76 is the culprit, as I could not figure out what to substitute entry["us_units"] with in my case. I would expect something like "metric_units" would do the trick, but unfortunately, no.

My workaround was this:

def to_mmol(mmol): return (mmol)

glucose = entry["glucoseInCurrentUnit"] if entry["glucoseInCurrentUnit"] and entry["us_units"] else to_mmol(entry["glucose"])

"units": "mmol" # changed from /"units": "mg/dL"/

I have very limited programming skills, and was happy to find a workaround. This was probably not the best solution, but it might just help someone like me.

BG_Check

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.