cmtjk / LinkUpConnect

15 stars 1 forks source link

15min values #4

Closed pooyaww closed 1 year ago

pooyaww commented 2 years ago

Recently I receive values on xdrip only each 15 mins while linkUpConnect is set to forward values each minute. Is there a new limitation on APIs or there is something wrong with my configuration? In the beginning I didn't have this problem.

cmtjk commented 2 years ago

Hi @pooyaww, which version of xDrip are you using? I'm currently not using xDrip+ but I think they updated the 'Download latest APK' at https://jamorham.github.io/#xdrip-plus. If I remenber correctly I was using a version from earlier this year, i.e. 2022.05.19.

And there are some changes on xDrip+'s side: https://github.com/NightscoutFoundation/xDrip/compare/2022.04.19...2022.08.03#diff-fe8553f56dd4c6bf395b78191772825f991cf3adda57e9df5a5df5d99fc86142#R27

Most deal with formatting but there're some changes in value deduplication/smoothing: https://github.com/NightscoutFoundation/xDrip/blob/e13a76ec2a89c287a9d61171e7c79e01b632c0de/app/src/main/java/com/eveningoutpost/dexdrip/LibreReceiver.java#L80

But these changes seem to be irrelevant since the hard coded 270,000 milliseconds are now more or less hardcoded 250,000 milliseconds: https://github.com/NightscoutFoundation/xDrip/blob/e13a76ec2a89c287a9d61171e7c79e01b632c0de/app/src/main/java/com/eveningoutpost/dexdrip/utils/DexCollectionType.java#L335 This time period for value smoothing seems not to be configurable(? or I'm missing something here).

When enabling the LibreReceiver logs (Settings -> Less common settings -> Extra Logging Settings -> Extra tags for logging -> "LibreReceiver:v", this also indicates a new version since a few weeks back I remember dealing with the old LibreReceiver name for logging, i.e. "xdrip libre_receiver:v") I see that the LibreReceiver is receiving data every minute as expected. When looking at the actual BG Data Table (Settings -> Less common settings -> Show Data Tables) I see most values with a bigger time period in between. Like 2-4 minutes but that's as expected due to deduplication/smoothing.

I've let xDrip+ 2022.08.03 and LinkUpConnect 1.3.2 run for a while and don't see any issues. My values are processed properly: Screenshot_20221002_150517_xDrip+

By the way: xDrip+ 2022.08.03 now includes the Web Follower source (https://xdrip.readthedocs.io/en/latest/install/webfollower/). You can try this one if you have issues with LinkUpConnect and don't need LinkUpConnect's notification.

pooyaww commented 2 years ago

Hi @cmtjk Thank you for complete answer. I checked many different versions of Xdrip+ including what you suggested but unfortunately all behave the same. In my case BG Data Table shows 15 min values! LinkUpConnect Debug shows that the values are sent every minutes. The only change that I can remember that recently happened is that my phone got updated to Android 12. Which Android version did you try ?

Regarding Xdrip+ Web Follower the main problem is calibration issue. It is not possible to calibrate values on Web Follower. Basically I use Xdip just because I can calibrate. But currently due to this 15 min problem calibration is useless.

cmtjk commented 2 years ago

Hi @pooyaww, i'm also on Android 12. You might want to check if the data is properly received in xDrip+: Settings -> Less common settings -> Extra Logging Settings -> Extra tags for logging -> "LibreReceiver:v" You should see a log entry like 'got bg reading: from sensor: ..... rawValue: .... at: ....' every minute.

pooyaww commented 2 years ago

@cmtjk I see logs like that, seems every two minutes I receive a value but there are many errors in between. Screenshot_2022-10-03-22-23-07-045_com.eveningoutpost.dexdrip.jpg

Screenshot_2022-10-03-22-26-06-506_com.eveningoutpost.dexdrip.jpg

cmtjk commented 2 years ago

Well the LibreTrenGraph comment says // A factor of zero, means that the object is not valid whatever this means and under which circumstances this occurs. Maybe your xDrip+ got in an invalid state somehow but this seems unlikely since you said that you tried several different versions (maybe clear cache?).

From the screenshots I see that the LibreReceiver receives the LinkUpConnect data as expected. The delay of 1+ minutes might be due to the LibreTrendGraph errors.

I'd seek help at https://github.com/NightscoutFoundation/xDrip/issues.

pooyaww commented 2 years ago

I opened a discussion topic in Xdrip repo. lets see what's their idea.