Git Product home page Git Product logo

loopcaregiver's Introduction

LoopKit

Build Status Carthage compatible project chat

LoopKit is a set of tools to speed up development of your own closed-loop insulin delivery app. It is agnostic to treatment decisions and input sources.

Loop

Loop is a full-featured app built on top of LoopKit.

LoopKit provides

  • Data storage and retrieval, using HealthKit and Core Data as appropriate
  • Protocol types for representing data models in a flexible way
  • Common calculation algorithms like Insulin On Board
  • Boilerplate user interfaces like editing basal rate schedules and carb entry

LoopKit does not provide

  • Treatment decisions: Your Diabetes May Vary.
  • Device communications: Device-specific libraries are maintained separately.

License

LoopKit is available under the MIT license. See the LICENSE file for more info.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

loopcaregiver's People

Contributors

aug0211 avatar billybooth avatar bjornoleh avatar dnzxy avatar gestrich avatar marionbarker avatar squarethebase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

loopcaregiver's Issues

Critical issue - was my caregiver command received and executed?

I’m a noob and set up my 9 year old’s iphone to loop about a week ago.

Simultaneously I set up caregiver on my own iphone.

I have experienced several issues where I send a command from caregiver and I have NO clue if it went through or not. In one case I was notified that the command was “sent” but the command was not actually administered because I had sent 2 commands within the OTP timeframe. The error message showed up ONLY on my 9 year old sons phone wheras I had no idea that it was missed.

I’ve also had some issues where I sent a bolus command and assumed that it had gone through. However, when I checked my sons phone it turns out that loop had decided NOT to give him the bolus since it exceeded his daily maximum. That’s all well and good, but as a caregiver, I need to know 100% surely that my commands were sent, authenticated, received, authenticated, and then executed. I really REALLY want to request that the caregiver always knows what happened with their request and whether it was received or executed and - if not executed - then why?

The main use case for me is that I want to be able to be able to cook dinner while my 9 year old is playing upstairs, calculate the carbs, and then program them. I can’t just grab my son’s iphone and bring it downstairs to the kitchen since the bt signal doesn’t reach and I would thus need to suspend insulin delivery.

I would also like to be able to set him into “pre meal mode” since I LOVE this feature.

Lastly, I want to be able to see and review and modify ALL of his settings.

As a noob onboarding into loop, it was a major PITA and very non-intuitive that my “caregiver” app was so limited wheras my 9 year old son’s Loop app was totally unrestricted.

I find myself constantly needing to ask him for his phone to see what happened since I dont trust the caregiver app and dont get as detailed info as my son does.

A year from now my son won’t need me as much - but as a caregiver of a newly looping child: this was unexpected.

Requests for a few features to caregiver

When my looper enters his carbs, he choose the emoji/text that is displayed on Nightscout.
When a caregiver enters the carbs, there is no such display.

We often do future carbs or a bolus for food then a bolus for his drink and it would be easy to glance at Nightscout and see what's going on but caregiver doesn't have the feature to add the emojis or text to Nightscout. Is this possible to do? It would be handy when one parent doses the child and the other parent could know if they need to be aggressive with a remote bolus or let Loop figure it out.

Also, can there be an alert for the caregiver when the bolus is complete? I often dose and assume it went through to find out that it didn't which throws off prebolus timing.

Thanks.

"Now" line

Would it be possible to add a "Now" line to the charts?

Make Home View Scrollable, like Loop

We should make the main view scrollable, similar to Loop. That will allow us to support additional graphs and the current override on the home view, like Loop. We will need to make sure graphs still have a decent default size for various device types. We may want to consider moving the Timeline graph to the top, to avoid it being clipped.

Make QR code optional During Setup

We currently assume write access for all Caregivers. There are cases a Caregiver should not have write access. The work-around is to scan a fake QR into caregiver that doesn't work. We could instead make the QR code optional with a strong warning like "Warning: Remote bolus/carbs will not function without scanning your Looper's QR" <I Know / Scan QR>.

As a bonus, it would be nice to hide the Bolus/Carb buttons but that is not quite as important.

Custom Bundle ID requires CAREGIVER_APP_BUNDLE_IDENTIFIER

To customize the Bundle ID, you must add CAREGIVER_APP_BUNDLE_IDENTIFIER to the override file. MAIN_APP_BUNDLE_IDENTIFIER is not used.

e.g.

// Override this if you don't want the default com.${DEVELOPMENT_TEAM}.loopkit that loop uses
//MAIN_APP_BUNDLE_IDENTIFIER =
CAREGIVER_APP_BUNDLE_IDENTIFIER = com.domain.caregiver

Caregiver doesnt use background activity

caregiver doesnt update BS in background and doesnt update watch BS, dev build done today 13-04-2024.
option of background actvity is not coming up in settings on app but does in loopfollow app.

Show Error When OTP is About to be Reused

Loop will not allow an OTP to be reused. When submitting bolus + carbs, you need to send 2 OTPs. Rather than Caregivers needing to remember to wait between commands and not knowing until it fails on the Loop side, it would be nice if we showed an error as soon as we detect they are reusing an OTP.

ex: "You have already used the current OTP code. Wait at least 30 seconds between commands.."

Remote Overrides Don't Support All Loop Functions

Loop supports overrides to start at a time in the future. This capability does not exist as a remote feature in Nightscout. The fields in Nightscout are available to set a time but that is not forwarded to Loop in the push notification.

Additionally, Loop supports "indefinite" overrides but there is not a field to send this. Loop treats Double.inifinite as an indefinite override but we likely can't send that kind of value through JSON. We could include a checkbox on Nightscout for this and a boolean indefinite that gets sent in the payload. Care will be needed to handle cases where both a duration and indefinite=true is sent -- which is undefined.

Finally, we could support changing the % percent of the override temporarily, like Loop allows.

A few notes to get started on these change:

Caregiver Updates

A few places to add the start time:

  • OverrideAction
  • NSRemoteCommandPayload
  • OverrideRemoteNotification (consider using either startDate or "start-time", like carbs).

Nightscout Updates

  • careportal.js. See the inputMatrix assigned for overrides
  • lib/plugins/loop.js: We can add new UI - See lines like prebolus: false for examples
  • lib/server/loop.js: Parse new values. See example if (data.duration !== undefined && parseInt(data.duration) > 0) {

Loop Updates

We will need to parse the new values on the Loop side and validate them.

Carb entry uses "Premeal" preset icon

I mentioned this during the LnL Zoom the other day. I'm opening an issue to track this. The carb entry icon should be the same as in the Loop app.

Bug Report: Carb Issues Disappear in Nightscout

It turns out that for the database used by Nightscout, when two carb entries have the same time of consumption, the most recent entry overwrites the prior one.

Please see: cgm-remote-monitor Issue 8185: Carb treatments disappearing

One proposed work around is to modify LoopCaregiver to keep the current time including seconds )and maybe msec) when the picker wheel is selected and only adjust the hours and minutes with the time picker. The odd of having the same time for remote carb entry then becomes miniscule.

The current method is to send selected hours and minutes with 0 seconds.

Please note that Loop behaves as expected, but for the remote carb entries selected to be at the same time from LoopCaregiver, Nightscout treatment history and display do not match Loop.

Carb Time Stepper Respect Time limits

There are limitations for how far you can deliver carbs in the past or future. It would be nice if the stepper would stop incrementing/decrementing when it reaches one of those limits.

IMG_3743

Request: Rectangular Complication Info

With the commonly used “calendar complication hack” no longer feasible as of WatchOS 10, a replacement for this would be massively valuable and impactful.

I’m thinking of the “rectangular complication”. Screen shot attached for current info I have in this complication, which includes:

  • Time of data pull
  • BG
  • Trend arrow
  • Delta
  • Loop status
  • 24hr A1C estimate*
  • 24hr Time in range %*
  • Current active basal
  • Insulin on board
  • Carbs on board

The two with * I think are not available today via Loop/LCG.

Other interesting data points I’ve toyed with are minimum predicted BG, maximum predicted BG, and eventual predicted BG.

Of course, the graph in the native Loop version of this complication is pretty to look at and has some good info baked into it, but it’s a bit tougher as it currently stands to understand min/max/eventual BG in that view for instance. If there was a way to get the visual graph while still delivering the data that’s needed, that’d be clever and beautiful.

incoming-59BCB0C4-88BF-4622-BC34-6C6E896049D4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.