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

6th
Oct 2016
garykidd
@garykidd
Oct 06 2016 00:03
I would like to retain the GUI though because it's helpful for me in certain situations.
Scott Leibrand
@scottleibrand
Oct 06 2016 00:03
yeah. we can delete a lot without touching the GUI. pretty sure you don't need java, or scratch/nuscratch.
you can google freepats: i don't recognize that
lib stuff and most of the rest I would leave
garykidd
@garykidd
Oct 06 2016 00:05
cool...thanks.
got an error trying to restart....
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 52, in __call__
    self.epilog( )
  File "/usr/local/bin/openaps-use", line 50, in epilog
    super(UseToolApp, self).epilog( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 75, in epilog
    self.create_git_commit( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 82, in create_git_commit
    self.git_repo( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 78, in git_repo
    self.repo = getattr(self, 'repo', Repo(os.getcwd( ), odbt=GitCmdObjectDB))
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/repo/base.py", line 171, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/pi/APS401
Scott Leibrand
@scottleibrand
Oct 06 2016 00:06
did you re-run oref0-reset-git from that dir?
garykidd
@garykidd
Oct 06 2016 00:06
let me try again
pi@raspberrypi:~/APS401 $ oref0-reset-git
Attempting to fix git corruption.  Please wait 15s.
Git repo does not appear to be corrupt.
/usr/local/bin/oref0-reset-git: line 52: 15296 Terminated              ( sleep 15; killall oref0-fix-git-corruption )
hmmm same error again as above.... should I oref0-fix-git-corruption
I could always re-install again with your script
Scott Leibrand
@scottleibrand
Oct 06 2016 00:11
try running git status && git diff && echo all good in that dir
garykidd
@garykidd
Oct 06 2016 00:12
big list...want it here...
Scott Leibrand
@scottleibrand
Oct 06 2016 00:13
did it end with "all good"?
garykidd
@garykidd
Oct 06 2016 00:13
nope
:
Scott Leibrand
@scottleibrand
Oct 06 2016 00:13
paste what look like the relevant bits then
garykidd
@garykidd
Oct 06 2016 00:14
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   monitor/mmtune.json

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   monitor/mmtune.json
Scott Leibrand
@scottleibrand
Oct 06 2016 00:14
oh, you probably copied before I changed it
garykidd
@garykidd
Oct 06 2016 00:14
then a bunch of untracked files...
Scott Leibrand
@scottleibrand
Oct 06 2016 00:15
re-run it again as git status && git diff && echo all good and it should say all good
which would indicate that GitPython is wrong, and the repo is fine
what command gave you the InvalidGitRepositoryError ?
garykidd
@garykidd
Oct 06 2016 00:16
hmmm how do I get out this?
the command was an mmtune
openaps use pump mmtune
Scott Leibrand
@scottleibrand
Oct 06 2016 00:17
Ctrl-C is generally the Cancel command
garykidd
@garykidd
Oct 06 2016 00:17
yeah--tried that but no dice
Scott Leibrand
@scottleibrand
Oct 06 2016 00:17
what is it doing?
cassknox
@cassknox
Oct 06 2016 00:17
Question: when i run: opens use ns shell preflight, why would it return false instead of true?
garykidd
@garykidd
Oct 06 2016 00:18
Let me paste it in here and I can delete it or redact it after..
cassknox
@cassknox
Oct 06 2016 00:18
it returned true last night but now today, it says false overtime, any ideas?
Scott Leibrand
@scottleibrand
Oct 06 2016 00:19
@cassknox because it can't connect to NS
garykidd
@garykidd
Oct 06 2016 00:19
This message was deleted
Scott Leibrand
@scottleibrand
Oct 06 2016 00:19
oh, the : means you're in less
q to quit
@garykidd oh, I see the problem
you made a git repo in your homedir
cassknox
@cassknox
Oct 06 2016 00:20
@scottleibrand is there a way to fix it? i have ns up and running in another window and on my phone and its just fine
Scott Leibrand
@scottleibrand
Oct 06 2016 00:20
make sure the rig has Internet, and check its ns config
@cassknox or use http://openaps.readthedocs.io/en/dev/ and skip all the manual nonsense
garykidd
@garykidd
Oct 06 2016 00:22
shoot...how do I kill that repo then
Scott Leibrand
@scottleibrand
Oct 06 2016 00:30
just sudo rm -rf .git from your homedir
garykidd
@garykidd
Oct 06 2016 00:31
and just to confirm that's....
pi@raspberrypi:/home $
there's that frown guy (funny)
Scott Leibrand
@scottleibrand
Oct 06 2016 00:32
no, that's /home/ - you want /home/pi. just cd to change back
there's shouldn't be any /home/.git/ unless you really got creative at some point. ;-)
garykidd
@garykidd
Oct 06 2016 00:33
hey...you're talking to me.
garykidd
@garykidd
Oct 06 2016 00:41
hmmm....
I keep getting this after running mmtune now
"setFreq": 916.708, 
  "usedDefault": true
}Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 52, in __call__
    self.epilog( )
  File "/usr/local/bin/openaps-use", line 50, in epilog
    super(UseToolApp, self).epilog( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 75, in epilog
    self.create_git_commit( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 82, in create_git_commit
    self.git_repo( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 78, in git_repo
    self.repo = getattr(self, 'repo', Repo(os.getcwd( ), odbt=GitCmdObjectDB))
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/repo/base.py", line 171, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/pi/APS401
or still...
1 sec
garykidd
@garykidd
Oct 06 2016 00:46
nah...I tried to remove an y git repo from home/ and from home/pi and no dice
Scott Leibrand
@scottleibrand
Oct 06 2016 00:47
maybe remove the one in /home/pi/APS401 again and re-run oref0-reset-git there.
it could've gotten confused by already being part of the one in the parent dir
if you still get the error after that, paste the output of cd /home/pi/APS401 && git status again
garykidd
@garykidd
Oct 06 2016 00:49
and that's just a local git not actually getting pushed to git externally..right?
Scott Leibrand
@scottleibrand
Oct 06 2016 00:54
unless you're doing some sort of git based backup of your repo
garykidd
@garykidd
Oct 06 2016 00:54
that did it...thanks...was gonna ask how you knew I had a git repo in home/pi?
Scott Leibrand
@scottleibrand
Oct 06 2016 00:55
from that big wall of text you pasted (and later deleted?)
it had a bunch of ../ paths in the git status output
which means "stuff in the parent directory"
you'll never see that if the directory you're running the command from is the root of the repo
KensingtonB
@KensingtonB
Oct 06 2016 01:31
Hi - We've been running open APS for about 2 weeks, and am trying to add Heroku, because we are overwhelming Azure with data. Trying to "deploy to heroku" from github repository, and getting this error:
No app.json located in the repo URL provided.
Make sure that an app.json file exists in the project root directory.
Eric Jensen
@elnjensen
Oct 06 2016 01:33
@kenstack @bustavo Belated thanks for the Walsh reference and the details on the Glucodyn calculations. (Catching up here after being away.)
cassknox
@cassknox
Oct 06 2016 01:55
Can I get some help? Im on the phase where I'm trying to pull BG data from ns and I'm on this particular part: openaps use ns shell get entries.json 'count=10'
openaps use ns shell upload treatments.json recently/combined-treatments.json
it returns this: No JSON object could be decoded
Can anyone help me figure out where I went wrong?
(the return is actually much longer, but thats the beginning.. let me know if I need to copy the entire thing on here?)
jmcrawford
@jmcrawford
Oct 06 2016 02:00
The first line of your comment is a 'get', you're retrieving data from NS. The second line you're doing an upload, which would send the contents of the file. If the file isn't there, you'll get that error. Are you trying to retrieve from NS, or upload?
cassknox
@cassknox
Oct 06 2016 02:01
i just did the auto configure-device-crud with my ns info and then the instructions say those are the next commands

If I only run the 'get' it returns: No JSON object could be decoded

Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(file).read(), file, 'exec'))
File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/home/pi/src/openaps/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/home/pi/src/openaps/bin/openaps-use", line 58, in run
reporter(output)
File "/home/pi/src/openaps/openaps/reports/reporters/init.py", line 33, in call
self.blob = self.serialize(data)
File "/home/pi/src/openaps/openaps/reports/reporters/init.py", line 31, in serialize
return self.method.serialize(render(data), self)
File "/home/pi/src/openaps/openaps/vendors/process.py", line 56, in prerender_json
return json.loads(data)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

jmcrawford
@jmcrawford
Oct 06 2016 02:06
your command is correct, so must be a problem with the configure-device-crud command - if you check the URL in ns.ini, does it look correct?
I modified the URL in my setup so that it is wrong, and I got the same error you did
cassknox
@cassknox
Oct 06 2016 02:08
do I do that by just putting in: ns.ini? because thats not working
jmcrawford
@jmcrawford
Oct 06 2016 02:08
cat ns.ini
cassknox
@cassknox
Oct 06 2016 02:09
(sorry, I'm very very beginner at all of this)
aha! that's wrong, let me see if I can figure out how to fix that
jmcrawford
@jmcrawford
Oct 06 2016 02:09
cat is the command to view the content of a file, use nano to edit it
Or, remove the ns device and recreate it
cassknox
@cassknox
Oct 06 2016 02:12
okay, I did the nano and edited it and saved it and re-ran and it WORKED! :) thank you!!!!
okay, now the upload one won't work... do you happen to know what i've messed up there?
jmcrawford
@jmcrawford
Oct 06 2016 02:12
Awesome. I'm not much further in the process, but glad I could help
cassknox
@cassknox
Oct 06 2016 02:13
This one: openaps use ns shell upload treatments.json recently/combined-treatments.json

it returns: No JSON object could be decoded
Input file recently/combined-treatments.json does not exist.

Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(file).read(), file, 'exec'))
File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/home/pi/src/openaps/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/home/pi/src/openaps/bin/openaps-use", line 58, in run
reporter(output)
File "/home/pi/src/openaps/openaps/reports/reporters/init.py", line 33, in call
self.blob = self.serialize(data)
File "/home/pi/src/openaps/openaps/reports/reporters/init.py", line 31, in serialize
return self.method.serialize(render(data), self)
File "/home/pi/src/openaps/openaps/vendors/process.py", line 56, in prerender_json
return json.loads(data)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

It says this, [INSERT ACTUAL INSTRUCTIONS ON HOW TO CREATE a treatments.json report before ns shell upload] but I'm not too sure what that even means haha
jmcrawford
@jmcrawford
Oct 06 2016 02:17
This is where I'm at. This command will upload the contents of a file to your NS site. Up at the top of the error is says recently/combined-treatments.json does not exist.
cassknox
@cassknox
Oct 06 2016 02:17
okay, yes, do you know how to make that exist?
jmcrawford
@jmcrawford
Oct 06 2016 02:18
That file is created from some other reports. As I understand the process, you first need to pull the data from your dex receiver, it gets cleaned up to avoid duplicate records, then you upload it.
cassknox
@cassknox
Oct 06 2016 02:19
but when i ran the reports to check that it was communication to my receiver properly, everything returned looking good
Eric Jensen
@elnjensen
Oct 06 2016 02:19
@lollydaggle Re: your broken pump near the battery cap. My old 523 was/is broken like that too, so I patched it with Sugru. Take out the battery cap and put some Vaseline on the threads (so Sugru won't stick to it), then screw it back in (gently so you don't break the plastic more) and then pack the Sugru in the broken area. It will mold nicely to the threads on the cap and make new threads in the rubber as it hardens.
2016-10-05 22.14.17.jpg
2016-10-05 22.14.54.jpg
jmcrawford
@jmcrawford
Oct 06 2016 02:20
@elnjensen sugru - is there anything it won't fix?
Eric Jensen
@elnjensen
Oct 06 2016 02:20
Ah, crap - took the battery out to take that picture but forgot that Medtronic won't take a half-used battery... OK, time for a new battery! That one was close to done anyway.
jmcrawford
@jmcrawford
Oct 06 2016 02:21
@cassknox I'm going through the docs - I know I saw this in a later section
cassknox
@cassknox
Oct 06 2016 02:21
running this: openaps use <my_dexcom_name> iter_glucose 1 gave the response expected
Eric Jensen
@elnjensen
Oct 06 2016 02:21
@jmcrawford It sure is useful! Holding up fine so far, but that plastic under there is in pretty rough shape. So far so good, though.
cassknox
@cassknox
Oct 06 2016 02:21
@jmcrawford im so grateful for your help!!!
jmcrawford
@jmcrawford
Oct 06 2016 02:23
ok, so your device is set up correctly. You'll need to create a report to pull the data from your Dex device, using much the same command. The difference between a 'use' command and a 'report invoke' command is that the report writes the output to a file, which can be used in the next step of the process
cassknox
@cassknox
Oct 06 2016 02:24
okay, so i need to make a report command before the upload?
jmcrawford
@jmcrawford
Oct 06 2016 02:34
yes, I'm trying to track down the section in the docs
cassknox
@cassknox
Oct 06 2016 02:37
I am reading through the openness --help right now and it has a lot of info, just trying to figure out what i need and what I'm missing
openaps --help **
It's got all the instructions for creating your pump and CGM devices, etc. Maybe it's the same set you're working with, in which case not that helpful :(
Scott Leibrand
@scottleibrand
Oct 06 2016 02:43
@cassknox you might want to save yourself all this effort and just use oref0-setup instead
if you do that you can skip all those "manual" sections
In other news, I just tested that the new Edison Explorer board can read BG from a Dexcom connected over USB, if it also has a USB battery providing 5V power on the other USB port. Not the most compact setup to carry an external battery, but allows for completely offline looping without reliance on openxshareble.
cassknox
@cassknox
Oct 06 2016 02:45
thanks @scottleibrand i just tried oref0-setup and it didn't give me anything?
Scott Leibrand
@scottleibrand
Oct 06 2016 02:46
which reminds me, I should make that the actual name of the command. in the mean time, directions are at https://openaps.readthedocs.io/en/dev/docs/walkthrough/phase-2/oref0-setup.html
cassknox
@cassknox
Oct 06 2016 02:47
oh okay, this is exactly what i did last night and remember it didn't work
Scott Leibrand
@scottleibrand
Oct 06 2016 02:48
k, happy to help figure out why (and probably improve the script to fix it for the next person)
cassknox
@cassknox
Oct 06 2016 02:48
so I'm trying to have patience tonight and go back through slowly and figure out where i went wrong but still having problems
Scott Leibrand
@scottleibrand
Oct 06 2016 02:48
ya, patience is a lot easier when you have help and are making progress. :)
Scott Leibrand
@scottleibrand
Oct 06 2016 02:54
Explorer-Dexcom-USB.jpg
cassknox
@cassknox
Oct 06 2016 02:54
so when it asks, schedule opens in cron? i say yes, right?
Scott Leibrand
@scottleibrand
Oct 06 2016 02:54
@cassknox if it looks like everything else succeeded and you're ready for it to try to start looping, yes
cassknox
@cassknox
Oct 06 2016 02:58
Yay! okay so I did all of this last night, but then the final step on that setup tells me to run: tail -F /var/log/openaps/pump-loop.log to make sure its working properly... last time i did this, it just kept reporting over and over for more than 40 minutes so you told me something was wrong
mo-bro
@mo-bro
Oct 06 2016 02:58
Hey all! very new to OpenAPS but I am eager to get started! I am currently using a Tandem TSLIM G4....any tips on where to find a spare minimed to get started on my first rig?
Scott Leibrand
@scottleibrand
Oct 06 2016 02:58
@cassknox yeah, I remember that, vaguely. is it still doing the same nothing over and over?
@mo-bro welcome! a lot of people find theirs via asking their local T1D user groups, looking or posting on craigslist, or sometimes via medwow
cassknox
@cassknox
Oct 06 2016 03:01

@scottleibrand yes, here is what it's spit out so far... pi@raspberrypi:~ $ tail -F /var/log/openaps/pump-loop.log
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 19:57:40 PDT 2016

Starting pump-loop at Wed 5 Oct 19:58:12 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
pumphistory more than 5m old: Refreshed pumphistory
rm: cannot remove ‘enact/suggested.json’: No such file or directory
Could not parse input data: { [Error: Cannot find module '/home/pi/myopenaps/monitor/glucose.json'] code: 'MODULE_NOT_FOUND' }
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 19:59:01 PDT 2016

Starting pump-loop at Wed 5 Oct 19:59:11 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 19:59:42 PDT 2016

Starting pump-loop at Wed 5 Oct 20:00:09 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 20:00:26 PDT 2016

it keeps going through the starting loop to completed loop and then goes again...
Scott Leibrand
@scottleibrand
Oct 06 2016 03:01
@cassknox so the important bit of that is Cannot find module '/home/pi/myopenaps/monitor/glucose.json
which means it's not getting any BG data from a CGM or from NS
cassknox
@cassknox
Oct 06 2016 03:02
yeah, i noticed that... :worried:
jmcrawford
@jmcrawford
Oct 06 2016 03:02
@cassknox @scottleibrand Holy cow that is sooo much easier that what I've been working through!
cassknox
@cassknox
Oct 06 2016 03:02
yeah my ns site says Openaps unknown (still)
Scott Leibrand
@scottleibrand
Oct 06 2016 03:02
so first let's look at the log file for the ns-loop
that's the same command as you ran, but ns-loop.log instead of pump-loop.log
probably won't be much useful info there, but it's worth a look
cassknox
@cassknox
Oct 06 2016 03:03
okay, looking..
Scott Leibrand
@scottleibrand
Oct 06 2016 03:03
and then we can go start running the relevant commands manually to see all the errors
mo-bro
@mo-bro
Oct 06 2016 03:04
@scottleibrand there are definitely options on medwow but registration was a bit daunting since a business is required...is that just a formality? also what does T1D mean? also sorry @cassknox don't want to interrupt troubleshooting
Eric Jensen
@elnjensen
Oct 06 2016 03:05
I've been offline for a while so just catching up with the (many!) messages here, and seeing some of the discussion about exceeding limits for Azure free plan. I ran into that, and have worked around it to my own satisfaction, so thought I'd share what I've done. It may not be the solution for everyone, but for what it's worth, here's what I'm doing. I'll tag a few people I've seen running into this, sorry if I miss others: @sjolundjohn @Bender1061 @mikestebbins @ceben80 .
Scott Leibrand
@scottleibrand
Oct 06 2016 03:05
@mo-bro Type 1 Diabetes
mo-bro
@mo-bro
Oct 06 2016 03:05
lol duh...ty
Scott Leibrand
@scottleibrand
Oct 06 2016 03:05
@cassknox that log output comes from the openaps ns-loop | tee -a /var/log/openaps/ns-loop.log line in your crontab
so if there's not enough output there to see what's failing, we'll want to start drilling down on that alias and running its components
Eric Jensen
@elnjensen
Oct 06 2016 03:06
First, as @tim2000s pointed out, the limit it's hitting in Azure (at least for me) is not the total amount of data transferred, it's the amount of CPU time the machine is using in responding to requests. So it's less a data volume issue than it is a "how hard to NS have to work to answer this query" issue.
(Those are related to some extent, of course.)
Scott Leibrand
@scottleibrand
Oct 06 2016 03:06
@cassknox so the first step there is openaps alias show ns-loop
Sebastien Lussier
@SebastienLussier
Oct 06 2016 03:07
hello @scottleibrand ! i probably missed something, but why is a USB battery needed to read BG from dexcom via USB ?
cassknox
@cassknox
Oct 06 2016 03:08
@scottleibrand okay so i went straight in and ran: tail -F /var/log/openaps/ns-loop.log
Scott Leibrand
@scottleibrand
Oct 06 2016 03:08
inside there, you'll see openaps get-ns-bg, which is the one we're interested in, so next would be openaps alias show get-ns-bg, etc.
cassknox
@cassknox
Oct 06 2016 03:08
its still running...
should i cancel this one and start there instead?
Scott Leibrand
@scottleibrand
Oct 06 2016 03:08
@cassknox if you don't see anything interesting in that log, you can Ctrl-C out of it and try the other show commands, ya
cassknox
@cassknox
Oct 06 2016 03:09
okay, perfect I will
Eric Jensen
@elnjensen
Oct 06 2016 03:09
The most brute-force way to reduce this is just to reduce how often the NS part of the loop runs. By default it is every minute. I run mine every five minutes instead. In my case it is using the wired G5 receiver most of the time, so there's not an issue of not getting CGM data frequently - the NS part of the loop is to upload pump info, and check for temp targets. You may have to find and disable the part of the ns-loop alias that pulls BGs from NS, which is get-ns-bg. You can either redefine the ns-loop alias, or make a new one that does the same things but omits that part.
Scott Leibrand
@scottleibrand
Oct 06 2016 03:09
@SebastienLussier because the Explorer board uses 3.7V lipo power, which isn't enough to turn on the USB controller, so you need a 5V power input to do that
Sebastien Lussier
@SebastienLussier
Oct 06 2016 03:10
i see... we'll be getting our CGM soon, but we're from Canada so i guess it will be a non share G4 for us
Scott Leibrand
@scottleibrand
Oct 06 2016 03:11
some other boards have 3.7V to 5V up-conversion circuits, but those draw a lot of extra power and take a lot of extra space
@SebastienLussier time for some quick medical tourism? ;-)
after you get your crippled G4 non-share, you can just hop down and get yourself a G4 Share receiver from the states. the sensors and transmitter are all the same.
might even be able to buy the G4 Share transmitter second-hand
Sebastien Lussier
@SebastienLussier
Oct 06 2016 03:13
oh really, wasn't aware of that, this is great
anyway, i'm not at a stage where i need to worry about shrinking my rig yet, or even making it portable
first the cgm, then the explorer board
hopefully after that i'll be able to experiment with our Ping
cassknox
@cassknox
Oct 06 2016 03:16
@scottleibrand okay so here's my issues (yikes!) when i ran the openaps get-ns-bg i got: $ openaps get-ns-bg
[Errno 2] No such file or directory
openaps: 'get-ns-bg' is not an openaps command. See 'openaps --help'.
Sebastien Lussier
@SebastienLussier
Oct 06 2016 03:16
so, fun times ahead :)
Scott Leibrand
@scottleibrand
Oct 06 2016 03:16
Unfortunately the Ping can't do temps, so making a safe loop with it is a lot harder.
cassknox
@cassknox
Oct 06 2016 03:16
@scottleibrand so I'm sure I've somehow skipped over something so all this is missing?!
so thats how i found myself back in the openaps --help
Scott Leibrand
@scottleibrand
Oct 06 2016 03:17
@cassknox ok, sounds like maybe you didn't give the script the NS info it needs? Or maybe you're in a different directory than the one it set up?
cassknox
@cassknox
Oct 06 2016 03:18
i believe i only have the one directory
Scott Leibrand
@scottleibrand
Oct 06 2016 03:18
Maybe running the script again and giving it a new loop directory name to set up?
cassknox
@cassknox
Oct 06 2016 03:19
okay so which script exactly are you referring to? sorry I'm getting lost a little at this point
Eric Jensen
@elnjensen
Oct 06 2016 03:19

If you enter carbs in the pump only and don't count on pulling carbs from NS, you can also reduce the amount of querying of NS by eliminating the call to ns-meal-carbs from the ns-loop alias. Finally (and again if you're not relying on pulling real-time BG data from NS) you can have it not talk to NS while you're sleeping. For example, if you change the initial part of the ns-loop line in crontab from the default * * * * * to */5 7-23 * * * it will only run that ns-loop command every five minutes, and only between 7 AM and midnight. Obviously you can change that to suit your preferences, but that works for me - I'm sleeping during those hours, and it will upload all the missing treatments from overnight the first thing in the morning.

Again, not saying this is right for everyone, but it keeps me comfortably within the Azure limits without (in my use case) losing any functionality.

cassknox
@cassknox
Oct 06 2016 03:22
@scottleibrand also when i run the openaps do-everything command it fails too
I'm thinking something didn't get setup right but I'm at a loss for where to re-start it again
Scott Leibrand
@scottleibrand
Oct 06 2016 03:23
By the script I mean oref0-setup.sh
cassknox
@cassknox
Oct 06 2016 03:24
okay, i have run through steps 0-3 on that multiple times and it fails every time
@scottleibrand okay so maybe this is the issue, here is the output for step 2:

Installing latest oref0 dev

oref0@0.2.0 global-install /home/pi/src/oref0
npm install && sudo npm install -g && sudo npm link && sudo npm link oref0

npm WARN package.json mocha@2.5.3 No README data
npm ERR! Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR! { [Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 4.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0

npm ERR! oref0@0.2.0 global-install: npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
npm ERR! Exit status 50
npm ERR!
npm ERR! Failed at the oref0@0.2.0 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.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "global-install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
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! /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0
Checking mmeowlink installation

what are all the errors???
Scott Leibrand
@scottleibrand
Oct 06 2016 03:30
That is a permissions thing. Do rm -rf ~/src/oref0 and try again
You probably ran it with sudo before, so now you can't update. Might need to sudo on the rm
cassknox
@cassknox
Oct 06 2016 03:33
okay so i did: sudo rm -rf ~/src/oref0
Scott Leibrand
@scottleibrand
Oct 06 2016 03:33
:+1:
cassknox
@cassknox
Oct 06 2016 03:34
then ran: tail -F /var/log/openaps/pump-loop.log

and got: $ tail -F /var/log/openaps/pump-loop.log
Starting pump-loop at Wed 5 Oct 20:32:11 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 20:32:41 PDT 2016

Starting pump-loop at Wed 5 Oct 20:33:14 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 20:33:31 PDT 2016

Starting pump-loop at Wed 5 Oct 20:34:07 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
pumphistory more than 5m old:

so far....
Scott Leibrand
@scottleibrand
Oct 06 2016 03:35
No, the rm was to fix things up to run oref0-setup again.
Steps 1 and 2 I think.
cassknox
@cassknox
Oct 06 2016 03:35
ooooh okay, so now i start from the top again
okay, okay. here goes
cassknox
@cassknox
Oct 06 2016 03:41
omg omg omg I'm getting so excited because I think it's might be working.... (still running though)
@scottleibrand thank you thank you thank you for your patience and help!! I'm so thankful for all you guys do and continue to do with this
Scott Leibrand
@scottleibrand
Oct 06 2016 03:42
:+1: :smile:
cassknox
@cassknox
Oct 06 2016 03:52
okay so i just got up and danced around my apartment because I'm so excited it finally worked! and now @scottleibrand this may be an incredibly stupid question so i apologize, but whats next? am i now officially looping? and if so, does that mean the rig will now automatically make the appropriate adjutments based on my settings in ns?
Scott Leibrand
@scottleibrand
Oct 06 2016 03:53
Heh. Has it set any temp basals yet?
The next steps are right there in readthedocs. Your current loop is probably only preventing lows, not managing highs.
cassknox
@cassknox
Oct 06 2016 03:54
oh okay, well as of now I'm battling a stubborn high so i have a bunch of IOB so no temp baseless yet...
Scott Leibrand
@scottleibrand
Oct 06 2016 03:55
well, it should still set the current basal as a temp if it's working
cassknox
@cassknox
Oct 06 2016 03:55
oh, yes it still says I'm getting my normal basal right now
Scott Leibrand
@scottleibrand
Oct 06 2016 03:55
https://openaps.readthedocs.io/en/dev/docs/walkthrough/phase-3/Understand-determine-basal.html is definitely worth reading now, and comparing against your loop output
cassknox
@cassknox
Oct 06 2016 03:56
but my pump does not show any temp basals on there
Scott Leibrand
@scottleibrand
Oct 06 2016 03:57
what does it say in the log right after trying to enact? there should be a line with "recieved (misspelled)" (true or false) in it
feel free to paste those lines if you want
cassknox
@cassknox
Oct 06 2016 04:03
{"requested":{"duration":30,"rate":1.3,"temp":"absolute"},"bg":289,"temp":"percent","snoozeBG":310,"timestamp":"2016-10-05T20:57:43.853848","predBGs":{"IOB":[289,289,288,286,283,279,274,267,260,252,243,234,224,214,205,197,189,182,176,170,165,161,158,155,152,150,148,146,145,144,144,143]},"rate":120,"reason":"COB: undefined, Dev: 69, BGI: -10.6, ISF: 30, Target: 88; Eventual BG 159 >= 90, basaliob 3.29 > max_iob 0; setting current basal of 1.3 as temp. Setting neutral temp basal of 1.3U/hr","eventualBG":159,"recieved":false,"duration":0,"tick":"+2","IOB":6.639}
is that what you're asking about?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:06
that's the requested line. there should be an enacted one very similar just below it
cassknox
@cassknox
Oct 06 2016 04:07
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":289,"tick":"+2","eventualBG":159,"snoozeBG":310,"predBGs":{"IOB":[289,289,288,286,283,279,274,267,260,252,243,234,224,214,205,197,189,182,176,170,165,161,158,155,152,150,148,146,145,144,144,143]},"IOB":6.639,"reason":"COB: undefined, Dev: 69, BGI: -10.6, ISF: 30, Target: 88; Eventual BG 159 >= 90, basaliob 3.29 > max_iob 0; setting current basal of 1.3 as temp. Setting neutral temp basal of 1.3U/hr","duration":30,"rate":1.3}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{"requested":{"duration":30,"rate":1.3,"temp":"absolute"},"bg":289,"temp":"percent","snoozeBG":310,"timestamp":"2016-10-05T20:57:43.853848","predBGs":{"IOB":[289,289,288,286,283,279,274,267,260,252,243,234,224,214,205,197,189,182,176,170,165,161,158,155,152,150,148,146,145,144,144,143]},"rate":120,"reason":"COB: undefined, Dev: 69, BGI: -10.6, ISF: 30, Target: 88; Eventual BG 159 >= 90, basaliob 3.29 > max_iob 0; setting current basal of 1.3 as temp. Setting neutral temp basal of 1.3U/hr","eventualBG":159,"recieved":false,"duration":0,"tick":"+2","IOB":6.639}
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 20:57:48 PDT 2016
Scott Leibrand
@scottleibrand
Oct 06 2016 04:07
Ok, ya.
It says recieved: false
Do you have an extended bolus running?
cassknox
@cassknox
Oct 06 2016 04:11
no
Scott Leibrand
@scottleibrand
Oct 06 2016 04:12
k. what model pump?
cassknox
@cassknox
Oct 06 2016 04:12
yeah, I'm seeing on all of them it says received: false :worried:
522
Scott Leibrand
@scottleibrand
Oct 06 2016 04:12
and not suspended or priming or anything, right?
cassknox
@cassknox
Oct 06 2016 04:13
nope, nothing going on
Scott Leibrand
@scottleibrand
Oct 06 2016 04:13
probably worth pausing the loop and trying some manual commands then
do crontab -e and add a # at the front of the pump-loop line
cassknox
@cassknox
Oct 06 2016 04:13
okay
Scott Leibrand
@scottleibrand
Oct 06 2016 04:13
and then wait for a Completed pump-loop in the pump-loop.log
cassknox
@cassknox
Oct 06 2016 04:14
hmm okay let me see

$ crontab -e

Select an editor. To change later, run 'select-editor'.

  1. /bin/ed
  2. /bin/nano <---- easiest
  3. /usr/bin/vim.tiny

Choose 1-3 [2]:

Scott Leibrand
@scottleibrand
Oct 06 2016 04:15
definitely 2 (or just hit enter)
unless you want to learn vim tonight. ;-)
cassknox
@cassknox
Oct 06 2016 04:15
hahah oh no, please no
haha
David
@davidkeddydb
Oct 06 2016 04:15
ok, anyone run into this little problem I am having with flashing the edison? I have flashed the edison with Ubilinux. When I nano into any of the network/interfaces, etc I get a read 24 lines (Warning: No write permission) Am I screwed. Get a new Edison?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:16
are you logged in as root or edison user?
David
@davidkeddydb
Oct 06 2016 04:17
I am logged in as edison. Is it literally that dumb and I just need to be root? That would be fantastic.
Scott Leibrand
@scottleibrand
Oct 06 2016 04:17
yeah, just sudo the command
or if you can't sudo yet, you can log in as root or su -
(one of the first things the wiki has you do is install sudo)
cassknox
@cassknox
Oct 06 2016 04:18
okay sorry @scottleibrand , so i hit 2 (enter) and now I'm supposed to add a # in front of one of the lines there?
what if i don't see a pump-loop line?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:19
scroll all the way down
it's one of the last ones
cassknox
@cassknox
Oct 06 2016 04:19
This message was deleted
this is all i see
Scott Leibrand
@scottleibrand
Oct 06 2016 04:19
the $'s are hiding the rest of it
see if you can make your window bigger
or scroll over on each one with the arrow keys
also, edit that post to blank our your API_SECRET
cassknox
@cassknox
Oct 06 2016 04:21
oh i see, i just wasn't seeing the ends
Scott Leibrand
@scottleibrand
Oct 06 2016 04:21
having that public allows anyone to go in and mess up your NS and thereby your loop. :(
cassknox
@cassknox
Oct 06 2016 04:21
okay, so I just add a #?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:21
maybe just delete the paste entirely
fix the paste first before gitter prevents you from editing
cassknox
@cassknox
Oct 06 2016 04:22
oh dear, I'm lost haha
Scott Leibrand
@scottleibrand
Oct 06 2016 04:22
mouse over the thing you pasted above, click the ... on the right, and click Delete
there we go, thx
cassknox
@cassknox
Oct 06 2016 04:22
okay, yeah thank you
Scott Leibrand
@scottleibrand
Oct 06 2016 04:23
I trust @cjo20 and @mddub not to abuse that info, and hopefully you trust me, since you're running my code. :)
(it shows who's seen a post so far, and it was just them)
cassknox
@cassknox
Oct 06 2016 04:23
haha I'm sure they're trustworthy :)
Scott Leibrand
@scottleibrand
Oct 06 2016 04:23
ok, so yeah, just add a # to the beginning of the line, and then Ctrl-X to save and quit
cassknox
@cassknox
Oct 06 2016 04:24
okay I'm not really sure how to add that?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:24
but while you're at it you might want to delete those extra NIGHTSCOUT_HOST lines too
looks like you typo'd it a couple times when running the script
if you put your cursor on those lines (with the arrow keys) and hit Ctrl-K it'll "kill" them
then move your cursor to the beginning of the pump-loop line, type the # to add it, and then you should be ready to Ctrl-X to save and quit
cassknox
@cassknox
Oct 06 2016 04:25
okay, I've deleted the two extra HOST lines
and then i put the cursor and added a # at the beginning of the pump-loop line
Scott Leibrand
@scottleibrand
Oct 06 2016 04:26
this is bringing back memories: I used to support pico (the UW's predecessor to nano) and Pine (the accompanying email program) when I was a student there. :)
cassknox
@cassknox
Oct 06 2016 04:26
okay saved and quit
haha you're so smart!
Scott Leibrand
@scottleibrand
Oct 06 2016 04:26
even back then people had no idea how to use a program that you didn't control with a mouse. ;-)
and this was in the Windows 98 days: not too long after the dark days of DOS. :)
cassknox
@cassknox
Oct 06 2016 04:28
haha well i can admit all this is making me feel like the biggest dummy (at least the programming aspect)
so now that I added that # what should i be trying?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:29
anyway, your pump-loop.log should show the last loop has completed, at which point you can go run openaps use pump status
(we just can't be trying to use the Carelink stick at the same time the pump-loop is trying to)
cassknox
@cassknox
Oct 06 2016 04:29
oh i see, okay
$ openaps use pump status
{
"status": "normal",
"bolusing": false,
"suspended": false
Scott Leibrand
@scottleibrand
Oct 06 2016 04:35
ok, now try echo '{ "temp": "absolute", "rate": 0, "duration": 0 }' | openaps use pump set_temp_basal
that will tell the pump to cancel any running temp basal
cassknox
@cassknox
Oct 06 2016 04:36
$ echo '{ "temp": "absolute", "rate": 0, "duration": 0 }' | openaps use pump set_temp_basal
usage: openaps-use pump set_temp_basal [-h] input
openaps-use pump set_temp_basal: error: too few arguments
Scott Leibrand
@scottleibrand
Oct 06 2016 04:36
actually, before we do that (correctly), try openaps use pump read_settings
cassknox
@cassknox
Oct 06 2016 04:36
haha okay
Scott Leibrand
@scottleibrand
Oct 06 2016 04:36
I'm wondering if your pump is set to percent mode
cassknox
@cassknox
Oct 06 2016 04:37
oh you know what, it is
Scott Leibrand
@scottleibrand
Oct 06 2016 04:37
that'll do it
and that command should show it
so fix that and uncomment the pump-loop line in crontab -e and you should be in business
cassknox
@cassknox
Oct 06 2016 04:38

$ openaps use pump read_settings

Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(file).read(), file, 'exec'))
File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/home/pi/src/openaps/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
output = app(args, self)
File "/home/pi/src/openaps/openaps/uses/init.py", line 92, in call
return self.method.selected(args)(args, app)
File "/home/pi/src/openaps/openaps/uses/init.py", line 31, in call
return self.method(args, app)
File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/home/pi/src/openaps/openaps/vendors/medtronic.py", line 333, in main
return getattr(self.pump.model, name)(**self.get_params(args))
AttributeError: 'Pump' object has no attribute 'model'

Scott Leibrand
@scottleibrand
Oct 06 2016 04:38
that means it had trouble talking to the pump. probably just try again
cassknox
@cassknox
Oct 06 2016 04:39
$ openaps use pump read_settings
{
"low_reservoir_warn_point": 20,
"keypad_lock_status": 0,
"maxBasal": 2.0,
"temp_basal": {
"percent": 100,
"type": "Units/hour"
},
"low_reservoir_warn_type": 0,
"insulinConcentration": 100,
"audio_bolus_enable": true,
"variable_bolus_enable": true,
"alarm": {
"volume": 2,
"mode": 2
},
"rf_enable": false,
"auto_off_duration_hrs": 0,
"block_enable": false,
"timeformat": 0,
"insulin_action_curve": 3,
"audio_bolus_size": 0.1,
"selected_pattern": 0,
"patterns_enabled": true,
"maxBolus": 15.0,
"paradigm_enabled": 1
Scott Leibrand
@scottleibrand
Oct 06 2016 04:39
every time before doing the thing you asked for, openaps asks the pump for its model as a way of making sure it's there and formatting the request properly. if that query fails, you'll get the AttributeError: 'Pump' object has no attribute 'model' error
cassknox
@cassknox
Oct 06 2016 04:39
oh okay, gitcha
Scott Leibrand
@scottleibrand
Oct 06 2016 04:40
was that output from before or after you changed it from percent to U/hr mode?
cassknox
@cassknox
Oct 06 2016 04:40
oops, thats from sfter
after
Scott Leibrand
@scottleibrand
Oct 06 2016 04:41
k, that's fine
go ahead and uncomment the pump-loop line and let's see if it actually sets a temp this time. :)
cassknox
@cassknox
Oct 06 2016 04:42
okay
its uncommented
do i now ned to re-initiate it??
Scott Leibrand
@scottleibrand
Oct 06 2016 04:43
it will run automatically once a minute once it's uncommented
that's what the * * * * * bit means
cassknox
@cassknox
Oct 06 2016 04:44
ah okay great
Scott Leibrand
@scottleibrand
Oct 06 2016 04:44
that's "every minute of every hour of every day of the week and every day of the month etc."
so I would go watch pump-loop again. :)
(you'll be doing a lot of that. and watching NS.)
has NS updated yet?
Mike Stebbins
@mikestebbins
Oct 06 2016 04:48
@elnjensen Thanks for the steps on coming in under the Azure quota cap, I appreciate the help.
cassknox
@cassknox
Oct 06 2016 04:49
yes, ns just updated and now shows a temp basal!
Scott Leibrand
@scottleibrand
Oct 06 2016 04:49
:-D
you have the openaps pill enabled?
cassknox
@cassknox
Oct 06 2016 04:49
(same as my normal basal, but thats what it should be, right?)
yes
Scott Leibrand
@scottleibrand
Oct 06 2016 04:49
exactly. until/unless it needs to set a low temp
cassknox
@cassknox
Oct 06 2016 04:50
okay, perfect!
okay so my next steps are to continue and add the targets and max job and all those additional settings to be fully in action, right?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:51
ya, but first read through everything and spend a good bit of time watching the loop and understanding what it's doing before you let it off its leash. :)
cassknox
@cassknox
Oct 06 2016 04:52
yes I definitely will, I'm so excited!
also, how close/far does it need to be to me and my pump? like while i sleep?
and if i want to wear it all day and go mobile with it to work and whatnot, is that difficult? I have the lithium battery.
Scott Leibrand
@scottleibrand
Oct 06 2016 04:53
carelink range sucks. it needs to be as close as possible, which might mean a USB extension cable under the mattress or something
or you can get a TI stick or other better radio stick to replace the carelink (perhaps on your second rig)
cassknox
@cassknox
Oct 06 2016 04:53
okay, luckily I have already bought that
Scott Leibrand
@scottleibrand
Oct 06 2016 04:54
you can take it mobile, but if you let your battery die it will eventually corrupt the Pi's SD card. so probably want to build a second rig (or at least get a backup SD card ready) before doing much of that.
cassknox
@cassknox
Oct 06 2016 04:55
oh okay, hmm ill look into that too then
what if I'm able to plug it in under my desk at work?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:55
the very first DIYPS closed loop fried its SD card after just a few days (@danamlewis loved it so much she wanted to take it everywhere), and we were back to loop-less while I ordered new equipment. :-)
yeah, under desk at work should be fine. just needs to be within a few feet of the pump.
and there you'll have reliable wall power
cassknox
@cassknox
Oct 06 2016 04:56
haha i can totally relate to that! :)
okay perfect, and so anytime i unplug it, say to move it to my bedroom tonight, i need to have my computer to shut it down properly right?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:57
we got some awesome data (on how many DIYPS alarms were generated) out of that unintentional mini crossover study, though. :)
ideally if you're logged in you should do sudo halt to shut it down cleanly
cassknox
@cassknox
Oct 06 2016 04:57
and does it need to be on my work wifi or how do i deal with that?
Scott Leibrand
@scottleibrand
Oct 06 2016 04:57
but if you're not logged in, a clean unplug is usually fine. maybe wait until the lights stop blinking for a moment.
cassknox
@cassknox
Oct 06 2016 04:58
oh okay
Scott Leibrand
@scottleibrand
Oct 06 2016 04:58
I think the real problem with the SD cards is the batteries dying if you're mobile.
you'll want to configure your work wifi on the Pi if you can
cassknox
@cassknox
Oct 06 2016 04:58
okay, how long do they last typically?
ah that may be difficult
Scott Leibrand
@scottleibrand
Oct 06 2016 04:59
depends on the size
are you getting BG from NS or from a plugged-in receiver?
cassknox
@cassknox
Oct 06 2016 05:00
i have a receiver
plugged into the pi
but i also have ns
so... im not really sure haha
Scott Leibrand
@scottleibrand
Oct 06 2016 05:00
if you configured oref0-setup properly, it should be able to pull BG over USB and use that. would be good to test it though.
cassknox
@cassknox
Oct 06 2016 05:01
over USB meaning without the receiver?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:01
either way, I wouldn't recommend running the loop completely offline without some way to watch it until you've got a lot more experience with it
cassknox
@cassknox
Oct 06 2016 05:01
because I'm using the G5
okay
Scott Leibrand
@scottleibrand
Oct 06 2016 05:01
over USB meaning by plugging the G5 receiver's USB charging cable directly into the Pi
there might still be one bug fix for G5 USB that I need to merge to dev before that will work though.
so in the mean time you can just use NS while you're on wifi
cassknox
@cassknox
Oct 06 2016 05:02
yes i have bought a cable (smaller than the G5 receiver charging cable) that I'm using plugged into the pi with the receiver
Scott Leibrand
@scottleibrand
Oct 06 2016 05:03
if you want we can test that out now, or leave it for later
cassknox
@cassknox
Oct 06 2016 05:03
okay
so what you're saying is that the BG won't come through unless its on NS right now, right?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:04
this one you test do without stopping the pump-loop, as it's just talking to the Dexcom
cassknox
@cassknox
Oct 06 2016 05:04
or they will because my receiver is plugged into the pi
Scott Leibrand
@scottleibrand
Oct 06 2016 05:04
that's what we're about to determine
cassknox
@cassknox
Oct 06 2016 05:04
oh okay
what do i need to do?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:04
try openaps monitor-cgm from your loop directory
cassknox
@cassknox
Oct 06 2016 05:05
when you say from my loop directly...?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:05
and then if that doesn't give you any errors, do head -20 cgm/cgm-glucose.json to see the first 20 lines of output
loop directory
cassknox
@cassknox
Oct 06 2016 05:05
oops directory, sorry
cgm://JSON/oref0_glucose/raw-cgm/glucose-raw.json
raw-cgm/glucose-raw.json raised Python int too large to convert to C long
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 6, in <module>
exec(compile(open(file).read(), file, 'exec'))
File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
app( )
File "/home/pi/src/openaps/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
output = app(args, self)
File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 535, in main
for egv, raw in itertools.izip_longest(iter_glucose, iter_sensor):
File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.10-py2.7.egg/dexcom_reader/readdata.py", line 300, in iter_records
for x in reversed(xrange(start, end)):
OverflowError: Python int too large to convert to C long
Scott Leibrand
@scottleibrand
Oct 06 2016 05:06
ok, I think you don't have the bug fix yet
one sec
cassknox
@cassknox
Oct 06 2016 05:06
okay
Scott Leibrand
@scottleibrand
Oct 06 2016 05:07
oh, I don't think the fix has actually been written yet. so let's do it manually to test.
openaps/oref0#237 is the issue we're fixing
cassknox
@cassknox
Oct 06 2016 05:08
okay
Scott Leibrand
@scottleibrand
Oct 06 2016 05:10
try openaps report add raw-cgm/raw-entries.json JSON cgm oref0_glucose --hours "24.0" --threshold "100" --no-raw
cassknox
@cassknox
Oct 06 2016 05:11
okay, added
Scott Leibrand
@scottleibrand
Oct 06 2016 05:11
and then openaps report show raw-cgm/raw-entries.json --cli to check it
and then openaps report invoke raw-cgm/raw-entries.json to run it
cassknox
@cassknox
Oct 06 2016 05:12
$ openaps report invoke raw-cgm/raw-entries.json
cgm://JSON/oref0_glucose/raw-cgm/raw-entries.json
reporting raw-cgm/raw-entries.json
Scott Leibrand
@scottleibrand
Oct 06 2016 05:12
good. now head -20 raw-cgm/raw-entries.json to see what it pulled (first 20 lines)
cassknox
@cassknox
Oct 06 2016 05:13
$ head -20 raw-cgm/raw-entries.json
[
{
"trend_arrow": "FLAT",
"system_time": "2016-10-06T06:08:32",
"direction": "Flat",
"sgv": 321,
"display_time": "2016-10-05T22:08:32",
"date": 1475730512000.0,
"dateString": "2016-10-05T22:08:32",
"device": "openaps://raspberrypi/cgm",
"type": "sgv",
"glucose": 321
},
{
"trend_arrow": "FLAT",
"system_time": "2016-10-06T06:03:44",
"direction": "Flat",
"sgv": 320,
"display_time": "2016-10-05T22:03:44",
"date": 1475730224000.0,
Scott Leibrand
@scottleibrand
Oct 06 2016 05:13
sweet!
cassknox
@cassknox
Oct 06 2016 05:13
:)
Scott Leibrand
@scottleibrand
Oct 06 2016 05:13
now I'm updating oref0-setup.sh with your fix. :)
cassknox
@cassknox
Oct 06 2016 05:13
YOUR fix
okay so this means if/when i try to bring the rig to work, it won't need to be setup on wifi to pull BG data?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:15
correct. if you want to test that end-to-end we can disable the ns-loop in cron to make it stop pulling BGs from NS and just rely on CGM
cassknox
@cassknox
Oct 06 2016 05:15
okay, sure. lets try it out
Scott Leibrand
@scottleibrand
Oct 06 2016 05:16
openaps/oref0@c2272f7 has your name on it now :)
cassknox
@cassknox
Oct 06 2016 05:17
aw you didn't have to do that, its all because of you!
Scott Leibrand
@scottleibrand
Oct 06 2016 05:17
I do a lot of it, but I can't test stuff like this: we still have G4.
cassknox
@cassknox
Oct 06 2016 05:17
but I'm happy to be utilized in any and every way to make the necessary improvements for us all!
Scott Leibrand
@scottleibrand
Oct 06 2016 05:18
so I'm trying to make a point, yes, but it's a valid point: we need people testing this stuff and sharing their findings. :)
cassknox
@cassknox
Oct 06 2016 05:18
yes, please, if there's anything i can ever help test for you just let me know
Scott Leibrand
@scottleibrand
Oct 06 2016 05:19
another question for you: did you do Azure or Heroku for NS?
cassknox
@cassknox
Oct 06 2016 05:20
i did azure, but now I'm reading how i may need to switch over to heroku?
cassknox
@cassknox
Oct 06 2016 05:20
shoot, okay.. ill have to look into that
Scott Leibrand
@scottleibrand
Oct 06 2016 05:21
if you loop 24x7, azure will stop working after 18h or so each day
cassknox
@cassknox
Oct 06 2016 05:21
oh dang okay
so is that a relatively easy switch?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:21
maybe not right away, but once you have a full set of data uploaded etc.
yeah, seems to be
cassknox
@cassknox
Oct 06 2016 05:22
oh okay, then maybe ill be able to get that switched over tomorrow at work... ill try
Scott Leibrand
@scottleibrand
Oct 06 2016 05:22
you can just re-run oref0-setup.sh with the new NS website host after you've had it running for long enough to populate some CGM data
you can leave them both running in parallel: you'll just want to get openaps switched over to stop hitting azure as hard
cassknox
@cassknox
Oct 06 2016 05:24
okay cool, ill make that happen tomorrow.
Scott Leibrand
@scottleibrand
Oct 06 2016 05:25
were we still gonna comment out ns-loop tonight?
cassknox
@cassknox
Oct 06 2016 05:26
yeah, I'm up for it if you are
Scott Leibrand
@scottleibrand
Oct 06 2016 05:26
let's do it
comment out ns-loop the same way you did pump-loop earlier, and then we'll watch the pump-loop.log to make sure it gets the next BG from the CGM directly
cassknox
@cassknox
Oct 06 2016 05:27
okay
okay ns-loop is commented out
David
@davidkeddydb
Oct 06 2016 05:28
@scottleibrand Do I need to be at root to install openaps and Oref0?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:28
@davidkeddydb which directions are you following?
David
@davidkeddydb
Oct 06 2016 05:29
@scottleibrand I went all through Mmeowlink, and went ubilinux and then to jubilinux and now I want to use Oref0 dev if I can
Scott Leibrand
@scottleibrand
Oct 06 2016 05:30
that can be done as edison user
David
@davidkeddydb
Oct 06 2016 05:30
@scottleibrand does it matter either way?
cassknox
@cassknox
Oct 06 2016 05:30

$ tail -F /var/log/openaps/pump-loop.log
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
glucose.json newer than pumphistory: Refreshed pumphistory
Could not parse input data: [SyntaxError: /home/pi/myopenaps/monitor/iob.json: Unexpected end of input]
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 22:28:26 PDT 2016

Starting pump-loop at Wed 5 Oct 22:29:15 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Old settings refreshed
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 22:29:58 PDT 2016

Starting pump-loop at Wed 5 Oct 22:30:16 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
Pumphistory less than 5m old
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 22:30:32 PDT 2016

Scott Leibrand
@scottleibrand
Oct 06 2016 05:31
@davidkeddydb I used to do everything as edison user, but the Explorer boards currently require running libmraa as root, so I've been doing everything as root, and that works just as well
you just need to pick one and be consistent
@cassknox for some reason it had trouble calculating your IOB. it might correct itself after 5m or so, not sure
David
@davidkeddydb
Oct 06 2016 05:33
@scottleibrand yeah, for whatever reason when I tried su- initially it kicked an error. All good now. Will try Oref0 and see. I have flashed the TI stick but I haven't done anything with it yet
Scott Leibrand
@scottleibrand
Oct 06 2016 05:33
@davidkeddydb did you do su- or su - ?
there's a space in there that's important. :)
David
@davidkeddydb
Oct 06 2016 05:34
@scottleibrand it was one of those :smile: Devil is in the details
cassknox
@cassknox
Oct 06 2016 05:34
@scottleibrand here we go...
Starting pump-loop at Wed 5 Oct 22:33:10 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
pumphistory more than 5m old: Refreshed pumphistory
{"iob":6.192,"activity":0.0487,"bolussnooze":4.786,"basaliob":0.092,"netbasalinsulin":0.1,"hightempinsulin":0.1,"time":"2016-10-06T05:33:44.000Z"}
{"delta":2,"glucose":320,"short_avgdelta":0.72,"long_avgdelta":0.8}
{"duration":9,"rate":0.85,"temp":"absolute"}
Adjusting target_bg from 87.5 to 88
Carb Impact: 8 mg/dL per 5m; CI Duration: NaN hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
Setting neutral temp basal of 0.85U/hr
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":320,"tick":"+2","eventualBG":182,"snoozeBG":397,"predBGs":{"IOB":[320,320,319,318,316,313,309,304,298,291,283,274,264,255,247,239,231,224,217,211,205,200,195,190,186,183,180,177,175,173,172,171]},"IOB":6.192,"reason":"COB: undefined, Dev: 48, BGI: -7.31, ISF: 30, Target: 88; Eventual BG 182 >= 90, basaliob 0.09 > max_iob 0; setting current basal of 0.85 as temp. Setting neutral temp basal of 0.85U/hr","duration":30,"rate":0.85}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{"bg":320,"temp":"absolute","snoozeBG":397,"recieved":true,"predBGs":{"IOB":[320,320,319,318,316,313,309,304,298,291,283,274,264,255,247,239,231,224,217,211,205,200,195,190,186,183,180,177,175,173,172,171]},"rate":0.85,"reason":"COB: undefined, Dev: 48, BGI: -7.31, ISF: 30, Target: 88; Eventual BG 182 >= 90, basaliob 0.09 > max_iob 0; setting current basal of 0.85 as temp. Setting neutral temp basal of 0.85U/hr","eventualBG":182,"timestamp":"2016-10-05T22:34:03.883501","duration":30,"tick":"+2","IOB":6.192}
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 22:34:08 PDT 2016
Scott Leibrand
@scottleibrand
Oct 06 2016 05:34
@davidkeddydb let me update the wiki to be explicit about logging in as root vs. edison, and ditch the su stuff
@cassknox and that's a new BG reading since you disabled ns-loop?
cassknox
@cassknox
Oct 06 2016 05:35
@scottleibrand yes, its the one just spit out... ill give it a few more minutes though to make sure
Scott Leibrand
@scottleibrand
Oct 06 2016 05:36
:+1:
cassknox
@cassknox
Oct 06 2016 05:36
shoot!
Starting pump-loop at Wed 5 Oct 22:35:18 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
temp_basal.json less than 5m old
enacted.json newer than pumphistory: Refreshed pumphistory
BG data is too old, or clock set incorrectly. Your CGM time is Wed Oct 05 2016 22:25:10 GMT-0700 (PDT) but your system time is Wed Oct 05 2016 22:36:20 GMT-0700 (PDT)
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"reason":"BG data is too old, or clock set incorrectly. Your CGM time is Wed Oct 05 2016 22:25:10 GMT-0700 (PDT) but your system time is Wed Oct 05 2016 22:36:20 GMT-0700 (PDT)"}
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Wed 5 Oct 22:36:24 PDT 2016
Scott Leibrand
@scottleibrand
Oct 06 2016 05:37
oh, I know what this is
cassknox
@cassknox
Oct 06 2016 05:37
ns is saying a diff BG number now
Scott Leibrand
@scottleibrand
Oct 06 2016 05:37
this is another bug I fixed, but it only affects this troubleshooting method of commenting out ns-loop
cassknox
@cassknox
Oct 06 2016 05:37
oh okay
Scott Leibrand
@scottleibrand
Oct 06 2016 05:40
so just go ahead and uncomment ns-loop again.
if ns-loop were running (but couldn't connect to NS) it should work
cassknox
@cassknox
Oct 06 2016 05:40
ok its uncommented
re-run pump-loop?
Scott Leibrand
@scottleibrand
Oct 06 2016 05:41
nah, just let it do it
cassknox
@cassknox
Oct 06 2016 05:42
oh okay
Scott Leibrand
@scottleibrand
Oct 06 2016 05:46
@davidkeddydb I just updated https://github.com/oskarpearson/mmeowlink/wiki/Prepare-the-Edison-for-OpenAPS#initial-setup to hopefully be more clear. if it's still unclear, feel free to edit further: it's a wiki
@cassknox everything looking good?
cassknox
@cassknox
Oct 06 2016 05:48
waiting for a new number
Scott Leibrand
@scottleibrand
Oct 06 2016 05:48
I know that game. :-)
cassknox
@cassknox
Oct 06 2016 05:52
@scottleibrand
Starting pump-loop at Wed 5 Oct 22:50:08 PDT 2016:
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
Profile less than 60m old
glucose.json newer than temp_basal.json
Temp refreshed
{"iob":7.332,"activity":0.0533,"bolussnooze":5.003,"basaliob":0.081,"netbasalinsulin":0.1,"hightempinsulin":0.1,"time":"2016-10-06T05:50:50.000Z"}
{"delta":1,"glucose":324,"short_avgdelta":0.56,"long_avgdelta":0.79}
{"duration":15,"rate":0.85,"temp":"absolute"}
Adjusting target_bg from 87.5 to 88
Carb Impact: 8.6 mg/dL per 5m; CI Duration: NaN hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
Setting neutral temp basal of 0.85U/hr
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":324,"tick":"+1","eventualBG":155,"snoozeBG":380,"predBGs":{"IOB":[324,324,323,320,317,312,306,298,289,280,270,260,249,239,228,219,210,201,193,186,179,173,168,163,158,155,152,149,147,146,145,145,144,144,143]},"IOB":7.332,"reason":"COB: undefined, Dev: 51, BGI: -7.99, ISF: 30, Target: 88; Eventual BG 155 >= 90, basaliob 0.08 > max_iob 0; setting current basal of 0.85 as temp. Setting neutral temp basal of 0.85U/hr","duration":30,"rate":0.85}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{"bg":324,"temp":"absolute","snoozeBG":380,"recieved":true,"predBGs":{"IOB":[324,324,323,320,317,312,306,298,289,280,270,260,249,239,228,219,210,201,193,186,179,173,168,163,158,155,152,149,147,146,145,145,144,144,143]},"rate":0.85,"reason":"COB: undefined, Dev: 51, BGI: -7.99, ISF: 30, Target: 88; Eventual BG 155 >= 90, basaliob 0.08 > max_iob 0; setting current basal of 0.85 as temp. Setting neutral temp basal of 0.85U/hr","eventualBG":155,"timestamp":"2016-10-05T22:50:58.310236","duration":30,"tick":"+1","IOB":7.332}
glucose.json newer than pumphistory: Refreshed pumphistory
{"iob":7.286,"activity":0.0538,"bolussnooze":4.895,"basaliob":0.081,"netbasalinsulin":0.1,"hightempinsulin":0.1,"time":"2016-10-06T05:51:40.000Z"}
{"delta":5,"glucose":329,"short_avgdelta":3.22,"long_avgdelta":1.56}
{"duration":30,"rate":0.85,"temp":"absolute"}
Adjusting target_bg from 87.5 to 88
Carb Impact: 9.6 mg/dL per 5m; CI Duration: NaN hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":329,"tick":"+5","eventualBG":168,"snoozeBG":388,"predBGs":{"IOB":[329,330,329,327,324,320,314,307,299,289,280,270,259,249,239,229,220,211,204,196,190,184,178,174,170,166,163,161,159,158,157,156,156,155]},"IOB":7.286,"reason":"COB: undefined, Dev: 58, BGI: -8.07, ISF: 30, Target: 88; Eventual BG 168 >= 90, basaliob 0.08 > max_iob 0, temp 0.85 ~ req 0.85U/hr"}
Settings refresh
:clap:
David
@davidkeddydb
Oct 06 2016 05:52
@scottleibrand As I have flashed the TI but never plugged it in anywhere, how do I handle when it asks about whether I am using mmeowlink
cassknox
@cassknox
Oct 06 2016 05:53
(now if only i can get these numbers to come down!)
Scott Leibrand
@scottleibrand
Oct 06 2016 05:54
@davidkeddydb how are you connecting it? USB?
David
@davidkeddydb
Oct 06 2016 05:54
@scottleibrand at this point I dont know what the tty is though I do know I am going off the OTG port off the sparkfun board
Scott Leibrand
@scottleibrand
Oct 06 2016 05:55
@cassknox pay attention to that eventualBG. and maybe even think like openaps and figure out how much extra insulin would be needed to bring eventualBG down to target.
cassknox
@cassknox
Oct 06 2016 05:56
yeah, okay thanks @scottleibrand, i have an old pump site too so I'm thinking i should switch it out before i got to bed
Scott Leibrand
@scottleibrand
Oct 06 2016 05:56
@davidkeddydb you can plug it in and see.
David
@davidkeddydb
Oct 06 2016 05:57
Can I still do that if I have started the Oref0 dev set up?
I can kill it and start over
Scott Leibrand
@scottleibrand
Oct 06 2016 06:00
or do it in another window
cassknox
@cassknox
Oct 06 2016 06:00
alright @scottleibrand i think i need to call it a night, thanks again for all your help tonight. So excited! Just to be clear, I can shut it down in the morning and unplug and bring it to work and plug it under my desk and be going tomorrow too right?
Scott Leibrand
@scottleibrand
Oct 06 2016 06:01
should be able to. I would make the effort to get it onto work wifi, though, or via a phone hotspot
because if it's running and you can't see what it's doing, you won't know how much to trust it
cassknox
@cassknox
Oct 06 2016 06:01
okay, to do that though I need the keyboard and mouse and HDMI into a monitor right?
David
@davidkeddydb
Oct 06 2016 06:02
@scottleibrand I am running now over wifi
Scott Leibrand
@scottleibrand
Oct 06 2016 06:02
@davidkeddydb the wifi thing was for @cassknox
@cassknox unless you want to set it up now while you're already online
you can add all your other wifi networks to wpa_supplicant.conf (or via the Raspberry Pi graphical interface)
cassknox
@cassknox
Oct 06 2016 06:03
you mean i can set up my work wifi now while I'm on my home wifi?
David
@davidkeddydb
Oct 06 2016 06:03
@scottleibrand Sorry, how do I find out what tty I am on from the command line on the edison
Scott Leibrand
@scottleibrand
Oct 06 2016 06:03
@cassknox yeah, if you know the SSID and password
cassknox
@cassknox
Oct 06 2016 06:03
ooooh okay, i'll get on that. Thanks!
Tim Street
@tim2000s
Oct 06 2016 06:03
@cassknox And you know what encryption type it uses
Scott Leibrand
@scottleibrand
Oct 06 2016 06:04
@davidkeddydb it'll probably be /dev/ttyACM0 - you can do an ls /dev/ttyA* before and after you plug it in to see what shows up
that said, you might also want to do the udev rules thing in case you ever need to plug in two USB devices (then it might be /dev/ttyACM1)
cassknox
@cassknox
Oct 06 2016 06:05
@tim2000s hmmm this may be trickier than i thought haha i was hoping to just pull the info off my saved wifi networks on my phone
Scott Leibrand
@scottleibrand
Oct 06 2016 06:06
@cassknox if you have a mac it might be accessible from the Keychain app
David
@davidkeddydb
Oct 06 2016 06:06
how do I do that as that would be nice if I ever wanted to plug cgm into a usb splitter. I did get that on your suggestion by the way.
Scott Leibrand
@scottleibrand
Oct 06 2016 06:06
This message was deleted
cassknox
@cassknox
Oct 06 2016 06:06
i am on a mac, however i do not use it at work
Scott Leibrand
@scottleibrand
Oct 06 2016 06:06
there's also another way you can do it with a "by-id/Nightscout" type of thing
@cassknox if you have an iPhone, it probably shares your wifi passwords with the Mac
cassknox
@cassknox
Oct 06 2016 06:07
oh duh okay
Tim Street
@tim2000s
Oct 06 2016 06:07
@cassknox if it just uses WPA-PSK you can set it up like your home wifi.
If it uses the enterprise version, you'll need to edit the wpa_supplicant.conf file
David
@davidkeddydb
Oct 06 2016 06:09
@scottleibrand should I already have mmeowlink installed for the TI stick prior to Oref0 or it will do it as part of the install package?
Scott Leibrand
@scottleibrand
Oct 06 2016 06:09
it can install it for you, either way
@cassknox I bet there are a few other OpenAPS users at that office of yours who could help with the wifi if you can't figure it out. :)
Tim Street
@tim2000s
Oct 06 2016 06:10
👍
Scott Leibrand
@scottleibrand
Oct 06 2016 06:10
@cassknox but in the mean time, you should also set up your phone's hotspot (if it supports that) and test that
that way you can always get the Pi online via your phone any time you want to see what it's doing or reconfigure it
cassknox
@cassknox
Oct 06 2016 06:10
@scottleibrand you would think in my offices there would be a couple, but no one i have heard using it there yet...
Scott Leibrand
@scottleibrand
Oct 06 2016 06:11
you're not at HQ then?
Tim Street
@tim2000s
Oct 06 2016 06:11
And if you download an ssh client onto your phone, you always have terminal access.
Scott Leibrand
@scottleibrand
Oct 06 2016 06:11
I use ServerAuditor for that
cassknox
@cassknox
Oct 06 2016 06:11
no i am... in San Diego
John Sjolund
@sjolundjohn
Oct 06 2016 06:11

QQ- when changint NS servers (Azure to Heroku for me) what are all the places I need to change it in OpenAPS?
1) Cron
2) /.profile

Anything else?

Tim Street
@tim2000s
Oct 06 2016 06:11
Me too @scottleibrand
On android I used JuiceSSH
NS.ini
@sjolundjohn
Scott Leibrand
@scottleibrand
Oct 06 2016 06:12
@sjolundjohn or just re-run oref0-setup.sh ;-)
^^ my new favorite answer for everything. ;-)
cassknox
@cassknox
Oct 06 2016 06:13
haha
Tim Street
@tim2000s
Oct 06 2016 06:13
Lol. Haven't got my head around that yet, after all the original work to set it up.
cassknox
@cassknox
Oct 06 2016 06:14
i think our wifi is very protected at work
John Sjolund
@sjolundjohn
Oct 06 2016 06:14
@scottleibrand indeed, I have found it is the best path to solve issues. Almost feels like cheating after learning the system :-)
cassknox
@cassknox
Oct 06 2016 06:14
i know not everyone is on it even
but theres also a guest wifi, maybe that one would be easier
Scott Leibrand
@scottleibrand
Oct 06 2016 06:14
@cassknox I know Chris Hannemann and Ben West are both in San Diego: not sure how close to you they are though.
does the guest wifi require login?
cassknox
@cassknox
Oct 06 2016 06:15
casue im not finding it on my keychain
no pw for the guest
Scott Leibrand
@scottleibrand
Oct 06 2016 06:15
if it's completely open, that would indeed be best
you can even set up your Pi to try any open wifi network it finds.
cassknox
@cassknox
Oct 06 2016 06:15
okay hmm but id have to be in the office right?
or can i do that from here at home?
John Sjolund
@sjolundjohn
Oct 06 2016 06:16
Thans @tim2000s and thanks @elnjensen for help
Scott Leibrand
@scottleibrand
Oct 06 2016 06:16
if you know the exact name of the guest network you can set it up explicitly
or you can edit wpa_supplicant.conf go connect to any open wifi
but for tonight I would focus on phone hotspot if that's an option
David
@davidkeddydb
Oct 06 2016 06:16

@scottleibrand I got an exception thrown: Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
)[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log

Scott Leibrand
@scottleibrand
Oct 06 2016 06:17
@davidkeddydb odd: that looks like a problem in pip, not any of our stuff.
cassknox
@cassknox
Oct 06 2016 06:17
shoot hotspot itsnt on my phone
:-1: oh well, ill figure it out tomorrow somehow... hopefully!
Scott Leibrand
@scottleibrand
Oct 06 2016 06:18
@davidkeddydb unless that pip.log shows something else
cassknox
@cassknox
Oct 06 2016 06:18
Thanks again @scottleibrand you're my hero!
Scott Leibrand
@scottleibrand
Oct 06 2016 06:18
:) glad we got you up and running!
cassknox
@cassknox
Oct 06 2016 06:18
me too! so so glad!
Scott Leibrand
@scottleibrand
Oct 06 2016 06:21
@cassknox have a good night! and check your PM's too. :)
David
@davidkeddydb
Oct 06 2016 06:21
@scottleibrand when going through set up, I get this error now after putting in NS, pump serial, etc: Checking /root/dke1: /root/src/oref0/bin/oref0-setup.sh: line 173: openaps: command not found
Scott Leibrand
@scottleibrand
Oct 06 2016 06:22
@davidkeddydb wonder if your FS / SD card got corrupted?
I would re-run at least the openaps install step
David
@davidkeddydb
Oct 06 2016 06:23
@scottleibrand what is the command in jubilinux to see file contents, is it still ls
Scott Leibrand
@scottleibrand
Oct 06 2016 06:23
yeah, jubilinux is almost identical to raspbian. both are debian linux distributions
(unlike, say, yocto, which is different in a lot of ways)
David
@davidkeddydb
Oct 06 2016 06:24
hmm. then I almost think my directory is empty. Will try rerunning set up
@scottleibrand as I am now, well trying to get on the edison, it means the chip is toast right?
Scott Leibrand
@scottleibrand
Oct 06 2016 06:26
unlikely to be an actual toasted chip at this point. usually those result in more spectacular failures, not something subtle
jmcrawford
@jmcrawford
Oct 06 2016 06:29
My loop is showing everything in mg/dL, how would I change it to mmol/L? I know it has something to do with units, I see a couple of reports in openaps.ini showing "to = mg/dL". Would I change these to mmol/L or something?
Scott Leibrand
@scottleibrand
Oct 06 2016 06:29
@jmcrawford is your pump set to mmol/L?
jmcrawford
@jmcrawford
Oct 06 2016 06:29
I changed it earlier this evening
Scott Leibrand
@scottleibrand
Oct 06 2016 06:30
are you using oref0-setup or a manual build?
jmcrawford
@jmcrawford
Oct 06 2016 06:30
oref0-setup - thanks to you and @cassknox
Scott Leibrand
@scottleibrand
Oct 06 2016 06:31
:-)
I think it's supposed to automatically pick up the units from the pump settings
but we only use mg/dL, so that's another thing I haven't tested much
jmcrawford
@jmcrawford
Oct 06 2016 06:33
The unit change hasn't been reflected in the pump-loop.log yet
Scott Leibrand
@scottleibrand
Oct 06 2016 06:34
if @cjo20 is around I think he might remember which things got translated over to mmol/L and which didn't...
Tim Street
@tim2000s
Oct 06 2016 06:34
The unit change doesn't apply in he pump-loop.log
Scott Leibrand
@scottleibrand
Oct 06 2016 06:35
or @tim2000s ;-)
(or probably lots of other EU folks that are getting online right about now)
jmcrawford
@jmcrawford
Oct 06 2016 06:40
Interesting, I can see in cgm/glucose.json that the sgv values changed from mg/dL to mmol/L at 21:38
Tim Street
@tim2000s
Oct 06 2016 06:43
Hmmm. I don't use a connected CGM. My values in NS-glucose.json are all my/dl
*mg/dl
I don't think I've got any mmol/l in my set up.
Matthias
@ceben80
Oct 06 2016 07:05
@scottleibrand question to the new setup vs my old loop where my attached Dexcom has already the priority for reading BGs.
Now if I attach the Dexcom and azure is available the BGs are coming from ns.
What needs to be done exactly to priorize a attached CGM device?
David
@davidkeddydb
Oct 06 2016 07:21
I am stopping for now, but for some reason my TI stick is set now to a dialout which it shouldn't be. Calling it quits for now. Thanks @scottleibrand for the help. Got futher along. Almost there.
Scott Leibrand
@scottleibrand
Oct 06 2016 08:20
@ceben80 Nightscout doesn't have priority necessarily. I think it's whichever BG is most recent. Share might be a few seconds more recent, not sure.
Matthias
@ceben80
Oct 06 2016 08:21
we don't use share in germany, my Dexcom is directly pi attached :wink:
Chris Oattes
@cjo20
Oct 06 2016 09:23
@scottleibrand: The stuff I did was for the output of determine-basal. If the right information is present, the output strings are converted to mmol/L that are uploaded to NS (Apart from BG itself, as that isn't generated inside determine-basal)
@davidkeddydb Anything internal to oref0 uses mg/dL, which is why the setups have the units device (to change the mmol/L pump data in to the format that oref0 understands). I think the only things in the logs that will be in mmol/L is (most of) the json output from determine-basal
Hannah Crabtree
@lollydaggle
Oct 06 2016 11:12
@elnjensen thanks so much! sugru was on my list of things to try but wasn't sure it would work that smoothly.
John Benjamin
@Bender1061
Oct 06 2016 11:26
@elnjensen thanks for the tips, the changing the alias not to pull BG readings from Nightscout if you are plugged in, or in my case using the enlite is a good idea, maybe that's something we can add to the oref0-setup script. Might look into that tonight. could make it part of the interactive setup.
Eric Jensen
@elnjensen
Oct 06 2016 12:38
@ceben80 Here's how I changed the NS loop to only pull BGs if the receiver is not available. (This is the raw line that's in openaps.ini.)
ns-loop-nobg = ! bash -c "echo Starting ns-loop at `date`: && if [ ! -e /dev/ttyACM0 ]; then openaps get-ns-bg; fi && openaps ns-temptargets && echo Refreshed temptargets && openaps upload && echo ns-loop completed at `date`."
The /dev/ttyACM0 is where the receiver shows up in my setup. Might be different for yours, and might swap if you have multiple USB devices plugged in. @scottleibrand had a more flexible way in a conversation a while back here about using lsusb and checking the device ID to make sure we're seeing the Dexcom receiver and not some other USB device, but I haven't implemented that yet.
@Bender1061 Something like the above might work for you, too, except I'm not sure how to check to see if you're getting enlite data. Might have to involve checking dates, could be a little more complicated.
David
@davidkeddydb
Oct 06 2016 13:12
So last night I got almost all the way through Oref0 dev set up and then things sort of fell apart with the TI stick. I got to listening......... but apparently it never heard anything. Any suggestions? I don't have my set up to try it to give the exact errors but perhaps later. I think I flashed the TI stick correctly but with my luck....
jwedding
@jwedding
Oct 06 2016 13:23
@scottleibrand & @loudestnoise Sorry, I 'm on the wrong time zone for you guys it seems! I'm not sure what that would mean in terms of scaling. In terms of at scale, right now it's all one off setups by me or Ben or Ali. As I'm not sure what's required, I'd probably need pretty specific details, or to set up a webinar the first time to make sure I was allocating the proper resources. If you wanted to be the guinea pig David, we could give it a go this evening.
David
@davidkeddydb
Oct 06 2016 13:28
When the Ti stick is plugged into the sparkfun board via otg usb I did get an initial green light on the TI stick for like a second. Should that green light stay on once it is plugged into the board?
Sandra Keßler
@SandraK82
Oct 06 2016 13:36
I'm seeing errors in my log:IOError: Lock at '/home/pi/myopenaps/.git/refs/heads/master.lock' could not be obtainedwhat should I do
cassknox
@cassknox
Oct 06 2016 13:44
@scottleibrand if I'm trying to use server auditor on my phone like you were talking about, how do I sign into that and have it access my PI? Or is it something I have to setup at home on wifi?
David
@davidkeddydb
Oct 06 2016 14:05
@cassknox If you have an iphone, go to apple store and you can download the app. Otherwise I think it is on google as well. It is Serverauditor
Once you are able to ssh into the PI then you can use Serverauditor to start the loop, shutdown the PI, you name it.
Tim Street
@tim2000s
Oct 06 2016 14:16
@cassknox You'll need the ipaddress of your Pi or try pi@raspberry.local
cassknox
@cassknox
Oct 06 2016 14:18
@tim2000s would that be my username or host name?
Tim Street
@tim2000s
Oct 06 2016 14:18
To set up the pi as a host.
David
@davidkeddydb
Oct 06 2016 14:18
I think with mine it actually requires ssh pi@raspberrypi.local
username is pi
host is going to be raspberrypi.local
cassknox
@cassknox
Oct 06 2016 14:19
@davidkeddydb thank you, yes I'm in an iPhone and I have the app, just trying to set up the host
David
@davidkeddydb
Oct 06 2016 14:21
@cassknox I dont know why, but for me the serverauditor on the iphone doesnt work as well for me as the ipad. YMMV. I would often get connection issues with the iphone. Possibly be I was on another wifi network than the pi which won't work to ssh into it.
cassknox
@cassknox
Oct 06 2016 14:51
okay i think i entered it all correctly, but my pi isnt picking up wifi here at work so its not working
David Young
@wgs4
Oct 06 2016 15:22
which model pebble watch is best for this project?
or is it all cosmetic preference?
Dana Lewis
@danamlewis
Oct 06 2016 15:24
Cosmetic preference, although many OpenAPsers like the urchin watchface, and I think I heard that doesn't work with round but should work with everything else
David Young
@wgs4
Oct 06 2016 15:25
is Urchin the software watchface I install after getting the physical watch? Trying to have my wife buy a pebble while shes out shopping and want to tell her the right thing to buy. :-)
Dana Lewis
@danamlewis
Oct 06 2016 15:26
Correct.
It's mostly cosmetic preference , pick the one you want to wear
David Young
@wgs4
Oct 06 2016 15:28
And its ok to buy the Pebble 2 vs the older Pebble classic?
Dana Lewis
@danamlewis
Oct 06 2016 15:28
Yes.
David Young
@wgs4
Oct 06 2016 15:42
well the Pebble 2 just started pre-order and shipping this month...
Dana Lewis
@danamlewis
Oct 06 2016 15:42
Yep. I have one on order since my beloved pebble steel is dying
Matthias
@ceben80
Oct 06 2016 15:47
@elnjensen great...thank you!!!
Mike Stebbins
@mikestebbins
Oct 06 2016 16:12
Capture.JPG

Tried switching Nightscout over to Heroku from Azure last night on a working rig, just started over using the setup script and changed to the new NS address. My loop is working (I can see temp basals set on my pump), but no openaps or pump data appears to be going to Nightscout and URCHIN on my pebble isn't showing any treatment data. I've enabled "openaps" and "pump" (see picture). Trying to track down the issue, I'm going through the pertinent openaps alias' one-by-one, and I get the following error when running openaps ns-meal-carbs`:

Warning: could not parse monitor/carbhistory.json
Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json

/usr/local/lib/node_modules/oref0/lib/meal/history.js:19
    for (var i=0; i < carbHistory.length; i++) {
                                 ^
TypeError: Cannot read property 'length' of undefined
    at findMealInputs (/usr/local/lib/node_modules/oref0/lib/meal/history.js:19:34)
    at generate (/usr/local/lib/node_modules/oref0/lib/meal/index.js:8:20)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-meal.js:99:21)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

Any ideas on what's going on or where to debug?

I should have mentioned that I don't have my Dexcom plugged into the pi, so I know that the rig is successfully pulling BG data (at least) from the Heroku data store...I'm just not sure why I can't see any treatment/carb/temp-basals in NS on Heroku yet.
Mike Stebbins
@mikestebbins
Oct 06 2016 16:54

More debugging. Stepping through aliases, I can get to the point that my upload\latest-treatments.json looks like this:

[
  {
    "duration": "30",
    "raw_duration": {
      "_type": "TempBasalDuration",
      "_description": "TempBasalDuration 2016-10-06T09:50:45 head[2], body[0] op[0x16]",
      "timestamp": "2016-10-06T09:50:45-07:00",
      "_body": "",
      "_head": "1601",
      "duration (min)": 30,
      "_date": "adb2094610"
    },
    "timestamp": "2016-10-06T09:50:45-07:00",
    "absolute": "0",
    "rate": 0,
    "raw_rate": {
      "_type": "TempBasal",
      "temp": "absolute",
      "_description": "TempBasal 2016-10-06T09:50:45 head[2], body[1] op[0x33]",
      "timestamp": "2016-10-06T09:50:45-07:00",
      "_body": "00",
      "_head": "3300",
      "rate": 0,
      "_date": "adb2094610"
    },
    "eventType": "Temp Basal",
    "medtronic": "mm://openaps/mm-format-ns-treatments/Temp Basal",
    "created_at": "2016-10-06T09:50:45-07:00",
    "enteredBy": "openaps://medtronic/715"
  }
]

But when I run ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json it returns Input file entries.json does not exist.

Scott Leibrand
@scottleibrand
Oct 06 2016 17:00
You don't have those two env variables set in your CLI environment.
You can paste the two lines from crontab into your shell to get them there for the current session.
If you want them every login they'd need to go into .profile.
Mike Stebbins
@mikestebbins
Oct 06 2016 17:01
Hold everything: I just flipped back to my Heroku NS instance, and I see the basals displayed finally! I made a change to my crontab NIGHTSCOUT_HOST entry that may have made the diference. Previously, I'd had "https://mstebbins.herokuapp.com/" . I deleted the trailing "/", and it seems to be working via cron.
Scott Leibrand
@scottleibrand
Oct 06 2016 17:01
The meal.json thing was probably just because you'd never entered or uploaded a carb entry to that NS yet.
Mike Stebbins
@mikestebbins
Oct 06 2016 17:02
Thanks, @scottleibrand, that makes sense on why it's working via crontab (after I fixed my hostname) but not in the CLI.
Scott Leibrand
@scottleibrand
Oct 06 2016 17:22
If anyone in or near Seattle is looking for a loopable pump, @diabeticgonewild found this: http://seattle.craigslist.org/see/ele/5807462680.html
If anyone non-local decides to buy it and the seller doesn't want to ship it (or you need someone to check that it works), I'm quite close by.
katie disimone
@Kdisimone
Oct 06 2016 17:22
actually i tried to buy it last night…instead i ended up talking him into trying loop. he’d done openaps with it previously
i could kick myself. i wanted that pump
:smile:
Eric
@ecc1
Oct 06 2016 17:24
@Kdisimone the good karma will be worth it :-)
Scott Leibrand
@scottleibrand
Oct 06 2016 17:24
Haha nice.
katie disimone
@Kdisimone
Oct 06 2016 17:25
He was a very nice guy. I hope he finds success with it.
katie disimone
@Kdisimone
Oct 06 2016 17:30
I’ve seen this pump in person and it works. A 715 with 1.2A. I bought a 722 from her that works great. http://orangecounty.craigslist.org/hab/5773166253.html
Hardwick1973
@Hardwick1973
Oct 06 2016 17:43
I have run the set-up script (http://openaps.readthedocs.io/en/dev/docs/walkthrough/phase-2/oref0-setup.html) and everything has been configured correctly...I had been struggling with getting my data to Nightscout but this is now working. Being new to the Putty interface I am feeling my way a little...from my loop directory, what's the best way to "run" so I can see what is going on (as an open loop). Ideally, I want to start, stop, then review the log files.
Stephen Lombardo
@lombardostephen_twitter
Oct 06 2016 17:54
I'm very new to all of this, I have a Medtronics 530g pump but I use the Dexcom G5 for CGM. Will I be able to build a system with my current pump or will I need to get an older MiniMed pump? Thanks!
Scott Leibrand
@scottleibrand
Oct 06 2016 18:20
"Medtronic" is singular. (Sorry, pet peeve.) No, 530G is too new. Check the hardware page of the OpenAPS docs.
@hardwick1973 you can comment out the pump-loop in cron and run it manually.
Stephen Lombardo
@lombardostephen_twitter
Oct 06 2016 18:24
Thanks and sorry!
Scott Leibrand
@scottleibrand
Oct 06 2016 18:28
:smile:
cassknox
@cassknox
Oct 06 2016 18:29
Hey @scottleibrand so I've got my rig plugged in and basically sitting in my lap here at work today and its not looping :( my openaps hasnt been working on my ns site for the past 6 hours (since I unplugged it this morning and brought it to work with me... do you think the commands we ran last night to get rid of the need for the wifi connect isnt working now? Any ideas why that would be?
Dana Lewis
@danamlewis
Oct 06 2016 18:29
@Kdisimone tell the Seattle guy to look us up/say hi, we have meet ups periodically :)
cassknox
@cassknox
Oct 06 2016 18:31
@scottleibrand Also, FYI, I got in touch with Mr Hannemann :) We're going to meet up to compare notes and tips on our break sometime soon. Thank you for the help!
Scott Leibrand
@scottleibrand
Oct 06 2016 18:31
@cassknox apparently not. need to set up an ssh client to log in and check it. if you can't get it on wifi, you can plug it into your computer with an Ethernet cable and ssh that way to troubleshoot. or get keyboard video and mouse set up to use the GUI
cassknox
@cassknox
Oct 06 2016 18:33
@scottleibrand Okay, conveniently I happen to have an Ethernet cable out in my car so I'll run and grab it :) I was trying to get the server auditor app to work but I don't think it will if my Pi isn't on the same wifi, right?
PieterGit
@PieterGit
Oct 06 2016 18:34
@scottleibrand : can you give an update on the explorerboard? Did you managed to get Dexcom G4 via USB OTG working? EnhancedRadioDevices/915MHzEdisonExplorer#3
cassknox
@cassknox
Oct 06 2016 18:35
@scottleibrand uh oh, I just took a look at the back of my computer here and it looks like the only Ethernet port is already occupied...
Scott Leibrand
@scottleibrand
Oct 06 2016 18:35
@PieterGit :point_up: October 5, 2016 7:43 PM
Hardwick1973
@Hardwick1973
Oct 06 2016 18:35
@scottleibrand so by running the interactive script (step 2) has the loop been initiated in cron and therefore is step 3 simply the output log file of step 2? (Or does step 3 kick everything off?)
Scott Leibrand
@scottleibrand
Oct 06 2016 18:36
step 3 is just to look at the output log file. in step 2 it asks if you want to set up cron or not.
PieterGit
@PieterGit
Oct 06 2016 18:36
This message was deleted
Scott Leibrand
@scottleibrand
Oct 06 2016 18:37
@PieterGit updated and closed the issue too
PieterGit
@PieterGit
Oct 06 2016 18:40
@scottleibrand : that's great news. not really portable, but usable... and any news on when the explorerboard will be available?
John Sjolund
@sjolundjohn
Oct 06 2016 18:41

@danamlewis @scottleibrand some more setup script feedback.

I just did a totally clean install (issues getting Edison working after switching to Heroku). Before that, I updated everything possible on the Edison including running npm run global-install.

The issue I am facing is that NS treatments are not being uploaded automatically.
1) The loop is running and I can see in reports and on pump that it is being enacted
2) I step through all NS alias / reports and it works including uploading of treatments and status
3) I can see that alias= pump-loop and ns-loop seem to be running
4) At the end of ns-loop it says "uploaded"

I can for the life of me not figure out why "openaps upload" is not running automatically.

To add, when I run openaps upload it works as expected
Hardwick1973
@Hardwick1973
Oct 06 2016 18:44
@scottleibrand great - last q from me. What's the best way to edit/modify cron? (I've done a quick Google but to no avail)
Dana Lewis
@danamlewis
Oct 06 2016 18:44
@scottleibrand I wonder if what @sjolundjohn is seeing what I am suspecting happening with paint splotch.
Scott Leibrand
@scottleibrand
Oct 06 2016 18:45
@Hardwick1973 crontab -e
John Sjolund
@sjolundjohn
Oct 06 2016 18:46
edison@edison2:~/openaps$ openaps ns-loop
Starting ns-loop at Thu Oct 6 20:44:32 CEST 2016:
ns://JSON/shell/cgm/ns-glucose.json
reporting cgm/ns-glucose.json
Refreshed temptargetsWarning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json
Removed duplicate bolus/carb entries:3
11 0 Thu Oct 06 2016 18:10:53 GMT+0200 (CEST)
+++--+-------+-----+++>>++->>>>>>>>++++------==-----=------=+++=-=-->>>>+++------=--=+------=--------------------+++++-----+-->>>>++>>>+---++-----+=--+=-++-++===--=+--+-==---==------+-----==+++++++=+++=--------------++--------+--+>>>>>>+++--+++-++++++=--++++++>> 58% of non-meal deviations negative (target 45%-50%)
Excess insulin sensitivity detected: ISF adjusted from 37.800000000000004 to 51
0
33 0 Thu Oct 06 2016 15:04:33 GMT+0200 (CEST)
+++--+-------+-----+++>>++->>>>>>>>++++------==-----=------=+++=-=-->>>>+++------=--=+------=--------------------+++++-----+-->>>>++>>>+---++-----+=--+=-++-++===--=+--+-==---==------+-----==+++++++=+++=--------------++--------+--+>>>>>>+++--+++-++++++=--++++++>> 58% of non-meal deviations negative (target 45%-50%)
Excess insulin sensitivity detected: ISF adjusted from 37.800000000000004 to 51
0
 and meal-carbs
Uploaded
Scott Leibrand
@scottleibrand
Oct 06 2016 18:46
@sjolundjohn might want to compare your NIGHTSCOUT_HOST and API_SECRET variables between cron and your shell
John Sjolund
@sjolundjohn
Oct 06 2016 18:47
shell in /.profile?
Scott Leibrand
@scottleibrand
Oct 06 2016 18:47
yeah, or just echo $NIGHTSCOUT_HOST etc
@sjolundjohn or you can bite the bullet and go set up proper ns uploads, and keep track of what you do to get those working so we can incorporate into oref0-setup
John Sjolund
@sjolundjohn
Oct 06 2016 18:49
@scottleibrand only difference I can detect between cron and when I run echo commands is that there is a trailing / on one of teh URL's
Scott Leibrand
@scottleibrand
Oct 06 2016 18:49
someone said that broke things for them
John Sjolund
@sjolundjohn
Oct 06 2016 18:50
@scottleibrand the NS uploads are working, just the automation component of having it run in cron for some reason
Scott Leibrand
@scottleibrand
Oct 06 2016 18:50
John Sjolund
@sjolundjohn
Oct 06 2016 18:51
and it has run perfectly every other time with the script. This is a new one for today
Scott Leibrand
@scottleibrand
Oct 06 2016 18:51
¯\_(ツ)_/¯
John Sjolund
@sjolundjohn
Oct 06 2016 18:54

My non technical but logical head tells me there is something not right with the ns-loop alias.

ns-loop ! bash -c "echo Starting ns-loop at $(date): && openaps get-ns-bg; openaps ns-temptargets && echo -n Refreshed temptargets && openaps ns-meal-carbs && echo \" and meal-carbs\" && openaps upload"

The last alias (upload) works perfectly when manual, but if you use the alias ns-loop it does not seem to want to work. Even though it displays uploaded

Scott Leibrand
@scottleibrand
Oct 06 2016 18:56
did you fix the URL?
John Sjolund
@sjolundjohn
Oct 06 2016 18:59

I did, removed trailing slash in cron.

Something did happen here when I ran ns-loop

Let me have it sit for 10 min to see if it works by itself
John Sjolund
@sjolundjohn
Oct 06 2016 19:06
I think that did it. Trailing slash, which comes when you copy paste NS URL from browser. Damn - 2 hours trying to troubleshoot and kept rebuilding it
Scott Leibrand
@scottleibrand
Oct 06 2016 19:07
please open an issue on that. should be easy to strip the / in code
John Sjolund
@sjolundjohn
Oct 06 2016 19:17
@scottleibrand absolutely will do
tazitoo
@tazitoo
Oct 06 2016 19:19
@scottleibrand - was just trying out the oref0-setup.sh script (slick!). The script stopped when it couldn't create the openxshareble vendor. Looking at the script, at line 275, it might be missing a cd $HOME/$DIR...?
John Sjolund
@sjolundjohn
Oct 06 2016 19:23

@scottleibrand openaps/oref0#242

Dinner time... wishing everybody a great evening/day

Scott Leibrand
@scottleibrand
Oct 06 2016 19:24
@tazitoo I think I fixed that in the oref0-setup branch. you can just run it a second time and it should work.
thx @sjolundjohn
tazitoo
@tazitoo
Oct 06 2016 19:24
yup! second time is the charm...thanks
garykidd
@garykidd
Oct 06 2016 19:26
This is getting old quickly......got to at least scale down to edison this weekend........
blob
garykidd
@garykidd
Oct 06 2016 19:41
@scottleibrand could you direct me to the battery you're using in that setup? are you using a separate charger board for that?
garykidd
@garykidd
Oct 06 2016 20:07
that meaning the battery used with edison explorer board you shared above
Dana Lewis
@danamlewis
Oct 06 2016 20:07
no, don’t need a battery block for the explorer board
the picture might be a smaller battery because i’ve got the ‘big’ one (2200 mah, still tiny and appropriate size for edison in your pocket) on me.
garykidd
@garykidd
Oct 06 2016 20:09
sorry not explorer board per se....the edison ...but isnt it hooke dup to your explorer board with a battery underneath
?
Dana Lewis
@danamlewis
Oct 06 2016 20:09
yes. but it doesn’t require an extra board. the setup is: explorer board with edison plugged on + battery plugged in via jst. nothing else.
garykidd
@garykidd
Oct 06 2016 20:10
understood
2200 give you 10 or 12 hours or so?
Dana Lewis
@danamlewis
Oct 06 2016 20:11
closer to 20 for a full charge for an old edison rig, haven’t kicked the tires hard enough to confirm how the 2200 runs with the explorer board yet, but hoping for at least 10-12 (i.e. average day). today’s going to be a good test for it.
David Young
@wgs4
Oct 06 2016 20:15
how do I instal urchin on pebble with iPhone ?
cant figure out how to get pbw file access in app. I do have dev enabled.
Scott Leibrand
@scottleibrand
Oct 06 2016 20:16
safari gives you an option to open the pbw in pebble
David Young
@wgs4
Oct 06 2016 20:16
got it thanks
fiberfan
@fiberfan
Oct 06 2016 20:28
Any recommendations on battery for a pi rig using a xDrip wixel receiver?
cassknox
@cassknox
Oct 06 2016 20:31
@scottleibrand okay so I have plugged my RPi into my computer with the Ethernet and I'm trying to run putty but I keep getting an error, do you know what the host name should be??
Scott Leibrand
@scottleibrand
Oct 06 2016 20:32
if you haven't changed it it'll be raspberrypi.local
cassknox
@cassknox
Oct 06 2016 20:33
@scottleibrand Hmm it says "Unable to open connection to raspberrypi.local Host does not exist"
I haven't changed it
David Young
@wgs4
Oct 06 2016 20:34
on urchin watchface, what is the wifi symbol indicating? the pebble classic doesn’t have wifi. My instance of nightscout has no data currently. does the wifi symbol with a line through it mean there is no data being uploaded from my cgm to nightscout possibly?
Dana Lewis
@danamlewis
Oct 06 2016 20:34
Read the readme ;) has some good info in there
David Young
@wgs4
Oct 06 2016 20:35
:-)
amazing what has already been documented. sorry about that !
Scott Leibrand
@scottleibrand
Oct 06 2016 20:38
@cassknox unless you're good at network troubleshooting, best bet is probably KVM (keyboard, video, and mouse)
cassknox
@cassknox
Oct 06 2016 20:39
@scottleibrand dang okay, well that's not an option for me at work as I don't have an hdmi port on my work computer to make that work.. Hmm guess I'll have to wait for Ben West to get back to me, hopefully he will have some helpful solutions !
Scott Leibrand
@scottleibrand
Oct 06 2016 20:40
most desktop monitors have HDMI input
maybe find a conference room?
cassknox
@cassknox
Oct 06 2016 20:41
Yeah I know the conference rooms have them, I just need to make sure it's okay that I use them for this... I'm going to talk to some people and see if I can't get in there for a little to try and make this work. Thanks for trying!
Scott Leibrand
@scottleibrand
Oct 06 2016 20:44
it's just HDMI. you can plug into the screen/projector the same way you would plug in a laptop. asking for permission for something like that is just asking for trouble.
no separate charger board needed...that's cool.
PieterGit
@PieterGit
Oct 06 2016 20:51
I currently have a rpi3 with smartipi touch (http://smarticase.com/products/smartipi-touch) as a standalone screen displaying nightscout with chromium and using as a fixed rig in the livingroom. An upgrade to a Ockel Sirus A, https://www.indiegogo.com/projects/ockel-sirius-a-the-world-s-most-versatile-mini-pc-mobile-design--2#/ might be interesting as a form factor (bigger than edision) . But because it's Windows 10 only and quite expensive, I'll skip this product. Their Ockel Sirius B is quite nice, but too powerhugry to use as an openaps rig.
David Young
@wgs4
Oct 06 2016 20:54
does RPi 2 have built-in bluetooth? or does that not happen until RPi 3?
PieterGit
@PieterGit
Oct 06 2016 20:54
rpi2 does not have bluetooth or wifi. You should use a RPI3 for that
cassknox
@cassknox
Oct 06 2016 20:56
@scottleibrand haha I know, I don't need any trouble! But I was just thinking, even if I can sneak in there and get into ssh, I don't have the wifi credentials so I'm not so sure there's a point unless someone can get me those top secret credentials...
We have one guest wifi without a pw but I'm not sure that one would work?
Tim Street
@tim2000s
Oct 06 2016 21:07
I'm currently running an RPI3 and it all works nicely on there, although I've disabled the BT due to using slice of radio\
Scott Leibrand
@scottleibrand
Oct 06 2016 21:12
@wgs4 Pi 2 works fine with USB and Bluetooth dongles, though, if you already have one you want to use.
@cassknox you can connect to the guest wifi from the Pi (if it's open and doesn't make you click through a web page when you connect)
David Young
@wgs4
Oct 06 2016 21:48
@scottleibrand thx, yes i ordered a $6 bluetooth dongle from amazon prime a few minutes ago.
is there any place for a riley link in an OpenAPS instance, or is that something unnessary to OAPS?
Scott Leibrand
@scottleibrand
Oct 06 2016 22:00
we have one where the RL is soldered to an Intel breakout board. no real advantage to doing that over soldering a TI stick though.
and as soon as Explorer board is available, that will be way easier
David Young
@wgs4
Oct 06 2016 22:02
@scottleibrand I don’t think I’ve thrown this out to the community yet, but I own an electronics manufacturing company. So, in the event building hardware is needed, I’m more than happy to help you guys out on that level. Soldering is pretty much my thing.
Scott Leibrand
@scottleibrand
Oct 06 2016 22:05
@wgs4 Nice. Morgan is just about ready to place orders for all the parts for the first batch of Explorer boards, which he was then planning to hand off to a local manufacturer to assemble. If you think you could beat them on speed and/or price (for this batch or future ones), I'm sure he'd love to discuss.
David Young
@wgs4
Oct 06 2016 22:07
I would love to. I am certain I could beat them on speed because my business is driven by my interests.. and this projects has the bulk of my interests right now. :-)
@scottleibrand pmed you.
Eric Jensen
@elnjensen
Oct 06 2016 23:01
@wgs4 It looks like you may have already settled on a square Pebble model, but in case you are interested in the Pebble round at some point, I do have Urchin running on it (thanks to some pointers from @mddub ). It's a little clunky still in terms of layout/ configuration so I haven't PRed anything back to the main repo yet, but hope to do that soon.
Dana Lewis
@danamlewis
Oct 06 2016 23:06
Oh great to hear @elnjensen
cassknox
@cassknox
Oct 06 2016 23:08
@scottleibrand yeah that's kind of what I was thinking would be the issue with our open guest wifi, there is a terms and services pop up page you must accept for it to work so I think that's out of the question. I'm going to try and check out the keychain on my Mac again, I can't figure out why my work wifi credentials aren't on there, I feel like they have to be
Scott Leibrand
@scottleibrand
Oct 06 2016 23:13
another option is to get a little Ethernet switch so you can plug the Pi in via Ethernet instead of wifi.
cassknox
@cassknox
Oct 06 2016 23:17
yeah i did plug in via ethernet today but when I was trying to get into putty to get on ssh it wouldn't work
okay and now I'm home, and it isn't working still, hmm
ns isnt looping