JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
317 stars 313 forks source link

Notifications Intervals not respected #482

Closed ulisse31 closed 4 months ago

ulisse31 commented 7 months ago

In general settings, if you leave notification intervals to "0", you will get phone notification every minutes. If you set it to a different value, say 60 minutes, it should give you only one notification every hour, provided no alarms are triggered in the meanwhile.

Looks like this settings is not respected despite the value I entered (45): notifications are pushed somehow randomly, but definitely less than 45 minutes.

Libre2 direct Master mode, Version 4.12.0 build 3

IMG_B5022EA5EF36-1

JohanDegraeve commented 7 months ago

The timer is reset if a disconnect/reconnect occurs: after a disconnect and reconnect, the next reading (which is usually in less than 1 minute) will be shown immediately. The Libre may disconnect frequently/randomly as the distance to your iPhone increases/decreases, or for other reasons.

ulisse31 commented 6 months ago

Thank you for prompt reply. What you wrote makes sense, even though I would argue that the notification interval should follow the setting regardless the disconnection event. I understand that the sensor sends the last 15 minutes (or was it 8 hours?) events so that if disconnection lasts less than that, then there won't be any gaps in the graph? Asking because I don't see any.

Are disconnection logs accessible somewhere so that I can prove this theory? I usually keep the phone very close to me (out of pocket within 1 meter) and I saw that happing dozen of times in a single evening. thanks again Andrea

JohanDegraeve commented 6 months ago

The reason why I did that is because sometimes I just pick my phone to see my value. While I come closer to the phone, it connects, gets a reading and by the time I pick my phone I have a reading in a notification. I don't think anybody else uses it like this. Actually for the moment I don't use the notifications at all.

The disconnects are not dependent on the amount of readings that the transmitter wants to send. I just happens.

In the settings there's an option to send a problem report. Send it to yourself. Search in the files that you will receive for "didDisconnect peripheral with name" (it should be followed by the name of the transmitter, but it may also be 'unknown'). Later you should see 'connected to peripheral with name'

ulisse31 commented 6 months ago

Thank you John for your response. Do you think it is worth to raise or change this report into a feature request? I still think the normal expected behaviour would be to enforce the setting specified in the option despite the micro disconnections (i.e. raise a scheduled notification ever xx minutes) otherwise it's a bit misleading for the non experienced user. Also the battery drain should slightly improve (phone doesn't wake up very often, i.e after every micro disconnect)

By the way, for our use case, you can have an instant reading in late iphone/ios by adding a custom widget on the left desktop of your phone; this way you can check the BG without even unlocking the phone by simply tapping and swiping right.

ulisse31 commented 6 months ago

And additionally, if we could have widget support all these "problems" would be redundant 😅

callms commented 6 months ago

And additionally, if we could have widget support all these "problems" would be redundant 😅

Indeed that's one of the reason why I started OpenGlück. I have a widget in my lock screen that shows my current glucose (taken from xDrip4iOS), and that's very helpful, as I don't even have to unlock my phone (and even more useful with always-on displays.) Tough I believe it's best to have two apps, I wouldn't object if someone did port some of the notifications in here.