jwoglom / tconnectsync

Syncs data from Tandem Source (formerly t:connect) to Nightscout for the t:slim X2 and Mobi insulin pumps
MIT License
113 stars 62 forks source link

Bolus is not displayed in Nightscout when there's a "glucose" property in the MongoDB document #109

Open HockeyTrafalgar opened 2 days ago

HockeyTrafalgar commented 2 days ago

I've noticed that some boluses that are imported to Nightscout by tconnectsync are not displayed on the Nightscout timeline. By comparing the documents in the "treatments" collection I've figured out that the problem is with the "glucose" field:

{ _id: ObjectId('6712477db4e184956acc623a'), eventType: 'Combo Bolus', created_at: '2024-10-17T18:09:45.000Z', insulin: 0.4, notes: 'Standard Bolus (Override)', enteredBy: 'Pump (tconnectsync)', pump_event_id: '1726261,1726246,1726247,1726248', glucose: 218, utcOffset: 240 },

If I remove this field from the document manually and restart Nightscout, the bolus appears on the timeline. Nightscout version 15.0.0.

jwoglom commented 1 day ago

Huh, that's bizarre. Honestly feels like a Nightscout bug to me? I think it's expected that you can specify a BG value in the same object as a treatment.

jwoglom commented 1 day ago

Are there any errors in the Nightscout web client or the server logs?