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

Oct 2018
Martin Haeberli
Oct 18 2018 01:44

trying a fresh install on an RPi3 with Explorer Hat:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'global-install' ]
2 info using npm@1.4.21
3 info using node@v8.11.1
4 verbose run-script [ 'preglobal-install', 'global-install', 'postglobal-install' ]
5 info preglobal-install oref0@0.7.0-dev
6 info global-install oref0@0.7.0-dev
7 verbose unsafe-perm in lifecycle true
8 info oref0@0.7.0-dev Failed to exec global-install script
9 error oref0@0.7.0-dev global-install: `npm install && sudo npm install -g && sudo npm link && sudo npm link oref0`
9 error Exit status 1
10 error Failed at the oref0@0.7.0-dev global-install script.
10 error This is most likely a problem with the oref0 package,
10 error not with npm itself.
10 error Tell the author that this fails on your system:
10 error     npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
10 error You can get their info via:
10 error     npm owner ls oref0
10 error There is likely additional logging output above.
11 error System Linux 4.14.71-v7+
12 error command "/usr/bin/node" "/usr/bin/npm" "run" "global-install"
13 error cwd /root/src/oref0
14 error node -v v8.11.1
15 error npm -v 1.4.21
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]

advice sought

Oct 18 2018 01:49
it's been a while with our Edison/explorer boards and now they're starting to croak on us. i have 2 more Edisons of unknown usability and a brand new explorer board I'm going to set up to see how it goes (before my Pi+Hat components arrive). my son is still <0.3 u/hr basal so I'm still on oref0 as I see it, right? as in, can't use the oref1 features yet? we've been looping for nearly 2 years now
Martin Haeberli
Oct 18 2018 01:53
@tynbendad based on what you say, I believe your explorer board has died. I have sometimes had good luck with Enhanced Radio Devices sometimes fixing broken explorer boards by replacing them.
fresh raspian lite install via pibakery
(as of yesterday)
uname result:
Linux openaps31 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
Dana Lewis
Oct 18 2018 02:29
@umich10 you can modify that if you truly want to SMB - but because his hourly insulin needs are relatively small, that may result in front loading insulin and then not getting it for a long time after that. Some people have tried that, some people wait until basal amounts go up higher
Oct 18 2018 02:32
@danamlewis Thanks! I might try it. I'm intrigued and feel like we've got enough experience to quickly put it back if it's not working.
Martin Haeberli
Oct 18 2018 02:34
@danamlewis (what) obvious am I missing on fresh oref0 install on RPi3 w/explorer hat? trying to install from dev branch per instructions (I think per instructions)
Dana Lewis
Oct 18 2018 02:42
@umich10 yup :+1:
@mhaeberli not sure. About to lose wifi on my plane so someone else might have a better clue. I'd try installing from top again, if you haven't, and if no one else pipes in w/ ideas.
Martin Haeberli
Oct 18 2018 02:44
@danamlewis thx safe travels!
Oct 18 2018 02:54
Have updated to .7 dev and done npm run global-install. No apparent errors and then when running the setup script again I end up with 0 byte (blank) preferences.json and updated_preferences.json files along with this error that ends the setup script when using the

Checking openaps 0.2.1 installation with --nogit support
openaps 0.2.1-dev
Checking /root/maraloop: mkdir: cannot create directory ‘/root/maraloop’: File exists
/root/maraloop initialized
/root/src/oref0/ already exists; pulling latest
Already up-to-date.
Checking oref0 installation
└── oref0@0.6.2
jq: Unknown option --slurpfile
Use jq --help for help with command-line options,
or see the jq documentation at
throw err;

SyntaxError: /root/maraloop/updated_preferences.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (module.js:672:27)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
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:87:23)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
Could not run oref0-get-profile

I'm flashing my other rig that had the same issue and starting from scratch to see if this is an issue that can be bypassed with a (very) clean install
Martin Haeberli
Oct 18 2018 02:56
@ericmtx not that I’m in position to give great advice, but it has been my experience that using a prebuilt oref0-runagain after a fresh install, especially an upgrade, can be fraught.
try installing with oref0-setup, interactive mode, have your parameters handy
and good luck!
Oct 18 2018 02:57
I'll try the regular setup, good idea. I think did that, but... :-)
Martin Haeberli
Oct 18 2018 02:59
error … This failure might be due to the use of legacy binary “node”
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
Oct 18 2018 03:01
same error with standard setup script (not runagain). I'm running v8.12 node
and npm is 6.4.1
Martin Haeberli
Oct 18 2018 03:01
hmm - interesting … no insight to offer, sorry
Oct 18 2018 03:02
no prob. we'll see if the reflashed one has any issues. I'll leave that pure Master and see how it goes. Rig #3 is still running and she can take Rileylink and Loop to school tomorrow so she can stay mobile while I work on these
Martin Haeberli
Oct 18 2018 03:08
@ericmtx are you on an Edison?
Martin Haeberli
Oct 18 2018 03:22

indirect success:

sudo apt-get remove nodejs
sudo apt-get remove npm
sudo apt auto remove

then reboot; then checkout dev; then npm run global-install

Martin Haeberli
Oct 18 2018 03:29
oref0-setup in interactive mode fails with:
cp: cannot stat 'preferences.json': No such file or directory
jq: Bad JSON in --slurpfile existing_prefs preferences.json: Could not open preferences.json: No such file or directory
    throw err;

SyntaxError: /root/myopenaps/updated_preferences.json: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.Module._extensions..json (module.js:671:27)
so maybe similar to @ericmtx ?
EXACTLY the same as @ericmtx
Martin Haeberli
Oct 18 2018 03:36
i’m -trying- a regression to d236908f1a48abb6162671432b1fd18c5cd5febf in case that is far enough back to work ...
Martin Haeberli
Oct 18 2018 03:46
but regressing looks to be more delicate than I first imagined, because the install script kinda wants to just check out a current branch
Martin Haeberli
Oct 18 2018 03:52
regression worked, I think; so most recent dev seems a bit suspect to me. can someone else please try to confirm - fresh RPi PiBakery install, then dev? if that works with most recent dev (hash c16f4a872de2b72ab137420e8c1ea1ef88e712a5) then I’m off target; if your install with most recent dev fails, then more investigation needed ...
(that is, using the d236908f1a48abb6162671432b1fd18c5cd5febf earlier dev seemed to work for me…)
Jeremy Cunningham
Oct 18 2018 04:23
There is PR #1141 that should fix the install error, but needs testing, @mhaeberli
Martin Haeberli
Oct 18 2018 04:25
@jpcunningh thx
i may test on a clean RPi3 in the next day or so and report back. Is there an EASY way to run oref0-setup in a way that lets me either specify a specific git hash or a PR or something, or do I have to pull it (like I did above) and hack the oref0-setup script in a way that helps
(what was the root cause of the 1141 related install error?)
Jeremy Cunningham
Oct 18 2018 04:44
It may work if you do something like shown below, but I'm not sure:
git fetch upstream pull/1141/head:test-branch
git checkout test-branch
git push -u origin test-branch
Dave Carlson
Oct 18 2018 14:52
@tzachi-dar check out for the start of my attempt for a Go BLE driver for miaomiao
Oct 18 2018 15:20
Has anyone experienced the Edison issue in which the device powers off entirely after removing the micro-USB, despite the battery still being in? Wondering if my Edison is starting to deteriorate.
(I am then able to turn it back on and it works fine from the battery. it's not a battery issue since i am trying another lipo and having the same issue)
Oct 18 2018 15:23
@thecubic well, I'm afraid I'm not familiar with the go language. But according to your comments this seems to be working :-)
Oct 18 2018 16:15
Anyone have any ideas how to fix this?
Continuing oref0-pump-loop at Thu Oct 18 11:10:27 CDT 2018
Preflight OK. Old settings: Couldn't refresh pumpprofile
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 19 s silence before mmtuning
Just keeps throwing this error
Martin Haeberli
Oct 18 2018 17:18
@dmdfreak - check pump battery (replace) - for starters.
you can try to manually mmtune - see instructions
check that US / WW pump mode is configured right; re-check pump serial number matches.
Oct 18 2018 17:23
The battery says it's full but I'll change that out just in case. it was working fine so I don't think the serial number would have changed. @mhaeberli thank you!
Martin Haeberli
Oct 18 2018 17:26
check antenna (if you have one) ; make sure pump and controller are close; see what mmtune says. (for example, if you have access to the shell, try something like: sudo service cron stop; sudo killall -g oref0-pump-loop ; openaps mmtune see also or
@dmdfreak of course, reboot the rig after ; sudo service cron start is probably enough, but just to be sure
Oct 18 2018 17:46
Thanks @mhaeberli trying all that now
Abigail Cember
Oct 18 2018 17:58
@live4sw I'm actually having this problem with the Raspberry Pi -- my battery doesn't seem to do anything at all.
@mhaeberli I can't loop yet either, and once got an error saying something about "no response from pump after wake-up" (I changed the battery, despite it not being empty). Does that sound to you like a similar problem to what @dmdreak is experiencing? What should we see in mmtune?
the mmtune results should NOT in -99 ; -90 or better should work
it does sound like a similar thing to what @dmdfreak saw
Martin Haeberli
Oct 18 2018 19:25

if you run mmtune, here is a bit more on how:

cd myopenaps/
root@etghopenaps22:~/myopenaps# oref0 mmtune
mmtune: "916.650", 3, -42

the -42 says a pretty strong signal; RPi Hat, external antenna

-99 means it’s NOT talking
Abigail Cember
Oct 18 2018 20:11
Ok, thanks -- that's really helpful. I don't remember off the top of my head what the last number was, but I remember not knowing what they meant other than the frequency. What's that second parameter (3 in your line of output)?
Oct 18 2018 20:59
Here is a short summery of my experience with installing on a pi:
Overall, things went well. There have been a few issues, that took some time to recover:
1) I'm almost sure that my pi has changed it's name during the install to localhost. (not a real issue)
2) I was not asked for passwords during the install problem (not a big issue).
3) install failed due to the issues that are described in
4) After that I had to run the scripts again as things have failed. (not very helpful I know).
5) Last issue that happened is related to installation of nightscout. Well I guess that this is not the correct forum... but actually it is. the instructions ( say update your master branch. Then it says, install your dev, and in my case it did not install (was too old). So if instructions are to install dev, than I guess that update should also be to install dev.
All in all it took around 3 hours. Great project. Keep the good work.
Martin Haeberli
Oct 18 2018 21:33
@acember I don’t know what the 3 means ...
the last number is signal strength in dB or dbM, I think
-99 means essentially - no signal. -20 is 10 times weaker than -10. But in my experience numbers like -90, -89, and up (like -20) are all good!