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

23rd
Apr 2019
Dana Lewis
@danamlewis
Apr 23 00:09
:+1:
Jason G
@jguyea
Apr 23 00:46
@cluckj Jon, a fresh image and install of dev netted me 'Radio check failed. ImportError: No module named spi_serial'. and cannot connect to RFM69HCW radio on /dev/spidev0.0. Not sure what setup options I selected but now back on 0.0? I connected back to that pin but still got no connection to pump. Im rerunning setup specifying --tty=/dev/spidev0.1 and --hardwaretype='rfm69hcw' to see if that works
Jon Cluck
@cluckj
Apr 23 00:53
the spi_serial error is something unrelated: https://gist.github.com/danamlewis/ed73bd2008def086a334a7102f6005bd
what does your preferences.json say about your ttyport?
Jason G
@jguyea
Apr 23 00:57
@cluckj awe, I thought this was merged in with setup-improvements branch. preferences says: "ttyport": "/dev/spidev0.1",
Jon Cluck
@cluckj
Apr 23 00:59
okay cool, you probably shouldn't have to re-run setup
Jason G
@jguyea
Apr 23 00:59
but setup is currently running... don't know what it was before I started.
Jon Cluck
@cluckj
Apr 23 01:02
it was having some unintended side effects, so it was reverted before setup-improvements was merged
Jason G
@jguyea
Apr 23 01:03
:thumbsup:
so I'll "git checkout setup-improvements && npm run global-install" ?
or do the install_mraa.sh step?
Jon Cluck
@cluckj
Apr 23 01:06
no need, dev has that stuff already :)
you want the "Dev Installation" part
Jason G
@jguyea
Apr 23 01:08
K... I'll "npm remove oref0 -g" once setup is complete.
LuminaryXion
@LuminaryXion
Apr 23 09:24

okay, I'll send you a list :)

whenever you're ready ^_^

Jon Cluck
@cluckj
Apr 23 13:11
@LuminaryXion In this order from least time-intensive to most: check the image you used by downloading a new one, or if you're using pibakery, switch to the Etcher instructions; try a different SD card if you've got one; download and install the packages it's failing on manually from archive.raspbian.org & use dpkg -i (this option is a huuuuuge time sink)
I'm suggesting those because having the same exact error after a new flash of raspbian usually means it's something wrong with the image (you can run a hash check or download a new image), flashing process (switch to the other instructions), or the local debian mirror (download from archive.debian.org)
NSewar
@nsewar01
Apr 23 15:11
tryinng to set up pi hat rig and keep getting the error: Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
sudo: npm: command not found
Scott Leibrand
@scottleibrand
Apr 23 15:39
try bash /tmp/openaps-install.sh dev
(after the curl to download openaps-install.sh)
davidvjr
@davidvjr
Apr 23 15:49
So i've recently got my rig up and looping, thanks @cluckj! But this morning I was trying to add a new wifi network. I decided to practice using terminus on my phone to ssh in. I ran nano /etc/wpa_supplicant/wpa_supplicant.conf but I think I misspelled .conf as .confa. Now I'm not looping, seems to run a full loop once in a while, like it looped 45 minutes ago. I've rebooted several times, I can ssh in, I changed pump (712) battery. I'm running the dev branch. Heres my log:
Starting oref0-pump-loop at Tue Apr 23 11:30:03 EDT 2019 with 4 second wait_for_silence:
Waiting up to 4 minutes for new BG: glucose.json newer than pump_loop_completed

Listening for 4s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 11:30:09 EDT 2019
Preflight fail. Retry 1 of preflight
Preflight (x12 models do not support SMB safety checks, SMB will not be available.) OK. Profile less than 60m old; Profile valid. Couldn't invoke_pumphistory_etc - continuing
Retry 1 of refresh_pumphistory_and_meal
Pump history update failed. Last record 2019-04-23T10:30:35-04:00
Couldn't invoke_pumphistory_etc - continuing
Listening for 10s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 11:31:19 EDT 2019
Retry 2 of refresh_pumphistory_and_meal
Pump history update failed. Last record 2019-04-23T10:30:35-04:00
Couldn't invoke_pumphistory_etc - continuing
Listening for 4s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 11:31:40 EDT 2019
Retry 3 of refresh_pumphistory_and_meal
Pump history update failed. Last record 2019-04-23T10:30:35-04:00
Couldn't invoke_pumphistory_etc - continuing
Couldn't refresh_pumphistory_and_meal
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 45 s silence before mmtuning
Listening for 45s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 11:32:43 EDT 2019
Listening for 45 s silence before mmtuning: Listening for 45s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 11:33:29 EDT 2019
mmtune: "868.300", 1, -52 -- "868.350", 1, -52
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 Tue Apr 23 11:33:51 EDT 2019
I'm afraid I messed up a file trying to edit from the terminus console. Any suggestions?
Scott Leibrand
@scottleibrand
Apr 23 15:52
ssh in and do ls -la /etc/wpa_supplicant/wpa* to see if there's a .confa file.
how far is the rig from the pump? that's a bit odd that you're getting consistent Pump history update failed. with an rssi of -52
davidvjr
@davidvjr
Apr 23 15:56
root@edisonrig:~# cd /etc/wpa_supplicant root@edisonrig:/etc/wpa_supplicant# ls action_wpa.sh wpa_supplicant.conf.1555600739.bak functions.sh wpa_supplicant.conf.946685500.bak ifupdown.sh wpa_supplicant.conf.946686278.bak wpa_supplicant.conf wpa_supplicant.conf.946686409.bak root@edisonrig:/etc/wpa_supplicant# more wpa_supplicant.conf
Looks like I didn't make a new file. Pump and rig are next to each other. I thought the same about the pump history failed... so I changed pump battery.
root@edisonrig:~# cd /etc/wpa_supplicant
root@edisonrig:/etc/wpa_supplicant# ls
action_wpa.sh        wpa_supplicant.conf.1555600739.bak
functions.sh         wpa_supplicant.conf.946685500.bak
ifupdown.sh          wpa_supplicant.conf.946686278.bak
wpa_supplicant.conf  wpa_supplicant.conf.946686409.bak
root@edisonrig:/etc/wpa_supplicant# more wpa_supplicant.conf
davidvjr
@davidvjr
Apr 23 16:02
Is there a way to check the battery level on the rig if your not looping? Because I just plugged a usb into the rig to rule out the rig battery... and bam. Got a loop.
I thought it charged all night but it's in a new printed case. I think possibly the usb cable wasn't fully seated?
Scott Leibrand
@scottleibrand
Apr 23 16:08
@davidvjr I suggested ls -la /etc/wpa_supplicant/wpa* to show file sizes too
hmm, I wonder if there's something related to peak voltage causing issues with the rig's ability to do sustained RF? not sure I've ever seen that before
cat /root/myopenaps/monitor/edison-battery.json; echo
davidvjr
@davidvjr
Apr 23 16:40
root@edisonrig:~# ls -la /etc/wpa_supplicant/wpa*
-rw-r--r-- 1 root root 486 Apr 23 09:41 /etc/wpa_supplicant/wpa_supplicant.conf
-rw-r--r-- 1 root root 127 Apr 18 11:18 /etc/wpa_supplicant/wpa_supplicant.conf.1555600739.bak
-rw-r--r-- 1 root root 127 Dec 31  1999 /etc/wpa_supplicant/wpa_supplicant.conf.946685500.bak
-rw-r--r-- 1 root root  57 Dec 31  1999 /etc/wpa_supplicant/wpa_supplicant.conf.946686278.bak
-rw-r--r-- 1 root root 120 Dec 31  1999 /etc/wpa_supplicant/wpa_supplicant.conf.946686409.bak
Sorry Scott!
root@edisonrig:~# cat /root/myopenaps/monitor/edison-battery.json; echo
{"batteryVoltage":3580, "battery":36}
The rig is charging now though...
Scott Leibrand
@scottleibrand
Apr 23 16:44
:+1:
davidvjr
@davidvjr
Apr 23 16:44
Are the sizes the numbers before .bak?
Scott Leibrand
@scottleibrand
Apr 23 16:44
no, after root root
the .bak files were from old editor sessions, probably before you added the additional networks
davidvjr
@davidvjr
Apr 23 16:51
OK, thanks. Trying to learn all I can!
So were you saying, if my battery is low, it has enough juice to perform most operations, but when it is trying to communicate with the pump, it's failing?
NSewar
@nsewar01
Apr 23 16:58
@scottleibrand thanks for your command; "bash /tmp/openaps-install.sh dev" it worked just fine!
Scott Leibrand
@scottleibrand
Apr 23 17:12
:+1:
Denis Shevchenko
@denisshevchenko
Apr 23 17:16
Hi there! I just installed OpenAPS, I see the beautiful unicorn on the screen, but l command returns this error:
Starting oref0-pump-loop at Tue 23 Apr 13:11:07 -04 2019 with 6 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
ImportError: No module named spi_serial

Radio check failed. ImportError: No module named spi_serial
2019-04-23 13:11:35,681 ERROR port is not set in pump.ini. Please set port to your serial device, e.g. /dev/mmeowlink
Listening for 40s silence before mmtuning: ....
How can I fix it?
Scott Leibrand
@scottleibrand
Apr 23 17:16
what hardware are you using?
Scott Leibrand
@scottleibrand
Apr 23 17:17
looks like your oref0-setup options may have been incorrect: try re-running setup and make sure you select the Explorer HAT option?
Denis Shevchenko
@denisshevchenko
Apr 23 17:18
Okay, will try it. Thanks!
Scott Leibrand
@scottleibrand
Apr 23 17:18
follow the openaps docs, except use bash /tmp/openaps-install.sh dev instead of bash /tmp/openaps-install.sh
bobhavlin
@bobhavlin
Apr 23 17:22
Is there some instructions for using openaps for an MDI user to optimize ISF, CR, and basal ? I found the following: https://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/autotune.html?highlight=mdi openaps/oref0#341 and installed and ran correctly, but I think I need to configure insulins, etc. Any ideas where to look?
Scott Leibrand
@scottleibrand
Apr 23 17:26
autotuneweb might be the easiest way to run autotune for MDI
you'll need to configure a NS profile with an hourly basal rate that approximates the insulin activity of your basal injections
the simple version of that is to take your daily basal dose and divide it up over 24h to get an hourly average for it to start from
bobhavlin
@bobhavlin
Apr 23 17:30
I tried the web version, but the numbers seemed to be diverging. So I tried running the dev/autotune-mdi and I think it ran ok, but I was trying to customize the insulin curve.
Scott Leibrand
@scottleibrand
Apr 23 17:40
hmm, k. we unfortunately haven't had much chance to work with MDI users to make autotune work reliably there. one known issue is that you likely don't have temp basal records, so we'd need to make sure that autotune is using the profile basals (rather than the autotuned ones) for further autotuning
Denis Shevchenko
@denisshevchenko
Apr 23 17:44
How can I re-install it? It said that oref0 already exists and it's not an empty directory..
Scott Leibrand
@scottleibrand
Apr 23 17:48
that's fine, it should keep going and do / re-do the rest
Denis Shevchenko
@denisshevchenko
Apr 23 18:00
Well, it doesn't look like fine, because the latest lines are these ones:
...
openaps installed
openaps 0.2.1-dev
fatal: destination path 'oref0' already exists and is not an empty directory.
~# l
Anyway, I can figure it out in the source code..
Denis Shevchenko
@denisshevchenko
Apr 23 18:06
Thanks @cluckj! I removed it..
Jon Cluck
@cluckj
Apr 23 18:07
running cd ~/src/oref0 && git checkout dev && git pull will put you at this spot in the docs: https://openaps.readthedocs.io/en/latest/docs/Build%20Your%20Rig/pi-install.html#switch-to-dev-branch-for-your-pi-hat
Denis Shevchenko
@denisshevchenko
Apr 23 19:04

Maybe the problem is here? I see this:

Explorer Board HAT detected. 
Configuring for Explorer Board HAT. 
Would you like to [D]ownload released precompiled Go pump communication library or install an [U]nofficial (possibly untested) version.[D]/U

And I'm choosing D. Is it correct?

Jon Cluck
@cluckj
Apr 23 19:11
yes
Denis Shevchenko
@denisshevchenko
Apr 23 19:24
Nah, the same error
Starting oref0-pump-loop at Tue 23 Apr 14:48:10 -04 2019 with 10 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
ImportError: No module named spi_serial

Radio check failed. ImportError: No module named spi_serial
2019-04-23 14:48:50,620 ERROR port is not set in pump.ini. Please set port to your serial device, e.g. /dev/mmeowlink
Listening for 40s silence before mmtuning: ........
I guess that ImportError: No module named spi_serial is the core of problem, right?
Denis Shevchenko
@denisshevchenko
Apr 23 19:46
This is my installation parameters:
/root/src/oref0/bin/oref0-setup.sh --dir=/root/myopenaps --serial=792849 --cgm=MDT --ns-host=https://MY-APP.herokuapp.com --api-secret=MY-SECRET --tty=/dev/spidev0.0 --max_iob=0 --enable=' autotune ' --radio_locale='WW' --hardwaretype='explorer-hat'
Jon Cluck
@cluckj
Apr 23 19:53
@denisshevchenko can you run npm remove oref0 -g and see if that fixes the problem?
Denis Shevchenko
@denisshevchenko
Apr 23 19:56
is trying now...
npm remove oref0 -g
removed 1 package in 103.859s
So? Should I run oref0-setup.sh again?
Jon Cluck
@cluckj
Apr 23 19:59
nope, just reboot
Denis Shevchenko
@denisshevchenko
Apr 23 20:00
The same error..
Maybe the reason is here: ERROR port is not set in pump.ini. Please set port to your serial device, e.g. /dev/mmeowlink
?
Jon Cluck
@cluckj
Apr 23 20:02
the reason is that it's running a master version of the loop
what version of node and npm are you running? node --version and npm --version
Denis Shevchenko
@denisshevchenko
Apr 23 20:04

the reason is that it's running a master version of the loop

Nope, I see this:

~/src/oref0# git branch
* dev
  master

what version of node and npm are you running? node --version and npm --version

~/src/oref0# node --version
v8.11.1
~/src/oref0# npm --version
6.9.0
Jon Cluck
@cluckj
Apr 23 20:05
the master branch was installed to /usr/local and the dev branch was installed to /usr; that npm remove oref0 -g should have removed it
let me get the exact rm command for it
just to make sure that we're removing the right thing: npm prefix -g
(it should return /usr)
Denis Shevchenko
@denisshevchenko
Apr 23 20:10
yes, I see /usr
Jon Cluck
@cluckj
Apr 23 20:10
okay, cd /usr/local/lib/node_modules then rm -rf oref0
Denis Shevchenko
@denisshevchenko
Apr 23 20:11
done
now reboot?
Jon Cluck
@cluckj
Apr 23 20:11
let's see if it helped: which oref0-pump-loop
Denis Shevchenko
@denisshevchenko
Apr 23 20:11
nothing
Jon Cluck
@cluckj
Apr 23 20:12
boo, okay go into ~/src/oref0 and run npm run global-install, then reboot
Denis Shevchenko
@denisshevchenko
Apr 23 20:14
ops
~/src/oref0# npm run global-install

> oref0@0.7.0-dev global-install /root/src/oref0
> npm install && sudo npm link && sudo npm link oref0 && sudo npm install -g && npm install -g

npm WARN checkPermissions Missing write access to /root/src/oref0/node_modules/oref0
npm ERR! path /root/src/oref0/node_modules/oref0
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/root/src/oref0/node_modules/oref0'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-23T20_13_57_536Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! oref0@0.7.0-dev global-install: `npm install && sudo npm link && sudo npm link oref0 && sudo npm install -g && npm install -g`
npm ERR! Exit status 254
npm ERR! 
npm ERR! Failed at the oref0@0.7.0-dev global-install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-23T20_13_59_317Z-debug.log
Jon Cluck
@cluckj
Apr 23 20:15
git pull?
Denis Shevchenko
@denisshevchenko
Apr 23 20:15
Already up-to-date.
Jon Cluck
@cluckj
Apr 23 20:18
can you run each of those commands individually and see which is failing?
npm install sudo npm link sudo npm link oref0 sudo npm install -g npm install -g
Denis Shevchenko
@denisshevchenko
Apr 23 20:22
The first one
~/src/oref0# npm install
npm WARN checkPermissions Missing write access to /root/src/oref0/node_modules/oref0
npm ERR! path /root/src/oref0/node_modules/oref0
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/root/src/oref0/node_modules/oref0'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-23T20_21_13_993Z-debug.log
Jon Cluck
@cluckj
Apr 23 20:22
do any of the others fail?
Denis Shevchenko
@denisshevchenko
Apr 23 20:31
no
other commands work
Jon Cluck
@cluckj
Apr 23 20:33
all of them but the first? try which oref0-pump-loop, and if that doesn't work give it a reboot and try again
Denis Shevchenko
@denisshevchenko
Apr 23 20:34
# which oref0-pump-loop
/usr/bin/oref0-pump-loop
Jon Cluck
@cluckj
Apr 23 20:34
:)
Denis Shevchenko
@denisshevchenko
Apr 23 20:34
?
Jon Cluck
@cluckj
Apr 23 20:34
nano /usr/bin/oref0-pump-loop
hopefully that file begins with:
#!/usr/bin/env bash

source $(dirname $0)/oref0-bash-common-functions.sh || (echo "ERROR: Failed to run oref0-b$

# OREF0_DEBUG makes this script much more verbose
# and allows it to print additional debug information
Denis Shevchenko
@denisshevchenko
Apr 23 20:36
#!/usr/bin/env bash

source $(dirname $0)/oref0-bash-common-functions.sh || (echo "ERROR: Failed to run oref0-bash-common-functions.sh. Is oref0 correctly installed?"; exit 1)

# OREF0_DEBUG makes this script much more verbose
# and allows it to print additional debug information.
# OREF0_DEBUG=1 generally means to print everything that usually
# goes to stderr. (It will will include stack traces in case
# of errors or exceptions in sub commands)
# OREF0_DEBUG=2 is for debugging only. It will print all commands
...
Jon Cluck
@cluckj
Apr 23 20:36
:thumbsup:
is the loop running now?
Denis Shevchenko
@denisshevchenko
Apr 23 20:37
Should I reboot first?
Jon Cluck
@cluckj
Apr 23 20:37
it probably can't hurt
Denis Shevchenko
@denisshevchenko
Apr 23 20:40
YEAH, I see it!
Thank you very much!!
So, what was the reason of problem?
Jon Cluck
@cluckj
Apr 23 20:40
:thumbsup:
the version of npm that raspbian ships with installs programs to /usr/local, and when we upgrade npm with npm install npm@latest -g it switches the install location to /usr
the master version of openaps-packages.sh uses raspbian's npm and installs oref0's master branch.....and then we upgrade npm and it installs dev into /usr
so master binaries are installed in /usr/local, and dev binaries get installed into /usr
aaaaand linux preferentially uses binaries in /usr/local over those in /usr
so we end up with master stuff running on a dev install
Denis Shevchenko
@denisshevchenko
Apr 23 20:52
Does it mean that current documentation is out-of-date?
Jason G
@jguyea
Apr 23 20:53
LOL … npm WARN checkPermissions Missing write access to /root/src/oref0/node_modules/oref0 Looks like Im where you were a little while ago @denisshevchenko, any advice?
BTW, is there a command line, script, that will clean up a Pi environment to start a fresh install, or do we just rewrite the card from Pibakery for best results?
... fresh OpenAPS install...
Jon Cluck
@cluckj
Apr 23 20:55
@jguyea he ran npm install sudo npm link sudo npm link oref0 sudo npm install -g npm install -g individually
and the npm install command failed
Dana Lewis
@danamlewis
Apr 23 20:56
@jguyea rewrite card is cleanest wipe if needed
Jason G
@jguyea
Apr 23 20:56
Yes, that's the command that is failing for me as well
Jon Cluck
@cluckj
Apr 23 20:56
ya, run the rest of them to fix it
Jason G
@jguyea
Apr 23 20:56
... wishing I hadn't bought a 64GB card now :) takes a while
Jon Cluck
@cluckj
Apr 23 20:56
then run npm install again to see if it works
Jason G
@jguyea
Apr 23 20:56
Ok thanks @cluckj
Jon Cluck
@cluckj
Apr 23 21:03
@denisshevchenko it's either a docs change or a code change, neither of which are great options
we're still trying to figure out what is going to work best for folks
Scott Leibrand
@scottleibrand
Apr 23 21:22
@cluckj do we just need to change npm run global-install to use ; instead of &&?
Jon Cluck
@cluckj
Apr 23 21:23
I don't know where that npm install fail is coming from
Riko L
@Ricco555
Apr 23 21:24
@cluckj thank you for the above troubleshooting to Denis. It made me check my rigs and I found the following:
  1. my pi works in opposite directory as you described (/usr/local/bin), but I have no issues there even after update two days ago to latest dev :ok:
  2. my edison has 2 dev installations, new dev in /usr/bin and old dev from January in /usr/local/bin .. and guess what, the old one was running all this time. :toilet:
    and I was constantly wondering why this one does not behave as expected. Now to fixing
Jon Cluck
@cluckj
Apr 23 21:24
@Ricco555 aaahhhhhh
Jason G
@jguyea
Apr 23 21:27
@cluckj Rerunning the commands in order netted errors from all but one of the link commands, now "npm run global-install" ran with no errors. :thumbsup:
Jon Cluck
@cluckj
Apr 23 21:27
:clap:
Riko L
@Ricco555
Apr 23 21:32
so .. if my npm prefix -g is /usr what will npm remove oref0 -g yield?
will it remove correct oref version which I want to keep, or bogus one in /usr/local/bin ?
Jon Cluck
@cluckj
Apr 23 21:33
what version of npm are you running?
Riko L
@Ricco555
Apr 23 21:34
6.4.1
Jon Cluck
@cluckj
Apr 23 21:37
I'd go in and remove the bogus one manually
I think npm remove oref0 -g is going to remove the version you want to keep
Riko L
@Ricco555
Apr 23 21:39
deleting would do the trick I presume?
also in lib folder
Jon Cluck
@cluckj
Apr 23 21:40
is the stuff in /usr/local/bin symlinked to stuff in /usr/local/lib?
Riko L
@Ricco555
Apr 23 21:41
yes
Jon Cluck
@cluckj
Apr 23 21:41
(/usr/local/lib/node_modules/oref0/bin?)
Riko L
@Ricco555
Apr 23 21:42
that's the one
Jon Cluck
@cluckj
Apr 23 21:46
I think you can remove the symlinks in /usr/local/bin and then delete the /usr/local/lib/node_modules/oref0 directory
I'm looking for a way to automate it, but it'd require changing the npm prefix (and I kinda don't want to explore the unintended consequences of that today)
Riko L
@Ricco555
Apr 23 21:57
yea..
one other thing, what would the "Preflight OK. Old settings: Couldn't refresh pumpprofile" mean? .. rig sees the pump, mmtune gets the good signal but somehow it will not start the loop.
^ I stopped the edison due to above and waited for the pi to pick up, but it didn't. we were not home for few days and pi rig was waiting for the loop all this time, so it was not tested after the update to latest dev. But I did run autotune manually on it.
Jon Cluck
@cluckj
Apr 23 21:59
re-run npm run global-install
Starting oref0-pump-loop at Tue Apr 23 17:48:02 EDT 2019 with 14 second wait_for_silence:
Waiting up to 4 minutes for new BG: glucose.json newer than pump_loop_completed

Listening for 14s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 17:48:16 EDT 2019
Preflight OK. Old settings: Couldn't refresh pumpprofile
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 13 s silence before mmtuning

Listening for 13s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 17:48:35 EDT 2019
Listening for 13 s silence before mmtuning: Listening for 13s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 17:48:48 EDT 2019
mmtune: "916.600", 3, -63 -- "916.650", 3, -63
waiting for 6 second silence before continuing
Listening for 6s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Tue Apr 23 17:49:11 EDT 2019
Done waiting for rigs with better signal.
If pump and rig are close enough, this error usually self-resolves. Stand by for the next loop.
Unsuccessful oref0-pump-loop at Tue Apr 23 17:49:11 EDT 2019
assuming the loop looked like that, over and over again? :laughing:
Riko L
@Ricco555
Apr 23 22:06
yes.. exactly:
Apr 23 23:59:06 pi-zero openaps: Starting oref0-pump-loop at Tue Apr 23 23:59:06 CEST 2019 with 8 second wait_for_silence:
Apr 23 23:59:07 pi-zero openaps: Waiting up to 4 minutes for new BG: First loop: not waiting
Apr 23 23:59:56 pi-zero openaps: Listening for 8s: ....................No interfering pump comms detected from other rigs (this is a good thing!)
Apr 23 23:59:56 pi-zero openaps: Continuing oref0-pump-loop at Tue Apr 23 23:59:56 CEST 2019
Apr 24 00:00:25 pi-zero openaps: Preflight OK. Old settings: Couldn't refresh pumpprofile
Apr 24 00:00:25 pi-zero openaps: oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 11 s silence before mmtuning
Apr 24 00:00:37 pi-zero openaps: Listening for 11s: .No interfering pump comms detected from other rigs (this is a good thing!)
Apr 24 00:00:37 pi-zero openaps: Continuing oref0-pump-loop at Wed Apr 24 00:00:37 CEST 2019
Apr 24 00:00:48 pi-zero openaps: Listening for 11 s silence before mmtuning: Listening for 11s: .No interfering pump comms detected from other rigs (this is a good thing!)
Apr 24 00:00:48 pi-zero openaps: Continuing oref0-pump-loop at Wed Apr 24 00:00:48 CEST 2019
Apr 24 00:01:10 pi-zero openaps: mmtune: "868.300", 3, -79 -- "868.350", 3, -80 
Apr 24 00:01:10 pi-zero openaps: waiting for 40 second silence before continuing
Apr 24 00:01:50 pi-zero openaps: Listening for 40s: .No interfering pump comms detected from other rigs (this is a good thing!)
Apr 24 00:01:51 pi-zero openaps: Continuing oref0-pump-loop at Wed Apr 24 00:01:50 CEST 2019
Apr 24 00:01:51 pi-zero openaps: Done waiting for rigs with better signal.
Apr 24 00:01:51 pi-zero openaps: If pump and rig are close enough, this error usually self-resolves. Stand by for the next loop.
Apr 24 00:01:51 pi-zero openaps: Unsuccessful oref0-pump-loop at Wed Apr 24 00:01:50 CEST 2019
over and over
Jon Cluck
@cluckj
Apr 23 22:07
it was the npm install by itself
re-running global-install fixed it for me
Riko L
@Ricco555
Apr 23 22:09
ok.. Just finished with the global-install. now I'll see.. I am expecting to see a change
Jon Cluck
@cluckj
Apr 23 22:10
it worked on the next loop for me
Riko L
@Ricco555
Apr 23 22:10
yep.. it picked up thanks
Jon Cluck
@cluckj
Apr 23 22:10
yay
Riko L
@Ricco555
Apr 23 22:10
now .. back to deleting old stuff
and .. did I mention that this global-install was run on above mentioned pi with nicely oref installation inside /usr/local/bin.. :) where npm prefix is /usr/local
Jon Cluck
@cluckj
Apr 23 22:15
:laughing:
npm v1.4.x?
Riko L
@Ricco555
Apr 23 22:15
no .. 6.4.1
Jon Cluck
@cluckj
Apr 23 22:16
npm is going to melt my brain
Riko L
@Ricco555
Apr 23 22:16
it was 6.7.0 while I was reporting in hardware-dev channel.. but I played with it and downgrade it to 6.4.1
trying to see what will happen. but it stayed in /usr/local
Jon Cluck
@cluckj
Apr 23 22:17
does it do the weird prefix switch when you put sudo in front?
Riko L
@Ricco555
Apr 23 22:18
one thing to mention.. unless it is being called in some of the setup scripts, I never updated with npm@latest only npm install npm -g..
and no.. sudo plays nicely as well .. same folders shown
Jon Cluck
@cluckj
Apr 23 22:18
:thumbsup:
Riko L
@Ricco555
Apr 23 22:20
even tried it (both) as root user and pi user. they produce same output
Jon Cluck
@cluckj
Apr 23 22:42
as long as it's fixed to one place, it should be okay
Riko L
@Ricco555
Apr 23 22:51
yes.. it seams that way. I just fixed the edison.. removed the old oref0 stuff from /local/bin and lib. had to be careful as openaps files were only in /usr/local/bin and not in /usr/bin .. and did global-install at the end. it did install some extra packages stuff, and I confirmed all is installed in /usr/bin this time before rebooting
Jon Cluck
@cluckj
Apr 23 23:03
:thumbsup:
that should be with the nodesource-installed versions of node and npm?
Riko L
@Ricco555
Apr 23 23:15
yes
Riko L
@Ricco555
Apr 23 23:33

also, one quick confirmation about its current status: Edison now constantly runs with unable to update pumphistory:

Starting oref0-pump-loop at Wed Apr 24 01:23:03 CEST 2019 with 27 second wait_for_silence:
Waiting up to 4 minutes for new BG: First loop: not waiting

Listening for 27s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed Apr 24 01:23:32 CEST 2019
Preflight OK. Profile less than 60m old; Profile valid. Pump history update failed. Last record 2019-04-24T00:34:36+02:00
Couldn't invoke_pumphistory_etc - continuing
Retry 1 of refresh_pumphistory_and_meal
Pump history update failed. Last record 2019-04-24T00:34:36+02:00
Couldn't invoke_pumphistory_etc - continuing
Listening for 6s: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Wed Apr 24 01:23:59 CEST 2019
Retry 2 of refresh_pumphistory_and_meal
Pump history update failed. Last record 2019-04-24T00:34:36+02:00

is this still OK, just cannot loop due to Pi now handling things? Or I have gained another issue :)

Scott Leibrand
@scottleibrand
Apr 23 23:34
does your pump have history?
if it's brand new, set a temp basal or something to give it one
Riko L
@Ricco555
Apr 23 23:34
should have.. currently pi rig is handling it
Scott Leibrand
@scottleibrand
Apr 23 23:34
k
Riko L
@Ricco555
Apr 23 23:35
I was just switching back and forth due to some npm stuff that Jon helped me sort out
but Edison didn't pick up and seams that it skips rather fast and reports failed history update
maybe I deleted few things more that necessary. I think I'll re-run from install script just in case.
Jon Cluck
@cluckj
Apr 23 23:39
did you run global-install after the deletion?
or reboot?
Riko L
@Ricco555
Apr 23 23:42
yes ..both
Jon Cluck
@cluckj
Apr 23 23:44
run a debug loop? systemctl stop cron && pkill -f oref0-pump-loop && cd ~/myopenaps && OREF0_DEBUG=1 oref0-pump-loop
Riko L
@Ricco555
Apr 23 23:44
and.. I think while removing oref0 stuff from usr/local/bin i removed pumphistory also
Jon Cluck
@cluckj
Apr 23 23:45
oh
Riko L
@Ricco555
Apr 23 23:45
oh yes.. I removed "pumphistory" "setbasals"
Jon Cluck
@cluckj
Apr 23 23:45
that should be in /usr/local/bin :laughing:
Riko L
@Ricco555
Apr 23 23:46
yep
i am comparing from pi directories
Jon Cluck
@cluckj
Apr 23 23:46
cp -prv ~/go/bin/* /usr/local/bin/
root@raspberrypi:~# ls -lah /usr/local/lib/node_modules/
total 12K
drwxr-sr-x  3 nobody pi    4.0K Apr 23 19:28 .
drwxrwsr-x  5 root   staff 4.0K Apr 23 19:28 ..
drwxr-sr-x 10 nobody pi    4.0K Apr 23 19:28 npm
cluckj @cluckj cackles
Riko L
@Ricco555
Apr 23 23:50
ha ha.. that's excellent .. works like charm :+1:
but shouldn't there be go/bin in PATH as well .. unless somewhere is hardcoded
Jon Cluck
@cluckj
Apr 23 23:52
nah, /root/go/bin shouldn't be in PATH
Riko L
@Ricco555
Apr 23 23:53
/usr/local/go/bin ?
Jon Cluck
@cluckj
Apr 23 23:58
oh
that's only if you build the binaries from source
I think L1292 is what you get if you choose download binaries