Skip to content

Add remote response notification for Loop#504

Merged
marionbarker merged 3 commits intodevfrom
remote-response-loop
Feb 5, 2026
Merged

Add remote response notification for Loop#504
marionbarker merged 3 commits intodevfrom
remote-response-loop

Conversation

@codebymini
Copy link
Collaborator

@codebymini codebymini commented Jan 17, 2026

Accept APNS responses from looping phone for remote carbs/bolus

Summary

This change makes the app properly accept APNS notifications sent back from a looping phone when a remote carbs and/or bolus request is issued. It ensures the notification path is valid, properly configured, and aligned with the remote-command settings flow so the response can be received reliably.

Details

  • Aligns the remote command setup so APNS credentials and environment are handled consistently when communicating with the looping phone.
  • Ensures the app is eligible to receive the push response for remote carbs/bolus actions.
    Adds supporting adjustments in the remote settings and notification handling flow to reduce failure cases in end‑to‑end remote responses.

@codebymini codebymini requested a review from bjorkert January 19, 2026 08:12
@marionbarker
Copy link
Collaborator

marionbarker commented Feb 5, 2026

Test

Test both with just this branch, and with this branch updated with the latest version of dev (4.5.0) locally.

  • build to a test phone which is examining my personal Loop URL
  • I can send carbs and bolus and both go through immediately to my loop phone.

The LoopFollow plot reflects the remote entries once the data is uploaded from Loop to Nightscout and then downloaded from Nightscout to LoopFollow.

The comment for this PR indicates: Ensures the app is eligible to receive the push response for remote carbs/bolus actions.

Next step will be a modification on the Loop side for this to return a message via APNS to the LoopFollow phone.

Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from "casual" review and test. Relying on bjorkert's review.

@marionbarker marionbarker merged commit 8dc72ef into dev Feb 5, 2026
@marionbarker marionbarker deleted the remote-response-loop branch February 5, 2026 23:15
@marionbarker
Copy link
Collaborator

Test Summary

Test with Nightscout PR 19 applied to the Loop app in addition to this version of LoopFollow.

✅ All tests succeeded for both LoopFollow and LoopCaregiver.

Test LoopCaregiver and LoopFollow

Build Loop onto my personal phone with the code in Nightscout PR 19 included.
Build LoopFolllow with the code in LoopFollow PR 504 included.

LoopCaregiver Test (success)

  • ✅ Use LCG to end the preset remotely
  • ✅ Use LCG to send 2 g carb
    • appears in Loop phone and on LCG display promptly
  • ✅ Use LCG to deliver 0.05 U bolus
    • appears in Loop phone and on LCG display promptly

LoopFollow Test (success)

  • Loop phone close to me, so bolus will go through
    • ✅ from LoopFollow phone send 3 g carbs
    • ✅ from LoopFollow phone send 0.1 U bolus
  • move Loop phone to another room so that a bolus attempted by the Loop phone will fail
    • ✅ from LoopFollow phone send 0.3 U bolus (❌ failed as expected)

Check LoopCaregiver - it immediately updates to display latest glucose and treatments from LoopFollow.

Graphic showing APNS messages on LoopFollow phone

The graphic below shows the messages as seen on the LoopFollow phone running 4.5.1 with the Loop phone running the code in Nightscout PR 19.

The new messages are highlighted in red.

nightscoutservice_pr19

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