Comments (5)
Does it show correctly in t:connect?
If you power off the pump, t:connect does something similar, assuming it delivered insulin at the basal rate till you power it back on...
from tconnectsync.
Yes, tconnect shows it correctly. There are no treatments entered in to nightscout for the manual stop or the manual restart but all treatments either side of the stop show up in nightscout.
from tconnectsync.
from tconnectsync.
Thanks for noticing and reporting this -- this is a perfect example of the sort of edge case that's easy to miss without either a lot of real-world use or very good test cases.
I've been looking into the data that tconnect returns from its API to pinpoint exactly how to detect when this situation occurs. Given the following data:
I was able to validate that the "0 u/hr Basal" basal events are properly being processed, as they show up in api.controliq.therapy_timeline
with a 0.0 basal. There is also an associated suspensionDeliveryEvent with the same timestamp:
{
'basal': {
'algorithmDeliveryEvents': [
...
{'y': 0.0, 'duration': 897, 'x': 1635195156}, # 1:52 PM
...
]
},
'suspensionDeliveryEvents': [
...
{'continuation': None, 'suspendReason': 'control-iq', 'x': 1635195156}, # 1:52 PM
...
]
}
But, like you mentioned, "Manual/Alarm" basal events are not currently working.
I discovered this is because a suspensionDeliveryEvent exists for it, but there is no associated delivery happening at that time:
{
'suspensionDeliveryEvents': [
{'continuation': None, 'suspendReason': 'manual', 'x': 1635188855} # 12:07 PM
]
}
I've added some code to catch this case and add a manual basal event for 0u/hr at the time of the manual suspension, with a duration lasting until the next basal event detected by the pump.
The event should appear in the nightscout API (at /api/v1/treatments) with reason "manual suspension".
from tconnectsync.
Thanks for your work on this project! Allows me to use openaps autotune again :)
from tconnectsync.
Related Issues (20)
- Get CGMTherapyEvent processed and logged to Nightscout
- Python 3.9.9 is Not Available for Heroku-22 Stack - Heroku Not Compiling App HOT 2
- Crash with "TypeError: get() got an unexpected keyword argument 'timeout'" HOT 2
- Issues with self-signed SSL cert on local install HOT 1
- Initial Install HOT 1
- docker crash v0.8.5 read timed out tconnectws2.tandemdiabetes.com HOT 1
- Question HOT 1
- heroku
- API Errors: Error occurred querying WS2 therapy_timeline_csv / get() got an unexpected keyword argument 'timeout' HOT 2
- Updating to a new version fails HOT 2
- Unknown therapy event type: Basal HOT 1
- Error: Cannot parse 2022-12-02+06:47:45.300389 00:00 as a valid ISO-8601 date HOT 21
- arrow.parser.ParserError: Could not match input '' to any of the following formats: ... HOT 1
- API Errors on startup ("Web Page Blocked!") HOT 7
- Heroku Free Resource causing app not to deploy HOT 2
- Bolus not updating in NS HOT 1
- Set up tconnectsync - login issues HOT 4
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) HOT 3
- Unable to Setup HOT 2
- Tier failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tconnectsync.