-
Notifications
You must be signed in to change notification settings - Fork 72
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
Battery and insulin left #110
Comments
I'm not aware of either of those levels being present in Tandem's API. The closest thing to your "insulin left" request would be the "Cannula Age" which is pulled in automatically by tconnectsync if you have the "PUMP_EVENTS" feature enabled |
Darn, we have the issue that our child doesn't let us know. We are trying to get her to monitor better but we would like to know before either stop. |
That's understandable. We have a rule that the pump charges every night, before hopping in the shower, plug the pump in. |
@dfgas @adam-saul Hm... i'd suggest taking a look at https://github.com/jwoglom/tconnectsync/blob/master/tconnectsync/eventparser/events.json which contains Tandem's canonical definitions of pump-reported events. (Tandem Source loads this exact file when it generates reports.) I don't see any periodic reporting of how much insulin is left in a cartridge, but the pump does report the total amount of insulin loaded into the cartridge, and you could feasibly subtract the total insulin delivered so far from that amount to estimate the current total. There are events for low battery alerts, but no raw power delivery information that I can find. So while it might be possible to guesstimate, factoring in the lag of how frequently the t:connect pump app uploads to the cloud, I don't think there's a perfect solution per se. |
I looked a bit closer and, as part of the t:connect app reverse engineering work I did, I think there might actually be a few possibilities of things we can use here:
|
@dfgas in the latest version of tconnectsync, give this a try:
and you should see items like this reported in Nightscout's devicestatus: I'm not totally sure how Nightscout handles multiple entities pushing devicestatus data (e.g., both this and Loop/Xdrip/another CGM uploader), but hopefully it's smart enough to do the right thing here and show a separate pump status. For HA or other integration you should be able to do something like |
@jwoglom This is great! I had to add |
This seems to be not quite working for me. Tandem Mobi, self-hosted NightScout and tconnectsync. I am getting battery % data displayed on the Pump pill on Nightscout, but:
Output from tconnectsync doesn't seem to say much more than what I've just said:
All I can think is that 18% is the delta of the battery, which is actually now at 90%. Possibility? |
@jonwilts thanks for sharing... I was trying to decode the raw bytes and it's entirely possible I got it wrong. Would you be able to run tconnectsync in dry run/pretend mode with the device status feature enabled with debug logging on, and email me the output? I specifically want to see the raw bytes for the history log entries that are logged when the devicestatus processing grabs the pump events. The more data I have on approximate pump battery percentages vs the raw data will help in establishing test cases and fixing the calculation. Thanks! |
**EDITED: Forgot to use
Updated log below** Yes of course. Just obfuscated serial numbers, etc.
That include what you need? Thank you. |
@jonwilts can you take a look at the reported battery values for tconnectsync v2.2.2 and see if they're more accurate? |
Installed & running - I'll keep track of the nightscout vs. tandem reported battery levels and report back. |
Apologies for the delay in replying. Definitely still seeing some discrepancies. E.g. right now Nightscout showing 16% while pump is showing >80%. There are times when it does appear to align, and others when it varies wildly. Let me know if you need more log output. Thanks. |
Not a problem, but can I pull battery data and insulin left in the pump? If so I need to figure how to pull into home assistant.
The text was updated successfully, but these errors were encountered: