Open tzachi-dar opened 4 years ago
OK, so understanding the small holes is easy. Let's look at the logs carefully:
What happens at 21:00 2019-12-12 21:00:12 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:01:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:02:13 openaps.ns-loop Refreshed carbhistory; COB: 13
Bottom line is this: There have been temporary failures in the pump log, in which the pump history file did not exist. Since meal data is prepared by the ns loop, it contained wrong data.
Here are the full logs. 2019-12-12 21:00:32 openaps.pump-loop Retry 2 of preflight 2019-12-12 21:01:02 openaps.autosens-loop Completed oref0-autosens-loop at Thu Dec 12 21:01:02 IST 2019 2019-12-12 21:01:02 openaps.autosens-loop No need to refresh autosens yet: {"ratio":1} 2019-12-12 21:01:02 openaps.autosens-loop Starting oref0-autosens-loop at Thu Dec 12 21:01:02 IST 2019: 2019-12-12 21:01:02 openaps.ns-loop {"glucose":158,"dateString":"2019-12-12T20:57:17.296000+02:00"} 2019-12-12 21:01:02 openaps.ns-loop Glucose file is fresh 2019-12-12 21:01:02 openaps.ns-loop Starting oref0-ns-loop at Thu Dec 12 21:01:02 IST 2019: 2019-12-12 21:01:05 openaps.ns-loop Latest NS temptargets: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:01:05 openaps.ns-loop Merging local temptargets: (NOT VALID JSON: empty) 2019-12-12 21:01:05 openaps.ns-loop Temptargets merged: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:01:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:01:15 openaps.ns-loop {"BG":166,"IOB":0.889,"rate":null,"duration":null,"units":null} 2019-12-12 21:01:16 openaps.ns-loop Latest NS treatment: 2019-12-12T18:58:57.000Z 2019-12-12 21:01:20 openaps.pump-loop Couldn't invoke_pumphistory_etc - continuing 2019-12-12 21:01:20 openaps.pump-loop Preflight Preflight OK. Profile less than 60m old; Profile valid. Pump history update failed. Last record 2019-12-12T20:53:25+02:00 2019-12-12 21:01:20 openaps.pump-loop Retry 1 of refresh_pumphistory_and_meal 2019-12-12 21:01:21 openaps.ns-loop Completed oref0-ns-loop at Thu Dec 12 21:01:21 IST 2019 2019-12-12 21:01:21 openaps.ns-loop No new treatments to upload 2019-12-12 21:01:52 openaps.pump-loop Couldn't invoke_pumphistory_etc - continuing 2019-12-12 21:01:52 openaps.pump-loop Pump history update failed. Last record 2019-12-12T20:53:25+02:00 2019-12-12 21:01:53 openaps.pump-loop Continuing oref0-pump-loop at Thu Dec 12 21:01:53 IST 2019 2019-12-12 21:01:53 openaps.pump-loop Listening for 1s: .No interfering pump comms detected from other rigs (this is a good thing!) 2019-12-12 21:01:53 openaps.pump-loop Retry 2 of refresh_pumphistory_and_meal 2019-12-12 21:02:02 openaps.autosens-loop Completed oref0-autosens-loop at Thu Dec 12 21:02:02 IST 2019 2019-12-12 21:02:02 openaps.autosens-loop No need to refresh autosens yet: {"ratio":1} 2019-12-12 21:02:02 openaps.autosens-loop Starting oref0-autosens-loop at Thu Dec 12 21:02:02 IST 2019: 2019-12-12 21:02:02 openaps.ns-loop {"glucose":158,"dateString":"2019-12-12T20:57:17.296000+02:00"} 2019-12-12 21:02:02 openaps.ns-loop Glucose file is fresh 2019-12-12 21:02:02 openaps.ns-loop Starting oref0-ns-loop at Thu Dec 12 21:02:02 IST 2019: 2019-12-12 21:02:05 openaps.ns-loop Latest NS temptargets: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:02:05 openaps.ns-loop Merging local temptargets: (NOT VALID JSON: empty) 2019-12-12 21:02:05 openaps.ns-loop Temptargets merged: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:02:13 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:02:17 openaps.ns-loop {"BG":166,"IOB":0.889,"rate":null,"duration":null,"units":null} 2019-12-12 21:02:18 openaps.ns-loop Latest NS treatment: 2019-12-12T18:58:57.000Z 2019-12-12 21:02:24 openaps.ns-loop Completed oref0-ns-loop at Thu Dec 12 21:02:24 IST 2019 2019-12-12 21:02:24 openaps.ns-loop [{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:53:25+02:00","_type":"TempBasalDuration","id":"FgHZNRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:53:25+02:00","absolute":2,"rate":2,"raw_rate":{"timestamp":"2019-12-12T20:53:25+02:00","_type":"TempBasal","id":"M1DZNRRMEwA=","temp":"absolute","rate":2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:53:25.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:50:54+02:00","_type":"TempBasalDuration","id":"FgH2MhRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:50:54+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:50:54+02:00","_type":"TempBasal","id":"Mxj2MhRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:50:54.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:41:48+02:00","_type":"TempBasalDuration","id":"FgHwKRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:41:48+02:00","absolute":2,"rate":2,"raw_rate":{"timestamp":"2019-12-12T20:41:48+02:00","_type":"TempBasal","id":"M1DwKRRMEwA=","temp":"absolute","rate":2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:41:48.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:39:47+02:00","_type":"TempBasalDuration","id":"FgHvJxRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:39:47+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:39:47+02:00","_type":"TempBasal","id":"MxjvJxRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:39:47.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:36:59+02:00","_type":"TempBasalDuration","id":"FgH7JBRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:36:59+02:00","absolute":1.7,"rate":1.7,"raw_rate":{"timestamp":"2019-12-12T20:36:59+02:00","_type":"TempBasal","id":"M0T7JBRMEwA=","temp":"absolute","rate":1.7},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:36:59.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:29:13+02:00","_type":"TempBasalDuration","id":"FgHNHRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:29:13+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:29:13+02:00","_type":"TempBasal","id":"MxjNHRRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:29:13.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:19:04+02:00","_type":"TempBasalDuration","id":"FgHEExRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:19:04+02:00","absolute":1.2,"rate":1.2,"raw_rate":{"timestamp":"2019-12-12T20:19:04+02:00","_type":"TempBasal","id":"MzDEExRMEwA=","temp":"absolute","rate":1.2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:19:04.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:09:06+02:00","_type":"TempBasalDuration","id":"FgHGCRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:09:06+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:09:06+02:00","_type":"TempBasal","id":"MxjGCRRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:09:06.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:07:45+02:00","_type":"TempBasalDuration","id":"FgHtBxRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:07:45+02:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2019-12-12T20:07:45+02:00","_type":"TempBasal","id":"MwDtBxRMEwA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:07:45.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":120,"raw_duration":{"timestamp":"2019-12-12T19:50:15+02:00","_type":"TempBasalDuration","id":"FgTPMhNMEw==","duration (min)":120},"timestamp":"2019-12-12T19:50:15+02:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2019-12-12T19:50:15+02:00","_type":"TempBasal","id":"MwDPMhNMEwA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:50:15.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T19:42:14+02:00","_type":"TempBasalDuration","id":"FgHOKhNMEw==","duration (min)":30},"timestamp":"2019-12-12T19:42:14+02:00","absolute":0.5,"rate":0.5,"raw_rate":{"timestamp":"2019-12-12T19:42:14+02:00","_type":"TempBasal","id":"MxTOKhNMEwA=","temp":"absolute","rate":0.5},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:42:14.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T19:22:33+02:00","_type":"TempBasalDuration","id":"FgHhFhNMEw==","duration (min)":30},"timestamp":"2019-12-12T19:22:33+02:00","absolute":0.5,"rate":0.5,"raw_rate":{"timestamp":"2019-12-12T19:22:33+02:00","_type":"TempBasal","id":"MxThFhNMEwA=","temp":"absolute","rate":0.5},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:22:33.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120}] 2019-12-12 21:03:01 openaps.autosens-loop Completed oref0-autosens-loop at Thu Dec 12 21:03:01 IST 2019 2019-12-12 21:03:01 openaps.autosens-loop No need to refresh autosens yet: {"ratio":1} 2019-12-12 21:03:01 openaps.autosens-loop Starting oref0-autosens-loop at Thu Dec 12 21:03:01 IST 2019: 2019-12-12 21:03:01 openaps.ns-loop Starting oref0-ns-loop at Thu Dec 12 21:03:01 IST 2019: 2019-12-12 21:03:05 openaps.ns-loop Found recent valid BG: 2019-12-12 21:03:05 openaps.ns-loop {"glucose":158,"dateString":"2019-12-12T20:57:17.296000+02:00"} 2019-12-12 21:03:05 openaps.ns-loop {"sgv":158,"dateString":"2019-12-12T20:57:17.296000+02:00"} 2019-12-12 21:03:08 openaps.ns-loop Latest NS temptargets: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:03:08 openaps.ns-loop Merging local temptargets: (NOT VALID JSON: empty) 2019-12-12 21:03:08 openaps.ns-loop Temptargets merged: {"target":140,"duration":30,"start":"2019-11-05T20:58:07.772Z"} 2019-12-12 21:03:16 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:03:20 openaps.ns-loop {"BG":166,"IOB":0.889,"rate":null,"duration":null,"units":null} 2019-12-12 21:03:21 openaps.ns-loop Latest NS treatment: 2019-12-12T18:58:57.000Z 2019-12-12 21:03:27 openaps.ns-loop Completed oref0-ns-loop at Thu Dec 12 21:03:27 IST 2019 2019-12-12 21:03:27 openaps.ns-loop [{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:53:25+02:00","_type":"TempBasalDuration","id":"FgHZNRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:53:25+02:00","absolute":2,"rate":2,"raw_rate":{"timestamp":"2019-12-12T20:53:25+02:00","_type":"TempBasal","id":"M1DZNRRMEwA=","temp":"absolute","rate":2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:53:25.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:50:54+02:00","_type":"TempBasalDuration","id":"FgH2MhRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:50:54+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:50:54+02:00","_type":"TempBasal","id":"Mxj2MhRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:50:54.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:41:48+02:00","_type":"TempBasalDuration","id":"FgHwKRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:41:48+02:00","absolute":2,"rate":2,"raw_rate":{"timestamp":"2019-12-12T20:41:48+02:00","_type":"TempBasal","id":"M1DwKRRMEwA=","temp":"absolute","rate":2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:41:48.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:39:47+02:00","_type":"TempBasalDuration","id":"FgHvJxRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:39:47+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:39:47+02:00","_type":"TempBasal","id":"MxjvJxRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:39:47.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:36:59+02:00","_type":"TempBasalDuration","id":"FgH7JBRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:36:59+02:00","absolute":1.7,"rate":1.7,"raw_rate":{"timestamp":"2019-12-12T20:36:59+02:00","_type":"TempBasal","id":"M0T7JBRMEwA=","temp":"absolute","rate":1.7},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:36:59.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:29:13+02:00","_type":"TempBasalDuration","id":"FgHNHRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:29:13+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:29:13+02:00","_type":"TempBasal","id":"MxjNHRRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:29:13.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:19:04+02:00","_type":"TempBasalDuration","id":"FgHEExRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:19:04+02:00","absolute":1.2,"rate":1.2,"raw_rate":{"timestamp":"2019-12-12T20:19:04+02:00","_type":"TempBasal","id":"MzDEExRMEwA=","temp":"absolute","rate":1.2},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:19:04.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:09:06+02:00","_type":"TempBasalDuration","id":"FgHGCRRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:09:06+02:00","absolute":0.6,"rate":0.6,"raw_rate":{"timestamp":"2019-12-12T20:09:06+02:00","_type":"TempBasal","id":"MxjGCRRMEwA=","temp":"absolute","rate":0.6},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:09:06.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T20:07:45+02:00","_type":"TempBasalDuration","id":"FgHtBxRMEw==","duration (min)":30},"timestamp":"2019-12-12T20:07:45+02:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2019-12-12T20:07:45+02:00","_type":"TempBasal","id":"MwDtBxRMEwA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T18:07:45.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":120,"raw_duration":{"timestamp":"2019-12-12T19:50:15+02:00","_type":"TempBasalDuration","id":"FgTPMhNMEw==","duration (min)":120},"timestamp":"2019-12-12T19:50:15+02:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2019-12-12T19:50:15+02:00","_type":"TempBasal","id":"MwDPMhNMEwA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:50:15.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T19:42:14+02:00","_type":"TempBasalDuration","id":"FgHOKhNMEw==","duration (min)":30},"timestamp":"2019-12-12T19:42:14+02:00","absolute":0.5,"rate":0.5,"raw_rate":{"timestamp":"2019-12-12T19:42:14+02:00","_type":"TempBasal","id":"MxTOKhNMEwA=","temp":"absolute","rate":0.5},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:42:14.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120},{"duration":30,"raw_duration":{"timestamp":"2019-12-12T19:22:33+02:00","_type":"TempBasalDuration","id":"FgHhFhNMEw==","duration (min)":30},"timestamp":"2019-12-12T19:22:33+02:00","absolute":0.5,"rate":0.5,"raw_rate":{"timestamp":"2019-12-12T19:22:33+02:00","_type":"TempBasal","id":"MxThFhNMEwA=","temp":"absolute","rate":0.5},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2019-12-12T17:22:33.000Z","enteredBy":"openaps://medtronic/754","utcOffset":120}] 2019-12-12 21:03:47 openaps.pump-loop Continuing oref0-pump-loop at Thu Dec 12 21:03:47 IST 2019
This appears to be working as designed: if certain nonessential data fails to refresh from the pump, OpenAPS will continue to loop without it, falling back to COB=0 until it can be refreshed on a subsequent loop.
Thanks for your answer.
I guess you know the design, better than anyone, but I still don't see how that can happen constantly. Let me explain:
Here is a code path that will happen with every pump-loop:
main() { if retry_fail smb_check_everything; then }
function smb_check_everything { try_fail smb_reservoir_before }
function smb_reservoir_before {
retry_fail refresh_pumphistory_and_meal
}
function refresh_pumphistory_and_meal { try_return invoke_pumphistory_etc || return 1 }
function invoke_pumphistory_etc { read_pumphistory 2>&3 || return 1 }
function read_full_pumphistory() { // Will return 1 in the case of failure }
That is main will call smb_check_everything which will call smb_reservoir_before which will call refresh_pumphistory_and_meal which will call invoke_pumphistory_etc which will call read_pumphistory . read_pumphistory will call read_full_pumphistory that way or the other. A failure in read_full_pumphistory will return an error which will stop the pump loop.
So I don't understand how the pumploop can continue after such a failure. (Maybe another failure has happened).
Thanks for your help.
The COB=0 condition isn’t caused by a pumphistory refresh failure. As you say, that has to succeed to proceed. It’s the various pump profile/settings reads that can fail and still allow looping to proceed, even if COB can’t be calculated.
Thanks for the answer. I'll read the code and see what I'll find.
The COB data that is received from the pump was not consistent, as it looked from one rig.
More info: Looking at NS, it seems that for some time, two rigs could not agree on basal rates.
Looking at logs, it appears that the problem is related to COB. Sometimes pump things it is 0, while on other times, it thinks that it has a bigger value (which is probably the correct one).
As I don't have the debug logs, here is what I have (looking for COB).
2019-12-12 19:33:17 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:34:14 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:35:13 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:36:15 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:37:13 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:38:17 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:39:17 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:40:19 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:41:16 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:42:18 openaps.ns-loop Refreshed carbhistory; COB: 31 2019-12-12 19:43:17 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:44:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 19:45:34 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:46:17 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:47:17 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:48:16 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:49:17 openaps.ns-loop Refreshed carbhistory; COB: 30 2019-12-12 19:50:17 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:51:14 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:52:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 19:53:20 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:54:18 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:55:17 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:56:21 openaps.ns-loop Refreshed carbhistory; COB: 29 2019-12-12 19:57:19 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 19:58:16 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 19:59:13 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:00:20 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:01:19 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:02:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:03:24 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:04:16 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:05:17 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:06:23 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:07:16 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:08:17 openaps.ns-loop Refreshed carbhistory; COB: 27 2019-12-12 20:09:17 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:10:12 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:11:17 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:12:16 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:13:16 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:14:16 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:15:16 openaps.ns-loop Refreshed carbhistory; COB: 24 2019-12-12 20:16:16 openaps.ns-loop Refreshed carbhistory; COB: 23 2019-12-12 20:17:13 openaps.ns-loop Refreshed carbhistory; COB: 23 2019-12-12 20:18:13 openaps.ns-loop Refreshed carbhistory; COB: 23 2019-12-12 20:20:17 openaps.ns-loop Refreshed carbhistory; COB: 22 2019-12-12 20:21:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:22:12 openaps.ns-loop Refreshed carbhistory; COB: 22 2019-12-12 20:23:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:24:16 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:25:22 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:26:14 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:27:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:28:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:29:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:30:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:31:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:32:14 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:33:17 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:34:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:35:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:36:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:37:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:38:12 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:39:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:40:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:41:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:42:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:43:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:44:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:45:12 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:46:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:47:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:48:13 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:49:17 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:50:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:51:17 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:52:17 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:53:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:54:17 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-12 20:55:16 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 20:56:16 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-12 20:57:16 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-12 20:58:17 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 20:59:12 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:00:12 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:01:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:02:13 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:03:16 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:04:22 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:05:16 openaps.ns-loop Refreshed carbhistory; COB: 13 2019-12-12 21:06:16 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:07:13 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:08:12 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:09:12 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:10:18 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:11:17 openaps.ns-loop Refreshed carbhistory; COB: 9 2019-12-12 21:12:12 openaps.ns-loop Refreshed carbhistory; COB: 9 2019-12-12 21:13:12 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:14:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:15:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:16:16 openaps.ns-loop Refreshed carbhistory; COB: 7 2019-12-12 21:17:13 openaps.ns-loop Refreshed carbhistory; COB: 7 2019-12-12 21:18:12 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:19:13 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:20:12 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:21:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:22:15 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:23:21 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:24:16 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:25:14 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:26:18 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:27:13 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:28:13 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:29:14 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:30:13 openaps.ns-loop Refreshed carbhistory; COB: 12 2019-12-12 21:31:16 openaps.ns-loop Refreshed carbhistory; COB: 11 2019-12-12 21:32:13 openaps.ns-loop Refreshed carbhistory; COB: 11 2019-12-12 21:33:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:34:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-12 21:35:11 openaps.ns-loop Refreshed carbhistory; COB: 0
My speculation is that the issue is caused because of a failure in read_full_pumphistory In such a case, the file monitor/pumphistory-24h-zoned.json is deleted, and the call to oref0-meal monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json > monitor/meal.json.new
is being done without carbs.
A careful read of the logs show that this is happening almost every day, although for a smaller period, so it should be easy to understand what is going on there.
for example: 2019-12-11 07:32:18 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-11 07:33:12 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-11 07:34:11 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-11 07:35:12 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-11 07:36:12 openaps.ns-loop Refreshed carbhistory; COB: 15 2019-12-11 07:37:15 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:38:12 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:39:11 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:40:11 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:41:12 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:42:17 openaps.ns-loop Refreshed carbhistory; COB: 0 2019-12-11 07:43:11 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:44:12 openaps.ns-loop Refreshed carbhistory; COB: 14 2019-12-11 07:45:11 openaps.ns-loop Refreshed carbhistory; COB: 14