NightscoutFoundation / xDrip

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

Treatments entered by followers are not uploaded to Nightscout #735

Closed anderser closed 6 months ago

anderser commented 5 years ago

Treatments (carbs, insuling) added on follower phone shows up in the graph in the master phone/xdrip and on other followers, but not in Nightscout as they are added.

Xdrip is set to use Nightscout REST API to upload. Values from sensor and calibrations are successfully synced to Nightscout, but not treatments.

BUT if I use Back-fill data, all the old treatments get synced. So it seems something is wrong with syncing new treatments as they are added.

The Xdrip master is a Samsung Galaxy S4, Android 4.3, Xdrip latest stable version. Nightscout is latest from master.

I can see no related log messages on the xdrip. Is there some way I can trace these requests to Nightscout in order to figure out where it stops?

jweismann commented 5 years ago

I have observed and reported this too. Only the treatment data entered on the phone that syncs to nightscout is uploaded to nightscout, not the treatment data entered on other phones in the sync group. A work-around is the have all phones in the sync group to upload to nightscout. That way, all treatment data in the sync group is uploaded to nightscout too.

anderser commented 5 years ago

@jweismann but wouldn't that suggestion mean that all BG-values also are uploaded twice (or more) (from each phone). I suppose that could mean trouble/duplication?

tolot27 commented 4 years ago

@jamorham Please assign this issue to me and rename it to "Treatments entered by followers are not uploaded to Nightscout".

Anoukmdv commented 2 years ago

Is this resolved or worked around? Thanks

rossi32s commented 2 years ago

My T1 Son is on iPhone with the dex app. I have nightscout server setup and has been pulling the data from dexshare fine for months. My wife and I both have Xdrip on our androids with nightscout as the datasource.. When she enters a treatment on her phone, it shows up on her phone/xdrip and the nightscout site. If i do a treatment on my phone it shows up on my phone/xdrip and the nightscout site. I cannot get the treatments she enters to my xdrip and she cannot see the ones I enter.

If I load the nightscout page and add a treatment, it shows up correctly/as expected on my phone and hers.

REST-API is setup on both of our phones.

Navid200 commented 6 months ago

In order for the follower to upload treatments to Nightscout, you will need to enable Settings −> Cloud Upload −> Nightscout Sync (REST_API) −> Enabled.

Then, on the same page, enter Base URL including either an API_SECRET or a token with write privilage.

Then, also enable Settings −> Cloud Upload −> Nightscout Sync (REST_API) −> Extra Options −> Upload treatments.

I'm not sure if the downloaded bg readings will be uploaded again. I am curious if that happens.
But, even if it does, Mongo looks at the timestamp and just ignores them since the exact same timestamp already exists.

I am closing this. But, we can reopen if needed. Please let us know if you have any questions.