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

22nd
Jul 2016
Scott Leibrand
@scottleibrand
Jul 22 2016 00:00
added that as phase 0
John Dodds
@johners97
Jul 22 2016 00:05
how do you create json input for temporary basal rate?
Scott Leibrand
@scottleibrand
Jul 22 2016 00:08
you can either use something like echo { foo: bar } | openaps use pump blah or you can use a text editor to write it to a file
or, if you want you can follow through the openaps setup steps to get an input file generated by oref0-determine-basal
John Dodds
@johners97
Jul 22 2016 00:09
Thank you
Jason Calabrese
@jasoncalabrese
Jul 22 2016 00:29
90 minutes before meal time for eating soon in the tests, I'd expect that most of the time I tried that he'd probably run around and start going low before the snack
Martin Haeberli
@mhaeberli
Jul 22 2016 00:34
@johners97 @danamlewis agree re max bolus … - amusingly enough (or scarily enough), the shipping default for max bolus from Medtronic (in the pump proper) seemed to be pretty high - one night long ago I almost gave a large accidental bolus on the pump because the UI with the backlight was confusing ...
japrobo
@japrobo
Jul 22 2016 00:42
This message was deleted
Lynne Butts
@flutelynne_twitter
Jul 22 2016 00:44
@scottleibrand Good read of the eating soon testing. I had been doing my eating soon for 120-180 minutes sometimes, and just using bolus wizard via pump AFTER I've eaten (if trending lower)...entering the carb and bolus at the same time via pump. I hardly know how much I may feel like eating or get interrupted, and this seems to be helping.
japrobo
@japrobo
Jul 22 2016 00:45

@dm61 to pick up the conversation we started last night, when I run

'pi@raspberrypi:~/myopenaps $ openaps use ns shell status monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json

I get this result, even though I can successfully invoke each of the sub-reports individually.

No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 58, in run
    reporter(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 33, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 31, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/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

Also, when I run

pi@raspberrypi:~/myopenaps $ openaps use ns shell status -h

I also get this result:

No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 58, in run
    reporter(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 33, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/__init__.py", line 31, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/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

Any ideas why I would get JSON object could not be decoded when trying to get to help file?!?

dougtakeuti
@dougtakeuti
Jul 22 2016 00:48
@scottleibrand yes, oref0 calculate-iob monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json reports iob=0. Also, no temp basals are displayed in NS.
edison@juba:~/ju$oref0 calculate-iob monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json
{"iob":0,"activity":0,"bolussnooze":0,"basaliob":0,"netbasalinsulin":0,"hightempinsulin":0}
Dana Lewis
@danamlewis
Jul 22 2016 00:55
@flutelynne_twitter glad to hear eating soon has been helpful!
Lynne Butts
@flutelynne_twitter
Jul 22 2016 00:57
@danamlewis I love it! and the auto-sens... and the activity mode!... Thank you so much!
John Dodds
@johners97
Jul 22 2016 00:58
Hey. Can I ask about setting up git on the terminal? Whats it all all about? So confused! :(
GeoffWyche
@GeoffWyche
Jul 22 2016 01:01
git is a system for keeping files, and keeping track of changes to files.
Martin Haeberli
@mhaeberli
Jul 22 2016 01:03
@johners97 if you haven’t already, try: sudo apt-get install git
which should install git on your RPi
John Dodds
@johners97
Jul 22 2016 01:04
@mhaeberli thanks, i've already done that but what is it for?
:)) I have read it several times and don't understand
GeoffWyche
@GeoffWyche
Jul 22 2016 01:04
In this case, it is for getting files from other people, and in the future, getting changes to those files
John Dodds
@johners97
Jul 22 2016 01:04
Oh right, so what do I put as my email
How do I know if i've set it up correctly?
GeoffWyche
@GeoffWyche
Jul 22 2016 01:08
make a temporary directory, something like mkdir temp, then move into that directory with cd temp, then try git clone http://github.com/ps2/rileylink. That should copy a bunch of files from github.com to your computer.
Julie
@julieraines
Jul 22 2016 01:09
@japrobo I’m having similar problems. been trying to resolve getting from NS and sending to NS and getting nowhere
japrobo
@japrobo
Jul 22 2016 01:09
@julieraines I know, I was learning from the ideas folks were trying to send you too. :)
Julie
@julieraines
Jul 22 2016 01:10
I’ve tried several different ways - including various instructions that are in the openaps docs and no dice so far
and @bewest tried helping by pointing to alias in his files but i’m just not that good at this so the most i got out of his files was a great political cartoon about apple and the fbi
japrobo
@japrobo
Jul 22 2016 01:12
@julieraines, were you able to get this command to give you results?
openaps use ns shell status monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
GeoffWyche
@GeoffWyche
Jul 22 2016 01:14
@johners97 git clone is safe to run, in that it will not cause any action other than downloading the files.
Scott Leibrand
@scottleibrand
Jul 22 2016 01:14
@dougtakeuti is your zoning incorrect?
GeoffWyche
@GeoffWyche
Jul 22 2016 01:17
@johners97 I can't help you with openaps technology, but I can help with Linux/RPi stuff
Julie
@julieraines
Jul 22 2016 01:21
@japrobo I haven’t done that one today but usually get errors. I’m running it now to post the errors
japrobo
@japrobo
Jul 22 2016 01:24
@julieraines good luck, I got that one to work 20 min ago or so and now I feel like I'm making progress again. :)
Julie
@julieraines
Jul 22 2016 01:24
what was the magic bullet?
No JSON object could be decoded
I need a t-shirt that says this
Martin Haeberli
@mhaeberli
Jul 22 2016 01:26
@julieraines :+1:
Julie
@julieraines
Jul 22 2016 01:27
i bet it’s a great way to pick up guys - lol
japrobo
@japrobo
Jul 22 2016 01:28
@julieraines lol, you are funny. I got my loop to work, finally, so I'm super happy.
Julie
@julieraines
Jul 22 2016 01:28
damn - that’s awesome!
what worked for you on getting the NS piece working? what were you missing? adding reports? adding alias?
japrobo
@japrobo
Jul 22 2016 01:30
@julieraines To get that command to work for me, I removed my ns device. It had been working before but something had gotten messed up, so it started throwing those errors.

@julieraines And then added it back in using these instructions:

Set up ns device¶

To get your OpenAPS viewed onto your Nightscout site, start by using the following tool:

nightscout autoconfigure-device-crud

To view your data on your Nightscout site, start by doing the following: nightscout autoconfigure-device-crud https://yourname.com yourplainapisecret

So this would be your actual https://myname.azurewebsites.net or https://myname.herokuapp.com. Your API_SECRET is listed in your Azure or Heroku settings. To test this: openaps use ns shell preflight

@julieraines After I did this, openaps use ns shell preflight provided true result.

Then I had to rebuild the monitor/upload-status.json report from that successful use command

openaps report add monitor/upload-status.json JSON ns shell status "monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json"
japrobo
@japrobo
Jul 22 2016 01:35
@julieraines once I was able to invoke that report, my loop finally worked. Yippee! My other loop is running this same report based on a different device called ns-status, which is still working over there. Not sure why it broke, but I'm glad it is working now.
Julie
@julieraines
Jul 22 2016 01:39
i’m doing it now (this will be the third try) and whether it works or not i’ve decided to cry either way (lol)
dougtakeuti
@dougtakeuti
Jul 22 2016 01:51

@scottleibrand the difference between pumphistory.json and pumphistory-zoned.json is a -03:00 after timestamp.
zoned:

{
    "_type": "Bolus",
    "_description": "Bolus 2016-07-21T00:40:58 head[4], body[0] op[0x01]",
    "timestamp": "2016-07-21T00:40:58-03:00",

not zoned:

{
    "_type": "Bolus",
    "_description": "Bolus 2016-07-21T00:40:58 head[4], body[0] op[0x01]",
    "timestamp": "2016-07-21T00:40:58",
japrobo
@japrobo
Jul 22 2016 01:51
@julieraines really hope it works! I've done my share of crying with this project
@julieraines except I'm uploading the nightscout stuff but none of the openaps results. crap, I'm not done working...
Scott Leibrand
@scottleibrand
Jul 22 2016 01:57
@dougtakeuti is the clock file zoned the same way? What about date?
Julie
@julieraines
Jul 22 2016 01:58

i’ve done this four times from start to finish and keep getting false 😩
pi@raspberrypi:~/sasha $ nightscout autoconfigure-device-crud
nightscout autoconfigure-device-crud <NIGHTSCOUT_HOST> <API_SECRET>

sets up:
openaps use ns shell get entries.json 'count=10'
openaps use ns shell upload treatments.json recently/combined-treatments.json
pi@raspberrypi:~/sasha $ nightscout autoconfigure-device-crud https://sarahraines.herokuapp.com <apisecrect>
added process://ns/nightscout/ns NIGHTSCOUT_HOST API_SECRET
process://ns/nightscout/ns https://sarahraines.herokuapp.com fe19322(blah blah)
pi@raspberrypi:~/sasha $ openaps use ns shell preflight
false

I’ve deleted my super secret password stuff

Julie
@julieraines
Jul 22 2016 02:06
has anyone else had this problem?
and thanks @japrobo - you give me hope (along with helpful tips : ^ )
Dragan Maksimovic
@dm61
Jul 22 2016 02:22
@julieraines I'm back on gitter now; looks like you already have some more hints to follow
btw, does your openaps use ns shell get entries.json work?
japrobo
@japrobo
Jul 22 2016 02:29
@julieraines so, maybe you are trying to do something different than we are, but your problems were helpful in getting us to the right fix tonight - thank you for that. We are all fixed up now, went back to using the ns-status device rather than ns, but had to rebuilt the ns-status device again, and the monitor/upload-status report too. Our openaps.ini file looks like this now:
@julieraines
[report "monitor/upload-status.json"]
suggested = enact/suggested.json
status = monitor/status.json
use = shell
reservoir = monitor/reservoir.json
reporter = JSON
battery = monitor/battery.json
clock = monitor/clock-zoned.json
json_default = True
device = ns-status
remainder = 
iob = monitor/iob.json
enacted = enact/enacted.json
Dragan Maksimovic
@dm61
Jul 22 2016 02:31
@jabrobo, glad to see you've made great progress, congrats!
Julie
@julieraines
Jul 22 2016 02:32
I don't remember- I'll check in the morning. I shut everything down so I'll try get entries in the morning. I will compare my openaps.ini to yours in the morning. These are all great tips. Thanks guys - fingers crossed!
japrobo
@japrobo
Jul 22 2016 02:33
@dm61 thanks for your support, it always feels good to have someone to listen. :) Good luck @julieraines
Dragan Maksimovic
@dm61
Jul 22 2016 02:33
ok, good luck @julieraines
dougtakeuti
@dougtakeuti
Jul 22 2016 03:13
@scottleibrand yes, they look ok
edison@juba:~/ju/monitor$ cat clock.json
"2016-07-22T00:09:53"
edison@juba:~/ju/monitor$ cat clock-zoned.json
"2016-07-22T00:09:53-03:00"
Scott Leibrand
@scottleibrand
Jul 22 2016 03:27
And date?
ssaint1
@ssaint1
Jul 22 2016 04:20
This message was deleted
savelik
@savelik
Jul 22 2016 04:52
openaps installed
openaps 0.1.5
so excited! :)
Dana Lewis
@danamlewis
Jul 22 2016 04:53
:)
Saskia
@Missdazzle
Jul 22 2016 09:54
This message was deleted
John Dodds
@johners97
Jul 22 2016 11:58
@savelik what devices are you using? :)
Julie
@julieraines
Jul 22 2016 13:35
This message was deleted

Having trouble still with NS device - I’ve done this many times and get the same results
pi@raspberrypi:~/sasha $ nightscout autoconfigure-device-crud
nightscout autoconfigure-device-crud <NIGHTSCOUT_HOST> <API_SECRET>

sets up:
openaps use ns shell get entries.json 'count=10'
openaps use ns shell upload treatments.json recently/combined-treatments.json
pi@raspberrypi:~/sasha $ nightscout autoconfigure-device-crud https://sarahraines.herokuapp.com <plainapisecret>
added process://ns/nightscout/ns NIGHTSCOUT_HOST API_SECRET
process://ns/nightscout/ns https://sarahraines.herokuapp.com fe19322<blocked out for security>
pi@raspberrypi:~/sasha $ openaps use ns shell preflight
false

So - where am I off? A setting in Heroku maybe?

Dragan Maksimovic
@dm61
Jul 22 2016 14:32
possibly; lets try to find out. can you cat ns.ini (but do not paste the last line here with your ultra-secret info)
Dragan Maksimovic
@dm61
Jul 22 2016 14:37

@julieraines then try this:

curl https://YOUR_NS.herokuapp.com/api/v1/experiments/test --header "api-secret: YOUR_HASHED_API_SECRET"

(copy and paste this from your ns.ini)

when you cat your ns.ini, you should see your hashed API_SECRET, which you can copy and paste in the above curl. This curl will check if your NS responds to your API_SECRET
mariano42
@mariano42
Jul 22 2016 14:41
just filled out the form after my 3rd night of successful looping :) thanks to everyone who helped me on here and thanks for not judging when I was making stupid mistakes. awesome community.
Dragan Maksimovic
@dm61
Jul 22 2016 14:41
@mariano42 :+1: congrats!
Dana Lewis
@danamlewis
Jul 22 2016 14:47
:confetti_ball:
David Cintron
@loudestnoise
Jul 22 2016 15:28
@mariano42 Woot woot
Jason Wittmer
@jbwittmer
Jul 22 2016 16:04
having trouble with AMA setup. I think I have it all set up appropriately, seems to loop OK but getting this report for meal.json - why would meal COB be null? I'm not using a separate carbhistory input - entering all carbs into pump
pi@raspberrypi:~/openaps1/monitor $ cat meal.json
{"carbs":45,"boluses":4.7,"mealCOB":null}
Here's the output of my loop if that helps anyone
PREFLIGHT OK
pump://JSON/read_settings/settings/settings.json
reporting settings/settings.json
pump://JSON/read_bg_targets/settings/bg_targets_raw.json
reporting settings/bg_targets_raw.json
pump://JSON/read_insulin_sensitivies/settings/insulin_sensitivities_raw.json
reporting settings/insulin_sensitivities_raw.json
pump://JSON/read_basal_profile_std/settings/basal_profile.json
reporting settings/basal_profile.json
get-profile://text/shell/settings/profile.json
Could not sort temptargets_data. Optional feature temporary targets disabled.
reporting settings/profile.json
pump://JSON/model/settings/model.json
reporting settings/model.json
pump://JSON/read_battery_status/monitor/battery.json
reporting monitor/battery.json
pump://JSON/reservoir/monitor/reservoir.json
reporting monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
reporting monitor/status.json
cgm://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
pump://JSON/iter_pump_hours/monitor/pumphistory-24h.json
reporting monitor/pumphistory-24h.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
meal://text/shell/monitor/meal.json
45 0 Fri Jul 22 2016 03:48:33 GMT-0500 (CDT)
-----------+---++++---------+--+-------++++++->>>>>>>>>>>>>>>>>>>>>>>>++++++---+++++-++--++-+++++++--+++++>+++++++++-==++=+-=-------=--=+=++++---++-----+>>++-->>>>+++-=---++>>>>>>++-++--------=--=-+---------------=------------>>>>>>>>>>-=-+++------=---++-----+--+-+-=---++++++++++--++-+==---==++++ 54% of non-meal deviations negative (target 45%-50%)
Excess insulin sensitivity detected: ISF adjusted from 102 to 115
NaN
reporting monitor/meal.json
detect-sensitivity://text/shell/settings/autosens.json
-----------+---++++---------+--+-------++++++->>>>>>>>>>>>>>>>>>>>>>>>++++++---+++++------+-+++++++--+++++++++++++++-++++++-+-------+--+++++++---++-----+-++----++++++-+-++>>>>>>>>>>>++-->++--------+-------------+-++-----+++++>>>>>>>>>>>>>>>++-+-+-++-->++-----+++++>>>>>>>>>>>>>>>>>>>>>>>++++++++++ 48% of non-meal deviations negative (target 45%-50%)
Sensitivity normal.
reporting settings/autosens.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
determine-basal://text/shell/enact/suggested.json
Error: date field not found: cannot calculate avgdelta
{"carbs":45,"boluses":4.7,"mealCOB":null}
{"ratio":1}
{"netbasalinsulin":-0.8,"activity":0.0156,"basaliob":-0.346,"time":"2016-07-22T11:05:19.000Z","hightempinsulin":0,"bolussnooze":0,"iob":0.065}
{"delta":-4,"glucose":87,"avgdelta":0}
{"duration":25,"rate":0.65,"temp":"absolute"}
{"max_iob":2.8,"type":"current","max_daily_safety_multiplier":3,"current_basal_safety_multiplier":4,"autosens_max":1.5,"autosens_min":0.7,"autosens_adjust_targets":true,"override_high_target_with_low":false,"dia":3,"model":{},"current_basal":1.05,"max_daily_basal":1.05,"max_basal":2.8,"min_bg":120,"max_bg":130,"sens":102}
Carb Impact: 4 mg/dL per 5m; CI Duration: NaN hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
reporting enact/suggested.json
No action required
tz://JSON/clock/monitor/clock-zoned.json
reporting monitor/clock-zoned.json
tz://JSON/rezone/monitor/pumphistory-zoned.json
reporting monitor/pumphistory-zoned.json
2016-07-22T10:59:11-05:00
No recent treatments to upload
ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
[{"device":"openaps://raspberrypi","pump":{"battery":{"status":"normal","voltage":1.39},"status":{"status":"normal","timestamp":"2016-07-22T16:05:51.000Z","bolusing":false,"suspended":false},"reservoir":171.55,"clock":"2016-07-22T11:05:19-05:00"},"openaps":{"suggested":{"bg":87,"temp":"absolute","snoozeBG":104,"timestamp":"2016-07-22T16:06:35.000Z","predBGs":{"IOB":[87,83,79,77,75,74,74,75,77,79,82,85,87,89,91,93,95,97,98,100,101,102,103,104,105,105,106,107,107,108,108,108,109,10
Jason Wittmer
@jbwittmer
Jul 22 2016 16:12
Also with determine-basal device getting the error Error: date field not found: cannot calculate avgdelta
Not sure why that would be. Help?
David Cintron
@loudestnoise
Jul 22 2016 16:14
Silly question, but are you inputting carbs via the pump or Nightscout?
Jason Wittmer
@jbwittmer
Jul 22 2016 16:15
inputting carbs via pump.
David Cintron
@loudestnoise
Jul 22 2016 16:19
Hrmm, oh yeah I see them there “carbs”:45
what you got in your meal.json report?
openaps report show monitor/meal.json
Jason Wittmer
@jbwittmer
Jul 22 2016 16:23
this is what I get from meal.json
{"carbs":45,"boluses":4.7,"mealCOB":null}
here's the response to openaps report show monitor/meal.json
meal://text/shell/monitor/meal.json
David Cintron
@loudestnoise
Jul 22 2016 16:25
oh right, sorry
um openaps report show monitor/meal.json --cli
Jason Wittmer
@jbwittmer
Jul 22 2016 16:26
OK here's what I get openaps use meal shell monitor/pumphistory.json settings/profile.json monitor/clock.json monitor/glucose.json settings/basal_profile.json
Jason Wittmer
@jbwittmer
Jul 22 2016 16:33
OK I'm going to step away for a while - will appreciate any ideas anyone can generate. I'll check back in an hour or so
Jason Wittmer
@jbwittmer
Jul 22 2016 17:08
OK it may be because I'm not "rezoning" the .json files before I'm feeding them into the system (I know that's different than the example, but it worked best the way I had my system set up and had been working otherwise before). I'm going to go back and re-order the timing my re-zoning and feed rezoned .json files in where appropriate and retry. I'll let everyone know the results.
Happy Friday, everyone :)
Scott Leibrand
@scottleibrand
Jul 22 2016 17:26
@jbwittmer the problem is probably unexpected date fields in your glucose.json
there are at least 3 ways to record the date in glucose data, and AMA probably doesn't handle your way yet
there are workarounds using the json tool to reformat it before handing it to AMA
or you can file an issue and we can work together on handling your data's date format in oref0 natively
Jason Wittmer
@jbwittmer
Jul 22 2016 17:36
@scottleibrand Thanks. I'm going to try to re-zone first and see if that works then I'll delve into the reformatting option. Any suggestions on where to look for info on reformatting .json?
Matt Pressnall
@logichammer
Jul 22 2016 17:38

@jasoncalabrese , playing with this:
https://github.com/shanselman/cgm-remote-monitor/blob/master/lib/plugins/maker-setup.md
And wondering how you specify warning-high, low, urgent-high, low, etc:

ns-warning-low - Alarms at the warning level with cause this event to also be triggered. It will be sent in addition to ns-event and ns-warning.

Closest I can find is here:
http://www.nightscout.info/wiki/welcome/website-features#customalarms
But not sure what would make an alert a warning vs urgent...ideas?
@shanselman ? Thanks!

Scott Leibrand
@scottleibrand
Jul 22 2016 17:39
that is all black magic in the AR2 algorithm
there was an effort at some point to provide a simplified alerting mechanism the allow static threshold for warning-high and urgent-high: can't remember if that is the default now or not
I think it might be, in which case take a look at the env variables like BG_HIGH etc.
Matt Pressnall
@logichammer
Jul 22 2016 17:44
@scottleibrand , thanks! I'm going to set up alerts around both and see what happens...And will be setting those APP variables and see if it influences the outcome...
by both, I mean, warning and urgent....
Jason Calabrese
@jasoncalabrese
Jul 22 2016 17:56
yeah that all from AR2 unless you setup the simple alarms, but I don't get many false alarms with AR2 and BWP
David Cintron
@loudestnoise
Jul 22 2016 17:58
@danamlewis 💯💯💯💯💯💯💯💯💯
Jason Calabrese
@jasoncalabrese
Jul 22 2016 17:58
for AR2 we try to figure out if it's for a low/high after by looking at where the forecasted point will be 15m out, but it's not perfect
Dana Lewis
@danamlewis
Jul 22 2016 17:58
I was waiting for that, @loudestnoise ;) :) :sparkles: :confetti_ball: :clap:
David Cintron
@loudestnoise
Jul 22 2016 18:04
I got too excited and didn't proof read my tweet.
LOL. I deleted and re-re-tweeted
Dana Lewis
@danamlewis
Jul 22 2016 18:05
:) <3
sarahspins
@sarahspins
Jul 22 2016 18:30
@danamlewis exciting!!
Dragan Maksimovic
@dm61
Jul 22 2016 18:32
@danamlewis incredible, outstanding, phenomenal ....
Dana Lewis
@danamlewis
Jul 22 2016 18:33
Yup, ya’ll are all those things :) <3 this community!
Peter Miller
@ochenmiller
Jul 22 2016 18:38
@danamlewis too cool! Any bets on how soon we get to 200? 500? 1000?
Scott Leibrand
@scottleibrand
Jul 22 2016 18:41
still doubling every 3-4 months, so if that continues 200 would be October
we'll probably need to figure out whether/how to count people going straight to Loop app.
Savek-CC
@savek-cc
Jul 22 2016 19:40
Problem getting a useable pump without getting ripped off... Would love to be able to use the spirit combo but Roche won't provide info on pump BT :(
ParkerBenda
@ParkerBenda
Jul 22 2016 19:44
So question...I started with openaps, but moved to Loop and just closed the loop. Do I remove myself entirely from openaps in progress? Move myself to the closed loop section? I'm just not sure how these projects want to be related to one another
Dana Lewis
@danamlewis
Jul 22 2016 19:44
heh. no reason to remove yourself unless you want to. that list is more to help people submit their first PR, which is applicable to any open source project that uses github, so you know how to submit them and contribute to the project
ParkerBenda
@ParkerBenda
Jul 22 2016 19:45
Right
Dana Lewis
@danamlewis
Jul 22 2016 19:45
our rule of thumb has been for people who have been closed looping successfully for 3 nights with no major problems, if they’re following the OpenAPS reference design
Martin Haeberli
@mhaeberli
Jul 22 2016 19:45
@danamlewis :+1: on 100 !
Dana Lewis
@danamlewis
Jul 22 2016 19:46
Loop seems to follow that, so any objections to having Loop loopers also submit the form when they go live? (@loudnate etc.?) If so, I can add “Loopkit” as an option on the form so people can note that that is how they’re looping
realizing, of course, that not everyone will do that, just like they don’t do that now, so this “count” is more of an estimate than an exact science ;) but I think it’s still nice to show the growth of the community
Martin Haeberli
@mhaeberli
Jul 22 2016 19:49
@danamlewis :+1: on integrating Loop - ers ...
Pete Schwamb
@ps2
Jul 22 2016 19:50
I think tracking Loopers is a good idea. I would expect that the title of the graph would change, then; Loop is not OpenAPS.
Dana Lewis
@danamlewis
Jul 22 2016 19:51
(and if we decide to do that, there’s a few people already in the “count” who also have been Loopkit Loop-ing, who can let me know and I can go adjust and add Loop to their stack, so if @loudnate ever wants an idea of who’s actively using, it would be easy to track)
John Dodds
@johners97
Jul 22 2016 21:09
I have set up azure website and a nightscout screen has appeared what should it say
sarahspins
@sarahspins
Jul 22 2016 21:10
@danamlewis I'd like to be counted :+1:
John Dodds
@johners97
Jul 22 2016 21:10

When I use

ENABLE then in the next box i put things in but nothing on my website appears

sarahspins
@sarahspins
Jul 22 2016 21:11
So I vote yes change the form ;)
Martin Haeberli
@mhaeberli
Jul 22 2016 21:15
@johners97 I don’t know your current Nightscout state but in my own experience when I add values to the ENABLE string (by the way, no commas, just “foo bar baz” - whatever the words are - I have always restarted my Azure instance afterwards before new stuff would happen ...
John Dodds
@johners97
Jul 22 2016 21:36
blob
Keeps sayin that please help
i think thats the issue ^
hellpppp
Kim St. Dennis
@kimstdennis_twitter
Jul 22 2016 21:42
@danamlewis @scottleibrand @bewest (and all the community contributors) Congrats on hitting 100 registered users! Thank you all for putting together a wonderful framework and commiting so much time to supporting it.
Scott Leibrand
@scottleibrand
Jul 22 2016 21:45
@johners97 if no one here knows how to fix that, you might try asking the nightscout support folks by posting in the CGM in the Cloud Facebook group.
Martin Haeberli
@mhaeberli
Jul 22 2016 21:48
@johners97 - is this the first time you have spun up Nightscout (in which case, you probably have little or no historical or live data to worry about)? If so, I’d recommend you start at the beginning with forking cgm-remote-monitor / dev (dev because you will want the latest dev stuff to use with OpenAPS) https://github.com/nightscout/cgm-remote-monitor/tree/dev or maybe better 0.9beta3 https://github.com/nightscout/cgm-remote-monitor/tree/0.9-beta3 - also there is Gitter nightscout/cgm-remote-monitor group that might advise ...
Scott Leibrand
@scottleibrand
Jul 22 2016 21:56
or nightscout/public
John Dodds
@johners97
Jul 22 2016 22:00
think i may have got it
Martin Haeberli
@mhaeberli
Jul 22 2016 22:00
@scottleibrand - good point - nightscout/public Gitter feed looks also like a good place to go
@johners97 yay ! ?
John Dodds
@johners97
Jul 22 2016 22:01
using some weird link to do it and somethings going down in a command prompt style window.
probably deleting system 32 lol
got it working!!
John Dodds
@johners97
Jul 22 2016 22:07
@mhaeberli yay? yay!
Martin Haeberli
@mhaeberli
Jul 22 2016 22:07
@johners97 :+1: yay! what did you do to fix it?
John Dodds
@johners97
Jul 22 2016 22:15
@mhaeberli I have no idea, I just started pressing random buttons
Julie
@julieraines
Jul 22 2016 22:16
@danamlewis @scottleibrand @bewest congrats on 100! let me know if you want to put together a survey or something to get info from folks in the loop, thinking about the loop, barriers to looping, etc.
@dm61 thanks for the tip - I got “status”: “ok” which is hopeful from running the curl with the hashed api-secret
Ben West
@bewest
Jul 22 2016 22:17
trouble using ns device?
Julie
@julieraines
Jul 22 2016 22:17
yes sir
Ben West
@bewest
Jul 22 2016 22:18
if you do something like openaps device show ns --ini you should see your url, which should probably start with https://, as well as your hashed API secret
Julie
@julieraines
Jul 22 2016 22:19
i just got TRUE!
OMG
Ben West
@bewest
Jul 22 2016 22:19
yeah
Julie
@julieraines
Jul 22 2016 22:19
WOOHOO!
Ben West
@bewest
Jul 22 2016 22:19
so openaps use ns shell preflight should return true :-)
Julie
@julieraines
Jul 22 2016 22:19
FINALLY - YES!
I need a beer
THANKS - I will do a PR because what @dm61 had me do did the trick
Ben West
@bewest
Jul 22 2016 22:20
what was that?
Julie
@julieraines
Jul 22 2016 22:21
curl https://sarahraines.herokuapp.com/api/v1/experiments/test --header "api-secret: <hashed api secret>
worked like butta
Dragan Maksimovic
@dm61
Jul 22 2016 22:23
So, @julieraines is true now? Yes! (although I have to say I do not understand how just doing that curl would have made a difference by itself - it was supposed to be just diagnostic. Looks like you can do magic @julieraines!
Julie
@julieraines
Jul 22 2016 22:24
it’s all about the karma @dm61 - i must have paid it forward today without even knowing it
Dana Lewis
@danamlewis
Jul 22 2016 22:24
:) :)
Dragan Maksimovic
@dm61
Jul 22 2016 22:25
I think I'll have some beer, hmm, or wine?
Julie
@julieraines
Jul 22 2016 22:26
it is friday after all
Dragan Maksimovic
@dm61
Jul 22 2016 22:27
indeed; and I am just about to wrap up some work and call it a day
Julie
@julieraines
Jul 22 2016 22:29
i’m hopeful this beer will improve my coding abilities
Julie
@julieraines
Jul 22 2016 23:07

[report "monitor/upload-status.json"]
oper = status
use = shell
reporter = JSON
json_default = True
device = ns
remainder = monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json

Does "remainder=“ point me to work I have yet to do? I’ve added and invoked a lot of reports but feel like I’m not working well with alias and oref0. What is this telling me?

Ben West
@bewest
Jul 22 2016 23:12
remainder is the "remainder of the arguments to feed to the tool to re-create the specified use", those are the arguments that get passed to the tool, http://openaps.readthedocs.io/en/latest/docs/openaps-guide/core/reports.html
you shouldn't really need to worry about the ini stuff at all
it's only there so that if the tool itself is busted, there's a way to figure it out easily
Matt Pressnall
@logichammer
Jul 22 2016 23:14

@jasoncalabrese , @TC2013
I swear I am really close to getting my Edison (with Sparkfun board) working. It connects over bluetooth when I do a:

openaps use cgm -h

my files look like:

openaps.ini
[vendor "openxshareble"]
path = .
module = openxshareble

[device "cgm"]
vendor = openxshareble
extra = cgm.ini

cgm.ini
[device "cgm"]
serial = SM1233456

But when I do anything with the device, I get an error back like this:


edison@rey:~/openaps-dev$ openaps use cgm glucose
ERROR:dbus.proxies:Introspect error on :1.1:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.4" (uid=1002 pid=1969 comm="/usr/bin/python /usr/local/bin/openaps-use cgm glu") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=1909 comm="/usr/local/bin/bluetoothd --experimental ")
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/edison/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 87, in __call__
    self.setup_ble( )
  File "/home/edison/src/openxshareble/openxshareble/app.py", line 29, in setup_ble
    self.adapter = self.ble.get_default_adapter()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/interfaces/provider.py", line 94, in get_default_adapter
    adapters = self.list_adapters()
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 167, in list_adapters
    return map(BluezAdapter, self._get_objects('org.bluez.Adapter1'))
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 182, in _get_objects
    for opath, interfaces in self._bluez.GetManagedObjects().iteritems():
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.4" (uid=1002 pid=1969 comm="/usr/bin/python /usr/local/bin/openaps-use cgm glu") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=1909 comm="/usr/local/bin/bluetoothd --experimental ")

I don't know if it matters but I did NOT add a mac address for the Dexcom...How do I find it to add it? What should my cgm.ini look like?

And my user (edison) is added to the dialout group.

Following the absolutely wonderful documentation here:
https://github.com/TC2013/aps-scripts/blob/master/openxshareble_instructions.md

With no errors or issues at all. Any advice?

Thanks!

Julie
@julieraines
Jul 22 2016 23:15
@bewest THANKS!
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:15
did you update the conf file to add the dialout group?
Matt Pressnall
@logichammer
Jul 22 2016 23:15
Which conf file? Sorry?
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:15
/etc/dbus-1/system.d/bluetooth.conf
theres a note about it in the link you posted above
Matt Pressnall
@logichammer
Jul 22 2016 23:16
Ah...hold one
Yes, I did...
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:17
and rebooted since then?
Matt Pressnall
@logichammer
Jul 22 2016 23:17
yes, that that as well
double checking the conf file now
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:17
it's something with the initial bluez install
Matt Pressnall
@logichammer
Jul 22 2016 23:18
damnit...my changes to the conf did not save...might not have been root
jason, you genius
doing that step again
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:20
also make sure you get the latest from openxshareble dev
Matt Pressnall
@logichammer
Jul 22 2016 23:20
will verify, that!
rebooting now
Matt Pressnall
@logichammer
Jul 22 2016 23:25
I was on master on openxshareable so on dev now...and pulled latest...enter this
openaps use cgm battery
And it hangs...returning nothing...going to reboot again
Returned this actually
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 607, in msg_reply_handler
    *message.get_args_list()))
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/device.py", line 80, in pair_error
    raise RuntimeError('Exceeded timeout waiting to Pair with device! %s', error)
RuntimeError: ('Exceeded timeout waiting to Pair with device! %s', DBusException(dbus.String(u'Software caused connection abort'),))
Do I need to give it a mac address?
I have the right serial in there
And I see a bluetooth connection although I didn't do an explicit pair other than entering the serial number
I see bluetooth on the dexcom, I should say
Ben West
@bewest
Jul 22 2016 23:32
that looks like a bluetooth issue of sorts
Matt Pressnall
@logichammer
Jul 22 2016 23:33
Hmmm...ideas for troubleshooting?
edison@rey:~/openaps-dev$ ps aux | grep bluetooth
root      1898  0.0  0.0   3696   960 ?        S    16:27   0:00 bluetooth_rfkill_event
root      1900  0.0  0.2   5236  2096 ?        S    16:27   0:00 /usr/local/bin/bluetoothd --experimental
edison    1944  0.0  0.0   4320   892 ttyMFD2  S+   16:32   0:00 grep bluetooth
edison@rey:~/openaps-dev$
I'm running experimentally
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:35
you had the receiver waiting to pair after forgetting, turning on share, etc?
Ben West
@bewest
Jul 22 2016 23:35
if you just changed the policy file, it's best to reboot
Matt Pressnall
@logichammer
Jul 22 2016 23:35
AH
@jasoncalabrese , I didn't do that all...t
the simple stuff
!
trying now
yes
I think this is it
Ben West
@bewest
Jul 22 2016 23:36
yeah, also need to go through clean forget -> enable share cycle
Matt Pressnall
@logichammer
Jul 22 2016 23:37
do I need to run a pair event from the edison? or does it just magically connect?
Jason Calabrese
@jasoncalabrese
Jul 22 2016 23:37
you don't need the mac address set, but it will be a lot more reliable if it is set, without it it tries to connect to other ble devices in the area
it tries to pair each time
Matt Pressnall
@logichammer
Jul 22 2016 23:38
k
turning off default device that it tries to pair to right now
stoked
Martin Haeberli
@mhaeberli
Jul 22 2016 23:38
@bewest - quick question re Edison OpenAPS rig with mongoLabs … (how and when) do you back up your mLabs data, Nightscout instance, and loop ? (the last, I gather, with git maybe to bitbucket)?
Matt Pressnall
@logichammer
Jul 22 2016 23:40
HELL YES!!!!
got it!
Martin Haeberli
@mhaeberli
Jul 22 2016 23:41
:+1:
Matt Pressnall
@logichammer
Jul 22 2016 23:42
Thanks so much, @bewest and @jasoncalabrese ! Quick question: how do I pull mac address and drop it into cgm.ini? This is so cool! Really appreciate it!!!!
Ben West
@bewest
Jul 22 2016 23:44
openaps use cgm configure --help
with mongo, you really shouldn't need to concern yourself with mongo beyond getting the connection string for nightscout
the design is such that nightscout's cgm-remote-monitor is the only thing that needs the mongo credentials
Matt Pressnall
@logichammer
Jul 22 2016 23:45
And using list_dexcom...perfect!
Ben West
@bewest
Jul 22 2016 23:45
the mongo db serves as a kind of backup for the data going into it
Matt Pressnall
@logichammer
Jul 22 2016 23:45
this is awesome
Ben West
@bewest
Jul 22 2016 23:46
git serves as a transactional memory for all the steps that have modified the data
the json exports serve as another kind of configuration backup, eg oref0 export-loop
Matt Pressnall
@logichammer
Jul 22 2016 23:48
All configured now... @jasoncalabrese, I should be playing with your code soon now that I have everything talking...so cool that this little dude can do all the work of the pi and battery I have now!
Don't know how folks do their edison backups but I have been doing this...haven't restored yet:
I've been away for a while, but finally got back to this topic. Sergio's suggestion worked like a charm. Actually, I used a modification to the recipe to compress the image, since all I had was a 4GB flash drive (which was unfortunately just under the capacity of 4GB MMC on the Edison) and was too lazy to go out and buy a bigger drive. Specifically, what I did was:

On the Edison I wished to clone:
1. Create a place to mount a USB flash drive. I did 'mkdir /mnt/usbdrive'
2. Plug in a USB drive to the USB OTG port, using a suitable OTG adapter cable and a powered USB hub.
3. Mount the USB drive: 'mount /dev/sda1 / mnt /usbdrive'
4. Create the compressed image: 'dd bs=4M if=/dev/mmcblk0 | gzip > / mnt /usbdrive/Edison_backup.gz'
Step 4 took about 35 minutes. (with bs=1M, it takes a lot longer)

On a brand-new Edison, right out of the box:
5. Connect via USB. I'm connecting with a Linux system, so: 'screen /dev/ttyUSB0 115200'
6. Create a place to mount a USB flash drive. I did 'mkdir / mnt /usbdrive'
7. Plug in a USB drive to the USB OTG port, using a suitable OTG adapter cable and a powered USB hub.
8. Mount the USB drive: 'mount /dev/sda1 / mnt /usbdrive'
9. Transfer the image to the new Edison: 'gzip -dc / mnt /usbdrive/Edison_backup.gz | dd bs=4M of=/dev/mmcblk0'
Step 8 took another 35 minutes.

After step 9, the new Edison responds to every line command with a "segmentation error" indication. However, after a power cycle, the new Edison comes up as a perfect clone of the old Edison. It also got the partitioning right. On my old Edison, I flashed it with a 1GB root ('/') partition. The cloning resulted a 1GB root as well. The only difference was that when connecting to the new Edison wirelessly, my router assigned a different IP address to it, since it had a different MAC address.

In just a little over a half-hour, one can completely backup one's Edison, or in just a little over an hour completely clone it.
Martin Haeberli
@mhaeberli
Jul 22 2016 23:53
@bewest - so what I had understood from one of your earlier notes today is that you run mongoDB on the Edison proper (stored on the extra SD card) … my q was - whether, when, and how you back up that_ instance to elsewhere should the rig get corrupted or, forbid, lost ...
Ben West
@bewest
Jul 22 2016 23:54
it's something I'm playing with and developing, not something I'm depending on currently
Martin Haeberli
@mhaeberli
Jul 22 2016 23:54
@bewest k thx
Ben West
@bewest
Jul 22 2016 23:54
my note was simply that it is easily installable and runnable
Martin Haeberli
@mhaeberli
Jul 22 2016 23:54
@bewest :+1:
Ben West
@bewest
Jul 22 2016 23:54
there are mongo tools for dumping and restoring to/from json, which I used to migrate from mlab sandbox and into a self-hosted version on a server
regarding those questions, I'm thinking about using the builtin mqtt support to sync multiple sources
form a cloud-mesh via mqtt, have it sync everywhere
the mqtt support allows propagating all the events that occur to all the other connected nodes