Skip to content

Feature Request: Improve glucose balancing under extreme weather conditions #3980

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

Open
MiryamMann opened this issue May 11, 2025 · 5 comments
Labels
enhancement New feature or request for_discussion

Comments

@MiryamMann
Copy link

Many people with type 1 diabetes experience noticeable changes in blood glucose levels during extreme weather, particularly during hot or freezing conditions.
I’d like to propose a new feature that integrates weather data (e.g., via an official meteorological API) into the balancing logic, so that environmental conditions can be taken into account dynamically.
This could help improve accuracy and safety for users during unusual climate events.

Let me know if this idea aligns with the project’s direction — I’d be happy to discuss possible implementation strategies.

@andyrozman
Copy link
Contributor

Theoretically connection to any weather API shouldn't be a problem, but each user would need to use its own credentials, because most of this services are not free...
Second problem I see that none of this weather changes are quantifiable... So you can't say that every person will need x times more insulin if weather changes from one day to another by y degrees... Not everybody has same requirements... Some people need more insulin and some people need less insulin if weather changes and not even they have the same amount all the time... Even collecting such data could be problematic (even if you do it on yourself), even for initial collection you would need to exactly record all the intakes and not leave anything out...
While idea seems intriguing, it would be hard to make and it wouldn't benefit that many people...
If you wanted to create learning model (sort of AI), you would need to collect a lot of data (from different users even), and any invalid data could skew the model (for example any data from me would be totally useless, because I don't record CH and in most of cases I let Loop run on its own, without even giving additional boluses)...

@MiryamMann
Copy link
Author

Thank you for replying.
I'll try to explain myself better.
The way I thought to do this is as follows:
The program would of course be optional for every user. There would be a setting option to raise the bolus ceiling on hot days — meaning, the loop would have more freedom to correct and balance high blood sugar levels.
The percentage increase in the ceiling would be determined by the user, through self-learning and self-research. For example, I would personally allow a margin of 15%.

Regarding the cost issue — I think that in my country (Israel) it is possible to use the API for free, and probably in other places too. If needed, I will conduct more serious research on this.
Does my idea sound more reasonable now?

@MiryamMann
Copy link
Author

MiryamMann commented May 12, 2025 via email

@TestManMars
Copy link

TestManMars commented May 12, 2025

I agree with @MiryamMann but I think the implementation should be different.

A research article from 1981 shows the following (sorry i couldnt find something more recent):
Image

How I think it can be done:

  • User creates API key for free weather reports (e.g. https://openweathermap.org/api/one-call-3).
  • The characteristics of the weather can optionally be used as triggers for automations (e.g. profile%, TT, etc.)

@andyrozman

  • "Not everybody has same requirements... Some people need more insulin and some people need less insulin if weather changes and not even they have the same amount all the time..." => We can leave this up to the user to decide right? For me setting up an automatic profile change to 60-80% would already decrease my mental workload and the chance of an unexpected hypo .

  • If you wanted to create learning model (sort of AI), you would need to collect a lot of data (from different users even), and any invalid data could skew the model (for example any data from me would be totally useless, because I don't record CH and in most of cases I let Loop run on its own, without even giving additional boluses)... => I think AI is indeed a lot of effort and will be not more reliable than a self defined automation rule.

@MiryamMann
Copy link
Author

MiryamMann commented May 12, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for_discussion
Projects
None yet
Development

No branches or pull requests

4 participants