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

10th
Jun 2018
Scott Leibrand
@scottleibrand
Jun 10 2018 02:11
@N3FM AFAIK that warning is just a warning, and doesn't hurt anything, but lots of people complain about it, so if you can figure out how to fix that'd be great. I think @cjo20 looked into it at one point and verified it was harmless, but I don't know if he has a fix or not.
Samuchco
@Samuchco
Jun 10 2018 03:11
Had to change pump due to button failure. Did a reset of setting
I did a run again cd && ~/src/oref0/bin/oref0-setup.sh and set the new pump serial number.
While pump is looping, it is not showing openaps or pump on NS. Neither boluses or temp basals
Has an "unknown" on openaps pill
I cleared the mlab and compressed the size file.
Samuchco
@Samuchco
Jun 10 2018 03:19
Jun 09 23:13:20 loop2 pump-loop.log: cat: monitor/status.json: No such file or directory
Jun 09 23:13:21 loop2 pump-loop.log: /usr/local/bin/oref0-pump-loop: line 568: test: ==: unary operator expected
Jun 09 23:13:21 loop2 pump-loop.log: cat: monitor/status.json: No such file or directory
Samuchco
@Samuchco
Jun 10 2018 07:36
Resolved
Martin Haeberli
@mhaeberli
Jun 10 2018 07:46
:+1: @samuchco how?
Roclave
@roclave__twitter
Jun 10 2018 17:19
I have successfully installed and started looping. Everything is working 100% except for Nightscout. Have tried a LOT of things, and Googled a LOT, but I am stuck. When Nightscout page loads, it does not appear to load correctly in my timezone. I have tried the deleting of future treatments, checked and rechecked time zones on pump and rig, and reset. However it still is not working. I went as far as setting up a new Nightscout page - and the same happens (without linked to any diabetes "stuff") when I open the app - the time zone is incorrect. The most recent time displayed at the bottom is about 2 - 3 hours old I'd say. I've tried adding TZ with my timezone in the config vars, but no luck there either. I am loving everything these past two days, but with no view of things via nightscout, it really is just not great and will not work for me :( Please can someone help. (p.s. I am in South Africa (which has Johannesburg listed as its city, just in terms of the timezone I am working with).
Scott Leibrand
@scottleibrand
Jun 10 2018 17:22
@roclave__twitter what does your pump-loop.log say the current rig and pump time are?
Roclave
@roclave__twitter
Jun 10 2018 17:57
Checking pump clock: "2018-06-10T19:49:18+02:00" is within 90s of current time: Sun Jun 10 19:49:20 SAST 2018 - this is what displays when running "l". I am in South African time zone, which is also what I have set Nightscout to. Nightscout displays very little - no glucose (just three lines), the time values that are supposed to be to the side are missing, but it is displaying IOB and Basal. no graphs - I need to move the middle bar to see anything, but then it only displays basal profiles.
@scottleibrand thanks :)
@scottleibrand also - this is another message in the log - Mismatched number of resumes(5) and suspends(8)!
pumphistoryMismatched number of resumes(5) and suspends(8)!
Warning: clock input Invalid Date is unzoned; please pass clock-zoned.json instead
and meal.json
Mismatched number of resumes(5) and suspends(8)!
Mismatched number of resumes(5) and suspends(8)!
Roclave
@roclave__twitter
Jun 10 2018 18:22
@scottleibrand although I saw that you responded to another question about those errors :smile:
@scottleibrand everything else is running so great. I can definitely see the difference vs my 640g. So would love to get the NS issue resolved.... you guys have done an amazing job!
Scott Leibrand
@scottleibrand
Jun 10 2018 18:42
Did you ever do openaps first-upload?
katie disimone
@Kdisimone
Jun 10 2018 18:54
for new pi0 rig…0.7.0-dev is what needs testing?
Scott Leibrand
@scottleibrand
Jun 10 2018 19:04
Or if you’re up for it, 0.7.0-refactor.
katie disimone
@Kdisimone
Jun 10 2018 19:08
sure :+1:
Roclave
@roclave__twitter
Jun 10 2018 19:11
@scottleibrand first upload? Not sure what you mean.
tynbendad
@tynbendad
Jun 10 2018 19:14
does anyone know if you can setup bluetooth tethering on your rig (edison) to more than one phone and it will use whichever phone is nearby at the time (or the strongest if both are)?
i'd guess not since oref0 setup uses only 1 bt address
Scott Leibrand
@scottleibrand
Jun 10 2018 19:15
@roclave__twitter search the docs for that.
@tynbendad just put in both MACs into crontab, separated by a space.
It will try them in the order listed until it connects to one.
tynbendad
@tynbendad
Jun 10 2018 19:16
awesome Scott, thanks!
katie disimone
@Kdisimone
Jun 10 2018 19:19
twice now on setup script for pi0 i’ve gotten the following message. ignore?
removed battery-status ! bash -c "sudo ~/src/openaps-menu/scripts/getvoltage.sh > monitor/edison-battery.json"
added battery-status ! bash -c "sudo ~/src/openaps-menu/scripts/getvoltage.sh > monitor/edison-battery.json"
Resetting spi_serial
Traceback (most recent call last):
  File "/usr/local/bin/reset_spi_serial.py", line 2, in <module>
    import spi_serial
  File "/usr/local/lib/python2.7/dist-packages/spi_serial/__init__.py", line 1, in <module>
    from .spi_serial import *
  File "/usr/local/lib/python2.7/dist-packages/spi_serial/spi_serial.py", line 1, in <module>
    import mraa as m
ImportError: No module named mraa
Schedule openaps in cron? y/[N]
nevermind…can’t ignore based on pump-loop
what’s the manual install for mraa?
Jon Cluck
@cluckj
Jun 10 2018 19:24
are you installing master?
katie disimone
@Kdisimone
Jun 10 2018 19:24
yes as the first pass and then was going to switch
Jon Cluck
@cluckj
Jun 10 2018 19:25
the installer is broken for the pi on the latest raspbian image with master
katie disimone
@Kdisimone
Jun 10 2018 19:25
ah…ok, i’ll go manual to start. thanks
Jon Cluck
@cluckj
Jun 10 2018 19:26
hold on, let me get you the patch that fixes it in dev :)
katie disimone
@Kdisimone
Jun 10 2018 19:26
:+1: thanks
Scott Leibrand
@scottleibrand
Jun 10 2018 19:27
We probably need to test both the upgrade and the fresh install paths at some point.
katie disimone
@Kdisimone
Jun 10 2018 19:28
i’m coming at this with testing how a brand new setup would go. and right now, you’re dropped into the master via installation script.
(what i showed above)
Scott Leibrand
@scottleibrand
Jun 10 2018 19:28
Well, after 0.7.0 is released a brand new setup wouldn’t install 0.6.x first.
Jon Cluck
@cluckj
Jun 10 2018 19:28
yeah >_<
Scott Leibrand
@scottleibrand
Jun 10 2018 19:29
So reproducing a fresh install would mean doing the Ctrl-C thing before oref0-setup, checking out and installing the branch to test, and doing oref0-setup with that.
katie disimone
@Kdisimone
Jun 10 2018 19:30
you want me to try that with 0.7.0-refactor?
Scott Leibrand
@scottleibrand
Jun 10 2018 19:30
Letting it install with master first tests the upgrade path, which is what most existing users would end up doing.
They both need testing, I don’t have a preference which to test first.
Jon Cluck
@cluckj
Jun 10 2018 19:30
the kernel version changed on the 4/18 raspbian, broke that check that installs MRAA, and I missed patching it before the latest release
katie disimone
@Kdisimone
Jun 10 2018 19:31
btw, i think pibakery would be an easier start for most people to setup raspberian and the initial wpa_supplicant.conf. Mind if i PR that into docs?
Scott Leibrand
@scottleibrand
Jun 10 2018 19:32
I’ve never heard of that. Would be interested to see how it’d work.
So yes please.
katie disimone
@Kdisimone
Jun 10 2018 19:33
Screen Shot 2018-06-10 at 11.50.20 AM.png
Jon Cluck
@cluckj
Jun 10 2018 19:33
oh that's really really cool
katie disimone
@Kdisimone
Jun 10 2018 19:33
basically, does the download of rasperian lite (and full, but you can easily select which to use). then a quick drag/drop for initial install. it does the ssh file, wpa_supplicant, flash, and your sd card is ready
Dana Lewis
@danamlewis
Jun 10 2018 19:34
Nice
katie disimone
@Kdisimone
Jun 10 2018 19:34
Screen Shot 2018-06-10 at 12.22.27 AM.png
basically kind of like this.
but, don’t need the bottom two…i was just playing around
Dana Lewis
@danamlewis
Jun 10 2018 19:35
This is why we like Pi 😊 lots of other good tools in the ecosystem
katie disimone
@Kdisimone
Jun 10 2018 19:35
then you click the “write” button, select your card and it does it all
Jon Cluck
@cluckj
Jun 10 2018 19:35
:D
katie disimone
@Kdisimone
Jun 10 2018 19:36
now i need to change the word raspberry. i hate typing that word
Dana Lewis
@danamlewis
Jun 10 2018 19:36
Heh
Travis Cannell
@diabeticpilot
Jun 10 2018 19:42
I just updated to the latest version of 0.7.0-dev on my Edison with a 715 and it looks like it is having issues reading/updating the meal.json. Any ideas on this error or what is going on?
Retry 2 of refresh_pumphistory_and_meal
Pump history updated through 2018-06-10T12:05:24-07:00; meal.json Could not parse input data:  SyntaxError: Unexpected end of JSON input
    at Object.parse (native)
    at Object.<anonymous> (/root/src/oref0/bin/oref0-meal.js:50:38)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:160:9)
{ "carbs": 0, "mealCOB": 0, "reason": "Could not parse input data" }
{"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}
Couldn't check_cp_meal - continuing
Roclave
@roclave__twitter
Jun 10 2018 19:56
@scottleibrand thanks a million! That had fixed it.
Scott Leibrand
@scottleibrand
Jun 10 2018 20:00
@diabeticpilot line 50 of oref0-meal is: var basalprofile_data = JSON.parse(fs.readFileSync(basalprofile_input, 'utf8'));
so I'd check your settings/basal_profile.json
Jon Cluck
@cluckj
Jun 10 2018 20:10
oo, enable serial console
katie disimone
@Kdisimone
Jun 10 2018 20:12
@cluckj i’ve never been on pi before…but the pibakery sure does look like it could more easily setup some of the peskier parts early
the serial console was one of those
Scott Leibrand
@scottleibrand
Jun 10 2018 20:16
sweet
Jon Cluck
@cluckj
Jun 10 2018 20:16
yeah, a few of us have been playing with network-manager as an alternative to the oref0 managed connectivity scripts, and the big pain is trying to get access to the pi and configure network-manager
oh no I'm out of spare pi0s
cluckj @cluckj gasps
Jon Cluck
@cluckj
Jun 10 2018 20:19
I'll play around with pibakery this week too after I go to microcenter :)
Scott Leibrand
@scottleibrand
Jun 10 2018 20:29
Can we get someone with Carelink and/or MDT Enlite CGM to re-test openaps/oref0#1007 (the oref0 dev branch) with the latest 0.6.2-dev changes and give us a 👍for merging to master and releasing as 0.6.2?
katie disimone
@Kdisimone
Jun 10 2018 21:05
run npm run global-install before setup script for 0.7.0-refactor, correct?
Scott Leibrand
@scottleibrand
Jun 10 2018 21:06
yes
I tried it without, and it didn't work. :)
(what I tried was switching from 0.7.0-dev to 0.7.0-refactor with just a git checkout 0.7.0-refactor)
katie disimone
@Kdisimone
Jun 10 2018 21:06
lol, just the first time i’ve seen an npm ERR! message before
got me double thinking my thoughts
Screen Shot 2018-06-10 at 2.06.18 PM.png
haha, just picked up that comma fix?
katie disimone
@Kdisimone
Jun 10 2018 21:38
this is encouraging….maybe i’ll eventually get a loop on this pi
Screen Shot 2018-06-10 at 2.37.54 PM.png
crap. error in crontab file
Would you like to remove your existing crontab first? y/[N] y
no crontab for root
no crontab for root
no crontab for root
"-":3: bad command
errors in crontab file, can't install.
NIGHTSCOUT_HOST=https://blahblah.herokuapp.com
API_SECRET=6f413b7d68996XXXXXXXXXXXXXXXX
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/bin:/bin:/usr/local/go/bin:/bin:/bin
* * * * * cd /root/myopenaps && oref0-cron-every-minute
@reboot cd /root/myopenaps && oref0-cron-post-reboot
5 4 * * * cd /root/myopenaps && oref0-cron-nightly
*/15 * * * * cd /root/myopenaps && oref0-cron-every-15min
any ideas?
Scott Leibrand
@scottleibrand
Jun 10 2018 21:42
lemme poke
I think that's this:
    #TODO: don't try to add DEXCOM_CGM_ID unless it exists
    (crontab -l; crontab -l | grep -q "DEXCOM_CGM_ID=" || echo DEXCOM_CGM_ID=$BLE_SERIAL) | crontab -
so, assuming you're not trying to set up a G4, that's a harmless warning, and we just need to do that TODO
and since I've now spent more time tracking that down than it'll take to fix it, lemme do so
katie disimone
@Kdisimone
Jun 10 2018 21:47
g5
Scott Leibrand
@scottleibrand
Jun 10 2018 21:48
k, ignore and proceed for now
katie disimone
@Kdisimone
Jun 10 2018 21:48
:+1:
mmtune: Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
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 Sun 10 Jun 14:49:23 PDT 2018
grep: monitor/temp_basal.json: No such file or directory
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/dev/i2c-1'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at peripheralSync (/root/src/openaps-menu/node_modules/i2c-bus/i2c-bus.js:95:21)
    at Bus.i2cWriteSync (/root/src/openaps-menu/node_modules/i2c-bus/i2c-bus.js:348:23)
    at Oled._transfer (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:136:25)
    at Oled._initialise (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:110:10)
    at new Oled (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:81:8)
    at Object.Display.init (/root/src/openaps-menu/lib/display/ssd1306.js:36:24)
    at module.exports (/root/src/openaps-menu/lib/display/ssd1306.js:68:13)
    at Object.<anonymous> (/root/src/openaps-menu/scripts/status.js:41:68)
0.7.0-refactor
Scott Leibrand
@scottleibrand
Jun 10 2018 21:50
have you rebooted yet?
not sure if the script properly makes you do so
katie disimone
@Kdisimone
Jun 10 2018 21:50
no reboot , i’ll do now
Scott Leibrand
@scottleibrand
Jun 10 2018 21:51
k, and assuming a reboot fixes that error, we'll need to make oref0-setup enforce a reboot, as i2c won't work without it
katie disimone
@Kdisimone
Jun 10 2018 21:51
:+1:
cute
IMG_2456.JPG
Scott Leibrand
@scottleibrand
Jun 10 2018 21:52
:-D
$ git commit -m"don't try to add DEXCOM_CGM_ID unless it exists" -a
[0.7.0-refactor c9c8782] don't try to add DEXCOM_CGM_ID unless it exists
katie disimone
@Kdisimone
Jun 10 2018 21:59
well now...
Screen Shot 2018-06-10 at 2.59.38 PM.png
Scott Leibrand
@scottleibrand
Jun 10 2018 22:00
:-)
Jon Cluck
@cluckj
Jun 10 2018 22:19
:clap:
katie disimone
@Kdisimone
Jun 10 2018 22:21
best practice shutoff for HAT? just flip power switch?
want to try installing this with the serial OTG active now
Scott Leibrand
@scottleibrand
Jun 10 2018 22:22
I usually just flip the switch, ya
there is a Reboot option in the System menu, but no Halt (yet)
katie disimone
@Kdisimone
Jun 10 2018 22:22
thanks
Jon Cluck
@cluckj
Jun 10 2018 22:32
I thought I put a shutdown in there
Scott Leibrand
@scottleibrand
Jun 10 2018 22:34
~/src/openaps-menu $ grep -r shutdown *
config/menus/menu.json: "command": "echo Rebooting in; echo 1 minute; shutdown -r",
config/menus/menu.json: "command": "shutdown -c; echo Reboot canceled",
if so it's not in master
Jon Cluck
@cluckj
Jun 10 2018 22:37
oh well
yeah I think I did it a loooong time ago, then it disappeared in a merge
Tim Gunn
@Tornado-Tim
Jun 10 2018 22:38
Can we turn off the HAT off after the shutdown, ie: the screen remains on after shutdown......
tynbendad
@tynbendad
Jun 10 2018 22:43
strangely, i just installed dev branch oref0 and even though it says it is 0.6.2-dev, it acts older... there's no flask in cron (so no offline webpage), and autotune runs very slow again.
Jon Cluck
@cluckj
Jun 10 2018 22:55
@Tornado-Tim yes
Scott Leibrand
@scottleibrand
Jun 10 2018 22:59
@cluckj how?
Jon Cluck
@cluckj
Jun 10 2018 23:07
put a "screen off" script into systemd to be run at shutdown
I'm not sure if the screen is the only thing running after the pi is shutdown, though
Scott Leibrand
@scottleibrand
Jun 10 2018 23:09
are you volunteering? or do you have any pointers for what the "screen off" script would do?
Jon Cluck
@cluckj
Jun 10 2018 23:12
yeah (to the former)
Tim Gunn
@Tornado-Tim
Jun 10 2018 23:14
But if the screen remains on, that means power is still active on the HAT.... I wonder if there is a way to turn off the board by using the GPIO controller
Jon Cluck
@cluckj
Jun 10 2018 23:14
^ right
turning off the screen is as simple as sending the screen adisplay.oled.turnOffDisplay();command, but I'm not sure what else on the hat is drawing power :)
Scott Leibrand
@scottleibrand
Jun 10 2018 23:35
could also use a volunteer or two to test 0.6.2-dev (the dev branch): openaps/oref0#1007