Add Temp Basal Rate
Hi, can you add temp basal rate?
If the source provide it and you can explain me more about... What does "temp" means? Are there also other basal rates? What source are you using?
As I do not wear a pump, I do not have much experience and knowledge about this...
Yes, it is about pump. It seems that we need to add parsing of one additional field (nigthscout) - pump.tempBasal.rate For example in nigthscout:
What about the current basal rate? Do you have experience in using the nightscout api? If yes, do you know, where to get these values? As I do not have such values, I can not test it in my nightscout instance.
Are you also using AAPS? It may provide such data in its broadcast...
api/v1/devicestatus.json { "_id": "68b81d336688ef066f368336", "created_at": "2025-09-03T10:49:22.820Z", "device": "openaps://samsung SM-A155F", "pump": { "status": { "status": "норма", "timestamp": "2025-09-03T10:49:17.751Z" }, "extended": { "Version": "3.3.1.3-a62f40c607-2025.03.05-19.35", "ActiveProfile": "boleem", "TempBasalAbsoluteRate": 0, "TempBasalStart": "03.09.2025 13:49", "TempBasalRemaining": 119, "LastBolus": "03.09.2025 12:37", "LastBolusAmount": 1.2, "BaseBasalRate": 0.15 }, "reservoir": 31, "clock": "2025-09-03T10:49:22.822Z" }, "openaps": { "enacted": { "algorithm": "SMB", "runningDynamicIsf": false, "timestamp": "2025-09-03T10:49:12.262Z", "bg": 196, "tick": "+6", "eventualBG": 93, "targetBG": 108, "insulinReq": 0, "deliverAt": "2025-09-03T10:49:12.262Z", "sensitivityRatio": 0.88, "reason": "COB: 6, Dev: 6,1, BGI: -0,7, ISF: 22,2, CR: 13, Target: 6,0, minPredBG 3,1, minGuardBG 5,1, IOBpredBG 2,2, COBpredBG 5,2; Eventual BG 5,2 \u003C 6,0, setting 120m zero temp. ", "duration": 120, "rate": 0, "predBGs": { "IOB": [196, 201, 204, 205, 205, 204, 202, 198, 193, 186, 179, 170, 160, 150, 141, 132, 124, 115, 107, 100, 93, 86, 80, 74, 69, 63, 58, 54, 50, 46, 42, 39], "ZT": [196, 184, 172, 160, 148, 136, 125, 113, 103, 92, 82, 72, 63, 54, 46, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39], "COB": [196, 201, 205, 209, 212, 213, 215, 215, 215, 214, 213, 211, 208, 205, 201, 197, 193, 187, 182, 175, 169, 162, 155, 150, 144, 139, 134, 129, 125, 121, 118, 114, 111, 108, 106, 103, 101, 99, 98, 97, 95, 94, 94, 93, 93, 92, 92, 93] }, "COB": 6.01810633213859, "IOB": 0.681, "variable_sens": 0, "consoleLog": [ "Sensitivity ratio set to 0.88 based on temp target of 108.0; ", "Adjusting basal from 0.15 to 0.132; ", "ISF from 351.0 to 398.9", "EventualBG is 93.0 ;", "minPredBG: 55.0 minIOBPredBG: 39.0 minZTGuardBG: -18.0", " minCOBPredBG: 92.0" ], "consoleError": [ "CR:13.0", "Threshold set from 4,1 to 4,5; ", "SMB disabled due to high temptarget of 108.0", "profile.sens: 351.0, sens: 398.9, CSF: 30.684615384615384", "Last carbs 72minutes ago; remainingCATime:5.2hours;60% carbs absorbed", "Carb Impact: 18.2 mg/dL per 5m; CI Duration: 1.7 hours; remaining CI (~2h peak): 0.0 mg/dL per 5m", "predCIs (mg/dL/5m):17 16 16 15 14 13 12 11 10 9 8 7 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "remainingCIs: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "UAM Impact: 18.2 mg/dL per 5m; UAM Duration: 2.8 hours", " avgPredBG: 55.0 COB: 6.018106332138592 / 15.0", "BG projected to remain above 6,0 for 170 minutes", "naive_eventualBG: -76.0 bgUndershoot: 157.0 zeroTempDuration 240 zeroTempEffect: 239 carbsReq: -5" ], "received": true, "requested": { "duration": 120, "rate": 0, "temp": "absolute", "smb": 0 }, "smb": 0 }, "suggested": { "algorithm": "SMB", "runningDynamicIsf": false, "timestamp": "2025-09-03T10:49:14.743Z", "bg": 196, "tick": "+6", "eventualBG": 93, "targetBG": 108, "insulinReq": 0, "deliverAt": "2025-09-03T10:49:12.262Z", "sensitivityRatio": 0.88, "reason": "COB: 6, Dev: 6,1, BGI: -0,7, ISF: 22,2, CR: 13, Target: 6,0, minPredBG 3,1, minGuardBG 5,1, IOBpredBG 2,2, COBpredBG 5,2; Eventual BG 5,2 \u003C 6,0, setting 120m zero temp. ", "duration": 120, "rate": 0, "predBGs": { "IOB": [196, 201, 204, 205, 205, 204, 202, 198, 193, 186, 179, 170, 160, 150, 141, 132, 124, 115, 107, 100, 93, 86, 80, 74, 69, 63, 58, 54, 50, 46, 42, 39], "ZT": [196, 184, 172, 160, 148, 136, 125, 113, 103, 92, 82, 72, 63, 54, 46, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39], "COB": [196, 201, 205, 209, 212, 213, 215, 215, 215, 214, 213, 211, 208, 205, 201, 197, 193, 187, 182, 175, 169, 162, 155, 150, 144, 139, 134, 129, 125, 121, 118, 114, 111, 108, 106, 103, 101, 99, 98, 97, 95, 94, 94, 93, 93, 92, 92, 93] }, "COB": 6.01810633213859, "IOB": 0.681, "variable_sens": 0, "consoleLog": [ "Sensitivity ratio set to 0.88 based on temp target of 108.0; ", "Adjusting basal from 0.15 to 0.132; ", "ISF from 351.0 to 398.9", "EventualBG is 93.0 ;", "minPredBG: 55.0 minIOBPredBG: 39.0 minZTGuardBG: -18.0", " minCOBPredBG: 92.0" ], "consoleError": [ "CR:13.0", "Threshold set from 4,1 to 4,5; ", "SMB disabled due to high temptarget of 108.0", "profile.sens: 351.0, sens: 398.9, CSF: 30.684615384615384", "Last carbs 72minutes ago; remainingCATime:5.2hours;60% carbs absorbed", "Carb Impact: 18.2 mg/dL per 5m; CI Duration: 1.7 hours; remaining CI (~2h peak): 0.0 mg/dL per 5m", "predCIs (mg/dL/5m):17 16 16 15 14 13 12 11 10 9 8 7 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "remainingCIs: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "UAM Impact: 18.2 mg/dL per 5m; UAM Duration: 2.8 hours", " avgPredBG: 55.0 COB: 6.018106332138592 / 15.0", "BG projected to remain above 6,0 for 170 minutes", "naive_eventualBG: -76.0 bgUndershoot: 157.0 zeroTempDuration 240 zeroTempEffect: 239 carbsReq: -5" ], "isfMgdlForCarbs": 351 }, "iob": { "iob": 0.681, "basaliob": -0.152, "activity": 0.0061, "time": "2025-09-03T10:49:14.743Z" } }, "uploaderBattery": 82, "isCharging": false, "configuration": {
},
"mills": 1756896562820
},
api/v1/treatments.json
{ "_id": "68b81da46688ef066f36833a", "created_at": "2025-09-03T10:51:16.643Z", "enteredBy": "openaps://AndroidAPS", "eventType": "Temp Basal", "isValid": true, "duration": 30, "durationInMilliseconds": 1800000, "type": "NORMAL", "rate": 0.05, "absolute": 0.05, "pumpId": 1722449856452, "pumpType": "OMNIPOD_DASH", "pumpSerial": "4241", "mills": 1756896676643, "carbs": null, "insulin": null },
Thank you for providing the data!!!
treatments.json shows the last value, but this is more an event and does not show the current value (afaik).
devicestatus.json has a lot of data, which may cause higher battery usage. Can you verify, that the data in devicestatus.json it the current one display in the nightscout dashboard?
Can you also check /api/v1/entries/current.json endpoint?
current.json
[ { "_id": "68b827206688ef066f36838d", "device": "Unknown", "date": 1756899042000, "dateString": "2025-09-03T11:30:42.000Z", "isValid": true, "sgv": 201, "direction": "Flat", "type": "sgv", "created_at": "2025-09-03T11:31:44.400Z" } ]
Can you verify, that the data in devicestatus.json it the current one display in the nightscout dashboard?
Yes, it is
Thank you, one more check for API v2:
/api/v2/properties/iob,cob,basal
Can you check the result and say me if the IOB, COB values are correct and which of the basal values is needed (basal, tempbasal or/and totalbasal)?
Maybe the v2 API makes more sense to retrieve these data...
/api/v2/properties/iob,cob,basal
{ "iob": { "iob": 0.898, "basaliob": -0.065, "activity": 0.0085, "source": "OpenAPS", "device": "openaps://samsung SM-A155F", "mills": 1756903094779, "treatmentIob": 1.253, "display": "0.90", "displayLine": "IOB: 0.90U" }, "cob": { "cob": 33.1322008021847, "source": "OpenAPS", "device": "openaps://samsung SM-A155F", "mills": 1756903094779, "display": 33.1, "displayLine": "COB: 33.1g" }, "basal": { "display": "T: 0.700U", "current": { "basal": 0.18, "treatment": { "_id": "68b834de6688ef066f36840d", "created_at": "2025-09-03T12:30:22.580Z", "enteredBy": "openaps://AndroidAPS", "eventType": "Temp Basal", "isValid": true, "duration": 30, "durationInMilliseconds": 1800000, "type": "NORMAL", "rate": 0.7, "absolute": 0.7, "pumpId": 1722449856468, "pumpType": "OMNIPOD_DASH", "pumpSerial": "4241", "mills": 1756902622580, "mgdl": 86, "endmills": 1756904422580 }, "combobolustreatment": null, "tempbasal": 0.7, "combobolusbasal": 0, "totalbasal": 0.7 } } }
In nigthscout basal display 0.70 (basa.teambasal or basal.display may be)
Thank you for the information!!!
Maybe the totalbasal may also contains the correct value. If you do not have any temp basal, I would be interested in the values again...
Can you explain me the difference between temp basal and current basal? Is temp basal the manually added one (for meal)?
the pump itself sets the temporary basal if need to correct current profile basal
maybe we'll take the field basal.display? it is always correct and "T" said that it is a temp
Ok, if you the pump will not do it as your current basal is enough, please check again the api endpoint to verify, if the totalbasal field is correct.
I do not like to use the display field, as it is a string, which must be parsed, I prefer using the correct field. That´s why I need to know, which is the correct field.
{ "iob": { "iob": 1.74, "basaliob": 0.01, "activity": 0.0112, "source": "OpenAPS", "device": "openaps://samsung SM-A155F", "mills": 1756904415348, "treatmentIob": 1.996, "display": "1.74", "displayLine": "IOB: 1.74U" }, "cob": { "cob": 26.7253583376003, "source": "OpenAPS", "device": "openaps://samsung SM-A155F", "mills": 1756904415348, "display": 26.7, "displayLine": "COB: 26.7g" }, "basal": { "display": "0.180U", "current": { "basal": 0.18, "treatment": null, "combobolustreatment": null, "tempbasal": 0.18, "combobolusbasal": 0, "totalbasal": 0.18 } } }
Now is using current basal, totalbasal is ok
Great! So "totalbasal" seems to be the correct field. But do you need to know, if it is a temp basal? I mean, do you need the "T" in the display?
No, i dont need "T".
Ok, now I have to check, if there is a possibility to get the data from AAPS or xDrip+ direct.
But it will take some time until this is available, because at the moment I´m working on the next release and have already some high tasks for the version after. But I will try to include it asap..
Thank you As to me , i am follower, and get this value from nitghtscout
And who is using AAPS? Do you have access to this device, also?
The biggest problem for me is to integrate it in the current layouts :-/
And who is using AAPS? Do you have access to this device, also? My son, yes, i have access