jwoglom / tconnectsync

Syncs data from Tandem Source (formerly t:connect) to Nightscout for the t:slim X2 and Mobi insulin pumps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cli returns empty array for basal data

PorkShoulderHolder opened this issue · comments

Not sure if I am missing something, but the csvdata["basalData"] is always an empty array, even when the the BASAL feature is specified. What could be going on here? IOB and boluses are returned without a problem.

You are correct -- the WS2 therapytimeline endpoint only contains pre-ControlIQ basal data. tconnectsync currently reads from this value regardless and merges it in for processing on the chance that you're inspecting a time interval which was before controliq was enabled on the pump. (I think it's based on whether your pump supports controliq in the firmware, rather than just toggling it on or off, but I haven't checked.)

Are you querying the ws2 endpoint manually or just looking into tconnectsync's code? The therapy_timeline endpoint should have the basal data you're looking for: https://github.com/jwoglom/tconnectsync/blob/master/tconnectsync/api/controliq.py#L106

Closing this issue due to inactivity, and because tconnectsync seems to be operating as designed (per how the tconnect API functions). Please re-open or create a new issue if you're still experiencing issues.