nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
98 stars 526 forks source link

[DanaKit] Progress update 04-08-2024 #381

Closed bastiaanv closed 3 months ago

bastiaanv commented 3 months ago

A long overdue update of DanaKit containing the following:

marionbarker commented 3 months ago

Status

Success as far as running with a simulator goes.

Configuration

First attachment of simulator to phone

This test report is for @bastiaanv - I routinely need to add the pump simulator and then remove it and add it back before I can get a green loop

Test with phone unlocked, app in foreground

Test with phone unlocked, app in background

Pretty sure that's all the testing that can be done with a simulator for Dana.

bastiaanv commented 3 months ago

@marionbarker Thanks for checking dev! I fixed the submodule.

About your test setup, did you enable the continuous mode? Did you see a status connected? Screenshot 2024-08-16 at 20 50 47 https://loopkit.github.io/loopdocs/troubleshooting/dana-heartbeat/#how-to-enable-continuous-bluetooth-mode

marionbarker commented 3 months ago

Status

I must still be missing something The continuous mode (with a simulator) is not working

"Bug?" Report

The CAGE did not update for NS when new Dana was added

Test with Continuous Mode

I followed the directions from this comment and turned on Continuous Mode.

Test in Foreground

Test in Background

Test with phone locked

More comments

When I first put app in background while phone was connected to Xcode, I noticed that this message happened about every 2 or 3 seconds.

NotificationHelper.swift - addRequest(identifier:content:triggerAfter:deleteOld:)#79: sending com.bastiaanv.continuous-ble.disconnect-warning notification

followed by a bunch of conect to pump messages but no determineBasal was happening

Rebuild to phone and watch for that. Get one and only one message at 13:12:31 But this message is going through every second

ContinousBluetoothManager.swift - keepConnectionAlive()#57: Sending keep alive message

Put app into background at 13:18 (those keepConnectionAlive messages stop and the disconnect-warning notification messages begin - every 2 sec).

NS shows stale loop. Log attached: Trio-feat-dana-continuous-background-Xcode-log.txt