Skip to content

include pump manufacturer and model in the pump status#947

Merged
ps2 merged 2 commits into
LoopKit:omnipod-testingfrom
jasoncalabrese:omnipod-testing-pump-status
May 9, 2019
Merged

include pump manufacturer and model in the pump status#947
ps2 merged 2 commits into
LoopKit:omnipod-testingfrom
jasoncalabrese:omnipod-testing-pump-status

Conversation

@jasoncalabrese
Copy link
Copy Markdown
Contributor

@jasoncalabrese jasoncalabrese commented May 4, 2019

depends on ps2/rileylink_ios#522

this will let us display 50+ U on the pump pill in Nightscout

uploaded device status looks like this:

"pump": {
  "bolusing": false,
  "suspended": false,
  "secondsFromGMT": -25200,
  "model": "Eros",
  "pumpID": "1F01ACAB",
  "clock": "2019-05-04T19:19:35Z",
  "manufacturer": "Insulet"
}
"pump": {
    "suspended": false,
    "pumpID": "999999",
    "manufacturer": "Medtronic",
    "model": "522",
    "battery": {
      "percent": 100
    },
    "reservoir": 90.6,
    "bolusing": false,
    "clock": "2019-05-04T05:13:58Z",
    "secondsFromGMT": -25200
  }

@Kdisimone
Copy link
Copy Markdown
Collaborator

works well for us, tested this on both mdt and pod loops to make sure there weren't any errant issues.

@ps2
Copy link
Copy Markdown
Collaborator

ps2 commented May 9, 2019

If the reservoir data is older than 15 minutes, then the uploaded reservoir field will be nil, which NS would display as "50+ U", right?

@ps2
Copy link
Copy Markdown
Collaborator

ps2 commented May 9, 2019

There probably needs to be some semantic support in Nightscout for reservoir values that are missing vs above reading threshold.

@jasoncalabrese
Copy link
Copy Markdown
Contributor Author

jasoncalabrese commented May 9, 2019

We could use a special reservoir value, in combination with manufacturer/model or maybe only include the pump info when it's current? The timestamp on the pump info in the device status will still be old in this case, so the user may start getting stale pump data alarms depending on their settings.

@jasoncalabrese
Copy link
Copy Markdown
Contributor Author

I was thinking the pump clock was the last time we read the state, but it's just the current time clock: Date()

@ps2
Copy link
Copy Markdown
Collaborator

ps2 commented May 9, 2019

It sounds like the NS convention would be to not include the pumpStatus part if pump data was stale. On the Loop side, I think the PumpManager could be updated to vend reservoir status, so you don't have to fetch it from DoseStore, and we'd also include a date for staleness. I'll merge this PR with the known issue (shouldn't have big effects), and we can tackle fixing it with the backend upload generalization.

@ps2 ps2 merged commit 561aa12 into LoopKit:omnipod-testing May 9, 2019
@jasoncalabrese jasoncalabrese deleted the omnipod-testing-pump-status branch May 9, 2019 17:24
cyoung1024 added a commit to cyoung1024/Loop that referenced this pull request Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants