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

5th
Nov 2018
Martin Haeberli
@mhaeberli
Nov 05 2018 00:08

running install (via oref0-runagain; perhaps that is a mistake) from dev.

…
/root/src/oref0/node_modules/oref0 -> /home/.rootfs/usr/lib/node_modules/oref0 -> /root/src/oref0
jq: Unknown option --slurpfile
Use jq --help for help with command-line options,
or see the jq documentation at http://stedolan.github.com/jq
module.js:675
    throw err;
    ^

SyntaxError: /root/myopenaps/updated_prefs.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

but when I run it again, install seems to complete...

(maybe I should do a full oref0-setup interactive?)
Diadon81
@Diadon81
Nov 05 2018 00:22

Hi everyone, someone help me with this autotune error ``` Warning: could not parse ns-entries.2018-11-03.json

/root/src/oref0/lib/autotune-prep/categorize.js:29
glucoseData.sort(function (a, b) {
^
TypeError: Cannot call method 'sort' of undefined ```

Martin Haeberli
@mhaeberli
Nov 05 2018 00:35
radio looks like it’s not working on an Edison.
./ccprog -p 19,7,36 erase
Using pins: DC=19, DD=7, RESET=36
Erasing chip.
This code is only tested on CC1110. Unsupported chip id = 0x00.
Chip erase failed.
suggestions? I’m inclined to declare this a ‘dead explorer board’ (after a plan to try disconnecting and reconnecting the board)
cduarte
@cduarte
Nov 05 2018 05:50
I installed the version 0.7.0 dev.
edit-pref is differentt
What is the variable "enable" ?
Martin Haeberli
@mhaeberli
Nov 05 2018 06:08
different edisons maybe different bluetooth behavior? one seems to sustain BT connections via iPhone; another seems to disconnect on its own after a few seconds. Any experience with this?
Name
@orbarya
Nov 05 2018 10:26
Hi, I want to run autotune as a one off one my ubuntu machine using data uploaded to NS from AndroidAPS. I'm going through the steps of phase C here https://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/autotune.html and I've reached a command that starts with cd ~/src, I don't understand what this src dir is, I don't have it on my machine.
yeagerm
@yeagerm
Nov 05 2018 13:40
@orbarya - That directory exists on rigs. You will need to create it: mkdir ~/src
ig888ack
@ig888ack
Nov 05 2018 15:10
Hi everyone, I recently purchased the Explorer Hat and built a Pi0 rig. After just about 10 uses (i'm still using my edison rig) the screen on the HAT stopped working. Everything else appears to be powering up correctly. Are there troubleshooting steps I can take or do I need to get in touch with Enhanced Radio Devices? Do these things have any kind of warranty?
Zach Gohr
@zgohr
Nov 05 2018 16:41
@ig888ack don’t get your hopes up. Enhanced Radio Devices will probably replace it, but the next one is just going to break as well.
I’d just get used to using it with no screen
ig888ack
@ig888ack
Nov 05 2018 16:42
@zgohr ok thanks, I'll reach out to them
Jon Cluck
@cluckj
Nov 05 2018 16:54
or get a hard case that covers the screen
Jon Cluck
@cluckj
Nov 05 2018 17:04
the size "A" is just enough room for an 18650 sized battery, pi + HAT
if you want more room, there are other sizes
I pulled out the insert and dremeled out some holes to mount the different parts to
AND it's waterproof :)
ig888ack
@ig888ack
Nov 05 2018 17:09
@cluckj awesome thanks, i've been looking for a better case. Do you happen to have a link to the battery you use? I went with the 2000 linked in the docs and I hardly get 2 hours out of it so I've been looking for a larger one
Jon Cluck
@cluckj
Nov 05 2018 17:11
@ig888ack I don't really recommend my battery setup (I'm using a high-capacity bare-cell 18650)
Diabetic_Dude
@diabetic_dude_twitter
Nov 05 2018 17:13
I have updated the time on my rig, updated my NS site and changed the time on my pump .... but for some reason openaps keeps changing the time. I look at the logs and I see this:
Jon Cluck
@cluckj
Nov 05 2018 17:13
the "A" size doesn't fit the adafruit 4400mAh battery, but the "B" size might
Diabetic_Dude
@diabetic_dude_twitter
Nov 05 2018 17:13
Checking pump clock: "2018-11-05T12:11:39-06:00" is within 90s of current time: Mon Nov  5 11:11:41 CST 2018
Pump clock is more than 55s off: attempting to reset it
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Restarting ntp (via systemctl): ntp.service.
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
it seems like my rig keeps changing the time from the correct time to one hour forward then back again
Diabetic_Dude
@diabetic_dude_twitter
Nov 05 2018 17:27
on my pump
Martin Haeberli
@mhaeberli
Nov 05 2018 17:29

for various reasons, I updated our two production Edison rigs to dev on Saturday, using the expedient of:
-service cron stop ; killall -g oref0-pump-loop
-cd ~/src/oref0; git checkout master ; git pull
(yes, git pull appears redundant here)
-npm run global-install
-cd ~/ ; bash myopenaps/oref0-runagain.sh
the install proceeded until I got an error (see above). I then just again:
-bash myopenaps/oref0-runagain.sh
after which the resulting rigs worked, but bluetooth tethering broke.
ultimately, I figured out I had to run a manual oref0-setup, not runagain.
after I did that, bluetooth tethering works again.

so two questions:
-how do I help debug the install failure on dev (this was dev on top of working master; one plan I have is dev directly on a newly-flashed Edison)
-how do I help debug the bluetooth failure?

the error I was getting on install:
…
/root/src/oref0/node_modules/oref0 -> /home/.rootfs/usr/lib/node_modules/oref0 -> /root/src/oref0
jq: Unknown option --slurpfile
Use jq --help for help with command-line options,
or see the jq documentation at http://stedolan.github.com/jq
module.js:675
    throw err;
    ^

SyntaxError: /root/myopenaps/updated_prefs.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
Jon Cluck
@cluckj
Nov 05 2018 17:48
runagain not working when switching from master to dev is a known issue (but sometimes it works, sometimes it doesn't)
docs change for that, maybe?
Dana Lewis
@danamlewis
Nov 05 2018 17:53
if you're switching versions, it's recommended to start from scratch and not use runagain
I think that's already in the docs, but if not, should be PRed to be more clear
Martin Haeberli
@mhaeberli
Nov 05 2018 18:01
:+1: thx to both
Eric
@ecc1
Nov 05 2018 18:21
If anyone is using dev and token-based NS authentication, the latest Go sources have @PieterGit 's patch to support it. Waiting for some field testing before using it in the next precompiled release
Martin Haeberli
@mhaeberli
Nov 05 2018 18:25
@ecc1 out of curiosity, how does Go code get involved in NS token auth? (using dev, but not yet token auth)
multiple.png
running multiple (maybe too many) rigs at night - in this case, as many as 4. I try to keep the settings in sync with each other. note the frequent basal changes. Am I, as Steve Jobs would have said, ‘holding it wrong’? is there a best practice for multiple rigs working in coordination?
Dana Lewis
@danamlewis
Nov 05 2018 18:35
Don't need to do anything different
7 is not too many ;) so 4 is fine
Frequent temps just means you have diabetes
Martin Haeberli
@mhaeberli
Nov 05 2018 18:36
:-) thx lol - it was the frequent basal changes, not the temps per se - almost as if the different rigs have different opinions about what temps to use
Dana Lewis
@danamlewis
Nov 05 2018 18:37
I would sync Autotune but otherwise good enough
Martin Haeberli
@mhaeberli
Nov 05 2018 18:38
multiple1.png
so syncing autotune would help the two rigs, 1 minute apart, likely come up with similar temp basal s?
(I had assumed that if the rigs were watching the same data over a number of days, their autotune values would converge, but it sounds like a bit more effort, leveraging @scottleibrand ’s long ago suggestion involving rsync, would end up with stabler answers .) (I have to look up his suggestion again).
or I’ll look in RTD for sync autotune ideas
:+1: THANKS!
Jon Cluck
@cluckj
Nov 05 2018 18:42
could those differences be from IOB decay in the interim periods between loops?
or between when the loops started?
Eric
@ecc1
Nov 05 2018 18:45
@mhaeberli it's just a matter of recognizing when the API secret is a special form ("token=xyzzy"), and passing that as a URL parameter in the appropriate places
Martin Haeberli
@mhaeberli
Nov 05 2018 18:48
@cluckj I don’t know - they are all operating with the same data mined from the pump and from NightScout ...
@ecc1 ok thx, but trying to understand what role Go code (for example, for pump radio) plays - probably it’s some OTHER Go code in dev ...
Jon Cluck
@cluckj
Nov 05 2018 18:49
they're running the determine-basal calculations at slightly different times though?
Martin Haeberli
@mhaeberli
Nov 05 2018 18:50
indeed ...
Eric
@ecc1
Nov 05 2018 18:59
@mhaeberli a few of the command-line utilities that I wrote interact with Nightscout (like g4update and cgmupdate), so there's NS upload code (mainly in the ecc1/nightscout github repo which is where this commit is)
Martin Haeberli
@mhaeberli
Nov 05 2018 19:30
@ecc1 nice!