These are chat archives for nightscout/intend-to-bolus

20th
Mar 2019
Zach Gohr
@zgohr
Mar 20 04:07
if anyone else starts seeing 2019/03/19 23:00:27 MEDTRONIC_PUMP_ID environment variable is not set - i just updated my dev branch and i ended up having to set pump_serial in my preferences.json.. the loop must have recently stopped reading it from pump.ini or something but i haven’t dug further yet
Dave Acklam
@dcacklam
Mar 20 07:02
Same issue here
Did a git pull last night and everything died
Just wiped my entire (Edison) rig clean and still have it
Dave Acklam
@dcacklam
Mar 20 07:08
And it's something wrong with the get prefs routine
I have gotten more normal behavior by editing oref0-pump-loop and hardcoding my pump ID, but the loop is still broke
Something is breaking get_pref_string, which is breaking everything else
Dave Acklam
@dcacklam
Mar 20 07:17
Bug report submitted, but i'd really like to know how far back I have to roll the git to get a working loop again
Dave Acklam
@dcacklam
Mar 20 07:23
May have figured it out... Preferences.json change
It's trying to pull stuff out of preferences.json that was in .ini files earlier is my best-guess...
Because it is looking for the pump serial in a JSON file instead of myopenaps/pump.ini...
Stargazer32584
@Stargazer32584
Mar 20 07:29

@cluckj After 2 hours, there is no reaction with 'l'. Here are the results of 'systemctl status cron':

root@APS:/home/pi# systemctl status cron
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Tue 2019-03-19 21:17:43 CET; 11h ago
Docs: man:cron(8)
Main PID: 210 (cron)
CGroup: /system.slice/cron.service
└─210 /usr/sbin/cron -f

Mar 19 21:17:43 APS systemd[1]: Started Regular background program processing da
Mar 19 21:17:43 APS cron[210]: (CRON) INFO (pidfile fd = 3)
Mar 19 21:17:43 APS cron[210]: (CRON) INFO (Running @reboot jobs)
Mar 20 07:17:01 APS CRON[1640]: pam_unix(cron:session): session opened for user
Mar 20 07:17:01 APS CRON[1644]: (root) CMD ( cd / && run-parts --report /etc/c
Mar 20 07:17:01 APS CRON[1640]: pam_unix(cron:session): session closed for user
Mar 20 08:17:01 APS CRON[1809]: pam_unix(cron:session): session opened for user
Mar 20 08:17:01 APS CRON[1813]: (root) CMD ( cd / && run-parts --report /etc/c
Mar 20 08:17:01 APS CRON[1809]: pam_unix(cron:session): session closed for user
lines 1-17/17 (END)

Dave Acklam
@dcacklam
Mar 20 07:29

Now getting: /root/src/oref0/lib/determine-basal/cob.js:8
var glucose_data = inputs.glucose_data.map(function prepGlucose (obj) {
^

TypeError: Cannot read property 'map' of undefined
at detectCarbAbsorption (/root/src/oref0/lib/determine-basal/cob.js:8:44)
at recentCarbs (/root/src/oref0/lib/meal/total.js:104:13)
at generate (/root/src/oref0/lib/meal/index.js:20:26)
at Object.<anonymous> (/root/src/oref0/bin/oref0-meal.js:122:23)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)

After putting the default preferences file back
Dave Acklam
@dcacklam
Mar 20 08:50
Further investigation: Above was due to my CGM source being offline, the entire 'dead loop with MEDTRONIC_PUMP_ID' error is due to changes in preferences.json not being addressed after git pull
tepidjuice
@tepidjuice
Mar 20 09:36
Still getting cannot connect to CC111x radio on /dev/spidev5.1
any debugging tips? Has my board had an annuerism?
tepidjuice
@tepidjuice
Mar 20 10:46
Fixed by flashing the radio chip. This was not mentioned in the docs so I've made the following: openaps/docs#1442
Stargazer32584
@Stargazer32584
Mar 20 11:01
@cluckj Cron problem is fixed. Now i wait for looping..
TheMeisi
@TheMeisi
Mar 20 12:44

Hi everybody!
I am not able to access my nightscout site since yesterday evening. I also get upload errors in my logs (see copy below). Anybody any ideas? thx

Mar 19 21:21:09 meisirig2 ns-loop.log: parse error: Invalid numeric literal at line 1, column 10
Mar 19 21:21:10 meisirig2 ns-loop.log: Traceback (most recent call last):
Mar 19 21:21:10 meisirig2 ns-loop.log: File "/usr/local/bin/openaps-use", line 63, in <module>
Mar 19 21:21:10 meisirig2 ns-loop.log: app( )
Mar 19 21:21:10 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
Mar 19 21:21:10 meisirig2 ns-loop.log: self.run(self.args)
Mar 19 21:21:10 meisirig2 ns-loop.log: File "/usr/local/bin/openaps-use", line 57, in run
Mar 19 21:21:10 meisirig2 ns-loop.log: output = app(args, self)
Mar 19 21:21:10 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/uses/init.py", line 92, in call
Mar 19 21:21:10 meisirig2 ns-loop.log: return self.method.selected(args)(args, app)
Mar 19 21:21:10 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/uses/init.py", line 31, in call
Mar 19 21:21:11 meisirig2 ns-loop.log: return self.method(args, app)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in call
Mar 19 21:21:11 meisirig2 ns-loop.log: output = self.main(args, app)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/init.py", line 88, in main
Mar 19 21:21:11 meisirig2 ns-loop.log: inputs = self.get_program(args)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/init.py", line 60, in get_program
Mar 19 21:21:11 meisirig2 ns-loop.log: program = json.load(argparse.FileType('r')(params.get('input')))
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/lib/python2.7/json/init.py", line 290, in load
Mar 19 21:21:11 meisirig2 ns-loop.log: **kw)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/lib/python2.7/json/init.py", line 338, in loads
Mar 19 21:21:11 meisirig2 ns-loop.log: return _default_decoder.decode(s)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
Mar 19 21:21:11 meisirig2 ns-loop.log: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
Mar 19 21:21:11 meisirig2 ns-loop.log: raise ValueError("No JSON object could be decoded")
Mar 19 21:21:11 meisirig2 ns-loop.log: ValueError: No JSON object could be decoded
Mar 19 21:21:11 meisirig2 ns-loop.log: Traceback (most recent call last):
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/bin/openaps-use", line 63, in <module>
Mar 19 21:21:11 meisirig2 ns-loop.log: app( )
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
Mar 19 21:21:11 meisirig2 ns-loop.log: self.run(self.args)
Mar 19 21:21:11 meisirig2 ns-loop.log: File "/usr/local/bin/openaps-use", line 57, in run

ok, short update:
I just re-deployed the app again on heroku and everything seems to work again.....
Stargazer32584
@Stargazer32584
Mar 20 13:21

@cluckj After some loops, i have this message from the x12-fix:

'Starting oref0-pump-loop at Wed 20 Mar 14:17:08 CET 2019 with 8 second wait_for_silence:
Waiting up to 4 minutes for new BG: First loop: not waiting

Listening for 8s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 14:17:18 CET 2019
Preflight (x12 models do not support SMB safety checks, SMB will not be available.) OK. Profile less than 60m old; Profile valid. Full history refreshed through null
meal.json Warning: could not parse monitor/carbhistory.json

Warning: setting mealCOB to 0 because currentDeviation is null/undefined
refreshed: {"carbs":0,"nsCarbs":0,"bwCarbs":0,"journalCarbs":0,"mealCOB":0,"currentDeviation":null,"maxDeviation":0,"minDeviation":999,"slopeFromMaxDeviation":0,"slopeFromMinDeviation":999,"allDeviations":[],"lastCarbTime":0,"bwFound":false}
Listening for 8s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 14:18:02 CET 2019
Checking that pump clock: "2019-03-20T14:18:59+01:00" is within 90s of current time: 2019-03-20T14:18:04+0100
Error: pumphistory-24h >5m old (or empty)
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 5 s silence before mmtuning

Listening for 5s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 14:18:14 CET 2019
Listening for 5 s silence before mmtuning: Listening for 5s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 14:18:20 CET 2019
mmtune: "868.450", 3, -27
No wait required.
If pump and rig are close enough, this error usually self-resolves. Stand by for the next loop.
Unsuccessful oref0-pump-loop at Wed 20 Mar 14:18:47 CET 2019
'

I missed the green signs. The mdt's are all correct !

Jon Cluck
@cluckj
Mar 20 15:07
Error: pumphistory-24h >5m old (or empty)
if the pump hasn't looped or been used in >24h, the pumphistory is probably empty
set a temp basal or do a tiny bolus?
@dcacklam did you add pump_serial to your preferences.json?
Scott Leibrand
@scottleibrand
Mar 20 15:29
@acember I just recalled that the Pi has a time file it writes to disk periodically, so it doesn’t go all the way back to 1999 like the Edison does.
Stargazer32584
@Stargazer32584
Mar 20 16:47

@cluckj Alright. Bolus is done. So...that's the message:

Starting oref0-pump-loop at Wed 20 Mar 17:32:08 CET 2019 with 1 second wait_for_silence:
Waiting up to 4 minutes for new BG: ........................
Listening for 1s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 17:37:13 CET 2019
Preflight (x12 models do not support SMB safety checks, SMB will not be available.) OK. Profile less than 60m old; Profile valid. Pump history updated through 2019-03-20T17:23:26+01:00 with 0 new records; meal.json Warning: could not parse monitor/carbhistory.json
refreshed: {"carbs":0,"nsCarbs":0,"bwCarbs":0,"journalCarbs":0,"mealCOB":0,"currentDeviation":-0.67,"maxDeviation":0,"minDeviation":999,"slopeFromMaxDeviation":0,"slopeFromMinDeviation":999,"allDeviations":[-1],"lastCarbTime":0,"bwFound":false}
Listening for 10s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed 20 Mar 17:38:10 CET 2019
Checking that pump clock: "2019-03-20T17:39:07+01:00" is within 90s of current time: 2019-03-20T17:38:12+0100
Temp refreshed: monitor/temp_basal.json: {"duration":0,"temp":"absolute","rate":1.75}
{"carbs":0,"nsCarbs":0,"bwCarbs":0,"journalCarbs":0,"mealCOB":0,"currentDeviation":-0.67,"maxDeviation":0,"minDeviation":999,"slopeFromMaxDeviation":0,"slopeFromMinDeviation":999,"allDeviations":[-1],"lastCarbTime":0,"bwFound":false}
{"iob":0.293,"activity":0.0008,"basaliob":0,"bolusiob":0.293,"netbasalinsulin":0,"bolusinsulin":0.3,"time":"2019-03-20T16:39:11.000Z","iobWithZeroTemp":{"iob":0.293,"activity":0.0008,"basaliob":0,"bolusiob":0.293,"netbasalinsulin":0,"bolusinsulin":0.3,"time":"2019-03-20T16:39:11.000Z"},"lastBolusTime":1553099006000,"lastTemp":{"date":0}}
{"delta":-0.71,"glucose":193,"noise":1,"short_avgdelta":-0.71,"long_avgdelta":-1.45,"date":1553098492410,"last_cal":0}
null
No deliverAt found.
{"reason":"If current system time Wed Mar 20 2019 17:39:08 GMT+0100 (CET) is correct, then BG data is too old. The last BG data was read 24.3m ago at Wed Mar 20 2019 17:14:52 GMT+0100 (CET). Temp 1.75 <= current basal 3U/hr; doing nothing. "}
Couldn't smb_verify_suggested
oref0-pump-loop failed. Waiting up to 4 minutes for new BG: ........................
Unsuccessful oref0-pump-loop (BG too old) at Wed 20 Mar 17:44:12 CET 2019

On the oled, there is only the symbol of the battery and a little point on the left side. At a new start of the system is the unicorn. That's usual. But after the first update of the HAT... .

Jon Cluck
@cluckj
Mar 20 16:49
it may take a little while to populate the rig with all the data it needs, but check nightscout to see if the BG data is there?
Stargazer32584
@Stargazer32584
Mar 20 17:09
@cluckj Yepp....seems to be running. I can see the manual bolus on nightscout. For me...the whole project depends on the "npm install npm@latest -g" command. Especally for the Pi with HAT.
Jon Cluck
@cluckj
Mar 20 17:09
great
Stargazer32584
@Stargazer32584
Mar 20 17:09
Thank you so much !
Jon Cluck
@cluckj
Mar 20 17:10
thanks for helping to figure out the issue with npm :D
are you running x12-fix?
Stargazer32584
@Stargazer32584
Mar 20 17:13
In the moment, i wait only for the display. How long should i wait ? System is online since 30 minutes.
Jon Cluck
@cluckj
Mar 20 17:14
it may have crashed due to lack of data: systemctl restart openaps-menu will restart it
Jon Cluck
@cluckj
Mar 20 17:25
@tzachi-dar have you tested openaps/oref0#1225 ?
tzachi-dar
@tzachi-dar
Mar 20 17:49
@cluckj did not have the time to do it yet. I intend to install a new rig tomorrow, so I'll be able to test it.
Jon Cluck
@cluckj
Mar 20 17:55
:D thanks
2 successes (not including me) so far
Stargazer32584
@Stargazer32584
Mar 20 18:16

@cluckj Ah...display is online.

Yes...i running your x12-fix. And it is perfect for us...!! For my sister and me..

Stargazer32584
@Stargazer32584
Mar 20 19:24
But one question is in my mind. What is the reason, that the background of the display in black, and then, lately and sometimes, it is green ?
Jon Cluck
@cluckj
Mar 20 19:31
rotating the pixels like that will prevent them from burning down unevenly, but it can be turned off/to other modes (instructions are in the openaps-menu readme)
Dana Lewis
@danamlewis
Mar 20 19:34
@cluckj I think we’re good to merge your x12 fix with 2 other testers
TranceCake
@TranceCake
Mar 20 20:10
Hi! I am testing @cluckj 's update-setup branch and I am seeing an error in ns-looplog that I have seen before, it crashes ns, does anyone know anything about that?
the rig is looping correctly
Jon Cluck
@cluckj
Mar 20 20:18
is it the upload{} thing?
Jon Cluck
@cluckj
Mar 20 20:34
err, uploader{}
TranceCake
@TranceCake
Mar 20 20:59
yeah