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

11th
Jul 2016
Julie
@julieraines
Jul 11 2016 00:02
I am new - hello everyone - at the very beginning of installing JESSE to my SD card and not doing something right. Sorry - not a programmer (just a brave mom). I'm getting an error msg
marmac-29869:~ julie.raines$ sudo dd bs=1m if=2016-05-27-raspbian-jessie.img of=/dev/disk1
dd: 2016-05-27-raspbian-jessie.img: No such file or directory
I've tried everything listed in the instructions and selecting disk 1 and mounting and unmounting and rdisk
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:03
speaking of aliases, if I need warmup to get me some clock data before monitor-pump, or I need get-basal-status before report invoke enact/suggested.json, I cannot just slide it in at the beginning of the alias in openaps.ini right? that does not seem to work.
I think I need to group, but I do or do not have to make an alias to nest one?
Julie
@julieraines
Jul 11 2016 00:03
Thanks for your patience
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:05
in example, does it make sense to put warmup and monitor-pump in one alias? or can I perform warmup first in the monitor-pump alias?
Paul Davis
@SirBinky
Jul 11 2016 00:06
@julieraines you put the micro sd card in the adapter and install it?
@shgrady you can do a warm up alias, then the general gather alias too
@shgrady you can make an alias, that runs other alias's so warmup then gather then enact
Julie
@julieraines
Jul 11 2016 00:07
@SirBinky yes I put it in the adapter and in my MAC
internal reader
Paul Davis
@SirBinky
Jul 11 2016 00:09
@julieraines ok so you download the file then install the image to the micro sd, then you put the micro sd into your pi and use hdmi monitor and usb mouse and keyboard
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:10
I just got stuck in the docs where you test
$ rm -f settings/* monitor/* enact/* $ openaps get-profile $ openaps monitor-pump $ openaps monitor-cgm $ openaps report invoke monitor/iob.json $ openaps report invoke enact/suggested.json
because my monitor-pump fails if I don't do the warm-up and my enact/suggested.json fails if I don't do the get-basal-profile, at this point should I just know those are required? if I start making aliases so these reports work, get the feeling I will get buried later, maybe better to swap these out for sub aliases.
Paul Davis
@SirBinky
Jul 11 2016 00:12
@shgrady what you're saying shows you know alot
Julie
@julieraines
Jul 11 2016 00:13
@SirBinky THANKS - because the instructions said to do all this from my MAC first which just was not jiving (so I'll switch over now and try that which makes a lot more sense : ^ ) and I already dropped and dragged it onto the card so maybe I'm just overthinking
Paul Davis
@SirBinky
Jul 11 2016 00:14
@shgrady the pump should just work, i've heard it can fail the usb sometime so warmup reboots it, i dunno maybe your setup requires you to do run the warm up to make the pump respond. it's not a big deal. add a new alias for warmup then get-profile
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:15
thanks, I actually slept last night because my phone fell off the charger, and I never heard the CGM, so I spent 6 hours at 300, woke up terribly sick, but amazing how sleep helps the brain, made some progress today. @SirBinky
the error I get is that monitor-pump fails on clock-zoned.json
well monitor/clock-zoned.json
Paul Davis
@SirBinky
Jul 11 2016 00:17
@shgrady bewest calls it do everything. so openaps alias add runit "openaps warmup && openaps get-profile"
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:18
checked my openaps.ini and thats where I saw monitor/clock-zoned.json
yeah, thats why I was hesitant to get a little crazy on it, because of those , which would have to be fixed if I do that, do-everything.....there I go, taking the docs too literally again, thanks for talking it out @SirBinky
Paul Davis
@SirBinky
Jul 11 2016 00:20
@shgrady you should do monitor/clock.json from pump then add
tz://JSON/clock/monitor/clock.json
@shgrady the docs help you along nothing in them makes you send a command to your insulin pump to change your basal
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:26
I have the report, maybe I am misunderstanding you, but when I was clearing my files with the rm -f command, I was not generating that specific clock-zoned report anywhere but the warmup,, are you saying I should call the report under the other alias?
I was continuing to get cannot find messages when trying to do it within the alias where a shell command needed it.
Paul Davis
@SirBinky
Jul 11 2016 00:29
@shgrady the clock report is a good general file, it's accessed as a warm up but also used later. if you're missing it later and warmup is the only time you generate the new file you need to add warm up to your general file.
Sarah Hodson Grady
@shgrady
Jul 11 2016 00:29
sounds good
Paul Davis
@SirBinky
Jul 11 2016 00:30
@shgrady make an alias called doitall or something, use warmup then do-everything
do-everything is apparently misleading cause it doesn't
Paul Davis
@SirBinky
Jul 11 2016 00:58
@shgrady it all working now?
Eric
@ecc1
Jul 11 2016 01:01
Can some Javascript expert give me a clue how the /api/v1/profile upload is supposed to work? I'm trying to get some information to appear on NS but the profile that gets created is nothing like what I read back from /api/v1/profile/current. (Trying to POST a profile.json file similar to what openaps get-profile produces.)
Martin Haeberli
@mhaeberli
Jul 11 2016 01:09
@julieraines - be VERY VERY careful with dd / sudo dd - it can ERASE your main disk…
as a side check, what kind of system are you running this on?
Martin Haeberli
@mhaeberli
Jul 11 2016 01:18
ok, on a Macintosh, please check out these instructions: https://www.raspberrypi.org/documentation/installation/installing-images/mac.md
note the importance of identifying the disk correctly :
If you are comfortable with the command line, you can write the image to a SD card without any additional software. Open a terminal, then run:

diskutil list

Identify the disk (not partition) of your SD card e.g. disk4, not disk4s1.
Unmount your SD card by using the disk identifier, to prepare for copying data to it:

diskutil unmountDisk /dev/disk<disk# from diskutil>

where disk is your BSD name e.g. diskutil unmountDisk /dev/disk4

Copy the data to your SD card:

sudo dd bs=1m if=image.img of=/dev/rdisk<disk# from diskutil>

where disk is your BSD name e.g. sudo dd bs=1m if=2016-05-27-raspbian-jessie.img of=/dev/rdisk4
Julie
@julieraines
Jul 11 2016 02:08
@mhaeberli I was careful to identify the correct disk which for me is disk1 and i tried following these directions and none of it worked. I'm doing a download of jesse directly onto the SD - tried installing NOOBS first but then it said I didn't have room for Jesse.
Martin Haeberli
@mhaeberli
Jul 11 2016 02:13

@julieraines keeping a good thought for you -

sudo dd bs=1m if=2016-05-27-raspbian-jessie.img of=/dev/disk1
dd: 2016-05-27-raspbian-jessie.img: No such file or directory

-when I downloaded 2016-05-27-raspbian-jessie it came as a .zip file; I then had to expand the .zip file onto my Mac’s hard disk. Then I had to “cd /Users/…/ to the immediate parent directory. Then the dd command worked (after the needed "sudo diskutil unmountdisk…”) It is also recommended to use “rdisk1” vs “disk1” - that uses “raw” mode, which is much faster. To test if you are in the right directory, you can also try

ls -l 2016-05-27-raspbian-jessie.img

which should give you some information about the file

@julieraines I say the above because the error message is consistent with either not being in the right directory or not having expanded the jessie .zip file
Julie
@julieraines
Jul 11 2016 02:31
@mhaeberli thanks! This is fantastic. I was thinking wrong directory but struggled with how to fix and i believe the zip was expanded but will doublecheck that. I did work in raw mode but tried both just in case.
Chris Oattes
@cjo20
Jul 11 2016 02:55
This message was deleted
@jasoncalabrese @scottleibrand Might be an interesting experiment to try running time openaps your-loop-command, then find . -type f -exec sed -i 's/json -e/json -E/g' {} + in the oref0 directory before running time openaps your-loop-command again
I saw a ~25% speedup, but I haven't checked whether it's broken anything yet
Jason Calabrese
@jasoncalabrese
Jul 11 2016 02:58
What's that doing clearing the files?
Chris Oattes
@cjo20
Jul 11 2016 02:59
It's replacing json -e with json -E
That change has already been commited to mm-format-ns-glucose.sh in merge-ama
It's probably a speedup elsewhere too
from man json
(Added in json v7.) Use the -E CODE option to execute (JavaScript) code on the input JSON.
 The given CODE is executed in a function bound to the input object (i.e. this is the input object).

       Security note: CODE is not executed in a sandbox, so json´s globals are available and unguarded. You can shoot yourself in the foot. Do not pass untrusted user-supplied strings here.

       Compatibility  note:  There is also a -e CODE option (lowercase "e") from earlier versions of json to do much the same thing (with slightly different semantics for the CODE). It is still supported for backward compatibility.
       However it is deprecated because it can cause processing to be 10x or more slower for large inputs. See the COMPATIBILITY section below.
COMPATIBILITY
       The json tool major version is incremented when there is a backward incompatible change. An overview of those changes is here.

       ·   v7: -E CODE and -C CODE were added in favour of -e CODE and -c CODE because the former provide a 10x or more performance improvement for larger inputs. The latter are still included for backward compatibility. -E/-C  use
           a JavaScript function to execute CODE, which -e/-c use node.js´s vm.runInNewContext which is crazy slow. Use of a JavaScript function places slightly different semantics and requirements on the given CODE, so new options
           were required for compat.
Jason Calabrese
@jasoncalabrese
Jul 11 2016 03:03
Oh, I saw that, but didn't really look into it
Does sound like something we should do for everything
Chris Oattes
@cjo20
Jul 11 2016 03:06
Yeah, that's what I'm going to test. I was just wondering if you got the same sort of speedup (which might actually be significant in terms of battery life)
that find command finds all instances of json -e recursively and replaces it with json -E (rather than trying to change them all manually)
Scott Leibrand
@scottleibrand
Jul 11 2016 03:11
my loop doesn't refresh things unless they're old enough to need refreshing, so I can't run that test
Chris Oattes
@cjo20
Jul 11 2016 03:17
you're too efficient :P Hopefully Jason will have some positive results. I'll look in to it more tomorrow. Night.
Martin Haeberli
@mhaeberli
Jul 11 2016 03:21

@julieraines FYI - the other thing you can do on a Mac is use Spotlight (from the command line) to locate the .zip / .img file:

mdfind -name 2016-05-27-raspbian-jessie.img

or

mdfind -name 2016-05-27-raspbian-jessie.zip

and it should tell you the path to the file

Scott Leibrand
@scottleibrand
Jul 11 2016 04:02
Did anyone (maybe @cjo20) ever get a chance to test upgrading oref0 from dev to merge-ama? we are likely going to merge the merge-ama branch into advanced-meal-assist ( openaps/oref0#154 ) tomorrow if everything looks good, and was hoping someone could test openaps/oref0#114 so we can then proceed with openaps/oref0#125 as soon as it looks good.
Martin Haeberli
@mhaeberli
Jul 11 2016 04:18
any advice on this error
openaps report add pump-history.jsonJSON pump iter_pump
usage: openaps-report add report {base,text,stdout,JSON} pump iter_pump
       [-h] count
openaps-report add report {base,text,stdout,JSON} pump iter_pump: error: too few arguments
David Cintron
@loudestnoise
Jul 11 2016 04:19
@mhaeberli You need to specify a number
Martin Haeberli
@mhaeberli
Jul 11 2016 04:23
k that worked; next question:
my pump is likely out of range of the carelink
Jason Calabrese
@jasoncalabrese
Jul 11 2016 04:23
there's a missing space
jsonJSON
Martin Haeberli
@mhaeberli
Jul 11 2016 04:24
@jasoncalabrese k - maybe a problem with Gitter paste ...
in any event
openaps report invoke pump-history.json
results in Attempting to use a port that is not open
did I somehow miss configuring the Carelink usb correctly?
Jason Calabrese
@jasoncalabrese
Jul 11 2016 04:24
do you already have model.json setup?
but sounds like the pump device might not be configure right
not plugging in, etc
eyim
@eyim
Jul 11 2016 04:26
There was some discussion around command to switch basal profiles. Using commands like use pump select_basal_profile_{STD,A,B}? or use pump activate_basal_profile <input> (like basal/temp-basal)
Did that ever get implemented?
Martin Haeberli
@mhaeberli
Jul 11 2016 04:26
openaps use pump model failed the same way
ssaint1
@ssaint1
Jul 11 2016 04:27
Anybody know why my uploaded treatments in Nightscout are close but not exactly what my pump is doing? My suggested.json file is EXACTLY what the pump ends up doing but for some reason different values are uploaded to nightscout.
Scott Leibrand
@scottleibrand
Jul 11 2016 04:27
@eyim I haven't seen any select basal profile command. probably a question for @bewest
@ssaint1 do you have an example of how they differ?
eyim
@eyim
Jul 11 2016 04:28
Okay Thank you Scott. It was discussed in Feb but I hadn't seen anything since
Scott Leibrand
@scottleibrand
Jul 11 2016 04:28
you should open an openaps issue for tracking if there isn't one already
ssaint1
@ssaint1
Jul 11 2016 04:33
@scottleibrand I thought I had several. The most recent turned out to be the current command was not yet uploaded to nightscout. I may be losing my ming, but I feel I have sen this a bunch of times. I will watch it and report back.
Martin Haeberli
@mhaeberli
Jul 11 2016 04:50

i assume that

openaps device add pump medtronic 123456

is the correct syntax for adding a pump via a carelink stick

any magic to making the carelink itself work with an RPi 3?
Scott Leibrand
@scottleibrand
Jul 11 2016 05:13
@ssaint1 when a temp is enacted, you have to wait for another pumphistory pull before it can be uploaded to treatments. So it'll always be one loop behind.
Jason Calabrese
@jasoncalabrese
Jul 11 2016 05:19
@cjo20 I didn't notice it last night, but looks like voltage goes to 100% as soon as the Edison is plugged in
Maybe that can't avoided without an external charger?
Mitchell Slep
@moomoobloo
Jul 11 2016 05:28
@scottleibrand @ssaint1 thanks for confirming about the upload being one iteration behind, i was unsure if that is how it was supposed to work. But doesn't the upload only take the last 5 minutes of history? Does that mean that your loop has to run less frequently than every 5 minutes to get the uploads working?
I meant more frequently :)
Martin Haeberli
@mhaeberli
Jul 11 2016 06:02
openaps use pump scan confirmed my USB stick was installed and working. I had to disconnect / connect it first
Chris Oattes
@cjo20
Jul 11 2016 08:29
@scottleibrand I think any issues I had going from dev to merge-ama have not been fixed (openaps.ini was fine, didn't need changes). Having said that
I think the order of extra arguments for oref0-get-profile has changed, putting model.json at the end of the list. Not entirely
sure how yargs handles that
@jasoncalabrese yes, it will jump to 100% when charging using the built-in charger.
Chris Oattes
@cjo20
Jul 11 2016 11:26
Is anyone currntly using yocto? working bluetooth seems attractive
Julie
@julieraines
Jul 11 2016 11:57
@mhaeberli finally was able to cd after trying it a few different ways and it loaded like a charm THANK YOU!!
Jason Calabrese
@jasoncalabrese
Jul 11 2016 13:46
@cjo20 I have working bluetooth with Ubi, using it for openxshareble
Chris Oattes
@cjo20
Jul 11 2016 14:03
@jasoncalabrese for what value of working? Would connecting to iOS bluetooth for personal hotspot sharing work?
Paul Martin
@Spazholio
Jul 11 2016 14:08
I've not been able to get connman working under Ubi for BT tethering.
Jason Calabrese
@jasoncalabrese
Jul 11 2016 14:17
yeah, the bluetooth hotspot is the only thing I've heard that works on Yocto and not Ubi
Chris Oattes
@cjo20
Jul 11 2016 14:25
That's what I want it for. Hence considering yocto. Any reson not to use yocto other than not having apt-get?
also trying to set up sometihng on ios that prods me to change basal rates when openaps makes a suggestion. There aren't any nice simple options that work properly
Chris Oattes
@cjo20
Jul 11 2016 15:03
That doesn't seem quite right
blob
Lynne Butts
@flutelynne_twitter
Jul 11 2016 15:39
@mhaeberli Good morning. Yes, I would sometimes have to disconnect and reconnect the carelink stick to get it to read. I would get in the habit of doing it after shutdown of the pi and putting on another battery or plugging into an outlet. Sometimes during the day if it stopped looping, and I could not ssh into the pi. It usually helped.
ssaint1
@ssaint1
Jul 11 2016 15:53
@scottleibrand That makes perfect sense now that I think about it, thanks Scott. I will watch it and make sure that explains what I am seeing.
Martin Haeberli
@mhaeberli
Jul 11 2016 16:32
@julieraines :+1:
Dana Lewis
@danamlewis
Jul 11 2016 16:32
Looking for at least one other person (not yet looping) who wouldn’t mind exporting CGM data and bolus data from CarePortal (plus basal rate schedule) in excel for a 24hour period to donate to a researcher for them to run with their fuzzy logic controller.
Chris Oattes
@cjo20
Jul 11 2016 16:37
@danamlewis I guess "open loop" counts as looping in this case?
Dana Lewis
@danamlewis
Jul 11 2016 16:38
yea, but if you were putting your boluses into care portal before, you could just give me data from before you started open looping
Chris Oattes
@cjo20
Jul 11 2016 16:39
I ended up wiping my treatments table in mlab while testing something
Dana Lewis
@danamlewis
Jul 11 2016 16:42
bummer
mariano42
@mariano42
Jul 11 2016 16:57
@bewest .. yesterday you responded to an issue I was having with monitor/glucose.json and you mentioned the two steps required to generate this file. I am a bit confused on step 1.. "figure out which device is generating the data, and save it in a raw file". I am thinking I need a raw-cgm folder in my project, or am I heading down the wrong path? When I show reports I see that /monitor/glucose.json under iter_glucose, but I thinking I am being dense and I have no idea what that actually is.
@bewest ... your last post to @SirBinky might have actually cleared a lot up for me. Thanks!
mariano42
@mariano42
Jul 11 2016 17:15
@danamlewis I think I could do that for you... I am not yet looping and have been putting the majority of my boluses in CarePortal.. sometimes i miss some on the weekends :)
Dana Lewis
@danamlewis
Jul 11 2016 17:16
:)
Martin Haeberli
@mhaeberli
Jul 11 2016 17:33
@danamlewis in terms of contributing data, we are not looping yet, but have a bunch of mLab data from Nightscout. Some of the more recent data includes RileyLink pump uploads. No formal treatments, though - would this data be useful ? If so, I’ll check with our T1D daughter, whose data it is, about contributing. Also have related TidePool data...
Dana Lewis
@danamlewis
Jul 11 2016 17:35
Sure, if you can find a way to list boluses in an excel file, that’s all that’s needed, alongside the CGM data in an excel file!
So whatever way you get it would work :)
(I just assumed it would be easiest to export from NS, but any way that’s not burdensome for grabbing the data is great)
Martin Haeberli
@mhaeberli
Jul 11 2016 17:57
@danamlewis so I’ll try to clear with the patient, and see what I can do on the data end. By when do you need it? (And how many other volunteers are you looking for?) If I can streamline this enough, maybe you can ask some other NS or TidePool users for their data processed this way … Also, all this data is in Medtronic’s CareLink for our T1D… so if you (or I) figure out easy ways to get the data out that way...
Dana Lewis
@danamlewis
Jul 11 2016 18:00
Whenever you can provide it, hopefully this week though. He only asked for 1-2 people worth of data, so I didn't want to post to Fbk and be sorting through hundreds :)
Martin Haeberli
@mhaeberli
Jul 11 2016 19:58
by the way, is it possible to tell a Dexcom G4 receiver attached to an OpenAPS instance (say, on an RPi) to calibrate without physically touching the buttons on the receiver?
Jason Calabrese
@jasoncalabrese
Jul 11 2016 20:01
I don't think we have a command for the that, but does seem like there would be a way
mariano42
@mariano42
Jul 11 2016 20:01
if i get results with "openaps use cgmdex oref0_glucose --hours 2.0" shouldn't I see a report created when I do "openaps report add raw-cgm/glucose-raw.json JSON cgmdex oref0_glucose --hours 2.0" ? I would have expected that I see a json file in raw-cgm called glucose-raw.json with the same data I did in the first call... it gives me " added cgmdex://JSON/oref0_glucose/glucose-raw.json" when I add the report, but I don't see any data there
Scott Leibrand
@scottleibrand
Jul 11 2016 20:04
you have to invoke reports. add just configures them
mariano42
@mariano42
Jul 11 2016 20:06
@scottleibrand oh man.. I should have known that! silly mistake, which I figured would be the case. Thank you!!!
Martin Haeberli
@mhaeberli
Jul 11 2016 20:40
@danamlewis - T1D says yes to donating data. I’ll work on curating it and getting it to you...
Dana Lewis
@danamlewis
Jul 11 2016 20:45
awesome. thank you @mhaeberli (and data creator! :))
Chris Oattes
@cjo20
Jul 11 2016 20:59
http://i.imgur.com/ljAE1cX.png Push notifications for open looping, with some better formatting
Wow that image was larger than I thought
Dana Lewis
@danamlewis
Jul 11 2016 21:02
:)
PR coming soon? :)
Chris Oattes
@cjo20
Jul 11 2016 21:18
maybe :P
Dana Lewis
@danamlewis
Jul 11 2016 21:18
I vote yes ;) would be great for helping people open loop without needing an Android
Chris Oattes
@cjo20
Jul 11 2016 21:28
Where would you want the scripts ?
jim-andrews
@jim-andrews
Jul 11 2016 21:39
So what's the best doc source for getting data from my G4 to the Edison? I'm assuming it's done with bluetooth magic.
Dana Lewis
@danamlewis
Jul 11 2016 21:39
wondering if they should go in oref0, or their own repo under openaps?
@jim-andrews you can a) get it from the cloud or b) use openxshareble (aka, the magic option)
jim-andrews
@jim-andrews
Jul 11 2016 21:41
Yes, that openxsharble sounds like the way to go. I'm in St. Croix next week and the internet coverage will most likely be spotty.
David Cintron
@loudestnoise
Jul 11 2016 21:41
who picked the name for openxshareable anyway
jim-andrews
@jim-andrews
Jul 11 2016 21:41
someone who likes to type I'm guessing...
Dana Lewis
@danamlewis
Jul 11 2016 21:41
@bewest built it, so he named it :)
David Cintron
@loudestnoise
Jul 11 2016 21:41
totally should have been dexcombtmagic
Dana Lewis
@danamlewis
Jul 11 2016 21:41
LOL
jim-andrews
@jim-andrews
Jul 11 2016 21:41
got my vote.
Dana Lewis
@danamlewis
Jul 11 2016 21:41
@jim-andrews what rigs do you have?
do you have a Pi? the other option is just to plug in your receiver to the Pi…easiest and less fiddly, but depends on whether you’re trying to haul a rig around or not
jim-andrews
@jim-andrews
Jul 11 2016 21:42
well the RPi3 and soon Edison.
David Cintron
@loudestnoise
Jul 11 2016 21:42
I just keep adding things to my text expansion tool NS = Nightscout
dex = Dexcom
Ben West
@bewest
Jul 11 2016 21:42
avoiding the word dexcom is usually important in a name since they have trademark
Dana Lewis
@danamlewis
Jul 11 2016 21:42
@jim-andrews openxshareble is fiddly for me sometimes, so overnight I always plug my receiver in to a Pi rig for overnight coverage
Scott Leibrand
@scottleibrand
Jul 11 2016 21:42
@loudestnoise it's openxshareble (no second a)
David Cintron
@loudestnoise
Jul 11 2016 21:42
pffft trademark smademark
Ben West
@bewest
Jul 11 2016 21:42
there's a reason it's not called dexdrip....
but there really is a reason it's no longer called dexdrip
jim-andrews
@jim-andrews
Jul 11 2016 21:43
something about dragging my Pi from bar to bar that does not sound to appealing. maybe it's just me.
David Cintron
@loudestnoise
Jul 11 2016 21:43
bewestbtmagic then
Dana Lewis
@danamlewis
Jul 11 2016 21:43
@jim-andrews heh. fair enough.
jim-andrews
@jim-andrews
Jul 11 2016 21:43
that and the Edison looks so 007.
David Cintron
@loudestnoise
Jul 11 2016 21:44
eh, maybe more Q than 007
jim-andrews
@jim-andrews
Jul 11 2016 21:44
good point. DON'T TOUCH THAT BUTTON!
David Cintron
@loudestnoise
Jul 11 2016 21:44
@scottleibrand oh I get it now openx share BLE
I kept thinking shareable
the data is shareable via BT
Chris Oattes
@cjo20
Jul 11 2016 21:45
@danamlewis a repo of it's own is a little excessive. I'll show you the code in a minute
Dana Lewis
@danamlewis
Jul 11 2016 21:45
@cjo20 :+1:
jim-andrews
@jim-andrews
Jul 11 2016 21:47
@danamlewis Good point about the backup. I can always just keep the Pi in the hotel room.
Dana Lewis
@danamlewis
Jul 11 2016 21:47
yea. I always recommend traveling with 2+ rigs.
jim-andrews
@jim-andrews
Jul 11 2016 21:50
So has anyone been hassled by TSA while traveling with a rig? I don't have to tell you what it "looks like" we are carrying.
Scott Leibrand
@scottleibrand
Jul 11 2016 21:51
to them it just looks like electronics. unlike certain schools in texas, they know the difference between a clock and a bomb
jim-andrews
@jim-andrews
Jul 11 2016 21:52
what about TSA agents trained in texas :smile:
Dana Lewis
@danamlewis
Jul 11 2016 21:52
;) see the first Q
Scott Leibrand
@scottleibrand
Jul 11 2016 21:52
:-p
jim-andrews
@jim-andrews
Jul 11 2016 21:52
@danamlewis Thanks. I see.
Dana Lewis
@danamlewis
Jul 11 2016 21:52
:+1:
David Cintron
@loudestnoise
Jul 11 2016 21:54
I flew with mine second day I was looping. I had it held together with rubber bands and it was very blinky and they didn’t give it a second look. I also never declare my insulin or any of that nonsense. I refuse scanners and they have to pat down and check my pump for EXPLOSIVES
but whatever
that’s because I’m not fancy pre-check like someone I know ^^^
Dana Lewis
@danamlewis
Jul 11 2016 21:55
I flew for ~6 months with my loops before getting pre-check. The answer to that FAQ doesn’t change, even with that ;)
Scott Leibrand
@scottleibrand
Jul 11 2016 21:55
but you should get pre-check if you fly more than once a year
Dana Lewis
@danamlewis
Jul 11 2016 21:55
586+ days of looping will do that for ya ;)
David Cintron
@loudestnoise
Jul 11 2016 21:56
I’m considering that. I’ve flown more this year than I normally do and I have two trips this fall
Dana Lewis
@danamlewis
Jul 11 2016 21:56
it’s worth it
and especially do global entry, which gets you fast pass coming back to US from trips, PLUS then pre-check
jim-andrews
@jim-andrews
Jul 11 2016 21:57
Good advice all. Thanks. I'm on it.
Dana Lewis
@danamlewis
Jul 11 2016 21:57
:+1:
Chris Oattes
@cjo20
Jul 11 2016 21:57

@danamlewis

push_enacted_format.sh

#!/bin/bash
input=`cat enact/suggested.json | json -k | grep -q rate && cat enact/suggested.json  | json rate duration reason`
input=${input//$'\n'/ }

if [ ! -z "$input" ]
then

duration=`echo $input | awk '{print $2;}'`
rate=`echo $input | awk '{print $1;}'`
reason=`echo $input | awk '{$1 = ""; $2 = ""; print $0;}'`
#echo $duration
#echo $rate
#echo $input
#echo $reason
if [ $duration = "0" ]
then
echo 'Cancel temp basal\\n$reason'
else
echo $duration m @ $rate U/hr\\n$reason
fi
fi

push_notification.sh

#!/bin/bash
input="${1:-$(</dev/stdin)}"
input=${input//$'\n'/\\n}
echo $input
if [ ! -z "$input" ]
then
echo "{\"body\": \"$input\"}"
echo "{\"type\": \"note\", \"title\":\"openAPS\", \"body\":\"$input\"}" |  curl -u READACTED: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary @-
fi

./push_enacted_format.sh | ./push_notification.sh

Dana Lewis
@danamlewis
Jul 11 2016 21:59
heh. if it’s that simple, doesn’t even need to go somewhere separate, could just be on the page in the docs, @cjo20
tazitoo
@tazitoo
Jul 11 2016 21:59
@cjo20 - was wondering if you had seen this? http://redbear.cc/2016/03/10/pi-zero-iot-hat/
Dana Lewis
@danamlewis
Jul 11 2016 22:01
maybe a page added in phase 3? after understanding determine-basal?
Chris Oattes
@cjo20
Jul 11 2016 22:01
I'll get something written up in the next few days
(eugh, writing)
Dana Lewis
@danamlewis
Jul 11 2016 22:01
:clap: :confetti_ball:
Chris Oattes
@cjo20
Jul 11 2016 22:01
and then someone might be kind enough to make it readable :P
Dana Lewis
@danamlewis
Jul 11 2016 22:02
I don’t think it’ll be as bad as you expect ;) but yup, perks of the PR process!
Chris Oattes
@cjo20
Jul 11 2016 22:02
@tazitoo I hadn't
Dana Lewis
@danamlewis
Jul 11 2016 22:02
thanks for sharing your work :)
tazitoo
@tazitoo
Jul 11 2016 22:03
I pre-ordered a couple - might work nicely with a pi zero and G4 share...
Martin Haeberli
@mhaeberli
Jul 11 2016 22:24
frequently asked question - just restarted a dexcom sensor (because it was required). but now have “???”. is it worth trying to stop and restart again? or what is recommended?
Dana Lewis
@danamlewis
Jul 11 2016 22:24
drink lots of water, often dehydration related
if you’re in the 2 hour calibration window (?), should go back to the timer once hydration kicks in. if it’s a live sensor, will go back to the BG after the hydration kicks in.
Martin Haeberli
@mhaeberli
Jul 11 2016 22:25
@danamlewis thx
Dana Lewis
@danamlewis
Jul 11 2016 22:25
:+1:
Scott Leibrand
@scottleibrand
Jul 11 2016 22:26
@mhaeberli might want to add that to the FAQ?
Martin Haeberli
@mhaeberli
Jul 11 2016 22:29
@danamlewis yes - in 2 hour window after restart before first cal requested
Dana Lewis
@danamlewis
Jul 11 2016 22:29
yea, then just drink a good bit and it should switch back to the timer
GabeA23
@GabeA23
Jul 11 2016 22:52
Trying to debug what I presume to be a time-zone issue
My loop is totally up and running but all of the "recent treatments" that get pushed to my NS are erroneously placed 5 hours in the past
So if I bolus at 6PM, it shows up on NS as having been a bolus at 1PM
Ben West
@bewest
Jul 11 2016 22:53
check time on the pump matches time when you type date
GabeA23
@GabeA23
Jul 11 2016 22:53
I'm using an edison
@bewest as in openaps use pump date?
Ben West
@bewest
Jul 11 2016 22:54
nope, just date
vs openaps use pump read_clock, sure
GabeA23
@GabeA23
Jul 11 2016 22:55
yup
Mon Jul 11 17:54:48 CDT 2016
it's correct
Ben West
@bewest
Jul 11 2016 22:55
and pump also shows 17:54?
pump data should have reports going into raw-pump/foo.json
GabeA23
@GabeA23
Jul 11 2016 22:56
"2016-07-11T17:55:40"
Ben West
@bewest
Jul 11 2016 22:56
and then there should be another report with tz rezone --astimezone
GabeA23
@GabeA23
Jul 11 2016 22:56
that's my read_clock output above
so yes they're similar
Ben West
@bewest
Jul 11 2016 22:56
what's happening is you are uploading the raw version, not the version with the timezone
so NS is assuming zulu/gmt
GabeA23
@GabeA23
Jul 11 2016 22:57
I think you are right
I never used the monitor/clock-zoned report
Ben West
@bewest
Jul 11 2016 22:57
it's several things, not just clock
everything needs to be zoned
David Cintron
@loudestnoise
Jul 11 2016 22:57
ZONE ALL TEH THINGS
Ben West
@bewest
Jul 11 2016 22:58
tz rezone --astimeonze ...
GabeA23
@GabeA23
Jul 11 2016 22:58
Haha. I never realized that zone was so important so I've been uploading monitor/clock.json instead of monitor/clock-zoned.json
Ben West
@bewest
Jul 11 2016 22:58
not sure clock ever gets uploaded to NS
GabeA23
@GabeA23
Jul 11 2016 22:58
I figured if monitor/clock.json had the right output it shoudn't make any difference but I guess I Was wrong!
Since I have you here... should anything be written under the timezone argument, or should that be blank?
[report "monitor/clock-zoned.json"] use = clock reporter = JSON astimezone = False date = None adjust = missing input = monitor/clock.json device = tz timezone =
Ben West
@bewest
Jul 11 2016 22:59
no, that's fine
that causes it to use the system's "local" zone
GabeA23
@GabeA23
Jul 11 2016 23:00
got it
so all of the nightscout reports (that require a "clock" value as an argument) should only be using monitor/clock-zoned.json?
Martin Haeberli
@mhaeberli
Jul 11 2016 23:02
$ openaps use pump read_basal_profile_std
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 "/usr/local/lib/python2.7/dist-packages/setuptools-24.0.2-py2.7.egg/pkg_resources/__init__.py", line 719, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-24.0.2-py2.7.egg/pkg_resources/__init__.py", line 1504, in run_script
    exec(code, namespace, namespace)
  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 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 61, in before_main
    self.setup_medtronic( )
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/mmeowlink.py", line 112, in setup_medtronic
    setup_func(self)
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/mmeowlink.py", line 75, in setup_medtronic_link
    link = builder.build(radio_type, port)
  File "/home/pi/mmeowlink-source/mmeowlink/link_builder.py", line 16, in build
    return SubgRfspyLink(port)
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/subg_rfspy_link.py", line 55, in __init__
    self.open()
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/serial_interface.py", line 27, in open
    self.check_setup()
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/subg_rfspy_link.py", line 71, in check_setup
    self.serial_rf_spy.sync()
  File "/home/pi/mmeowlink-source/mmeowlink/vendors/serial_rf_spy.py", line 117, in sync
    raise CommsException("Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?")
mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?
... $ openaps use pump read_battery_status
{
  "status": "normal", 
  "voltage": 1.32
  • new mmeowlink - on RPi3 - trying to understand why one works and not the other ...
GabeA23
@GabeA23
Jul 11 2016 23:35
Thanks @bewest ! I made sure the zoning on clock and pump-history were functioning and it works!
I was always so confused why you had "raw" values and "non-raw" values (other than unit conversion, of course). Now it all makes sense haha.
GabeA23
@GabeA23
Jul 11 2016 23:46
Does anyone else have trouble pushing from your "local" to "remote" when using bitbucket to backup your local repository?
edison@pancreas:~/betacell$ git push origin master
Password for 'https://mybitbucketURL':
To https://mybitbucketURL
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://mybitbucketURL'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Martin Haeberli
@mhaeberli
Jul 11 2016 23:56

any specific advice on having TWO pumps (one loop able, one not) in the same OpenAPS system? can I do something like

openaps device add pump1 mmeowlink subg_rfspy /dev/ttyACM1 123456
openaps device add pump2-loopable mmeowlink subg_rfspy /dev/ttyACM1 654321

?

then how to tell OpenAPS which one is installed on the T1D patient ?