Skip to content

Conversation

@marionbarker
Copy link
Contributor

@marionbarker marionbarker commented Sep 20, 2024

This was tested with a Stelo by the user who told me Stelo uses the DX01 prefix.

This PR builds and the following graphics are seen with the build.
There was also a suggestion that a single prefix of "DX" might be sufficient.

Edited with updated figure after commit: 8b18b0f: add warning about no glucose alerts for Stelo

g7-pr-30

@elnjensen
Copy link

@marionbarker, would it be worth splitting Stelo off as a separate menu entry, so we could know if people are using that (vs. G7/One+), and then pop up a warning about them not getting BG alerts with Stelo? (And possibly about this being untested with Loop.) That's not needed for pairing, but maybe worth a heads-up to the user?

@marionbarker
Copy link
Contributor Author

This was tested successfully yesterday by a Stelo user who sent me a PM.

I will update the text to include that alerts and alarms are not available for Stelo and are provided by the Dexcom apps for G7 and ONE+.

@marionbarker
Copy link
Contributor Author

Summary of Stelo testing

There are differences in the way Loop and Trio make use of CGM modules, so both were tested.

  • Trio has CGM alarms as a feature and successfully provided glucose alarms;
    • Alarms will not be available with Loop using Stelo
  • Loop integrates with Apple Health differently than Trio, I only tested this part with Loop
    • For most of my testing with Loop and Stelo, I disabled writing Glucose to Health for Stelo so Loop keeps the original values
    • When I synched Stelo to health, Loop read in the smoothed values and "lost" any values below 70 that Loop picked up from Stelo (before the 3 hour delay)
      • After this experience of missing glucose values, I disabled Stelo writing to health again
      • Presumably any values above 250 would have been lost as well

Test

I tested while wearing a G7 and a Stelo sensor.

Glucose alarms:

  • For use with Loop, no glucose alarms are provided with Stelo
  • For use with Trio, the user needs to navigate to Trio, Notifications, Trio Notifications and enable Always Notify CGM
    • They can choose settings on the Trio Notifications screen to adjust those notifications
    • I got alerts on my phone and watch from Trio when outside the limits that I configured

No calibrations

The Stelo app does not allow for calibrations.

My two sensors were in pretty good agreement (n=1). The Stelo readings were higher than G7 (and finger stick) by about 20 mg/dL the first 24 to 48 hours then agreed well on later days.

Interaction with Apple Health

Stelo writes to Apple Health with a 3 hour delay. The smoothed values are at 5 minute intervals with values that exceed the 70 and 250 limit not reported.

This was only tested for Loop.

  • Because this test was on my Looping phone, I do not have Trio as one of my sources for data in Apple Health
  • Initially, Stelo was not writing to Apple Health
  • At one point, I enabled Stelo's ability to write to Apple Health and the Loop readings were modified to the smoothed values and values less than 70 were deleted (see third graphic below)
  • After this experience, I disabled Stelo's ability to write to Apple Health

Test Timeline

Initial configuration:

  • I have Loop (3.6.3) and Trio (0.5.1.7) installed on my looping phone
    • I use Loop as my OS AID; Trio is installed for testing purposes
    • Both apps are able to detect Dexcom readings with no conflict
  • While wearing just a G7, I modified Trio : G7SensorKit to only look for prefix "DX01"
    • The Trio app stopped displaying glucose from the G7
    • The Loop app continued normally
  • I added a Stelo sensor while still wearing the G7
    • As soon as the Stelo warmed up, Trio picked up the readings from Stelo
    • The Trio app (and later Loop) detects and displays glucose readings every 5 minutes and has no limit at 70 or 250 mg/dL
    • The Stelo app displays smoothed readings at 15 minute intervals and indicates Below 70 or Above 250 with a truncated graph instead of actual readings at that level

Once the G7 sensor was past the grace period, I built Loop onto my looping phone with the G7SensorKit modification found in this PR, commit 8b18b0f.

  • Loop displayed Searching for Sensor and then picked up the Stelo device promptly
  • Loop and Trio continue to report the Stelo reading every 5 minutes.

Initially - I had not enabled Stelo to write to Health. Later, I enabled that and hit the "sync" button. This deleted values in Health, previously written to Health by Loop that were below range (see third graphic below). I then turned off ability of Stelo to write to Health again.

Graphics

G7, Stelo and Trio

The first graphic shows a trace that includes times when glucose was above 250 and then later below 70. I scaled the screenshots so that the 70 mg/dL line and 250 mg/dL values on the 3 graphs are vertically aligned and added horizontal lines indicating those values. Stelo and Trio show different values because Stelo only displays values at 15 minute interval - the one in the image is 9 minutes old - while Trio displays a newer reading. The smoothing applied by Stelo is readily apparent when comparing the Trio (and later Loop) graphs.

From left to right:

  • G7 app
  • Stelo app
  • Trio app
G7-Stelo-Trio_excerpt-scaled_with_labels




Loop and Stelo

The second graphic shows landscape views of the Stelo app on top and the Loop app on bottom. This is another instance where the glucose dipped below 70 mg/dL The smoothing applied by Stelo is apparent. This graphic was acquired while Stelo was not writing to Apple Health, so Loop plots the unmodified glucose.

Stelo-Loop



Loop and Stelo: Apple Health Interaction

The third graphic shows 2 landscape views of the Loop app before and after enabling Stelo's ability to write glucose to Apple Health. Loop reads those values back from Apple Health. Both Loop traces include a time when the glucose dipped below 70 mg/dL The lower trace demonstrates that for readings older than 3 hours, Loop plots the smoothed data and does not include values less than 70 mg/dL.

The Apple Health history is shown on the right. The times in the blue highlight show the gap in data from Stelo when the glucose was below 70 mg/dL.

stelo-deletes-low-values-from-health

Other changes

We should add some additional code to:

  • detect if a sensor is a G7, ONE+ or Stelo
  • modify the link to the Dexcom app based on the sensor type

This kind of change is needed whether this PR is added or not.

Right now, tapping on the glucose for a ONE+ attempts to open the G7 app.

@marionbarker marionbarker marked this pull request as draft August 3, 2025 00:16
@bjornoleh
Copy link

Regarding the app url, there was some discussion about this on Zulip quite some time ago:

https://loop.zulipchat.com/#narrow/channel/144182-development/topic/Stelo/near/476917339

Did you test changing it to stelo:// to verify that this is correct?

More info on Dexcom app urls here:
LoopKit/Loop#2243

@marionbarker
Copy link
Contributor Author

Just noticed another code changes required for this PR.

The time to expiration is set to 10 days, whereas Stelo (and soon there will be a 15-day version of G7) expires after 15 days.

.padding(.horizontal)
}.frame(maxWidth: .infinity)
Text(String(format: LocalizedString("%1$@ can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView (1: appName)"), self.appName))
Text(String(format: LocalizedString("%1$@ can read CGM data from the G7 platform, but you must still use the Dexcom App for pairing, calibration, alarms and other sensor management available to the sensor series (G7, ONE+, Stelo).\n\nWARNING: Dexcom Stelo app provides no alerts and alarms. Glucose alerts and alarms are not provided by %2$@.", comment: "Descriptive text on G7StartupView (1: appName, 2: appName)"), self.appName, self.appName))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wondering if this long string should be broken into two localized strings that are concatenated together. I think this would make it easier for localization tasks moving forward.

It is not true that Stelo provides no alerts or alarms. After wearing one for 15 days, I got plenty of alerts. Also, we want this submodule to be suitable for use with Trio as well as Loop. (And Trio does have alerts.) Perhaps we could say:
"Dexcom Stelo app does not provide the same critical alarms as G7 or ONE+."

@marionbarker
Copy link
Contributor Author

Thanks much for the assistance Daniel (@codebymini).

Test

These tests were successful.

Loop

Test Phone
I tested this with a test phone

  • Saw the expected changes when adding the G7 platform
  • Saw the "Unknown Sensor" header when tapping on the CGM icon from main screen
  • The G7 app opened when tapping on "Open Dexcom app"

Real Phone
I added this to my looping phone which is using my G7 sensor

  • Nominal behavior when leaving G7 connected
  • The G7 app opened when tapping on "Open Dexcom app:

I then deleted the CGM and added it back

  • Saw the expected changes when adding the G7 platform
  • Waited for Searching for Sensor to resolve (which it did on next reading)
  • Nominal behavior again

Trio

Test Phone
I tested using this branch of G7SensorKit to build Trio on a test phone.

  • Works as expected.

Real Phone
I keep a copy of Trio on my looping phone for testing purposes.

  • Trio is configured with a simulated pump but reads my Dexcom Sensor (G7 for this test)
  • Deleted CGM and added it back
  • Shows Unknown Sensor while searching
  • Picks up G7 on next signal

@marionbarker
Copy link
Contributor Author

Future tests planned.

I will be adding a Stelo as my next sensor. These are planned tests. Please comment if additional tests should be added.

  1. Insert the Stelo about a day before G7 expires
    • the app should continue using G7 because Stelo is not paired to Dexcom app
  2. Pair the Stelo sensor to the Stelo app while G7 is still active
    • find out what happens if 2 active / paired sensors are operating at the same time
    • If there is cross-talk, discuss best path forward while in this situation
  3. Once G7 reaches end of grace period, switch to using Stelo

Reminder to anyone testing with Stelo & question for @ps2

  • If you connect Stelo to health and have any excursion above 250 or below 70, then after 3 hours, Loop will discard its glucose readings in favor of Health and will show gaps instead of glucose
  • I suggest not allowing Stelo to write to health when you are using it as a looping sensor

Pete - Is this a solvable issue. Could a modification be made to the code that updates glucose reading at 3 hours?

@marionbarker
Copy link
Contributor Author

In-vivo test

I am running the latest version of this PR using a Stelo sensor with Loop. (~3 pm 11 Oct 2025, sensor start time).

@ps2 is concerned about lack of alerts. There are no alerts with Loop and few provided by Stelo - it can indicate a spike after a meal, but there are no notifications when going low.

I did run into this. My glucose got to the upper 50s before turning around and rising to normal levels while I was sleeping.
Note - This is also an issue for Nightscout as a CGM or Dexcom Share, both of which are CGM options for Loop, but can be ameliorated by adding alarms to internet-dependent systems.

After this experience, I enabled several alerts:

  • I turned on my Nightscout low and urgent low alerts
  • I set LoopFollow to use my Stelo as a keep-alive and enabled low alerts for LoopFollow
  • I also turned on my Trio notifications (which I previously had off).

I can run Trio in parallel to Loop and it picks up the Stelo signal in the same way that Loop does.

Both Trio and LoopFollow versions on my phone were modified. Trio uses the same G7SensorKit code as Loop. For LoopFollow, I just added "DX01" as the prefix to use for background refresh.

I will continue to run with this scenario - alerts from Nightscout and LoopFollow with notifications from Trio to get a feel for how well those alerts work.

@marionbarker
Copy link
Contributor Author

Opinion

I think this is a valid option to offer people who self-fund and find Stelo more cost effective than other options. I will go back and look at the warning messages.

Final Observations

After my experience where I reached mid-50 mg/dL overnight without an alert, I turned on several alerting features.

As a Loop user, I found using LoopFollow to be the best option. That allows me to set time-of-day alerts and gives easy access to snoozing the alerts (hit the volume button, then review the snooze screen or the Loop screen) when they happen.

Any Loop user who uses internet dependent CGM without alarms, should consider this as a choice.

For Trio users, they have in-app alerts. But even though I got haptic notifications on my watch from Trio, I still think I would want the LoopFollow low alert enabled.

Neither Loop with LoopFollow nor Trio allow for critical alerts, but they can be added to the apps allowed to run during sleeping and other focus modes.

Test Overlap

I tested when G7 sensor was in the grace period and started a Stelo.

  • There was no interference of the Stelo with Loop glucose readings
  • Once the G7 expired, Loop picked up Stelo but I can't remember if it was automatic and did not record that in my notes

I tested when the Stelo was in grace period and started a G7

  • There was no interference the glucose readings for Loop - it continue to read Stelo, not G7
  • I paired the phone to G7 about halfway through warmup and continued to get Stelo readings for Loop control
  • The Stelo expired at 11:45 pm, while I was asleep
    • I woke up around 12:30 am and noticed Loop had Sensor Expired reading
    • I tapped on scan under the Loop Stelo screen and it picked up the G7 and switched the screen formatting to say G7

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.

4 participants