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

20th
Feb 2016
Jim Matheson
@jmatheson
Feb 20 2016 02:09
Finally got a (half) day in snowboarding with my setup. Worked solid despite getting dexcom g5 via ble to NS and back down. Kept me in line and prevented a low.
Jason Calabrese
@jasoncalabrese
Feb 20 2016 03:05
great
what setup was that?
Toby Canning
@TC2013
Feb 20 2016 04:38
@ceben80 It has been months, but I did something similar and was able to use the truncate command to essentially cut off the end of the img file. I think I shrunk it to an 8GB image and fortunately it worked well. It has been so long since I did it and the command is listed in sectors, so hopefully my memory is correct about the size of the file. This is a linux command, but may be supported in Mac or in Cygwin in windows: truncate --size=$[(15351807)*512] OpenAPS.img
The premise of this working is hopefully it is just cutting off empty space (maybe zeros), but of course there is a risk you'll cut off actual data.
Matthias
@ceben80
Feb 20 2016 06:27

@/all
Did any of you tried the following?

https://www.virtualhere.com/

Connect the Carelink Stick to the mobile using remotely over the internet โ€“ the Raspberry Pi remains at home. This could really be a perfect solution if youโ€™re not at home.
The advantage would be not annoyed by carrying the RPi and Powerbank.

Jim Matheson
@jmatheson
Feb 20 2016 06:32
@jasoncalabrese edison, sparkfun, sparkdun battery board with soldered 2000mAh. G5 through ios ble share app to NS. ios hotspot. Granted been having issues with hotspot tonight
And usb ti stick
Ben West
@bewest
Feb 20 2016 06:42
@ceben80 if you look in the decoding-carelink repo, you'll see some socat utilities that do the same thing
you can arrange for socat to bridge the serial connection to a tcp port, which you can then forward over ssh
on other end you can perform similar trick to create serial port that is mapped to the forward tcp port
both ends are provided as examples
in fact
this was precursor to openaps tools https://github.com/bewest/insulaudit-ssh-tools
Matthias
@ceben80
Feb 20 2016 08:26
@/all Today I am carrying my APS stuff in a bag.
Monitoring the core parameters shows the Pi temperature of 116 ยฐF.
If this temperature is okay? Heatsinks are installed...
20160220_063843.jpg
Matthias
@ceben80
Feb 20 2016 09:14
@/all In terms of monitoring logs etc. does anybody perform actions like send an email when whatever happens (critical situations....)?
Jason Calabrese
@jasoncalabrese
Feb 20 2016 09:29
I just setup new relic for basic monitoring of storage, cpu, memory, etc, but it won't work on PIs, only Edisons
Matthias
@ceben80
Feb 20 2016 09:41
@jasoncalabrese That's the beauty of this amazing project, you quickly get a lot of ideas, wonderful :smile:
joannestevens
@joannestevens
Feb 20 2016 11:27
I am now at the point of trying to communicate with my pump but I keep getttting an error message: attempting to use a port that is not open ... I can't see any useful tips of google ... can anyone please point me in the right direction?
Dana Lewis
@danamlewis
Feb 20 2016 12:00
Hi all - just popping in to say @scottleibrand & I are back online. Looking forward to reviewing the PRs I see waiting for the docs!
Matthias
@ceben80
Feb 20 2016 12:01
Hi Dana
great news from my side....wait....
@danamlewis @scottleibrand
I have been successfully looped 3+ overnight.
The "keeping-up-to-date" form has been sent out.
What will be the next looper number? :wink:
This project is so awesome and I want to thank everyone here in this chatroom for any advice!
Dana Lewis
@danamlewis
Feb 20 2016 12:06
Congrats! :) it'll probably be tomorrow ;) when I get caught up via email to review the form!
joannestevens
@joannestevens
Feb 20 2016 13:29
I am finding the instructions for pulling blood glucose levels from nightscout a little confusing, are there any further documents on this stage of the set up? I am using an xdrip and don't have a dexcom receiver so need to go through this? Many thanks Jo
JaysonEwer
@JaysonEwer
Feb 20 2016 13:31
@ceben80 ๐Ÿ‘๐Ÿ‘๐Ÿ’ช. Great Job! It is an awesome project! @danamlewis @scottleibrand Welcome back!! I hope you had a restful and enjoyable time.
Matthias
@ceben80
Feb 20 2016 13:46
@JaysonEwer Thanks.....It's so great my APS, meanwhile I'm using it sometimes during the day :+1:
Scott Leibrand
@scottleibrand
Feb 20 2016 13:58
So to chime in on the max_iob discussion from a few days back: there have been some changes since master that make a low max_iob work a lot better. Specifically, the old way we calculated basal IOB was a shortcut, calculating it as net IOB minus bolus snooze IOB. That meant that after a big meal bolus, the loop would hit max_iob and stop high temping.
Matthias
@ceben80
Feb 20 2016 14:30
Hi Scott, welcome back from holiday :smile:
Dana Lewis
@danamlewis
Feb 20 2016 14:32
@jaysonewer thanks :)
@joannestevens That's the area of docs that need more work, but what's in master is our most current of everything.
I think either @TC2013 @audiefile Or @eyim might be using xDrip and might have some pointers for what might be different for pulling from NS, if anything
Scott Leibrand
@scottleibrand
Feb 20 2016 14:35
In the latest oref0 (dev I think) we calculate basal IOB correctly, so a max (basal) IOB of 2x average basal is usually sufficient
Dana Lewis
@danamlewis
Feb 20 2016 14:44
Yes that's it. Needs more work, but that's what is currently documented!
joannestevens
@joannestevens
Feb 20 2016 14:47
Yes, I've managed to understand thus far but I can't decipher that section :smile:
Scott Leibrand
@scottleibrand
Feb 20 2016 15:00
Yeah, someone needs to add the `openaps
the openaps device add and openaps report add commands to get that resulting ini.
schulzedj
@schulzedj
Feb 20 2016 16:20
Was reading through the suggested revisions to the documentation and NS is referenced several times. Correct me if I'm wrong but is NS in the context of the closed loop used principally for visualization and historical comparison? I have not pursued NS since I use IOS for my phone (at least my perception is NS is not IOS friendly).
joannestevens
@joannestevens
Feb 20 2016 16:31
Scott Leibrand
@scottleibrand
Feb 20 2016 16:35
@joannestevens: that would be the perfect edit to make and submit as your first pull request.
You'll want to fork (copy) the docs repo, find the page in your copy, edit it, commit that (with a note as to what you changed and why) and then submit a pull request to the dev branch of the openaps docs repo to get it incorporated.
Dana Lewis
@danamlewis
Feb 20 2016 16:37
@schulzedj NS is very ios friendly - can be pulled up via safari, but we also use a app that pulls it in and does quite well
but yes, in context for visualization, easy status checking, and historical view
Scott Leibrand
@scottleibrand
Feb 20 2016 16:37
@schulzedj we use Nightscout entirely with IOS. We use the G4 Share app to upload BGs to Dexcom, and then NS pulls them in from there. So no need for th android-uploader.
schulzedj
@schulzedj
Feb 20 2016 16:49
Ok- was just reading through the NS for G4 and Share... Sounds like I need to register at a host of websites and bring all of this together.
joannestevens
@joannestevens
Feb 20 2016 16:50
@scottleibrand ... I'll have a go
JaysonEwer
@JaysonEwer
Feb 20 2016 16:58
@schulzedj iOS with NS and OpenAPS work quite well together. I "found" OpenAPS after being introduced to NS by a friend and getting it all setup. The NS documentation is excellent, it does take some time and effort to get it all operational, but it's WELL WORTH the effort!!
Scott Leibrand
@scottleibrand
Feb 20 2016 17:27
@joannestevens almost perfect. Only thing we need to change is to select the dev branch of openaps/docs before doing the PR. your request is targeting master
joannestevens
@joannestevens
Feb 20 2016 17:30
@scottleibrand ... what do you mean by targeting master?
Scott Leibrand
@scottleibrand
Feb 20 2016 18:17
"joannestevens wants to merge 1 commit into openaps:master from joannestevens:patch-1"
At openaps/docs#90
you have to change from the master to the dev branch before you make the PR to get it to target dev
joannestevens
@joannestevens
Feb 20 2016 18:26
Ok, that makes sense now
Aaron Michelson
@Aaybob
Feb 20 2016 18:34

My Openaps stopped running. I suspect memory corruption. What would repair it? I get this error $ 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

Jason Calabrese
@jasoncalabrese
Feb 20 2016 18:50
maybe you're not fetching all the files, and 1 of them was deleted? seems that the active-basal-profile.json file might not be right. Does it exist? What are the contents?
Aaron Michelson
@Aaybob
Feb 20 2016 18:51
I don't see that file anywhere
Jason Calabrese
@jasoncalabrese
Feb 20 2016 18:54
you may have it named something else
Aaron Michelson
@Aaybob
Feb 20 2016 18:54
I have only these reports
$ openaps report show
pumpbuilding://JSON/iter_pump_hours/last_four_pump_hours.json
pumpbuilding://JSON/settings/settings.json
pumpbuilding://JSON/read_carb_ratios/read_carb_ratios.json
pumpbuilding://JSON/read_clock/read_clock.json
pumpbuilding://JSON/read_battery_status/read_battery_status.json
pumpbuilding://JSON/read_selected_basal_profile/read_selected_basal_profile.json
ns-status://JSON/shell/monitor/upload-status.json
pumpbuilding://JSON/read_settings/settings/settings.json
pumpbuilding://JSON/read_bg_targets/settings/bg_targets.json
pumpbuilding://JSON/read_insulin_sensitivities/settings/insulin_sensitivities.json
pumpbuilding://JSON/read_basal_profile_std/settings/basal_profile.json
get-profile://text/shell/settings/profile.json
cgmbuilding://JSON/iter_glucose_hours/last_four_cgm_hours.json
pumpbuilding://JSON/iter_pump_hours/monitor/pumphistory.json
pumpbuilding://JSON/read_clock/monitor/clock.json
calculate-iob://JSON/shell/monitor/iob.json
pumpbuilding://JSON/read_temp_basal/monitor/temp_basal.json
cgmbuilding://JSON/iter_glucose/monitor/glucose.json
determine-basal://text/shell/enact/suggested.json
pumpbuilding://JSON/model/model.json
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
tz://JSON/clock/visualize/clock-zoned.json
pumpbuilding://JSON/read_status/visualize/read_status.json
pumpbuilding://JSON/reservoir/visualize/reservoir.json
pumpbuilding://JSON/read_battery_status/visualize/read_battery_status.json
tz://JSON/rezone/visualize/pumphistory-zoned.json
Jason Calabrese
@jasoncalabrese
Feb 20 2016 18:56
what do you have as inputs to the profile.json report
Aaron Michelson
@Aaybob
Feb 20 2016 18:59
[report "settings/profile.json"]
use = shell
bg_targets = settings/bg_targets.json
settings = settings/settings.json
basal_profile = settings/basal_profile.json
reporter = text
json_default = True
max_iob = settings/max_iob.json
device = get-profile
remainder = []
isf = settings/insulin_sensitivities.json
joannestevens
@joannestevens
Feb 20 2016 19:02
I'm just at the point of adding and invoking reports .. is there a list anywhere of typical reports that are recommended for use?
Jason Calabrese
@jasoncalabrese
Feb 20 2016 19:02
looks very different from mine, what's get-profile device look like?
Aaron Michelson
@Aaybob
Feb 20 2016 19:03
profile.json and basal_profile.json are empty but exist
[device "get-profile"]
vendor = openaps.vendors.process
extra = get-profile.ini
Jason Calabrese
@jasoncalabrese
Feb 20 2016 19:05
ok, then the details are in get-profile.ini
Aaron Michelson
@Aaybob
Feb 20 2016 19:05
$ cat get-profile.ini
[device "get-profile"]
fields = settings bg_targets isf basal_profile max_iob
cmd = oref0
args = get-profile
Jason Calabrese
@jasoncalabrese
Feb 20 2016 19:06
ok, so I think the issue is with settings/basal_profile.json, whats that report look like? can you run it manually?
Aaron Michelson
@Aaybob
Feb 20 2016 19:08
yes it runs manually
Jason Calabrese
@jasoncalabrese
Feb 20 2016 19:08
@joannestevens there are examples, but everyone lands up with something custom, not ideal, I think the new pass to the docs will help with that
good, maybe it missing from an alias?
Aaron Michelson
@Aaybob
Feb 20 2016 19:10
profile.json also runs manually but was blank before running it manually
So those files got corrupted and were never being called but existed from a previous manual invoke
joannestevens
@joannestevens
Feb 20 2016 19:20
Thanks @jasoncalabrese .. where can I find the examples?
Aaron Michelson
@Aaybob
Feb 20 2016 19:22
@joannestevens here's my reportspumpbuilding://JSON/iter_pump_hours/last_four_pump_hours.json
pumpbuilding://JSON/settings/settings.json
pumpbuilding://JSON/read_carb_ratios/read_carb_ratios.json
pumpbuilding://JSON/read_clock/read_clock.json
pumpbuilding://JSON/read_battery_status/read_battery_status.json
pumpbuilding://JSON/read_selected_basal_profile/read_selected_basal_profile.json
ns-status://JSON/shell/monitor/upload-status.json
pumpbuilding://JSON/read_settings/settings/settings.json
pumpbuilding://JSON/read_bg_targets/settings/bg_targets.json
pumpbuilding://JSON/read_insulin_sensitivities/settings/insulin_sensitivities.json
pumpbuilding://JSON/read_basal_profile_std/settings/basal_profile.json
get-profile://text/shell/settings/profile.json
cgmbuilding://JSON/iter_glucose_hours/last_four_cgm_hours.json
pumpbuilding://JSON/iter_pump_hours/monitor/pumphistory.json
pumpbuilding://JSON/read_clock/monitor/clock.json
calculate-iob://JSON/shell/monitor/iob.json
pumpbuilding://JSON/read_temp_basal/monitor/temp_basal.json
cgmbuilding://JSON/iter_glucose/monitor/glucose.json
determine-basal://text/shell/enact/suggested.json
pumpbuilding://JSON/model/model.json
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
t
@joannestevens a lot of them are found with $ command: openaps use <pumpname> -h
joannestevens
@joannestevens
Feb 20 2016 19:25
ahh yes I've found those, it was more building some aliases and what configurations I should do for those?
Aaron Michelson
@Aaybob
Feb 20 2016 19:27
aliases will invoke those reports and execute logic and shell commands
@jasoncalabrese thanks for troubleshooting for me!!! The loop erred the first time i tried it so i ran the steps of loop and they all ran and then loop ran just great
joannestevens
@joannestevens
Feb 20 2016 19:31
thanks @Aaybob that's really helpful
Aaron Michelson
@Aaybob
Feb 20 2016 19:33
what did you think aliases did?
Jason Calabrese
@jasoncalabrese
Feb 20 2016 19:34
glad that got you going again @Aaybob
would be good to check that each of the files you need is in an alias and gets updated each loop
joannestevens
@joannestevens
Feb 20 2016 19:34
combined individual reports together in my laymans terms
Scott Leibrand
@scottleibrand
Feb 20 2016 19:35
@Aaybob one thing might be checking how your refresh settings alias is called.
If it's conditional on the success of another alias, and that one requires settings files as input, you have a catch-22
Aaron Michelson
@Aaybob
Feb 20 2016 19:39
@joannestevens Okay sure..to make more complex reports...and then you'd have only one big complex report for an input to something. Makes sense. Good thinking. I guess the developers just went another way with it. There are some programs that you will later use that have six reports as inputs.
joannestevens
@joannestevens
Feb 20 2016 19:43
@Aaybob Great thanks
eyim
@eyim
Feb 20 2016 19:50
@joannestevens Hi Joanne. Yes I pull from Nighscout for bg data. We have one NS site that gets uploaded from xdrip and one from share servers. Let me know what questions you have.
Aaron Michelson
@Aaybob
Feb 20 2016 19:52

loop ! bash -c "( (openaps preflight && openaps gather && openaps enact) || echo LOOP FAIL)...........
gather ! bash -c "rm -f monitor/*; openaps monitor-cgm >/dev/null && openaps monitor-pump >/dev/null && openaps gather-profile >/dev/null && echo GATHER OK"
gather-profile report invoke settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json

I don't see how the last two invokes of "gather-profile" could have not worked. Do you see any problems? @scottleibrand

@joannestevens and we use alias to with one word invoke several reports like the one I just show one line above "gather-profile"
Aaron Michelson
@Aaybob
Feb 20 2016 19:57
@joannestevens and each of those invokes will do the "use" command and get info. then you see how the "gather" alias calls the "gather-profile" alias. This just keeps the one alias from being too long to read.
joannestevens
@joannestevens
Feb 20 2016 20:08
@eyim thanks, I am unable to understand the section in the master document so need someone to walk me through the set up
eyim
@eyim
Feb 20 2016 20:10
I am out with the kids right now but will circle back to you as soon as I get home.
joannestevens
@joannestevens
Feb 20 2016 20:11
Thanks, that would be fantastic @eyim
Nyadach
@Nyadach
Feb 20 2016 22:59
hi all, mind if I ask another daft question (probably a typo somewhere again)?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:00
Isn't that what we're here for? :-)
Nyadach
@Nyadach
Feb 20 2016 23:01

thanks @scottleibrand am just hitting an error when running enact it seems
pi@raspberrypi:~/my_openaps $ openaps gather pump://JSON/read_settings/settings/settings.json reporting settings/settings.json pump://JSON/read_bg_targets/settings/bg_targets.json reporting settings/bg_targets.json pump://JSON/read_insulin_sensitivities/settings/insulin_sensitivities.json reporting settings/insulin_sensitivities.json pump://JSON/read_basal_profile_std/settings/basal_profile.json reporting settings/basal_profile.json get-profile://text/shell/settings/profile.json reporting settings/profile.json 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 reporting monitor/iob.json calculate-iob://JSON/shell/monitor/iob.json reporting monitor/iob.json pi@raspberrypi:~/my_openaps $ openaps last_four_hours

reporting last_four_pump_hours.json
cgms://JSON/iter_glucose_hours/last_four_cgms_hours.json
reporting last_four_cgms_hours.json
pi@raspberrypi:~/my_openaps $ openaps preflightpump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json

PREFLIGHT OK
pi@raspberrypi:~/my_openaps $ openaps enact

{"delta":-2,"glucose":148,"avgdelta":-3}
{"duration":0,"rate":0,"temp":"percent"}
{"bolusiob":0.034905312179999905,"iob":1.196783889045,"activity":0.019346969696969696}
{"max_iob":10,"type":"current","dia":4,"current_basal":0.35,"max_daily_basal":0.75,"max_basal":2,"min_bg":99,"max_bg":123,"sens":99}
reporting enact/suggested.json
{"temp":"absolute","bg":148,"tick":-2,"eventualBG":50,"snoozeBG":55,"reason":"Eventual BG 50<99, no temp, setting -0.05U/hr","duration":30,"rate":0}
usage: openaps-report invoke [-h]
{enact/suggested.json,last_four_cgms_hours.json,last_four_pump_hours.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,read_battery_status.json,read_carb_ratios.json,read_clock.json,read_selected_basal_profile.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json}
[{enact/suggested.json,last_four_cgms_hours.json,last_four_pump_hours.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,read_battery_status.json,read_carb_ratios.json,read_clock.json,read_selected_basal_profile.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'enact/enacted.json' (choose from u'enact/suggested.json', u'last_four_cgms_hours.json', u'last_four_pump_hours.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory.json', u'monitor/temp_basal.json', u'read_battery_status.json', u'read_carb_ratios.json', u'read_clock.json', u'read_selected_basal_profile.json', u'read_status.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/profile.json', u'settings/settings.json')

No action required

Scott Leibrand
@scottleibrand
Feb 20 2016 23:02
You can do ``` on its own line before and after a paste to get that better formatted.
New line before and after.
Looks like you haven't defined your enacted.json report yet.
Just a single ``` before and after the big paste, each on their own line.
No need to do it for every one.
Gitter markdown syntax throws everyone for a loop at first. :-)
Nyadach
@Nyadach
Feb 20 2016 23:06
its urm interesting!
Scott Leibrand
@scottleibrand
Feb 20 2016 23:06
;-)
Do you know how to enact a temp manually?
Nyadach
@Nyadach
Feb 20 2016 23:11
no?
oh the openaps enact enact/enact.json?
openaps enact enact/suggested.json?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:17
So the
So the latter report generates the suggested.json
actually, not quite
that would be openaps report invoke enact/suggested.json
Nyadach
@Nyadach
Feb 20 2016 23:19
to create the suggested.json?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:19
ya. You're doing that part already.
Toby Canning
@TC2013
Feb 20 2016 23:19
This message was deleted
Scott Leibrand
@scottleibrand
Feb 20 2016 23:20
You need to create a report that similarly creates an enact/enacted.json, and in the process actually enacts the temp suggested in suggested.json
the enacted.json is the "results" of the enact operation, to be used for reporting to NS etc.
Take a look at openaps use pump -h or similar to figure out which pump command would do that.
And then you'll create a report that, when invoked, runs that command and stuffs the output into enact/enacted.json
Nyadach
@Nyadach
Feb 20 2016 23:25
so enacting first, then doing something like a read_settings to store those as the enacted?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:26
No, the command that sets the temp produces output indicating what it just did.
Try it manually first with openaps use pump <command>
Nyadach
@Nyadach
Feb 20 2016 23:30
having a look at set_temp_basal but only seeing temp, rate, and duration?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:33
Take a look at your suggested.json: what fields does it have?
set_temp_basal takes a json file as input, and requires those three fields.
They define the temp you want it to set.
Nyadach
@Nyadach
Feb 20 2016 23:37
so with it saying when set_temp_basal =h it needs a { "temp" : "absolute"", "rate" : 0, "duration" : 0 } is what it's doing when the suggested is returning {"temp":"absolute","bg":154,"tick":"+1","eventualBG":116,"snoozeBG":116,"reason":"116 is in range. No temp required"}
Scott Leibrand
@scottleibrand
Feb 20 2016 23:38
So that particular suggested.json can't be enacted, as it doesn't have a rate or duration (no temp required).
Nyadach
@Nyadach
Feb 20 2016 23:38
thus the error?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:39
If you were to set a temp and re-run everything, it would probably recommend canceling it (rate 0 duration 0).
That will give an error, yes, but earlier you had a suggested.json with rate and duration that errored because you hadn't yet defined an enact/enacted.json report to run set_temp_basal.
joannestevens
@joannestevens
Feb 20 2016 23:40

Using username "pi".
pi@raspberrypi.local's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Feb 20 22:01:43 2016 from fe80::786c:a9a2:812b:40d7%wlan0
pi@raspberrypi ~ $ cd myopenaps
pi@raspberrypi ~/myopenaps $ openaps device add ns-glucose process 'bash -c "curl -s https://technojo.azurewebsites.net/api/v1/entries/sgv.json | json -e \"this.glucose = this.sgv\""'
added process://ns-glucose/bash -c "curl -s https://technojo.azurewebsites.net/api/v1/entries/sgv.json | json -e \"this.glucose = this.sgv\""/
pi@raspberrypi ~/myopenaps $ openaps report add monitor/glucosetest.json text ns-glucose shell
added ns-glucose://text/shell/monitor/glucosetest.json
pi@raspberrypi ~/myopenaps $ openaps report invoke monitor/glucosetest.json
ns-glucose://text/shell/monitor/glucosetest.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 4, in <module>
import('pkg_resources').run_script('openaps==0.0.10', 'openaps-report')
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 724, in run_script
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 1650, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report";, line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-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.10-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.10-py2.7.egg/openaps/cli/subcommand.py";, line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-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.10-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.10-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'monitor/glucosetest.json'
pi@raspberrypi ~/myopenaps $

Ben West
@bewest
Feb 20 2016 23:41
use ns-get instead :-D
Scott Leibrand
@scottleibrand
Feb 20 2016 23:41
So if you manually create a cancel_temp.json with that rate 0 duration 0 that you pasted, you can try enacting that manually.
joannestevens
@joannestevens
Feb 20 2016 23:42
Thanks to @eyim I've got this far tonight ... can anyone suggest why it is not finding the file when I invoke it?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:42
Invoke generates the named file, according to how you have it configured.
If it says that file name isn't configured, you need to do an openaps report add command to do so.
joannestevens
@joannestevens
Feb 20 2016 23:43
Yes I did .. just above
Nyadach
@Nyadach
Feb 20 2016 23:44
so the set_temp_basal really needs to get note into the enact = ! bash -c "rm enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json &&$ but in the [report "enact/enacted.json"] device = pump use = set_temp_basal with that report added into the enact line?
Ben West
@bewest
Feb 20 2016 23:44
ah
@joannestevens yes
@joannestevens mkdir monitor
Scott Leibrand
@scottleibrand
Feb 20 2016 23:44
@joannestevens sorry, crossing conversations.
Ben West
@bewest
Feb 20 2016 23:44
the docs for that are also not great, it should recommend using ns-get instead of all the bash stuff
Scott Leibrand
@scottleibrand
Feb 20 2016 23:46
Would help if someone who has recently set up ns-get could draft an update to that part of the docs (on their own forked copy of the docs repo) to PR in
joannestevens
@joannestevens
Feb 20 2016 23:46
@bewest why do I need to mkdir monitor
Scott Leibrand
@scottleibrand
Feb 20 2016 23:46
I'm about to take off (flying home), so will be offline for awhile.
Ben West
@bewest
Feb 20 2016 23:46
the report will try to write a file in that subdirectory
if the subdirectory does not exist, it throws an error
in fact, it throws the exact error you pasted
joannestevens
@joannestevens
Feb 20 2016 23:47
Can you be a little more specific @bewest
Ben West
@bewest
Feb 20 2016 23:48
about which part, the error?
Scott Leibrand
@scottleibrand
Feb 20 2016 23:48
You're asking it to save the file in a directory that doesn't yet exist.
So you need to give it a place to put the file.
mkdir will create it
joannestevens
@joannestevens
Feb 20 2016 23:48
so shall I try the process now I have put the mkdir command in?
Ben West
@bewest
Feb 20 2016 23:48
mkdir monitor will create the directory so that files can be organized in them
you don't need mkdir everytime, just this one time
joannestevens
@joannestevens
Feb 20 2016 23:49
Thanks I'll try again
Scott Leibrand
@scottleibrand
Feb 20 2016 23:49
Zoom zoom! Laters.
Nyadach
@Nyadach
Feb 20 2016 23:50
thanks @scottleibrand
Ben West
@bewest
Feb 20 2016 23:51
you can get a listing of the files and directory using ls
joannestevens
@joannestevens
Feb 20 2016 23:54
Thanks so much @bewest & @eyim ... all sorted .. I'm now pulling data straight from NS
eyim
@eyim
Feb 20 2016 23:55
Great. Sorry - mental assumption on my part that you had the monitor folder. Glad you are up and running