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

Remote Overrides Don't Support All Loop Functions #26

Open
gestrich opened this issue Oct 15, 2023 · 0 comments
Open

Remote Overrides Don't Support All Loop Functions #26

gestrich opened this issue Oct 15, 2023 · 0 comments

Comments

@gestrich
Copy link
Collaborator

gestrich commented Oct 15, 2023

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.

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

No branches or pull requests

1 participant