nightscout / nightguard

iOS and WatchOS Client for the Nightscout CGM System
GNU Affero General Public License v3.0
243 stars 159 forks source link

Sensor age not reflecting correctly in conjunction with Nightscout #221

Closed PhilaBurger closed 1 year ago

PhilaBurger commented 1 year ago

I’m experiencing two different but similar and seemingly related issues.

I’m running the Freestyle Libre 3 and using Glucose Direct to feed my Nightscout.pro site.

When I start a new sensor, GD sees the correct sensor start date/time:

CBF126AE-71D5-4D01-B67B-F1639BD7050C

It updates my Nightscout site with that info:

98EA260D-2B24-4EB4-8681-E4DE99923836

However, Nightguard isn’t pulling that info. In fact, if I go into the duration screen, it sets the date/time to whatever the date/time is at the time I go into that tab:

D3769602-2BF8-4F14-8134-C9AF383B3542 1FB3A6A4-05D9-4F72-A8DE-9F79F579761F

Additionally, if I were to set the date/time to match what GD shows and saving it, NG will update the NS site, but the NS view will end up showing the sensor age as 4 hours less than the actual sensor age.

I’d love for Nightguard to simply pulll/display the sensor age as stored in Nightscout UNLESS I manually/specifically reset it via Nightguard and save it.

dhermanns commented 1 year ago

Hi! We already had a case which could be the same reason: https://github.com/nightscout/nightguard/issues/144

I'm not sure what Glucose Direct uses to store SAGE, but Nightguard is aligned to AAPS. And yes, nightscout is a little bit ambiguous regarding SAGE.

PhilaBurger commented 1 year ago

I did read the other issues...and see some similarity...possibly in the case of using NG to set the start time, though it only takes 1 hour for the FSL to warm up, so I would think that, at most, the time difference between NG and NS should be 1 hour.

However, my issue (related or not) is that, IMO, NG should be checking and pulling the sensor age from Nightscout unless I've set the date/time via NG, at which point the updated info could/should be sent to NS.

dhermanns commented 1 year ago

I think nightguard would already behave as you would expect, if Glucose Direct would write the sensor change to Nightscout. But looks to me that it just stores sensor start.

And for the reasons in #144 nightguard ist using sensor change only.

PhilaBurger commented 1 year ago

Ok, I understand what you're saying.

As, in the case of the FSL line, I don't believe there's an option to restart a sensor, I'll inquire of the Glucose Direct developer as to possibly writing the info as sensor change, instead of (or in addition to) sensor start, since for the purposes of FSL, they would be one and the same.

For my own understanding, though:

Regardless of whether they're started or restarted, the sensors have a limited life span, which isn't extended or shortened by restarting it, and they have to be swapped after X time (10 days, 14 days, etc). Given this, I wonder why we would desire tracking start/restart date/time over change date/time.

dhermanns commented 1 year ago

It was quite usual to restart the Dexcom G5 sensor. I think that was the reason to distinguish between sensor start and sensor change date. Don't know what sensors are still restartable.