nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.4k stars 71.68k forks source link

Double Entries in nightscout, when deleting and reentering Treatments in AAPS #8213

Open gerison77 opened 8 months ago

gerison77 commented 8 months ago

I have NS 15.0.2 running with using AAPSclient V 3.0. with NSClilent V1 due to parental setup, with 3 clients.

Bug: Deleting Treatments (eg. carbs due to false timeshift) an reentering (at the intended point of time) leads to double entires in NS. In the following example time shift was set incorrectly in the bolus calculator. The kh entry was then deleted and rentered (17g). However. NS shows now double entries of the 17g. No Double entries in each AAPS App

Screenshots:

Build: Screenshot_20240119-094121

Nighscout Web:

grafik

Treatments in AAPS Client:

Screenshot_20240113-094101~2

psonnera commented 8 months ago

I might be wrong but I don't thinks AAPS will delete tratments in NS. That should be done manually.

gerison77 commented 8 months ago

I really don't think so. It happend just again. A caretaker corrected carbs due to eating more than expected. Again double entries in NightScout. I surveill the data on my desk... the data should be correct, since they show up in nightscout reporter as well. So I have to desagree.

actual screenshots: Screenshot_20240119-122157 grafik

psonnera commented 8 months ago

Can you please show the logs of AAPS sending the treatment deletion request to Nightscout?

gerison77 commented 8 months ago

Hi I recreated the bug once again. Made new screenshots and log entry as follows. I entered the carbs in AAPSClient and deleted them with AAPS Full. Whereas in the treatment tab of both AAPSClient and AAPSFull the entry was deleted (See Time of Screenshot 20:20, you have entries in NS Site. I entered 20g (20:17) and 25g (20:18) and deleted them both afterwards. See Screenshots. The same happened today when deleting ecarbs....

Screenshot_20240121-202045 Screenshot_20240121-202029

gerison77 commented 8 months ago

Were the logs submitted? I pasted them several times.....

psonnera commented 8 months ago

@gerison77 I don't see AAPS deleting treatments in Nightscout for neither V1 nor V3 API but I might be wrong. My question was: where did you read that this is an AAPS/NSClient feature, and if it is, can you show the request to Nightscout that's been ignored? It should show in the logs as a REST command DELETE /treatments.

gerison77 commented 8 months ago

@psonnera Sorry Patrick, I didn't read that. I simply expected the data to be correct across all the platforms used. I posted this already on discord before and decided then to open this issue. If I was wrong, I am sorry. But since this is a security issue (you can bolus in a parental setup via SMS without involvement of AAPS Client - relying on NS could be missleading and cause false treatments.) I will take this issue to the proper channel than. Thank you for your time and effort.

psonnera commented 8 months ago

@gerison77 no excuses needed, I just wanted to make sure this was a documented feature before asking NS devs to act on it. Let's see the answer on AAPS side first.