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

29th
Jan 2016
dougtakeuti
@dougtakeuti
Jan 29 2016 02:31

@scottleibrand and @bewest, yesterday you helped me fix the fact that all reports were root. Now whenever an alias includes rm, it prompts for authorization to remove every single file. This generates problems in the cron, so that the loop is incomplete or does not run at all. This problem is related to an alias named update:

update = ! bash -c "rm monitor/*; openaps report invoke monitor/clock.json  monitor/reservoir.json  monitor/clock-zoned.json monitor/current_pump_status.json monitor/current_battery_status.json  monitor/pumphistory.json settings/basal_profile.json monitor/temp_basal.json monitor/iob.json"

The second problem is that I have observed that enact/suggested.json is generated as root by the following alias:

enact = ! bash -c "rm enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json && grep -q duration enact/suggested.json && ( openaps report invoke enact/enacted.json && cat enact/enacted.json ) || echo No action required"

This leads to an error again when I try to upload to NS. Any ideas about what I should look for?

Scott Leibrand
@scottleibrand
Jan 29 2016 02:32
You're still running openaps with sudo
or as root, somehow
is your crontab running things as root, or with sudo?
or do any of your aliases have sudo in them?
dougtakeuti
@dougtakeuti
Jan 29 2016 02:39
I've been looking for that kind of thing, trying to clean everything. I'll double check.
Scott Leibrand
@scottleibrand
Jan 29 2016 02:41
how are you doing your crontab? /etc/crontab, or crontab -e as pi, or something else?
dougtakeuti
@dougtakeuti
Jan 29 2016 02:50
crontab -e
Scott Leibrand
@scottleibrand
Jan 29 2016 02:51
as pi, or as root? if unsure, type whoami where you would normally type crontab -e
dougtakeuti
@dougtakeuti
Jan 29 2016 02:52
When I check status, I see
pi@raspberrypi:~ $ service cron statuscron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled)
   Active: active (running) since Thu 2016-01-28 22:49:43 BRST; 1h 59min ago
     Docs: man:cron(8)
 Main PID: 2394 (cron)
   CGroup: /system.slice/cron.service
           └─2394 /usr/sbin/cron -f
Scott Leibrand
@scottleibrand
Jan 29 2016 02:52
that's fine (cron runs as root, but it runs your jobs as the user whose crontab they're in)
try openaps alias show | grep sudo and crontab -l | grep sudo
if neither of those returns anything, maybe you just didn't completely clean up from an earlier manual sudo run
dougtakeuti
@dougtakeuti
Jan 29 2016 02:54
but when I have to stop /start cron I have to do sudo service cron start otherwise acess is denied. is that ok?
Scott Leibrand
@scottleibrand
Jan 29 2016 02:54
you should never have to restart cron
but sudo there is fine if you do
to make sure everything is cleaned up, do chown -R pi.pi ./ from your openaps repo directory
dougtakeuti
@dougtakeuti
Jan 29 2016 02:57
I didn't get anything from openaps alias show | grep sudo and crontab -l | grep sudo
Scott Leibrand
@scottleibrand
Jan 29 2016 02:57
you'll probably get Operation not permitted errors, in which case run sudo chown -R pi.pi ./
Aaron Michelson
@Aaybob
Jan 29 2016 03:26
I get the message No action required when suggested.json does not contain the word "duration". I want to take action when the word "duration" is present. There is the operator ||. Is there an operator to do the opposite of || such as <true> {operator}<run> will run. I think I get errors by telling the pump to do illogical nothing.
Scott Leibrand
@scottleibrand
Jan 29 2016 03:43
&& is the inverse of ||
pronounced "and
Pronounced "and" vs. "or" :-)
Aaron Michelson
@Aaybob
Jan 29 2016 03:44
hmmm
Shows a similar use of &&
dougtakeuti
@dougtakeuti
Jan 29 2016 03:51
Thanks! No more rm prompts.
JaysonEwer
@JaysonEwer
Jan 29 2016 04:00
I think i've run into my first git corruption :-/ Hello Everyone.
Scott Leibrand
@scottleibrand
Jan 29 2016 04:22
oref0-reset-git
Jason Curry
@mccgm
Jan 29 2016 04:42
I understand I need inputs from my suggested.json report to go into my enacted.json and I know I need the rate and duration from it, but no amount of research or looking back through this thread gives me enough background to make it happen.
Aaron Michelson
@Aaybob
Jan 29 2016 04:43
@mccgm the documentation was just changed and does make it much harder to understand
Jason Curry
@mccgm
Jan 29 2016 04:44
Is there any documentation out there that I can use to better understand how to call inputs from one report to another?
Aaron Michelson
@Aaybob
Jan 29 2016 04:44
the documentation last week did not use "enacted.json". I don't understand that part and don't need it.
Scott Leibrand
@scottleibrand
Jan 29 2016 04:44
Suggestions please
Aaron Michelson
@Aaybob
Jan 29 2016 04:45
what is enacted.json's purpose?
Scott Leibrand
@scottleibrand
Jan 29 2016 04:45
we need you to propose how to do better. Just complaining doesn't help.
It shows what was enacted.
Aaron Michelson
@Aaybob
Jan 29 2016 04:45
I'm just saying its hard to understand
Scott Leibrand
@scottleibrand
Jan 29 2016 04:45
So you can upload it to NS or see what happened when.
Aaron Michelson
@Aaybob
Jan 29 2016 04:46
I haven't gotten that far
Jason Curry
@mccgm
Jan 29 2016 04:46
Oh, I'm not complaining, I'm saying what I do know and what I don't know
Aaron Michelson
@Aaybob
Jan 29 2016 04:46
I have a log that shows every running not just runs that enact something
Jason Curry
@mccgm
Jan 29 2016 04:47
I'm also asking for learning resources. If this is not the appropriate forum, I apologize
Scott Leibrand
@scottleibrand
Jan 29 2016 04:47
If you have any openaps use in your loop, you'll need to replace those with reports that do the same thing, but actually record what they've done.
@mccgm you're doing great.
I was reacting to @Aaybob's tone.
Logs are good. When you also want to upload what happened, you'll need a report producing an enacted.json so you can upload that to NS.
@mccgm a report stores the output of an openaps command (a use)
To figure out which use you want here, try openaps use -h
Jason Curry
@mccgm
Jan 29 2016 04:51
I actually want to know more about some of these shell commands and what they do, so I "get" what's going on. I have googled, but if there is a resource out there for gaining a bit more of the functions and syntax of "text" "&&" and "shell"
Scott Leibrand
@scottleibrand
Jan 29 2016 04:52
&& is a bash thing. You can google that.
But the others are openaps-specific.
-h is your friend there.
And the openaps docs of course.
Aaron Michelson
@Aaybob
Jan 29 2016 04:54
@scottleibrand you know I'm so grateful for your help...its' more help than any doctor visit and I can't wait to get another night of that good blood sugar...and @mccgm said there is no way to understand "enacted" and I wanted to tell him that I closed the loop without "enacted"
Jason Curry
@mccgm
Jan 29 2016 04:54
yeah, that -h has been helpful in the past, but in the case of set_temp_basal, I'm really not sure what it's saying
Aaron Michelson
@Aaybob
Jan 29 2016 04:55
Although I closed the loop my understanding of what I'm doing isn't too good
I first tried set_temp_basal with a number to set the temp basal to that number....it didn't work
Jason Curry
@mccgm
Jan 29 2016 04:56
Yeah, I'll keep looking, but maybe #IAmWaiting until I can take a programming class
Aaron Michelson
@Aaybob
Jan 29 2016 04:57
Ok hold on.... temp basal gets the input <n> or something according to -h
Scott Leibrand
@scottleibrand
Jan 29 2016 04:57
@Aaybob thanks. I hear you. We still need to make this stuff more straightforward. But we need your help to document things.
Jason Curry
@mccgm
Jan 29 2016 04:57
@Aaybob me too, but along with the duration as well.
Scott Leibrand
@scottleibrand
Jan 29 2016 04:57
The input it wants is your suggested.json (output of oref0-determine-basal)
It needs to be in JSON format.
Aaron Michelson
@Aaybob
Jan 29 2016 04:58
I guess I thought "enacted" was an unneccesary barrier to completion.
Scott Leibrand
@scottleibrand
Jan 29 2016 04:58
That is what makes it harder to do from the command line.
@Aaybob you can enact a temp without reporting to enacted.json: that file is to store the output for auditing and uploading.
Aaron Michelson
@Aaybob
Jan 29 2016 04:59
give temp basal the report
Scott Leibrand
@scottleibrand
Jan 29 2016 04:59
So "necessary" for some things but not others.
Aaron Michelson
@Aaybob
Jan 29 2016 05:00
The feeling of waking up from a night of good blood sugar is indiscribably delicious
The doc made it seem like we had to parse the text
@mccgm use the format given in -h and input the file.....did you give up?
Aaron Michelson
@Aaybob
Jan 29 2016 05:05
"enacted" seemed like a new level of programming which we had to extract text
Scott Leibrand
@scottleibrand
Jan 29 2016 05:05
Nah, it's just a matter of configuring a report, the same way as all the other reports you set up to pull data from the pump.
Aaron Michelson
@Aaybob
Jan 29 2016 05:06
doc's got to say that
Scott Leibrand
@scottleibrand
Jan 29 2016 05:06
K. If you have any suggestions for how to explain that without "giving people the answers", would love to accept a pull request. :-)
we don't want to allow people to just copy and paste something without understanding.
But obviously helping people understand is the important part, so we need help from people who had trouble understanding the first time to figure out what would make more sense.
Jason Curry
@mccgm
Jan 29 2016 05:08
The section on enacted and the enact alias has a good start and prompts the user to dig deep and gain background knowledge. I would recommend more of the same
Scott Leibrand
@scottleibrand
Jan 29 2016 05:08
It's hard to figure out what is hard to understand when I know the system like the back of my hand.
Jason Curry
@mccgm
Jan 29 2016 05:10
Maybe some "recommended reading" links on how to understand the basics of pulling information from one report to another
(if that's even what I'm supposed to be trying for)
Aaron Michelson
@Aaybob
Jan 29 2016 05:11
yeah I hear you, is it a legal thing? I understand for hardware but software? People need to understand because things will go wrong and they will need to figure out what changed. But its something that will improve the life....my friend kind of got upset when I showed her because she thought of how corporations keep the cure and make money off the sick.
@see how lost he is from the document update?
Scott Leibrand
@scottleibrand
Jan 29 2016 05:13
Mostly it's a safety thing: we want people to understand how the system works so they can teoubleshoot it. There is also some element of "ownership": if you build your own system, you are responsible for how it works. If you just copy and paste someone else's code, you might be inclined to blame them if it malfunctions somehow.
Aaron Michelson
@Aaybob
Jan 29 2016 05:14
I never would have closed the loop.....I needed a copy and paste of some sort....and then I modified my pasted after seeing an error message that allowed me to solve a problem of using a report I hadn't written....there's no way to understand the programming at that point of development....i thought the doc found a good balance there of not giving something to copy and paste exactly.
Aaron Michelson
@Aaybob
Jan 29 2016 05:22
did you see my video?
JaysonEwer
@JaysonEwer
Jan 29 2016 05:25
@scottleibrand thanks for the oref0-reset-git, is that what I should be doing when I try to do a git push and I get the following message back?
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>
Jason Curry
@mccgm
Jan 29 2016 05:38
Has anyone tried fivver.com to find coding help?
Ben West
@bewest
Jan 29 2016 05:43
git remote -v
to find a list of origins
try git push origin
JaysonEwer
@JaysonEwer
Jan 29 2016 05:44
Thank's @bewest Is this indicative of git corruption?
Ben West
@bewest
Jan 29 2016 05:45
no
JaysonEwer
@JaysonEwer
Jan 29 2016 05:45
Its like my config vanished
I was backing up just fine.
Ben West
@bewest
Jan 29 2016 05:45
that's what reset git does
it destroyes your git
hmm
JaysonEwer
@JaysonEwer
Jan 29 2016 05:45
ah, but it also didnt fix my issue yet.
Ben West
@bewest
Jan 29 2016 05:45
oh?
I'm watching your video, currently on minute 11
JaysonEwer
@JaysonEwer
Jan 29 2016 05:47
my preflight is good, but it fails here:
Jan 29 00:46:37 Ewer-Open-APS openaps: Traceback (most recent call last):
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/bin/openaps-report", line 4, in <module>
Jan 29 00:46:37 Ewer-Open-APS openaps:     __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 745, in run_script
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1670, in run_script
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
Jan 29 00:46:37 Ewer-Open-APS openaps:     app( )
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
Jan 29 00:46:37 Ewer-Open-APS openaps:     self.run(self.args)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
Jan 29 00:46:37 Ewer-Open-APS openaps:     output = app(args, self)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/subcommand.py", line 50, in __call__
Jan 29 00:46:37 Ewer-Open-APS openaps:     return self.method.main(args, app)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/invoke.py", line 48, in main
Jan 29 00:46:37 Ewer-Open-APS openaps:     reporters.Reporter(report, device, task)(output)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 27, in __call__
Jan 29 00:46:37 Ewer-Open-APS openaps:     self.blob = self.serialize(data)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 25, in serialize
Jan 29 00:46:37 Ewer-Open-APS openaps:     return self.method.serialize(render(data), self)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/process.py", line 55, in prerender_json
Jan 29 00:46:37 Ewer-Open-APS openaps:     return json.loads(data)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
Jan 29 00:46:37 Ewer-Open-APS openaps:     return _default_decoder.decode(s)
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
Jan 29 00:46:37 Ewer-Open-APS openaps:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jan 29 00:46:37 Ewer-Open-APS openaps:   File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
Jan 29 00:46:37 Ewer-Open-APS openaps:     raise ValueError("No JSON object could be decoded")
Jan 29 00:46:37 Ewer-Open-APS openaps: ValueError: No JSON object could be decoded
Jan 29 00:46:37 Ewer-Open-APS openaps: No CGM data.
Ben West
@bewest
Jan 29 2016 05:48
ah, so cgm report is failing?
which is your cgm report?
it fails when you do openaps report invoke monitor/glucose.json (whatever your glucose report is named?)
JaysonEwer
@JaysonEwer
Jan 29 2016 05:49
Nope, i'm good there.
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke monitor/glucose.json
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
Ben West
@bewest
Jan 29 2016 05:50
hmmm
when it fails
it should say which report it's attempting right before it fails
JaysonEwer
@JaysonEwer
Jan 29 2016 05:50
calculate-iob://JSON/shell/monitor/iob.json
Ben West
@bewest
Jan 29 2016 05:50
ah, great
ok
so running that report fails every time?
JaysonEwer
@JaysonEwer
Jan 29 2016 05:51
it looks like it:
pi@Ewer-Open-APS:~/Documents/openaps $ openaps gather
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
reporting monitor/pumphistory.json
calculate-iob://JSON/shell/monitor/iob.json

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/pi/Documents/openaps/settings/profile.json'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js:35:22)
    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)
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1670, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/subcommand.py", line 50, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/invoke.py", line 48, in main
    reporters.Reporter(report, device, task)(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 27, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 25, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/process.py", line 55, 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
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 29 2016 05:52
ah, can't find settings/profile.json
JaysonEwer
@JaysonEwer
Jan 29 2016 05:52
ah, profile
Ben West
@bewest
Jan 29 2016 05:52
order for oref0:
  1. get-profile, 2.) calculate-iob, 3.) determine-basal
JaysonEwer
@JaysonEwer
Jan 29 2016 05:53
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke settings/profile.json
get-profile://text/shell/settings/profile.json

/usr/local/lib/node_modules/oref0/lib/profile/basal.js:8
    var basalRate = basalprofile_data[basalprofile_data.length-1].rate
                                                                 ^
TypeError: Cannot read property 'rate' of undefined
    at Object.basalLookup (/usr/local/lib/node_modules/oref0/lib/profile/basal.js:8:66)
    at generate (/usr/local/lib/node_modules/oref0/lib/profile/index.js:27:33)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js:58:19)
    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
reporting settings/profile.json
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 29 2016 05:53
aha, hmmmm
ok it's trying to look at your active-basal-profile
from selected_basal_profile
I think docs have this part wrong
can you pull out the get-profile report definition?
I should make this task easier, apologies
JaysonEwer
@JaysonEwer
Jan 29 2016 05:54
Its been working fine for over a week. I did recently make some changes to my ranges.
Ben West
@bewest
Jan 29 2016 05:55
hmm on the pump?
JaysonEwer
@JaysonEwer
Jan 29 2016 05:55
yes
and even after I made the changes, It was working fine, thats why I thought I ran into some corruption
Ben West
@bewest
Jan 29 2016 05:56
hmm
if git status runs ok, it's not corrupt
also any reports/uses run ok it's not corrupt
JaysonEwer
@JaysonEwer
Jan 29 2016 05:56
well, i did the reset, let me check status
Ben West
@bewest
Jan 29 2016 05:56
if you do git remote -v and it's empty, we might want to restore your remote so you can push again
JaysonEwer
@JaysonEwer
Jan 29 2016 05:57
pi@Ewer-Open-APS:~/Documents/openaps $ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    basal_profile.json
    bg_targets.json
    calculate-iob.ini
    cd
    cgms.ini
    clock.json
    determine-basal.ini
    get-profile.ini
    glucose.json
    max_iob.json
    model.json
    ns-status.ini
    ns-upload.ini
    oref0-mint-max-iob.sh
    oref0.ini
    pump-history.json
    pump.ini
    pump_settings.json
    pumphistory.json
    read_status.json
    tz.ini
    upload/

nothing added to commit but untracked files present (use "git add" to track)
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 29 2016 05:57
well, the rerports are running
yeah ,it's fine
JaysonEwer
@JaysonEwer
Jan 29 2016 05:57
are all those NOT being tracked? I need to track those guys
Aaron Michelson
@Aaybob
Jan 29 2016 05:59
When I go out of cgm reception my loop continues to say no cgm data and preflight fail 20 times so far . I'm told the program should be expected to recover. I'm not sure if I've ever seen it recover from having gone out of reception range.
Scott Leibrand
@scottleibrand
Jan 29 2016 06:00
@aaybob does the CGM have data? or is it giving you an "out of range" antenna error?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:00
yep
Oh, sorry, @scottleibrand you were talking to @Aaybob :-D
Aaron Michelson
@Aaybob
Jan 29 2016 06:00
yes, just missed one tick while in kitchen
Scott Leibrand
@scottleibrand
Jan 29 2016 06:01
what does your preflight alias look like?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:02
@bewest I did seem to have a pretty good lockup a day ago, and then again today, I had to unplug my wifi to get it to come back onto the network
Scott Leibrand
@scottleibrand
Jan 29 2016 06:04
that's not uncommon. I have some workarounds in cron for that, but they're specific to my setup. unplugging and replugging wifi is a good fix though
Aaron Michelson
@Aaybob
Jan 29 2016 06:05
preflight ! bash -c "rm -f model.json && openaps report invoke model.json 2>/dev/null >/dev/null && grep -q T monitor/clock.json && echo /"PREFLIGHT OK/" || (mm-stick warmup || (sudo oref0-reset-usb && echo PREFLIGHT SLEEP && sleep 120); echo PREFLIGHT FAIL; exit 1)"
Scott Leibrand
@scottleibrand
Jan 29 2016 06:05
@JaysonEwer check the contents of the basal profile json in your settings directory
JaysonEwer
@JaysonEwer
Jan 29 2016 06:06
checking
Scott Leibrand
@scottleibrand
Jan 29 2016 06:06
@Aaybob your preflight logic is flawed
Aaron Michelson
@Aaybob
Jan 29 2016 06:07
ah ha!
Scott Leibrand
@scottleibrand
Jan 29 2016 06:07
stuff in parentheses gets executed as a single unit
you're only doing PREFLIGHT SLEEP if mm-stick warmup fails and oref0-reset-usb succeeds
JaysonEwer
@JaysonEwer
Jan 29 2016 06:08
pi@Ewer-Open-APS:~/Documents/openaps $ cat settings/basal_profile.json
[]pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 29 2016 06:08
that may or may not be causing the issue you care about, but it makes that part of the loop ineffective
@JaysonEwer there's your problem
JaysonEwer
@JaysonEwer
Jan 29 2016 06:08
delete it and re-run that report?
Scott Leibrand
@scottleibrand
Jan 29 2016 06:08
do you have an openaps report invoke settings/basal_profile.json in your loop somewhere?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:08
thought I did, checking...
Scott Leibrand
@scottleibrand
Jan 29 2016 06:09
I recommend refreshing all of your settings reports regularly so you can recover if one of them comes back empty like that
I do it right in my loop, after the important stuff is all done
@Aaybob even with your messed up preflight logic, you shoudl be getting PREFLIGHT OK if it's able to invoke the model.json report
you say you're always getting PREFLIGHT FAIL?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:10
I'm still looking, but in the meantime, I've just re-run that report. I'm pretty sure its part of my openaps gather alias
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke settings/basal_profile.json
pump://JSON/read_basal_profile_std/settings/basal_profile.json
reporting settings/basal_profile.json
pi@Ewer-Open-APS:~/Documents/openaps $ cat settings/basal_profile.json
[
  {
    "i": 0,
    "start": "00:00:00",
    "rate": 1.9500000000000002,
    "minutes": 0
  },
  {
    "i": 1,
    "start": "05:00:00",
    "rate": 1.5,
    "minutes": 300
  },
  {
    "i": 2,
    "start": "09:00:00",
    "rate": 2.15,
    "minutes": 540
  },
  {
    "i": 3,
    "start": "15:00:00",
    "rate": 2.15,
    "minutes": 900
  },
  {
    "i": 4,
    "start": "18:00:00",
    "rate": 2.0,
    "minutes": 1080
  }
]pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 29 2016 06:11
much better
JaysonEwer
@JaysonEwer
Jan 29 2016 06:11
yep
Scott Leibrand
@scottleibrand
Jan 29 2016 06:12
you might have put it in a part of your loop that never gets executed if previous steps fail
JaysonEwer
@JaysonEwer
Jan 29 2016 06:12
cool, i got a new error, :-D
my carelink failed, it will reset in sec
Scott Leibrand
@scottleibrand
Jan 29 2016 06:12
if gather is conditional on (follows an && after) something that depends on profile.json to work, you'll be stuck in a catch-22
JaysonEwer
@JaysonEwer
Jan 29 2016 06:13
ah
yeah
pi@Ewer-Open-APS:~/Documents/openaps $ openaps gather
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
monitor/clock.json  raised  write failed: [Errno 5] Input/output error
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1670, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/subcommand.py", line 50, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/medtronic.py", line 62, in before_main
    self.check_session(app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/medtronic.py", line 115, in check_session
    self.session = self.get_session_info( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/medtronic.py", line 81, in get_session_info
    fields = self.create_session( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/medtronic.py", line 103, in create_session
    self.pump.power_control(minutes=minutes)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/session.py", line 75, in power_control
    data = self.stick.download( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 725, in download
    size = self.poll_size( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 551, in poll_size
    size  = self.read_status( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 567, in read_status
    result = self.query(LinkStatus)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 504, in query
    return self.process( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 485, in process
    raw = self.send_force_read( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 601, in send_force_read
    self.link.write(reader.format( ))
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/link.py", line 45, in write
    r = self.serial.write( string )
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 489, in write
    raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error
pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 29 2016 06:13
; is the thing that says "run this next, regardless of whether that last thing worked"
JaysonEwer
@JaysonEwer
Jan 29 2016 06:13
Its wild I haven't run into this yet. :-D
Scott Leibrand
@scottleibrand
Jan 29 2016 06:13
not sure I have either
could be your carelink stick is hosed
try the mm-stick warmup
Ben West
@bewest
Jan 29 2016 06:14
I/O error like that indicates flaky usb/device knocked loose from port
JaysonEwer
@JaysonEwer
Jan 29 2016 06:14
yeah my preflight has been passing ok and thats in there
Scott Leibrand
@scottleibrand
Jan 29 2016 06:14
could be bad cable then, if nothing is loose
JaysonEwer
@JaysonEwer
Jan 29 2016 06:14
but not this time...:-D
pi@Ewer-Open-APS:~/Documents/openaps $ mm-stick warmup
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/stick.py", line 906, in <module>
    stick = Stick(link.Link(port))
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/link.py", line 23, in __init__
    raise AlreadyInUseException("{port} already in use".format(port=port))
decocare.link.AlreadyInUseException: /dev/serial/by-id/usb-0a21_8001-if00-port0 already in use
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 29 2016 06:15
ah, loop going
Scott Leibrand
@scottleibrand
Jan 29 2016 06:15
that just means loop has already got it open
Ben West
@bewest
Jan 29 2016 06:15
it is 10:15 afterall
Scott Leibrand
@scottleibrand
Jan 29 2016 06:15
if loop is working, you're good. :)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:16
not working, i'm still getting the No CGM data message
Scott Leibrand
@scottleibrand
Jan 29 2016 06:19
what does glucose.json look like?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:19
pi@Ewer-Open-APS:~/Documents/openaps $ openaps gather
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
reporting monitor/pumphistory.json
calculate-iob://JSON/shell/monitor/iob.json

module.js:485
    throw err;
          ^
SyntaxError: /home/pi/Documents/openaps/settings/profile.json: Unexpected end of input
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:482:27)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js:35:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1670, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/subcommand.py", line 50, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/invoke.py", line 48, in main
    reporters.Reporter(report, device, task)(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 27, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/reports/reporters/__init__.py", line 25, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/vendors/process.py", line 55, 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
pi@Ewer-Open-APS:~/Documents/openaps $
I'll get you glucose in a sec
Ben West
@bewest
Jan 29 2016 06:19
thought it was saying profile.json
need to double check which steps are being run
Scott Leibrand
@scottleibrand
Jan 29 2016 06:19
did you ever re-run the profile.json report?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:20
yep
Ben West
@bewest
Jan 29 2016 06:20
manually, just now, or in the loop?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:20
let me stop my loop, i think i'm in a loop or something. :D
manually
i'm going to manually step through my loop now; i've stopped my crontab...
JaysonEwer
@JaysonEwer
Jan 29 2016 06:27
cool, for some reason there was some CRUFT in there, causing problems. :-/
I've manually stepped through my loop, which complained about a few things, i ran the reports manually, but I think you're right @scottleibrand I have a few &&, when I should have ; instead.
also, my killall appears to not be working
Scott Leibrand
@scottleibrand
Jan 29 2016 06:29
what killall are you trying?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:29
killall -g --older-than 10m openaps
Scott Leibrand
@scottleibrand
Jan 29 2016 06:30
is the process older than 10m?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:30
well, earlier, i think I saw some stale stuff when I did a ps aux
but I didnt look at the timestamps as closely as I should have
is that the correct string on the killall?
Scott Leibrand
@scottleibrand
Jan 29 2016 06:31
yeah, that's right
JaysonEwer
@JaysonEwer
Jan 29 2016 06:31
After letting things settle down and stopping my cronjob, and re-running few reports manually, My loop is back up.
Scott Leibrand
@scottleibrand
Jan 29 2016 06:31
if it happens again, note the exact processes and times from ps that aren't getting killed
JaysonEwer
@JaysonEwer
Jan 29 2016 06:31
right
Scott Leibrand
@scottleibrand
Jan 29 2016 06:31
how did you end up killing them off?
JaysonEwer
@JaysonEwer
Jan 29 2016 06:32
I rebooted eariler
ok, so i'm still not sure what happened with my git
Scott Leibrand
@scottleibrand
Jan 29 2016 06:33
@bewest I have openxshareble running on my edison. sometimes it works, but even when it successfully talks BLE to the CGM, I'm usually getting AttributeError: 'NoneType' object has no attribute 'iter_records'
JaysonEwer
@JaysonEwer
Jan 29 2016 06:33
other than not having backed it up yesterday. When I treid to back it up today it gave me the error I posted above
do I need to redo my remote git backup now or is there a backup copy of my setting somewhere?
Scott Leibrand
@scottleibrand
Jan 29 2016 06:35
by backup you mean the git push stuff?
you should be able to just re-do a git clone and then it'll pick up from there
JaysonEwer
@JaysonEwer
Jan 29 2016 06:35
Thanks for the help, @bewest and @scottleibrand!
Yes, the git push stuff
Scott Leibrand
@scottleibrand
Jan 29 2016 06:36
if you want to re-clone, you'll want to rename your openaps repository directory, and then git clone will basically restore your "backup"
or you could fiddle with git remote to get it set up to merge the more recent stuff with the github repository, if you don't want to lose the recent history
JaysonEwer
@JaysonEwer
Jan 29 2016 06:39
I"m not that familiar with git. the remote stuff that I had is gone, right? When I do a git clone I need to give it a repository, right. Is that how I rename the repository?
Scott Leibrand
@scottleibrand
Jan 29 2016 06:40
first off, what do you want to do?
"restore from backup" or something more complicated?
@bewest oh, this one was user error. I updated my cgm device but forgot to --configure the serial number. we might want to have it error out when a serial number isn't provided, instead of just reporting sending auth code None and continuing.
JaysonEwer
@JaysonEwer
Jan 29 2016 06:42

Also, here is the tail end of my loop log:

Jan 29 01:38:41 Ewer-Open-APS openaps: reporting monitor/reservoir.json
Jan 29 01:38:41 Ewer-Open-APS openaps: pump://JSON/read_battery_status/monitor/battery.json
Jan 29 01:38:41 Ewer-Open-APS openaps: reporting monitor/battery.json
Jan 29 01:38:41 Ewer-Open-APS openaps: pump://JSON/status/monitor/status.json
Jan 29 01:38:41 Ewer-Open-APS openaps: reporting monitor/status.json
Jan 29 01:38:41 Ewer-Open-APS openaps: tz://JSON/clock/monitor/clock-zoned.json
Jan 29 01:38:41 Ewer-Open-APS openaps: reporting monitor/clock-zoned.json
Jan 29 01:38:41 Ewer-Open-APS openaps: tz://JSON/rezone/monitor/pumphistory-zoned.json
Jan 29 01:38:41 Ewer-Open-APS openaps: reporting monitor/pumphistory-zoned.json
Jan 29 01:38:49 Ewer-Open-APS openaps: pump://JSON/read_settings/settings/settings.json
Jan 29 01:38:49 Ewer-Open-APS openaps: reporting settings/settings.json
Jan 29 01:38:49 Ewer-Open-APS openaps: pump://JSON/read_bg_targets/settings/bg_targets.json
Jan 29 01:38:49 Ewer-Open-APS openaps: reporting settings/bg_targets.json
Jan 29 01:38:49 Ewer-Open-APS openaps: pump://JSON/read_insulin_sensitivies/settings/insulin_sensitivities.json
Jan 29 01:38:49 Ewer-Open-APS openaps: reporting settings/insulin_sensitivities.json
Jan 29 01:38:49 Ewer-Open-APS openaps: pump://JSON/read_basal_profile_std/settings/basal_profile.json
Jan 29 01:38:49 Ewer-Open-APS openaps: reporting settings/basal_profile.json
Jan 29 01:38:49 Ewer-Open-APS openaps: get-profile://text/shell/settings/profile.json
Jan 29 01:38:49 Ewer-Open-APS openaps: reporting settings/profile.json
Jan 29 01:38:53 Ewer-Open-APS openaps: {"delta":3,"glucose":136,"avgdelta":3.6666666666666665}
Jan 29 01:38:53 Ewer-Open-APS openaps: {"duration":24,"rate":2.45,"temp":"absolute"}
Jan 29 01:38:53 Ewer-Open-APS openaps: {"bolusiob":0,"iob":0.10051191316375,"activity":0.0007554545454545454}
Jan 29 01:38:53 Ewer-Open-APS openaps: {"max_iob":2,"type":"current","dia":4,"current_basal":1.95,"max_daily_basal":2.15,"max_basal":3,"min_bg":130,"max_bg":130,"sens":50}
Jan 29 01:38:53 Ewer-Open-APS openaps: determine-basal://text/shell/enact/suggested.json
Jan 29 01:38:53 Ewer-Open-APS openaps: reporting enact/suggested.json
Jan 29 01:38:53 Ewer-Open-APS openaps: {"temp":"absolute","bg":136,"tick":"+3","eventualBG":143,"snoozeBG":143,"reason":"Eventual BG 143>130, temp 2.45 >~ req 2.47U/hr"}
Jan 29 01:38:53 Ewer-Open-APS openaps: No action required
Jan 29 01:38:58 Ewer-Open-APS openaps: ns-status://JSON/shell/monitor/upload-status.json
Jan 29 01:38:58 Ewer-Open-APS openaps: reporting monitor/upload-status.json
Jan 29 01:38:58 Ewer-Open-APS openaps: cat: entries.json: No such file or directory

the "cat:entries.json: No such file or directory" is due to my ns-upload and upload-status.json still not being setup correctly. that "cat: entries.json" appears to be coming from the monitor/upload-status.json, right?

Scott Leibrand
@scottleibrand
Jan 29 2016 06:42
that usually means you don't have your $NIGHTSCOUT_HOST and $API_SECRET set
JaysonEwer
@JaysonEwer
Jan 29 2016 06:43
@scottleibrand What i'm trying to do is figure out why my git push is no longer working. I seem to have experienced a file system or EMP :-P threw everything into a TIZZY.
Ben West
@bewest
Jan 29 2016 06:43
git remote -v
JaysonEwer
@JaysonEwer
Jan 29 2016 06:43
when I run it manually it works fine
Ben West
@bewest
Jan 29 2016 06:43
the reset script wipes out remotes
JaysonEwer
@JaysonEwer
Jan 29 2016 06:44
yeah, but it was wiped out before I even reset it
Ben West
@bewest
Jan 29 2016 06:44
git remote -v
Scott Leibrand
@scottleibrand
Jan 29 2016 06:44
when you get entries.json errors in cron but not locally, that's because you don't have $NIGHTSCOUT_HOST and $API_SECRET set in your crontab, but you do in your shell
@bewest is the git meister: work with him on that. :)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:45
I just checked my crontab and I had a $ at the beginning of each line is that necessary or is that my problem?
Scott Leibrand
@scottleibrand
Jan 29 2016 06:46
probably a problem, but I'd have to see it in context to be sure
the line setting NIGHTSCOUT_HOST should start with NIGHTSCOUT_HOST (nothing before that)
same as with PATH:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
JaysonEwer
@JaysonEwer
Jan 29 2016 06:48
yeah, that's what jumped out at me, i've gone ahead and removed the $
Scott Leibrand
@scottleibrand
Jan 29 2016 06:48
cool. now you can do git remote -v for ben to help you with that. :)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:49
THAT DID IT
!!!!
WOOHOOO
Scott Leibrand
@scottleibrand
Jan 29 2016 06:49
:-)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:49
freaking $
dang
that's been driving me cRAZY!!!
Scott Leibrand
@scottleibrand
Jan 29 2016 06:49
syntax is fun. ;-)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:50
:-D
that will be sweet
thank you Sir!!
Ben West
@bewest
Jan 29 2016 06:50
:clap:
JaysonEwer
@JaysonEwer
Jan 29 2016 06:51
I also need to add the treatments back in, I had taken them off to isolate but now I know the issue
I need to let @dm61, ITS FINALLY WORKING!! DON'T PUT the $ in the crontab!! :)
i'll get a PR opened on that!!
sheesh, the weight of the world has lifted from my weary sole. :smile:
yeah, so now onto the git meistro
Scott Leibrand
@scottleibrand
Jan 29 2016 06:53
normally that would be soul, but perhaps you are just referring to your feet... ;-)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:53
I can just step through the setting up the remote stuff again. I have to fine my notes on that remote site.
Ben West
@bewest
Jan 29 2016 06:53
yeah, basically need to find your hosted git url
JaysonEwer
@JaysonEwer
Jan 29 2016 06:53
I am a diabetic after all :feet:
I have diabetes, rather
it doesn't define me :P
Ben West
@bewest
Jan 29 2016 06:54
your hosted git site will have an url you can use like: git remote add origin <url>
Dana Lewis
@danamlewis
Jan 29 2016 06:54
@JaysonEwer Yay for PRs ;)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:55
yep, i've done it before just followed the awesome document, near page one-ish and setup the git backup early, I just hadn't automated it yet.
BTW, i'm well beyond the 3 days, i'm filling out the paper work now for that @danamlewis
Dana Lewis
@danamlewis
Jan 29 2016 06:56
3 days overnight loop? Sweet :)
JaysonEwer
@JaysonEwer
Jan 29 2016 06:56
Did I tell you all I reached out to one of the UVA clinical trials, type zero, I think it was and said I was interested. They responded to me and I need to fill out some paperwork.
Dana Lewis
@danamlewis
Jan 29 2016 06:57
Cool. If you get in their trial you'll get a cool comparison and maybe have some ideas of how to improve openAPS further :)
Ben West
@bewest
Jan 29 2016 06:57
or vice versa
Dana Lewis
@danamlewis
Jan 29 2016 06:58
;)
Ben West
@bewest
Jan 29 2016 06:58
they made some interesting choices, would love to ask them about it
JaysonEwer
@JaysonEwer
Jan 29 2016 06:59
Yeah, the reason I haven't reported the 3 days yet is I wanted the nightscout visual representation prior to stating that I HAVE ARRIVED!! :musical_note: NOW THAT YOU ALL helped me get my auto updates working properly, now I'll have even more pretty visual representations to share with the world!!
Scott Leibrand
@scottleibrand
Jan 29 2016 07:00
:confetti_ball:
Ben West
@bewest
Jan 29 2016 07:00
nice
screenshot?
Dana Lewis
@danamlewis
Jan 29 2016 07:00
@JaysonEwer :+1:
JaysonEwer
@JaysonEwer
Jan 29 2016 07:01
Well, i'll get you a screenshot tomorrow, because my loop was down for multiple hours this afternoon evening.
Sulka Haro
@sulkaharo
Jan 29 2016 07:01
New issue that I'm not sure how to solve: LCHF meals absorb so slowly that OpenAPS occasionally starts zero-temping when meal is still absorbing. Thinking the bolus snooze could be different for low and high temps
Dana Lewis
@danamlewis
Jan 29 2016 07:03
Meal assist or not meal assist?
Sulka Haro
@sulkaharo
Jan 29 2016 07:03
meal assist is on. Not sure if it's triggering consistently
Have seen if be off
JaysonEwer
@JaysonEwer
Jan 29 2016 07:08
I submitted the 3 day form, @danamlewis Thank you!!
I think I need to move into dev to get the meal asist rolling.
Scott Leibrand
@scottleibrand
Jan 29 2016 07:09
@sulkaharo You're having the exact opposite problem we're having right now. For us, zero-temping as soon as BG starts to drop is necessary due to increased sensitivity. I had tried to code the newest meal-assist code to not bolus snooze when carbs hadn't been bolused for, but that prevented the loop from helping ward off lows.
Latest meal-assist branch will probably still help though. It just won't bypass bolus snooze when BG is dropping (for now)
Ben West
@bewest
Jan 29 2016 07:20
working on some new tools and stuff
was thinking it'd be nice to export/import report definitions with ease...
bewest@bewest-MacBookPro:~/Documents/openaps$ openaps report show model.json --json
{"type": "report", "model.json": {"device": "pump", "use": "model", "reporter": "JSON"}}
bewest@bewest-MacBookPro:~/Documents/openaps$ openaps report show model.json --ini
[report "model.json"]
device = pump
use = model
reporter = JSON

bewest@bewest-MacBookPro:~/Documents/openaps$ openaps report show model.json 
pump://JSON/model/model.json
bewest@bewest-MacBookPro:~/Documents/openaps$
tools can use this to eg easily tweak secrets outside git automatically without having to parse ini
JaysonEwer
@JaysonEwer
Jan 29 2016 07:22
@bewest what about a trace function that would allow you to trace which reports are members of which alias, etcetera?
It's already doing the dependency checking, right, couldn't it also just report those dependencies?
Thomas Emge
@ThomasEmge
Jan 29 2016 07:34
Is there a script to format the glucose values as read from dexcom so that they are ready for upload to NS?
Scott Leibrand
@scottleibrand
Jan 29 2016 08:02
@bewest looping successfully with openxshareble on the Edison. :-D
that will be most useful for our cruise in a few weeks. :-)
Thomas Emge
@ThomasEmge
Jan 29 2016 08:06
or is there a way to get this information filtered":198000,"unfiltered":197000,"rssi":100,"noise":1, through the openaps dexcom command?
Ben West
@bewest
Jan 29 2016 08:36
ah, that would be useful
need new use for that
iter_dreamsicle maybe
Sulka Haro
@sulkaharo
Jan 29 2016 09:24
@scottleibrand cool - any ETA for the branch making it to the general dev branch?
dhermanns
@dhermanns
Jan 29 2016 15:33
@danamlewis Thanks for your help. So I better don't brick the pump trying it ;-)
JaysonEwer
@JaysonEwer
Jan 29 2016 15:46
Hello all, i'm remote and my pi is hanging off my mobile hotspot. I'm getting the following error as I monitor my pi's syslog "Unable to upload to https://my.azurewebsites.net" Are any of you aware of what my issue might be? I'm using AT&T.
JaysonEwer
@JaysonEwer
Jan 29 2016 16:18
doh, i think i may have found my issue. I'll need a sane dns configured when i'm remote....standby, i'll report back.
JaysonEwer
@JaysonEwer
Jan 29 2016 16:41
It's working now. I didn't do anything, it just started working. I'm ok with that, but would like to understand what may have been happening...I'll keep investigating
Dana Lewis
@danamlewis
Jan 29 2016 16:50

OpenAPS = (n=1)*31!

LadyViktoria
@LadyViktoria
Jan 29 2016 16:51
wow
Andrew Warrington
@andrew-warrington
Jan 29 2016 17:17
i'm guessing that considering the number of loopers times the duration, the OpenAPS community must now have more collective knowledge about living with an APS than any research project to date. maybe more than all of them combined. too bad we have no way to harness that real-world experience into something useful for study.
Jason Calabrese
@jasoncalabrese
Jan 29 2016 17:23
I keep hoping that some researcher would like to use my real-time feed, so much data there that I'll probably never get around to analyzing
Dana Lewis
@danamlewis
Jan 29 2016 17:24
@andrew-warrington I wouldn't say "no way" :)
JaysonEwer
@JaysonEwer
Jan 29 2016 17:47
@danamlewis Did I get a number yet? :-D
JaysonEwer
@JaysonEwer
Jan 29 2016 18:01
@danamlewis sorry, I just saw your other message. I'm number 31, wooohoo! Thanks again, everyone!!
Dragan Maksimovic
@dm61
Jan 29 2016 18:18
@JaysonEwer congrats!
JaysonEwer
@JaysonEwer
Jan 29 2016 18:30
Thank you@dm61. Did you see, I finally figured out what my upload issue was!
I had included the $ in my environment variables in my crontab file. :-D
Dragan Maksimovic
@dm61
Jan 29 2016 19:34
oh, I see - glad to hear everything is now working :+1:
JaysonEwer
@JaysonEwer
Jan 29 2016 21:37
Same here, it's very cool seeing what Openaps is doing. I think I might be ready to move to the Dev branch of Openaps, with the more aggressive algorithms. Although, as an exercise, I think I'll build that on my spare pi and do a better job submitting PR's as I go.
Dana Lewis
@danamlewis
Jan 29 2016 21:38
:+1:
(good idea to build on a second setup regardless)
back up SD card too while you’re being forward-thinking :)
JaysonEwer
@JaysonEwer
Jan 29 2016 21:45
Is the backup process documented. How are folks doing it? Do you use DD?
Jason Calabrese
@jasoncalabrese
Jan 29 2016 21:46
are you on a mac? windows?
I thought we had the backup-your-SD-card described, but not seeing it, so that should be added (it’s just mentioned in passing in the above link). <—PR opportunity for anyone who wants to get their feet wet
Matthias Granberry
@mgranberry
Jan 29 2016 21:51
rsync -aPvx is my go-to tool for backups
Scott Leibrand
@scottleibrand
Jan 29 2016 21:58
For this you need to be able to do a complete disk image though. Rsync just gets the files.
JaysonEwer
@JaysonEwer
Jan 29 2016 21:59
@jasoncalabrese I"m mac/windows/linux agnostic. :-) I can do either. I"ll check out the link and come up with a suggested/recommended/streamlined way and submit a PR. I've got some experience in this area.
Matthias Granberry
@mgranberry
Jan 29 2016 22:00
--delete too and it has worked for me in the past. Doing dd on a live filesystem is asking for trouble, and restoring from a whole-device dd can get you into trouble if you restore it to a different device.
JaysonEwer
@JaysonEwer
Jan 29 2016 22:01
yeah, I was wondering if @danamlewis is using rsync between all her setups to keep them in sync with each other. Based on what happened to me yesterday, I'm not positive I want to do a dd of my current setup. Although it seems to be working pretty well today. As promised @bewest last night, i'll get another screenshot posted. I"m ready for the more agressive approach in the dev branch. :-)
Matthias Granberry
@mgranberry
Jan 29 2016 22:02
the -a flag handles devices, permissions, etc, and the -x prevents it from recursing into other devices like dev/proc/sys
JaysonEwer
@JaysonEwer
Jan 29 2016 22:02
yeah, @mgranberry, i'm kinda with you on the dd thing. I would have to take it down for a time to do that, which I"m ok with, it would be nice to have a way to have a proper backup , oooh, maybe a GPIO RAID controller. ;-)
Matthias Granberry
@mgranberry
Jan 29 2016 22:02
that's enough to make a Linux machine work
Dana Lewis
@danamlewis
Jan 29 2016 22:03
@JaysonEwer no. we use rsync to copy json files up to DIYPS (which I still use on the side) and to copy glucose.json from a plugged-in Pi during restart from another receiver. but not syncing configs like you’re thinking.
Matthias Granberry
@mgranberry
Jan 29 2016 22:03
@JaysonEwer maybe an md raid1 with a memory stick in a usb card reader?
JaysonEwer
@JaysonEwer
Jan 29 2016 22:04
oh, I like that, idea @mgranberry that could be very cool
Matthias Granberry
@mgranberry
Jan 29 2016 22:05
I think the bigger problem in practice is corruption and a raid isn't a backup. rsync and a place to dump files every day is a better option.
JaysonEwer
@JaysonEwer
Jan 29 2016 22:05
good point
Matthias Granberry
@mgranberry
Jan 29 2016 22:05
Just make sure to use -a to preserve ownership/permissions/flags etc.
JaysonEwer
@JaysonEwer
Jan 29 2016 22:06
I"m planning on turning this whole thing into a virtual instance IN THE CLOUD!! :-)
I know you all have been playing with that idea @jasoncalabrese @scottleibrand @danamlewis There are times when communication gets interrupted too frequently.
Although, my rig has been on my iphone 6S hotspot all day updating my Nightscout like a champ!
@jasoncalabrese Was that you that said you were using quite a bit of data the other day. I need get that deduping stuff going also.
Jason Calabrese
@jasoncalabrese
Jan 29 2016 22:16
I used a ton of data, but realized my laptop on phone were on the hotspot for a day or 2...
I haven't found a reliable way to turn the hotspot on and off automatically when leaving the house, so it stays on all the time
tried using tasker, but seems you need root with lolipop
and I'd rather not root the phone
Scott Leibrand
@scottleibrand
Jan 29 2016 22:21
y'all are misunderstanding the proper use of dd here
you shut down the Pi, unplug the SD card, plug it into a Mac with an SD card reader, and dd the contents of the SD card off to a file on the Mac
then to restore, you dd the file back to a new SD card of equal or greater size.
at that point you'll have two identical SD cards, so two Pi's booted off them will behave identically (including fighting over hostnames in mDNS, if booted onto the same network at the same time)
but other than that, there's no harm in having an exact backup, and it simplifies troubleshooting a lot
Matthias Granberry
@mgranberry
Jan 29 2016 22:25
@scottleibrand there are bits of the card that are sometimes misused in the low-address portions of the disk range that get used for error correction. Most FSs leave those regions untouched because of shenanigans played by some ancient disk drives and cheap flash memory sometimes takes advantage of that
if you dd the ext{2,3,4} fs directly you won't run into problems. You might if you do the whole card.
Scott Leibrand
@scottleibrand
Jan 29 2016 22:26
ok. I haven't seen that issue with any of the CanaKit SD cards or the new 32GB one I bought.
Matthias Granberry
@mgranberry
Jan 29 2016 22:26
good cards won't be a problem, but older/budget chinese ones might be a problem
Scott Leibrand
@scottleibrand
Jan 29 2016 22:26
I've done it both ways, but prefer to dd the entire card, not just the ext4 fs
Matthias Granberry
@mgranberry
Jan 29 2016 22:29
but they only when they start to get a little questionable in their reliability after a number of rewrite cycles and the error correction firmware kicks in. Memory controllers are getting better, though, so this might not be a problem recently. I got out of that business a couple processes ago and it all changes every time dies get smaller. The error-correcting codes had started getting pretty close to the theoretical maximum performance for high-end controllers 3 years ago, so that has probably started trickling down in the market by now and they might not need to resort to that kind of trick any more
Scott Leibrand
@scottleibrand
Jan 29 2016 22:35
most of my 8GB CanaKit SD cards stopped working reliably (to the point of unusability) after about a year of hard usage.
we still have one of the 8GB ones running a loop, as well as a newer 32GB, and have a spare 32GB I just bought if needed
Dana Lewis
@danamlewis
Jan 29 2016 22:57
SF AREA FOLKS: Just emailed out details about the Sunday Berkeley meetup. If you’re interested and hadn’t previously expressed so, let me know and I can give you details. Trying to get a headcount by tomorrow at noon so I can put in a reservation.
Ben West
@bewest
Jan 29 2016 22:57
I'm there
Dana Lewis
@danamlewis
Jan 29 2016 22:57
:+1:
Matthias Granberry
@mgranberry
Jan 29 2016 23:29
@scottleibrand cheap SD cards can only be rewritten a dozen or two times reliably. For cameras it's not necessarily noticeable, but I suspect openaps is rougher. Cheap (most) flash drives suffer from the same MLC flash reliability issues.
Rachel Sandlain
@audiefile
Jan 29 2016 23:38
I do what @scottleibrand described, although I tend to use pifiller to write to the spare card as it seems to be faster. I find the two hour warm up a convenient time to back up since you can't loop then anyway
Cosmo Wolfe
@cozmo
Jan 29 2016 23:41
@danamlewis I’m interested - Not heard of these things before.
Dana Lewis
@danamlewis
Jan 29 2016 23:42
:+1:
JaysonEwer
@JaysonEwer
Jan 29 2016 23:54
Great idea,
@audiefile
Thomas Emge
@ThomasEmge
Jan 29 2016 23:58
@scottleibrand and @danamlewis you have quite the setup going, are all your device uploading to same NS instance? I am asking because I am running into the CPU limits (60 minutes) of the free Azure version. I'll start digging this weekend why this might be happening but I am just wondering if I exhausted the 'natural' limits of the free account and it is time to step into the 'big league'; well, the shared account would be the next step up.
Scott Leibrand
@scottleibrand
Jan 29 2016 23:59
I am running our NS with node on a digitalocean droplet
it's worth the $5/mo :)
but if you don't have another need for a droplet, heroku is easier to manage