Skip to content

Add Stelo support #30

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

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