ivalkou / freeaps

FreeAPS X - an artificial pancreas system for iOS based on OpenAPS
MIT License
162 stars 143 forks source link

IOB curve isn't displayed correctly in NS day to day reports #59

Closed bjornoleh closed 2 years ago

bjornoleh commented 3 years ago

The IOB curve isn't displayed correctly in NS day to day reports.

Version 0.1.23 RC

20210514_082109

The transition from Loop to FreeAPS X is at around 16.00 on the 12th. It is marked by a profile switch.

With Loop, the IOB trace is as expected. With FAPSX there is nothing the first hours, then next day just a gradually increasing linear slope.

I have disabled display of basal and COB here to make IOB more prominent.

IOB from FAPSX is displayed correctly in the main view of Nightscout.

It is correctly displayed in reports for AAPS users, so not an issue with oref.

bjornoleh commented 3 years ago

There is something strange with the COB trace as well, at least fir the day in the middle in the screenshot below. This could be unrelated to the IOB issue, I don't know.

Screenshot_20210517-000127_Chrome

marionbarker commented 3 years ago

I think the problem is that IOB is not reported in the OpenAPS pill - only found in the IOB pill.
The COB is reported in the OpenAPS pill which is why it can be shown in plots. Marion-20210611-0821

bjornoleh commented 3 years ago

@marionbarker, thanks, that is possible. I have AAPS running in simulation on my phone, connected to a backup NS instance. IOB is reported there, so clearly a difference compared to FAPSX.

bjornoleh commented 3 years ago

AAPS example: Screenshot_20210612-202333_Chrome

bjornoleh commented 2 years ago

I was wondering if OpenAPS also display IOB in the openaps pill. According to screenshots in this issue, that seems to be the case.

https://github.com/openaps/oref0/issues/1405

PNG-bilde

So it seems FAX is displaying less info in the openaps pill than OpenAPS and AAPS. And this appears to be the cause of the missing IOB trace in the NS Day to day reports.

Would it be possible to add IOB to what is reported in the openaps pill?

bjornoleh commented 2 years ago

For reference, FreeAPS dev v0.2.4 does not display IOB:

Skjermbilde 2021–12–15 kl  23 31 33

It’s not too important to have the IOB value displayed in the pill, but getting the NS reports to work as intended is, as it give valuable information when adjusting settings.

marionbarker commented 2 years ago

I sent Ben West a PM about this when I was using FAX and he thought it was a FAX problem. But then I talked to someone who uses AAPS and she said the IOB doesn't plot in day-to-day reports for her.

The concept of plotting IOB and COB to help in adjusting settings is used a lot in Loop, where the plots work. There are some graphics features available with OpenAPS in Day-to-Day reports that do not work in Loop.

I modified my Omnipod message parser to handle FAX log files and added an IOB, COB, etc plot, but that requires saving the log files daily and running a python parser (on a mac).

bjornoleh commented 2 years ago

I think I have checked this before, at least I checked now by firing up my Android phone with AAPS in sim mode. AAPS do show the IOB trace, as long as the IOB checkbox is ticked. See from around 19:00 below:

5 7 -0 5 →

bjornoleh commented 2 years ago

https://github.com/ivalkou/freeaps/commit/0f8de8274303ec65169ace4f008448168a6a814d fixed this bug.Thanks!