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).
Diabetes-M to Nightscout upload script
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).
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
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
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.
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.
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?
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.
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.