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

31st
Dec 2015
dougtakeuti
@dougtakeuti
Dec 31 2015 00:00
not really.
Is it ok to paste large portions of text as I've been doing? Doesn't it make the chat horrible to read for other users?
Dana Lewis
@danamlewis
Dec 31 2015 00:06
Yup, it's fine. It is a little easier to read if you format it, use ` before and after a single line of code, do three of them on a single line before and after a block of code.
But not a big deal if you dont
If it's a ton of code,
you can stick it in a gist and just pastthe link here. But the volume you've been posting is fine, IMO
`exa
example
dougtakeuti
@dougtakeuti
Dec 31 2015 00:11
ok then, thanks! anyway, this is what I have in glucose.json:
[
  {
    "packet_size": 0,
    "name": "DataEnd",
    "date": "2015-12-30T21:45:00",
    "date_type": "none",
    "_tell": 1,
    "op": "0x01"
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 2,
    "sgv": 184,
    "date": "2015-12-30T21:40:00",
    "packet_size": 0,
    "op": 92
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 3,
    "sgv": 186,
    "date": "2015-12-30T21:35:00",
    "packet_size": 0,
    "op": 93
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 4,
    "sgv": 188,
    "date": "2015-12-30T21:30:00",
    "packet_size": 0,
    "op": 94
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 5,
    "sgv": 188,
    "date": "2015-12-30T21:25:00",
    "packet_size": 0,
    "op": 94
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 6,
    "sgv": 186,
    "date": "2015-12-30T21:20:00",
    "packet_size": 0,
    "op": 93
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 7,
    "sgv": 182,
    "date": "2015-12-30T21:15:00",
    "packet_size": 0,
    "op": 91
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 8,
    "sgv": 182,
    "date": "2015-12-30T21:10:00",
    "packet_size": 0,
    "op": 91
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 9,
    "sgv": 182,
    "date": "2015-12-30T21:05:00",
    "packet_size": 0,
    "op": 91
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 10,
    "sgv": 186,
    "date": "2015-12-30T21:00:00",
    "packet_size": 0,
    "op": 93
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 11,
    "sgv": 190,
    "date": "2015-12-30T20:55:00",
    "packet_size": 0,
    "op": 95
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 12,
    "sgv": 190,
    "date": "2015-12-30T20:50:00",
    "packet_size": 0,
    "op": 95
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 13,
    "sgv": 186,
    "date": "2015-12-30T20:45:00",
    "packet_size": 0,
    "op": 93
  }
]`
dougtakeuti
@dougtakeuti
Dec 31 2015 00:18
So I don't get the Could not determine last BG time message
Scott Leibrand
@scottleibrand
Dec 31 2015 00:19
Oh, that is Medtronic sensor data, not dexcom.
dougtakeuti
@dougtakeuti
Dec 31 2015 00:19
yes
Scott Leibrand
@scottleibrand
Dec 31 2015 00:19
There is some json field rename you have to do to get it into the expected format.
I don't recall what exactly that is offhand.
dougtakeuti
@dougtakeuti
Dec 31 2015 00:20
Is that info documented?
Scott Leibrand
@scottleibrand
Dec 31 2015 00:21
Not sure it is. There are a few folks from Europe who've gotten set up, but not sure if they documented how.
Let's look at the field names. I think it's obvious.
dougtakeuti
@dougtakeuti
Dec 31 2015 00:23
ok, I'll have a look, thanks!
Scott Leibrand
@scottleibrand
Dec 31 2015 00:23
Maybe change sgv to glucose.
Or look in the code where that error occurs and see what triggers it.
If you can't figure it out I'll check when I'm back on my computer.
dougtakeuti
@dougtakeuti
Dec 31 2015 00:26
Yes, I'm looking into the code right now. Would you have a sample of a Dexcom file so I could compare? I see, you don't have your computer, never mind.
Scott Leibrand
@scottleibrand
Dec 31 2015 00:44
Jason's repos have them: jasoncalabrese/indy@77ac7f6
Scott Leibrand
@scottleibrand
Dec 31 2015 00:52
thx @eyim. that writeup of yours I just merged to openaps/docs should be very helpful for everyone working on NS uploads. :)
schulzedj
@schulzedj
Dec 31 2015 00:53
Here are a couple errors I'm getting when trying to run reports. Based off of conversations a couple nights ago it seems I would not need to "run" reports on the settings since we're pulling from the pump. Here are the output results:
'''
pi@raspberrypi:~/daneopenaps $ openaps report invoke enact/suggested.json
determine-basal://text/shell/enact/suggested.json
'''
which says syntax error on iob.json...so I run the report to invoke the iob.json and the results are:
'''
Error: Cannot find module '/home/pi/daneopenaps/settings/profile.json'
'''
Any thoughts or suggestions?
Dana Lewis
@danamlewis
Dec 31 2015 00:53
+1 thanks @eyim
Scott Leibrand
@scottleibrand
Dec 31 2015 00:54
for formatting, you want ` (on the same key as ~) not ' (on the same key as ")
Error: Cannot find module '/home/pi/daneopenaps/settings/profile.json means you haven't invoked the settings/profile.json report yet
schulzedj
@schulzedj
Dec 31 2015 00:59
Which would make sense...so here's the next error it throws when I run this report
cannot find module settings/settings.json
Could it be a naming convention issue? pi@raspberrypi:~/daneopenaps $ openaps report invoke settings.json usage: openaps-report invoke [-h] {enact/suggested.json,glucose.json,iob.json,iter_glucose.json,last_four_cgm_hours.json,last_four_pump_hours.json,model.json,pumphistory.json,read_clock.json,settings/basal_profile_std.json,settings/bg_targets.json,settings/insulin_sensitivies.json,settings/profile.json,temp_basal.json} [{enact/suggested.json,glucose.json,iob.json,iter_glucose.json,last_four_cgm_hours.json,last_four_pump_hours.json,model.json,pumphistory.json,read_clock.json,settings/basal_profile_std.json,settings/bg_targets.json,settings/insulin_sensitivies.json,settings/profile.json,temp_basal.json} ...] openaps-report invoke: error: argument report: invalid choice: 'settings.json' (choose from u'enact/suggested.json', u'glucose.json', u'iob.json', u'iter_glucose.json', u'last_four_cgm_hours.json', u'last_four_pump_hours.json', u'model.json', u'pumphistory.json', u'read_clock.json', u'settings/basal_profile_std.json', u'settings/bg_targets.json', u'settings/insulin_sensitivies.json', u'settings/profile.json', u'temp_basal.json') pi@raspberrypi:~/daneopenaps $
Scott Leibrand
@scottleibrand
Dec 31 2015 01:07
do you have a settings.json report set up at all?
something like openaps report add settings/settings.json JSON pump read_settings
schulzedj
@schulzedj
Dec 31 2015 01:09
Checked the reports and I don't see the settings/settings.json... Let me add that now, invoke the report and then try again
dougtakeuti
@dougtakeuti
Dec 31 2015 02:42
@scottleibrand it works now. Basically the formatting of glucose.json requires:
1) erasing the first block of info
2) replacing sgv with glucose and date with display_time.
Scott Leibrand
@scottleibrand
Dec 31 2015 02:46
K. If you want to, we need someone to update oref0-determine-basal to handle either format.
Or anyone else using MDT CGM who wants to help
dougtakeuti
@dougtakeuti
Dec 31 2015 02:51
with my coding skills (nonexisting), I wouldn't dare... sorry. I'll try to get some help.
Scott Leibrand
@scottleibrand
Dec 31 2015 03:03
SGV might actually be ok. I just noticed the share2 data uses that. May only be the date field name
schulzedj
@schulzedj
Dec 31 2015 03:17
@scottleibrand did the openaps.org website change or am I missing something? I cannot seem to locate the design document as I need to go back and change some of my naming conventions and am looking to reference that document
Dana Lewis
@danamlewis
Dec 31 2015 03:18
Reference design is still on openAPS.org
Scott Leibrand
@scottleibrand
Dec 31 2015 03:18
still linked at the top
schulzedj
@schulzedj
Dec 31 2015 03:18
Yup- just found it. Thanks again
Dana Lewis
@danamlewis
Dec 31 2015 03:18
Look to top right to see the pages. It's also, if needed, in the Openaps docs on GitHub as well so we can track changes moving forward
schulzedj
@schulzedj
Dec 31 2015 04:20
One of the inconsistencies I've noticed is the use or lack there of for using monitor. e.g. monitor/clock.json. The reference docs say it's not needed but many of the examples show it with the monitor structure.
Scott Leibrand
@scottleibrand
Dec 31 2015 04:22
Yeah. The main reason to put things into monitor/ is to make it easy to delete them all before each run. That guarantees you can't act on old data and enact the same old recommendation over and over indefinitely if your loop gets partially stuck. (I had that happen a few times with openaps-js.)
schulzedj
@schulzedj
Dec 31 2015 04:32
You had mentioned in the reference docs that with Orefo it was not an issue. Would you suggest going back and adding monitor?
Scott Leibrand
@scottleibrand
Dec 31 2015 04:33
I don't follow your question.
schulzedj
@schulzedj
Dec 31 2015 04:37
So in the ref. docs it shows openaps monitor-cgm because I did not set up monitor my command looks like openaps cgm
As an example
Trying to set this up "The max_iob.json has to be defined manually: it's not configured on the pump. It's a really simple json file that looks like {"max_iob":0}" Should I add this using the nano command or is there a better way?
schulzedj
@schulzedj
Dec 31 2015 04:54

I am working my way through invoking all the reports and I don't understand why I keep getting additional module errors: ```pi@raspberrypi:~/daneopenaps $ openaps report invoke iob.json
iob://text/shell/iob.json

module.js:340
throw err;
^
Error: Cannot find module '/home/pi/daneopenaps/clock.json'```

I have a report for read_clock.json. So do I need to keep adding the reports I get module errors for?
schulzedj
@schulzedj
Dec 31 2015 05:38
Since I know nobody has ever received this error I figured I'd ask. I have the cgm time set a minute ahead of the pump and I have refreshed the reports so I don't believe my date is too old...any thoughts or advice? pi@raspberrypi:~/daneopenaps $ openaps report invoke enact/suggested.json determine-basal://text/shell/enact/suggested.json BG data is too old, or clock set incorrectly Traceback (most recent call last): File "/usr/local/bin/openaps-report", line 4, in <module> __import__('pkg_resources').run_script('openaps==0.0.7', '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.7-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.7-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.7-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.7-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.7-py2.7.egg/openaps/reports/invoke.py", line 45, in main reporters.Reporter(report, device, task)(output) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg/openaps/reports/reporters/__init__.py", line 18, in __init__ self.output = getattr(self.method, 'get_output_stream', default_prep_stream)(self) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg/openaps/reports/reporters/__init__.py", line 5, in default_prep_stream return open(reporter.report.name, 'w') IOError: [Errno 2] No such file or directory: u'enact/suggested.json' pi@raspberrypi:~/daneopenaps $
Rachel Sandlain
@audiefile
Dec 31 2015 05:40
Have you checked that all your devices have the correct time - cgm, pump, and pi? Have you refreshed all the input files so that they are less than 5 minutes old?
schulzedj
@schulzedj
Dec 31 2015 05:49
the one I have not done is the pi- everything else yes
schulzedj
@schulzedj
Dec 31 2015 05:57
In refreshing the reports, specifically openaps pump alias the challenge is as follows: pump://JSON/iter_pump_hours/pumphistory.json pumphistory.json raised NAK!!
There's a bunch of other output but the NAK!! doesn't seem to be great
Sulka Haro
@sulkaharo
Dec 31 2015 07:20
Was there any documentation around what fields Nightscout and OpenAPS expects to be in the JSON objects? I assume not :D
@juliatakeuti here's a working record as pulled from Nightscout:
  {
    "direction": "Flat", 
    "noise": 1, 
    "dateString": "Thu Dec 31 09:12:49 EET 2015", 
    "sgv": 128, 
    "date": 1451545969000, 
    "unfiltered": 138592, 
    "rssi": 180, 
    "device": "dexcom", 
    "filtered": 133120, 
    "_id": "5684d5c08f1b52dc20915bfb", 
    "type": "sgv"
  }
Ben West
@bewest
Dec 31 2015 08:46
NAK usually means no serial number
there is a tool called mm-format-ns-glucose
also, mm-format-ns-profile, mm-format-ns-pump-history, mm-format-ns-treatments
it's a combination of shell and node scripts that collectively document what openaps and nightscout expect
pattern for the formatting tools is $from-format-$target-$record
or to instead of target
so "mm-format-ns-profile` formats the medtronic data so that it looks like a Nightscout profile
Ben West
@bewest
Dec 31 2015 08:58
further, FYI, all mm-* tools, like mm-send-comm.py etc are all targeting medtronic paradigm series (of all models), the ones that talk to the pump all follow same rules for --init, and --serial and doing prelude/postlude stick diagnoses
Scott Leibrand
@scottleibrand
Dec 31 2015 13:27
@schulzedj I think one of your problems is that you aren't refreshing things every time. You should be building aliases that invoke all of the data-gathering reports and then run that alias every time before the IOB and determine-basal reports.
Toby Canning
@TC2013
Dec 31 2015 17:42
I am thinking of trying @oskarpearson 's : https://github.com/oskarpearson/mmeowlink/tree/mmcommander
Does anyone know of an alternative to IAR?
Oskar Pearson
@oskarpearson
Dec 31 2015 17:47
At the moment it's pretty tied to the iar compiler
I can probably send you a precompiled firmware if you let me know your region
Direct message me an email address
Toby Canning
@TC2013
Dec 31 2015 17:48
Thanks! US
will do
Dana Lewis
@danamlewis
Dec 31 2015 18:08
@jasoncalabrese Any ideas for speeding up the app, or what trade offs we need to choose? Takes more than a full minute for mine to load initially these days.
Ben West
@bewest
Dec 31 2015 18:11
does the sdcc port not work?
Jason Calabrese
@jasoncalabrese
Dec 31 2015 18:26
@danamlewis I think it's all the new OpenAPS device status
It's sending 2 days worth to enable retro mode
You can turn off DEVICESTATUS_ADVANCED
Scott Leibrand
@scottleibrand
Dec 31 2015 18:28
Could we do that after it renders?
since only the most recent OpenAPS status matters for the initial view.
Jason Calabrese
@jasoncalabrese
Dec 31 2015 18:28
Yeah, would be great to find a way to do that
I'm thinking that we could do something in-between for now
Send 6hrs instead of 48
Make that an option, then figure out how to background load the rest
Dana Lewis
@danamlewis
Dec 31 2015 18:32
Yea. That would be nice
Jason Calabrese
@jasoncalabrese
Dec 31 2015 18:40
Try turning out off and see how much it helps
I think @sulkaharo turned it off too
If like to configure it per device
Only care about retro on laptop
Scott Leibrand
@scottleibrand
Dec 31 2015 18:45
How do you do it per device?
Jason Calabrese
@jasoncalabrese
Dec 31 2015 18:53
Not sure how we'd do it, would be per websocket client I think
Sulka Haro
@sulkaharo
Dec 31 2015 18:59
I turned it off and then back on, as the behavior is now broken on dev when it's off. Both OpenAPS and uploader statuses effectively break, as the system seems to send whatever is the latest entry on device status.
End result was OpenAPS pill showing an error and uploader battery not coming through. Haven't debugged.
Jason Calabrese
@jasoncalabrese
Dec 31 2015 19:06
If it's of only 1 device status is sent, so that will be a uploader battery or OpenAPS
Oskar Pearson
@oskarpearson
Dec 31 2015 19:39
@bewest I've not tested the sdcc ports, so can't comment on it. I've been focussing on getting https://github.com/ps2/subg_rfspy to work instead
Feedback would be welcome
If anyone else wants to try the other variants of mmcommander
Scott Leibrand
@scottleibrand
Dec 31 2015 20:28
guess maybe I should finally do that release of oref0 dev to master...
Dana Lewis
@danamlewis
Dec 31 2015 20:29
Oh yea. Would be good before I do the post. #procrastinatorsunite
Rachel Sandlain
@audiefile
Dec 31 2015 20:30

procrastinatorsunite #nextweek

Dana Lewis
@danamlewis
Dec 31 2015 20:33
pretty much :)
Scott Leibrand
@scottleibrand
Dec 31 2015 20:34

ilikebighashtags

LadyViktoria
@LadyViktoria
Dec 31 2015 20:34
!!!
Scott Leibrand
@scottleibrand
Dec 31 2015 20:34

andcannotlie

Rachel Sandlain
@audiefile
Dec 31 2015 20:35
:smile:
Scott Leibrand
@scottleibrand
Dec 31 2015 22:06
oref0 version 0.1.2 released!
Dana Lewis
@danamlewis
Dec 31 2015 22:06
:confetti_ball:
:fireworks: (for tonight)
LadyViktoria
@LadyViktoria
Dec 31 2015 22:08
is this with meal assist?
Dana Lewis
@danamlewis
Dec 31 2015 22:08
next step is taking meal assist branch and merging to dev
LadyViktoria
@LadyViktoria
Dec 31 2015 22:08
:D
:+1:
Scott Leibrand
@scottleibrand
Dec 31 2015 22:09
0.1.2 has expected-delta, and the IOB calculation fix, and some other minor bug fixes
as well as @LorelaiL's refactor and a bunch of new tests. particular thanks to @jasoncalabrese for making it possible to finally figure out the IOB bug.
Rachel Sandlain
@audiefile
Dec 31 2015 22:12
Can someone help me with uploading treatments to nightscout? I have the openaps plugin working so I'm close. I'm just not sure what is needed to format and ship pumphistory using the oref0 tools
Dana Lewis
@danamlewis
Dec 31 2015 22:12
Check out @eyim 's recent add to the docs
I haven't checked it all the way through, but went ahead and added his PR so there's something there, if you want to add to it :)
Rachel Sandlain
@audiefile
Dec 31 2015 22:15
I used that to help with the plugin. It was a good guide but the commands aren't 100% correct
Dana Lewis
@danamlewis
Dec 31 2015 22:15
Ah, k
Scott Leibrand
@scottleibrand
Dec 31 2015 22:16
openaps alias add format-ns-status '! bash -c "ns-status monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json > upload/ns-status.json"'
openaps alias add upload-ns-status '! bash -c "openaps format-ns-status && ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json upload/ns-status.json"'
openaps alias add upload '! bash -c "echo -n Upload && ( openaps upload-ns-status; openaps report invoke enact/suggested.json 2>/dev/null; openaps pebble; openaps upload-pumphistory-entries; openaps upload-recent-treatments ) >/dev/null && echo ed"'
Rachel Sandlain
@audiefile
Dec 31 2015 22:16
And it doesn't really cover treatments does it? I use a script I wrote to send treatments so I have had temps showing for awhile. I was hoping to be able to automate bolus as well
please take notes on what needs improved, and submit a PR to update the docs if you can
Rachel Sandlain
@audiefile
Dec 31 2015 22:18
:+1:
eyim
@eyim
Dec 31 2015 23:03
@audiefile Correct it doesn't upload recent treatments. Sorry - left that part out as recent treatments was in the main part of my loop and not involved with the new openaps pillbox.
Rachel Sandlain
@audiefile
Dec 31 2015 23:05
No problem!
I've been using a DIY version for a while because I couldn't get the tools to work. I figured it was time to try the other way again
Scott Leibrand
@scottleibrand
Dec 31 2015 23:06
:-)
Rachel Sandlain
@audiefile
Dec 31 2015 23:06
Your guide helped with the openaps pillbox a lot so thank you
Scott Leibrand
@scottleibrand
Dec 31 2015 23:45
merged oref0 meal-assist branch to dev
Jason Calabrese
@jasoncalabrese
Dec 31 2015 23:51
Nice, saw lots of merging