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

29th
Nov 2018
Dromore1911
@Dromore1911
Nov 29 2018 00:04

@ecc1 I am using an explorer board. I just tried to roll back to 0.6.2 and got this at the end of the setup

  • oref0@0.6.2
    updated 1 package in 23.647s
    Checking mmeowlink installation
    Version: 0.11.1
    module.js:550
    throw err;
    ^

Error: Cannot find module 'yargs'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/root/src/oref0/bin/oref0-get-profile.js:45:16)
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)
Could not run oref0-get-profile

Eric
@ecc1
Nov 29 2018 00:09
sorry, others will have to chime in about how to re-install other branches, I was going to try to debug the comms issue for dev
Dromore1911
@Dromore1911
Nov 29 2018 00:11
I'd love to use the Dev branch if comms would allow it. Should I do a reflash and reinstall master again?
I also have a Pi 0 rig with the custom HAT that i could attempt to make work
Eric
@ecc1
Nov 29 2018 00:14
I don't think you need to reflash, just do a complete reinstall of the openaps stuff (but I don't have experience with how to do that). And following the current instructions for Pi rigs should give you a working dev branch setup
MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 00:28
Looks like my only hope to get dev working again is #1153 *edit. Can I change this manual? Or do i have to wait untill its merged?
tepidjuice
@tepidjuice
Nov 29 2018 00:32
I have stumbled accross a medtronic 511 insulin pump with firmware 2.0A any chance it might be loopable at all?
MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 00:32
@tepidjuice No, this is not loopable
tepidjuice
@tepidjuice
Nov 29 2018 00:33
In any way?
MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 00:34
tepidjuice
@tepidjuice
Nov 29 2018 00:36
Is it worth checking out at all? Or it just has no capacity to send/recieve commands?
Dana Lewis
@danamlewis
Nov 29 2018 00:38
@tepidjuice no capacity
tepidjuice
@tepidjuice
Nov 29 2018 00:38
Shame :/
Any thoughts on cases for rasp pi 0W?
Dana Lewis
@danamlewis
Nov 29 2018 00:44
General advice for anyone trying to switch branches: don't use run again if you're going dev to master or master to dev. Do a fresh install, then run setup script.
Dromore1911
@Dromore1911
Nov 29 2018 00:44
Would a fresh install require me to reflash the edison? or wipe the SD card for the Pi 0
Dana Lewis
@danamlewis
Nov 29 2018 00:49
No: just run install from the top.
Dromore1911
@Dromore1911
Nov 29 2018 00:56
Okay, Giving that a shot right now

Got part way done and stopped with this message

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
Depends: node-ansi (>= 0.3.0-2) but it is not going to be installed
Depends: node-ansi-color-table but it is not going to be installed
Depends: node-archy but it is not going to be installed
Depends: node-block-stream but it is not going to be installed
Depends: node-fstream (>= 0.1.22) but it is not going to be installed
Depends: node-fstream-ignore but it is not going to be installed
Depends: node-github-url-from-git but it is not going to be installed
Depends: node-glob (>= 3.1.21) but it is not going to be installed
Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
Depends: node-inherits but it is not going to be installed
Depends: node-ini (>= 1.1.0) but it is not going to be installed
Depends: node-lockfile but it is not going to be installed
Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
Depends: node-gyp (>= 0.10.9) but it is not going to be installed
Depends: node-nopt (>= 3.0.1) but it is not going to be installed
Depends: node-npmlog but it is not going to be installed
Depends: node-once but it is not going to be installed
Depends: node-osenv but it is not going to be installed
Depends: node-read but it is not going to be installed
Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
Depends: node-request (>= 2.25.0) but it is not going to be installed
Depends: node-retry but it is not going to be installed
Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
Depends: node-semver (>= 2.1.0) but it is not going to be installed
Depends: node-sha but it is not going to be installed
Depends: node-slide but it is not going to be installed
Depends: node-tar (>= 0.1.18) but it is not going to be installed
Depends: node-underscore but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@NS1911:~#

MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 12:35
keep on getting the same problem with the pihat dev install, how can i get a working install?

(node:5075) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm ERR! cb() never called!
npm ERR! not ok code 0

npm ERR! oref0@0.7.0-dev global-install: npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oref0@0.7.0-dev global-install script.
npm ERR! This is most likely a problem with the oref0 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
npm ERR! You can get their info via:
npm ERR! npm owner ls oref0
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.14.79+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "run" "global-install"
npm ERR! cwd /root/src/oref0
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/src/oref0/npm-debug.log
npm ERR! not ok code 0
/root/src/oref0/bin/oref0-setup.sh: line 751: oref0-get-profile: command not found
Could not run oref0-get-profile

MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 12:40
i have tried a fresh installation, same problem as the update.
MarvelousMarvin
@MarvelousMarvin
Nov 29 2018 14:17
I don't know what has changed but after i have tried many times it finally worked! Yeah, back online
fidoman
@efidoman
Nov 29 2018 15:35
@danamlewis - I did the setup again from scratch (not runagain) and found where the error is. Any ideas of how to resolve?
Add NIGHTSCOUT_HOST and API_SECRET to /root/.bash_profile
sed: can't read .profile: No such file or directory
sed: can't read .profile: No such file or directory
I have a /root/.bash_profile and /root/.profile file
What script is that? I can try and have a look
fidoman
@efidoman
Nov 29 2018 15:42
oref0-setup.sh
And you're on master branch?
What does echo $HOME say?
@efidoman openaps/oref0#1157 should fix this
Cas Eliëns
@cascer1
Nov 29 2018 15:55
Damn that was fast
Shell scripts is what I do ;)
fidoman
@efidoman
Nov 29 2018 17:27
Thanks - testing it now
fidoman
@efidoman
Nov 29 2018 18:12
My $HOME is set correctly
root@eddie1:~/src/oref0/bin# echo $HOME
/root
Also, my version of oref0-setup.sh already referenced $HOME/.profile. I'm using Your instance of oref0 [0.7.0-dev, dev] is up-to-date.
I see you closed the PR and found that already. So, I guess I'll comment out those lines and rerun setup then.
what does git status say for the branch you're on?
If master then you need to change .profile to $HOME/.profile around line 993. If you're on dev, then it should work.
fidoman
@efidoman
Nov 29 2018 18:18
root@eddie1:~/src/oref0# git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working directory clean
root@eddie1:~/src/oref0#
Scott Leibrand
@scottleibrand
Nov 29 2018 18:18
Your instance of oref0 [0.7.0-dev, dev] also indicates he's on dev
fidoman
@efidoman
Nov 29 2018 18:19
yep, and it doesn't work on a newly flashed edison on dev
at least for me it doesn't
I don't know OpenAPS enough to trust just that, so wanted to verify via means I know. So with that, grep ' .profile' bin/oref0-setup.sh shouldn't return anything, is that correct?
Scott Leibrand
@scottleibrand
Nov 29 2018 18:20
I don't know if sed: can't read .profile: No such file or directory is actually a problem: that may just mean you don't have anything already in your .profile that needs updating.
what's the problem you're seeing with your dev install?
Yeah, on dev this is wrapped in a check whether the file exists, so those lines indeed in this case could be commented out.
fidoman
@efidoman
Nov 29 2018 18:21
I'll give it a try. I noticed no other errors in the install and it seems to end abruptly at that point
I commented out the entire if / fi section for .profile and trying again now
What does that section look like in your file?
fidoman
@efidoman
Nov 29 2018 18:32
Went a little further this time
importing supermicrobolus file
pump://JSON/set_temp_basal/enact/smb-enacted.json
pump://JSON/bolus/enact/bolused.json
Adding OpenAPS log shortcuts
Add NIGHTSCOUT_HOST and API_SECRET to /root/.bash_profile
sed: can't read .profile: No such file or directory
sed: can't read .profile: No such file or directory
    # With 0.5.0 release we switched from ~/.profile to ~/.bash_profile for API_SECRET and NIGHTSCOUT_HOST, because a shell will look
    # for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from
    # the first one that exists and is readable. Remove API_SECRET and NIGHTSCOUT_HOST lines from ~/.profile if they exist
    # if [[ -f $HOME/.profile ]]; then
    # sed --in-place '/.*API_SECRET.*/d' $HOME/.profile
    #  sed --in-place '/.*NIGHTSCOUT_HOST.*/d' $HOME/.profile
    #fi
That's after I commented it out
Now, it's failing somewhere further down
weird ... commented out, but still saying it has an issue with .profile ... where's that coming from?
fidoman
@efidoman
Nov 29 2018 18:38
Not coming from this file
grep profile *setup* | grep sed
    #sed --in-place '/.*NIGHTSCOUT_HOST.*/d' $HOME/.bash_profile
    #sed --in-place '/.*API_SECRET.*/d' $HOME/.bash_profile
    # sed --in-place '/.*API_SECRET.*/d' $HOME/.profile
    #  sed --in-place '/.*NIGHTSCOUT_HOST.*/d' $HOME/.profile
    sed --in-place '/.*NIGHTSCOUT_HOST.*/d' $HOME/.bash_profile
    sed --in-place '/.*API_SECRET.*/d' $HOME/.bash_profile
    sed --in-place '/.*DEXCOM_CGM_RECV_ID*/d' $HOME/.bash_profile
    #sed --in-place '/.*DEXCOM_CGM_TX_ID*/d' $HOME/.bash_profile
            sed --in-place '/.*GOROOT*/d' $HOME/.bash_profile
            sed --in-place '/.*GOPATH*/d' $HOME/.bash_profile
            sed --in-place '/.*export PATH*/d' $HOME/.bash_profile
            sed --in-place '/.*GOPATH*/d' $HOME/.bash_profile
            sed --in-place '/.*export PATH*/d' $HOME/.bash_profile
that helped. seems the oref0-setup in the path isn't somehow the same as the one in /root/src/oref0/bin
Eric
@ecc1
Nov 29 2018 18:53
PSA: When people having issues say they're "on dev", they should do a "git pull" to make sure they're actually up to date. "git status" won't tell you that.
fidoman
@efidoman
Nov 29 2018 18:55
@ecc1 - good advice. I did that about 10 times at least. Also did global install after reflashing the edison before running setup. For some reason, it didn't populate the links correctly in /usr/local/bin
and to be sure, I'm redoing from scratch again now, did the git pull, doing the global-install and then oref0-setup again as well.
hmmm ... this time it got the right oref0-setup file in place. Could it be that git checkout dev doesn't give the latest and I missed a git pull before the original global-install?
fidoman
@efidoman
Nov 29 2018 19:00
that could explain it.
now setup doesn't work at all
looks like I'm back to needing to reflash - oref0 is looping so I'll do that another day.
root@eddie1:~/myopenaps# oref0-setup
/usr/local/bin/oref0-setup: line 17: /usr/local/bin/oref0-bash-common-functions.sh: No such file or directory
ERROR: Failed to run oref0-bash-common-functions.sh. Is oref0-setup.sh in the right directory?
/usr/local/bin/oref0-setup: line 20: usage: command not found
/usr/local/bin/oref0-setup: line 295: print_usage: command not found
/usr/local/bin/oref0-setup: line 296: prompt_yn: command not found
Eric
@ecc1
Nov 29 2018 19:07
@efidoman yes, "git checkout dev" just switches branches in your local repo, doesn't update anything from remotes
fidoman
@efidoman
Nov 29 2018 19:07
that's it then. :->
Well I cloned the repo so I would have thought that switching to dev would give me the latest dev code as of the clone though
Eric
@ecc1
Nov 29 2018 19:18
yes, that's my understanding too
fidoman
@efidoman
Nov 29 2018 19:21
ok, I'm a little puzzled because I reflashed, immediately did a branch change to dev and then did the global-install.
Dromore1911
@Dromore1911
Nov 29 2018 19:39
Update from yesterday. I reflashed the edison, Installed master branch, did the master branch installation of logger. Everything is working again and I'm looping.
Going to finish installing the Dev on my Pi rig today, hopefully it goes smoothly
MrJarnould
@MrJarnould
Nov 29 2018 22:22

Hi everyone, Jacob here from Luxembourg. I've been trying to figure out why Papertrail is no longer outputting pump-loop logs. All it outputs is "No matching events". However, I can see the pump-loop logs when I ssh into into my rig. It seems like only pump-loop.log isn't showing up on Papertrail (I can see cgm-loop, ns-loop, autosense-loop, network etc):

I decided to redo the Papertrail setup from the docs. I'm stuck at the Aggregating logs section.

HTTP request sent, awaiting response... 200 OK
Length: 3122260 (3.0M) [application/octet-stream]
Saving to: 'remote_syslog_linux_i386.tar.gz.1'

remote_syslog_linux_i386.tar. 100%[=================================================>]   2.98M   467KB/s   in 9.9s

2018-11-29 22:50:48 (308 KB/s) - 'remote_syslog_linux_i386.tar.gz.1' saved [3122260/3122260]

root@edisonhost:~# tar xzf ./remote_syslog*.tar.gz
root@edisonhost:~# cd remote_syslog
root@edisonhost:~/remote_syslog# sudo cp ./remote_syslog /usr/local/bin
cp: cannot create regular file '/usr/local/bin/remote_syslog': Text file busy
thanks in advance!
Looks like something has that file open. I'd probably use lsof to find what
MrJarnould
@MrJarnould
Nov 29 2018 23:33
Indeed, I tried lsof but to no avail
root@edisonhost:~/remote_syslog# sudo cp ./remote_syslog /usr/local/bin
cp: cannot create regular file '/usr/local/bin/remote_syslog': Text file busy
root@edisonhost:~/remote_syslog# lsof
-bash: lsof: command not found
Install it then ;)
apt install lsof