Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPS Plugin, predBGs causing display issue #3904

Closed
boc-the-git opened this issue Sep 8, 2018 · 5 comments
Closed

OpenAPS Plugin, predBGs causing display issue #3904

boc-the-git opened this issue Sep 8, 2018 · 5 comments

Comments

@boc-the-git
Copy link

boc-the-git commented Sep 8, 2018

Having recently got my loop running via OpenAPS I'm noticing a negative impact on NS. When predBGs is populated (specifically within the 'enacted' attribute), it is screwing up the alignment of everything on NS.

I'm a relatively new user, so can't confirm if this is a long time issue or not, though I couldn't find any relevant issue.

This is an example of the devicestatus record causing the issue, I've confirmed with 5+ different records that the presence of predBGs is the trigger for the issue:

    "_id": {
        "$oid": "5b93b9266a10f700046044f5"
    },
    "device": "openaps://redacted",
    "openaps": {
        "iob": {
            "iob": 0.638,
            "activity": 0.0088,
            "basaliob": -0.158,
            "bolusiob": 0.796,
            "netbasalinsulin": -0.55,
            "bolusinsulin": 1.8,
            "iobWithZeroTemp": {
                "iob": 0.638,
                "activity": 0.0088,
                "basaliob": -0.158,
                "bolusiob": 0.796,
                "netbasalinsulin": -0.55,
                "bolusinsulin": 1.8,
                "time": "2018-09-08T11:52:55.000Z"
            },
            "lastBolusTime": 1536400978000,
            "lastTemp": {
                "rate": 0.75,
                "timestamp": "2018-09-08T21:24:31+10:00",
                "started_at": "2018-09-08T11:24:31.000Z",
                "date": 1536405871000,
                "duration": 29.4
            },
            "timestamp": "2018-09-08T11:52:55.000Z"
        },
        "suggested": {
            "temp": "absolute",
            "bg": 172,
            "tick": "+12",
            "eventualBG": 318,
            "insulinReq": 2.62,
            "reservoir": "149.3\n",
            "deliverAt": "2018-09-08T11:54:25.366Z",
            "sensitivityRatio": 1,
            "COB": 0,
            "IOB": 0.638,
            "reason": "COB: 0, Dev: 4.5, BGI: -0.1, ISF: 3.1, CR: 14, Target: 6.0, minPredBG 14.1, minGuardBG 10.2, IOBpredBG 10.6, UAMpredBG 17.7; Eventual BG 17.7 >= 6.0, adj. req. rate: 6 to maxSafeBasal: 2.61, temp 0.75<2.6U/hr. ",
            "duration": 30,
            "rate": 2.6,
            "timestamp": "2018-09-08T11:54:25.366Z"
        },
        "enacted": {
            "temp": "absolute",
            "bg": 172,
            "tick": "+12",
            "eventualBG": 318,
            "insulinReq": 2.62,
            "reservoir": "149.3\n",
            "deliverAt": "2018-09-08T11:54:25.366Z",
            "sensitivityRatio": 1,
            "predBGs": {
                "IOB": [
                    172,
                    179,
                    185,
                    190,
                    194,
                    198,
                    201,
                    203,
                    205,
                    205,
                    206,
                    205,
                    203,
                    202,
                    201,
                    199,
                    198,
                    197,
                    196,
                    195,
                    195,
                    194,
                    193,
                    193,
                    192,
                    192,
                    191,
                    191,
                    191,
                    190
                ],
                "ZT": [
                    172,
                    170,
                    167,
                    165,
                    163,
                    161,
                    159,
                    157,
                    156,
                    155,
                    153,
                    152,
                    152,
                    151,
                    151,
                    150,
                    150,
                    151,
                    151,
                    152,
                    152
                ],
                "UAM": [
                    172,
                    183,
                    193,
                    203,
                    212,
                    221,
                    229,
                    238,
                    245,
                    253,
                    260,
                    267,
                    273,
                    279,
                    284,
                    289,
                    294,
                    298,
                    302,
                    306,
                    309,
                    312,
                    314,
                    316,
                    317,
                    318,
                    319,
                    319,
                    319,
                    319,
                    318
                ]
            },
            "COB": 0,
            "IOB": 0.638,
            "reason": "COB: 0, Dev: 4.5, BGI: -0.1, ISF: 3.1, CR: 14, Target: 6.0, minPredBG 14.1, minGuardBG 10.2, IOBpredBG 10.6, UAMpredBG 17.7; Eventual BG 17.7 >= 6.0, adj. req. rate: 6 to maxSafeBasal: 2.61, temp 0.75<2.6U/hr. ",
            "duration": 30,
            "rate": 2.6,
            "received": true,
            "timestamp": "2018-09-08T11:54:46.460Z"
        }
    },
    "pump": {
        "clock": "2018-09-08T21:52:55+10:00",
        "battery": {
            "voltage": 1.23,
            "string": "normal"
        },
        "reservoir": 149.3,
        "status": {
            "status": "normal",
            "bolusing": false,
            "suspended": false,
            "timestamp": "2018-09-08T11:54:48.650Z"
        }
    },
    "uploader": {
        "batteryVoltage": 3770,
        "battery": 49
    },
    "created_at": "2018-09-08T11:57:26.622Z"
}

This is what it looks like with the predBGs attribute in place:
image

This is when removing the predBGs attribute from the record in the DB:
image

@boc-the-git
Copy link
Author

Note I was able to work around the issue a bit by setting the SHOW_FORECAST variable to null (instead of openaps), but that obviously defeats the purpose of the data, and makes it look fairly similar to manually removing the predBGs

@PieterGit
Copy link
Contributor

@scottleibrand can you explain this?

@scottleibrand
Copy link
Member

This graph is completely missing BG information. Nightscout rarely displays correctly without BGs: no one designed it to.

@scottleibrand
Copy link
Member

I’d jump into Gitter if you need help getting your CGM info uploaded to NS. There are lots of different methods.

@PieterGit
Copy link
Contributor

@scottleibrand Thanks (I should have better looked at the screenshots). @BOC14 please make sure your cgm uploading works. Please ask help if you need it, e.g. at https://gitter.im/nightscout/intend-to-bolus
Closing this issue, because it looks like a problem with the uploader. Feel free to reopen if it's needed and you have your cgm upload in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants