NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.4k stars 1.14k forks source link

Syncing Libre2 raw data #1597

Open jordipbou opened 3 years ago

jordipbou commented 3 years ago

Hello,

First of all, thanks for the work you're doing here.

We're using xDrip+ with a patched LibreLink app, then syncing between master app (the one on the phone with patched app) and two more phones with xdrip sync.

Master xdrip+ shows Libre2 raw data as small white points around the normal graph. We've found that both infos (raw and processed) are very helpful together but they're only shown on master device.

I've been unable to sync raw data (the white points) between devices, is it possible? It would be an interesting enhancement if it's not possible right now.

Thanks

jordipbou commented 3 years ago

Hello again,

I've asked about syncing with xdrip sync only, but it will be useful to send raw data to Nightscout also. I've been unable to do that also.

Both options, uploading raw data to xdrip-sync and nightscout are very interesting for my own case.

As I understand there's limited time to work on issues and that maybe this is not an important request, I would be glad to help trying to implement those features.

I've cloned the repository and started analyzing source code to understand xdrip internals. Also, I've read the collaboration guidelines and it would be fantastic to talk to some developer to start guiding me on this. Of course, I understand the possibility of not wanting this feature to be added to the project.

Thanks

Navid200 commented 3 years ago

@jordipbou I am not a developer. But, I am curious why you say that both raw and processed values are helpful. Would you please explain why?

The purpose of calibration is to correct a known error.
The accuracy of calibration is paramount. And, you can inspect the calibration graph any time you desire. But, why would you want to see both raw and processed all the time?

jordipbou commented 3 years ago

First of all, we are not calibrating because when started using xdrip four months ago we were looking for info and found posts commenting that Libre2 needed no calibration, so we started using it that way and have not found errors worth calibrating. So we don't know much about calibration procedure and calibration graph.

But we are using Libre2 raw data not for correcting errors but to see fast changes in trend.

The xdrip calculated glucose values give very good information for us showing current trend, but that can change very fast (we have a four year old daughter and I don't know if this happens to everyone) and then xdrip is slow in picking up that change (thanks to raw info we have been able to solve hypos even before Libre2 low alarm was activated).

Using raw data we can compare trend and raw immediate information to take decisions.

I have implemented this sync myself and we are using it for two weeks now (I will make a push request soon) and having that information on our phones has become very valuable to avoid hypos when she's in school, for example.

Best regards!

Navid200 commented 3 years ago

Thanks for explaining.

Do you also use the xDrip's "Forecast Lows" alert? If not, please give it a try.

Navid200 commented 3 years ago

@jordipbou A developer may ask you the same question. Even if a developer goes ahead and implements this, before the implementation can be merged, the same question may come up.

I ask the question again. Have you used the forecast low alarm to accomplish what you need? If you can accomplish what you need with xDrip as is, there will be no need to modify xDrip.

jordipbou commented 3 years ago

Oh, I'm sorry, I thought the question was a suggestion and not needed an answer.

No, I have not used the forecast low alarm. As I said, raw data for libre changes a lot faster and glucose values calculated by xdrip add a lot of latency. If libre data is 10 minutes late of blood glucose values, on fast changing situations the smoothing of raw values made by xdrip can add 10 minutes more.

We have lots of situations where raw data is rising and xdrip is alerting of falling or of a low (because it's late).

Using raw data is not an ideal, as alarms will not work with it, but in some situations it has become very valuable for us.

Implementation of raw value sharing adds the option of using that information on remote when its needed, or just ignore it if you don't need it. Alarms still are the best for situations where you are not aware of what its hapenning and need xdrip to alert you.

As I said, I already implemented it and we're using it daily, not just to alert of lows but to have better info on trend change (after giving some food, for example, we can see glucose values rising even 10 minutes before xdrip values are rising, allowing better decisions to maintain her in range).

I will add a pull request shortly, I just need to take some time to do it.

Hope this answers the question, and again, sorry for not answering before.

anyforwork commented 3 years ago

@jordipbou We have 3 year old daughter and we look forward to your PR. It's really useful feature for us.

For example, we do not start taking meal until raw data shows a downward trend. If we will wait smoothed data we can lose dozen minutes and get hypo. If we do not take a pause we can get hyper.

This feature also is really useful when daughter is riding her scooter or in the play yard. We always have to be close to her to get possibility to see raw data. With your feature we can give her master phone and see raw data on the followers ones.

tolot27 commented 3 years ago

I have implemented this sync myself.

Then just create a PR and we can review it. If jamorham decides, it is useful, he will merge it.

tzachi-dar commented 3 years ago

Are you using the patched app or oop2?

בתאריך יום א׳, 28 במרץ 2021, 20:21, מאת Mathias Walter ‏< @.***>:

I have implemented this sync myself.

Then just create a PR and we can review it. If jamorham decides, it is useful, he will merge it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NightscoutFoundation/xDrip/issues/1597#issuecomment-808927533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4TBZBR6B7KFHRGGFLXHY3TF5XQ3ANCNFSM4V2LOCTA .

jordipbou commented 3 years ago

@anyforwork You're describing our exact same scenario and the reasons to implement synchronization on raw values.

@tolot27 I've created the pull request #1686

@tzachi-dar I don't know what oop2 is. We're using patched LibreLink app as hardware data source.

Estetne commented 3 years ago

@jordipbou Hello. We are waiting for this feature very much. You wrote that you are currently using raw data sync. Can we somehow get the app file and also use this possibility now?

jordipbou commented 3 years ago

@Estetne @anyforwork I have uploaded my own build of xdrip to https://jordipbou.github.io/xdrip/xdrip-libre2-raw-sync.apk

Be aware that this is my personal own build and has more changes other than libre2 raw sync, I'm using it daily without problems, but I can not support anyone so you're on your own. Changes are:

Estetne commented 3 years ago

@jordipbou Thank you very much, we will try it

illepidus commented 3 years ago

Any chance this feature would be added to any further xdrip version? That would be wonderful.

malloy139 commented 2 years ago

It is now over a year since the last comment. PR #1686 is still not merged but #1821 should address this? If this is working now I have not yet figured out how to activate the raw data on the follower. Is this working for anyone else?

twinko commented 1 year ago

would be great if we could implement this feature!

malloy139 commented 1 year ago

Raising alerts based on raw values would also be very helpful