Closed sgmoore closed 3 years ago
Ah, if the /status API is giving incorrect info, I can revert that. I had mine set to mg/dl so I assumed it was working.
So if Nightscoout is configured to be mmol, it still sends readings as MG/dl? If so, that at least makes programming for Nightscout easier.
I will get these changes in. Thanks
Ah, here it is. It's from the nightscout variables in the config:
DISPLAY_UNITS
Not sure what its exactly used for since its independent from the settings on the main nightscout page. Might be for telling it what sort of unit you're expected from your datasource.
Going to assume we get data from the server as MG/DL. Then provide a setting to switch it to MMOL if people notice it is incorrect.
Version 11.1.0 should be deploying soon with fixes for this.
Thanks, that is working for me now.
I don't think the 5b6a2bebc4e0dc8f73fa48d311db3ce8ea950831 commit Now query nightscout to see what type of value it is sending us is correct.
Certainly does not work for me and reports my blood sugar to be 18 times higher than they really are. (I've reverted to a previous build, which works fine).
My nightscout is setup using MMOL/L but the api figures are always returned in mg/dl. (Can't find any official confirmation / documentation on this, but another user has confirmed it is the same for him).
Related to this, regarding your comment
Only speaking from my own case, but that block of code has never been executed. Firstly, as stated, my figures are returned in mg/dl and so have never contained any decimal points. Secondly I have never got any results of 30 or below. My readings are sourced from a FreeStyle libre and looking at the figures when I have had a bad low, I would be fairly sure that this never returns figures below 2.1 mmol/l or 38 mg/dl. I have had a manual finger prick reading of 1.9 mmol/l or 34 mg/dl but that isn't recorded in Nightscout (and is still is above the 30 theshold)
However issue https://github.com/Delubear/GlucoseTray/issues/50 would make me wary of assuming that this is the case for everyone, as that bug was from one of my prs, but the strange thing is, that url works for me! (The fixed url also works). The data is returned in slightly different format (json rather than what looks like plain text), but it is still returned, so I'm not sure why it doesn't work for others.