nightscout / nightguard

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

Upload issue to Apple Health #255

Closed JohnV235 closed 4 months ago

JohnV235 commented 1 year ago

Nightguard has started uploading 54 entries for every second to Apple Health. Example: at 4:45 AM it sends the same glucose reading 54 times. Then at 4:45 AM it will send the reading 54 times. Then at 4:46 AM, etc. Totally messed up using Apple Health for my glucose. Any ideas?

dhermanns commented 1 year ago

Would be helpful what versions you are running.

JohnV235 commented 1 year ago

Thanks - I'm new to this. Version 3.8.1.831

dhermanns commented 1 year ago

This is the latest App-Store Version. @sebdei could you have a look?

sebdei commented 1 year ago

If I remember correctly, duplication handling is done by apple health itself. Since I'm not using the App anymore, it would be nice if somebody would approve this bug. In any case I might find some time during the next few weeks.

superevr commented 9 months ago

First time setting up Nightguard and syncing to Apple Health. I'm really happy to have this functionality to put more of my information in one place. This is very helpful, especially when looking up historical changes and trends.

Unfortunately I also came across this bug. Similar to the first post, Nightguard generated dozens and dozens of duplicate entries for readings. For example, one of the synced historical records for Jan 26 at 5:50:23 PM appears in the Apple Health Recorded Data 56 times. That is, Same glucose, same date (to the second), same source, and nearby "Date Added to Health". (From Jan 26, 2024 at 6:17:55 PM through 6:17:56 PM)

image

This doesn't happen always, but it certainly floods Apple Health with duplicate data. I don't think Apple Health de-duplicates the raw data. But it will de-duplicate the information from two different apps before it displays it in a chart.

This is version 3.9.1 from the app store.

superevr commented 9 months ago

If it helps, the data is syncing from the Gluroo API, which is populating data for Freestyle Libre 3 via Libre Link Up.

Parke-Bench commented 8 months ago

Same issue here, data coming from GluRoo’s LibreLinkUp connection to my Libre 2.

Love the NightGuard app and having my BS nums on my Apple Watch, but I had to disable the HealthKit integration because it was flooding my history with thousands of readings every hour.

I’m not super experienced with iOS programming but I do have an Apple Developer’s Licence, and am a fairly experienced programmer in general, so if anyone wants to point me to the “likely culprit” code in the repository, I can poke around and do some diagnostics.

lenabee92 commented 5 months ago

I have the opposite problem… my Nightguard is receiving the information correctly from Gluroo but it isn’t transmitting to Apple Health even though I have it set to do so.

dhermanns commented 4 months ago

Is this still an issue with V3.9.2? Had a look at the last days but can't reproduce this. If this still is an issue, it would be helpful to know how you can force this behavior.

lenabee92 commented 4 months ago

No it seems to be working nowSent from my iPhoneOn Jul 11, 2024, at 2:50 PM, dhermanns @.***> wrote: Is this still an issue with V3.9.2? Had a look at the last days but can't reproduce this. If this still is an issue, it would be helpful to know how you can force this behavior.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

JohnV235 commented 4 months ago

Seems to be working fine now. All entries are unique. Thanks!

Parke-Bench commented 4 months ago

Seems to be working fine now. All entries are unique. Thanks!

I guess 3.9.2 hasn't made it to the Canadian Apple App Store yet. I'm on 3.9.1 and it's still uploading 54 duplicate readings every minute.

dhermanns commented 4 months ago

Ah - my fault. 3.9.2 is on testflight only right now. So you can try that:

https://testflight.apple.com/join/Ub8WcpcE

Parke-Bench commented 4 months ago

I installed 3.92 and activated Nightguard again as a data source, but unfortunately it is still submitting 50 or more duplicate entries. I'm on iOS 17.5.1. image

Parke-Bench commented 4 months ago

I reset the Sync with Apple Health and now it's working! Yay! Thank you so much for fixing this. image

dhermanns commented 4 months ago

Very strange that a simple reset fixes this. But very valuable hint for others that experience this. Thanks to you - I didn't do anything to fix it 😉.