Skip to content

Send the newest treatment seen with remote bolus and carb commands - #842

Open
bjorkert wants to merge 2 commits into
loopandlearn:devfrom
bjorkert:remote-guard
Open

bjorkert wants to merge 2 commits into
loopandlearn:devfrom
bjorkert:remote-guard

Conversation

@bjorkert

@bjorkert bjorkert commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

LoopFollow now sends the Nightscout id of the newest treatment it had when the bolus, meal or carb screen was opened. Loop and Trio use it to refuse a command if something was added that the caregiver had not seen. Trio commands also get an id so they never run twice. Replies now stay in Notification Center when the app is open, so the reason for a refusal can be read. Older Loop and Trio ignore the new fields. Companion to LoopKit/LoopWorkspace#594 and nightscout/Trio#1789.

The bolus, meal and carb screens take the Nightscout id of the newest treatment LoopFollow had fetched when they open, and send it with the command as known-through-id to Loop and known_through_id to Trio, which use it to refuse a command if something was added that the caregiver had not seen. Trio bolus and meal commands carry a command id, and Loop commands expire 12 minutes after they are sent. Commands from the watch carry no id. Replies to remote commands stay in Notification Center while the app is open.
# Conflicts:
#	RemoteShared/PushMessage.swift
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.

1 participant