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

14th
Jul 2016
sarahspins
@sarahspins
Jul 14 2016 00:22 UTC
I'm trying to get things set up for the first time and I am getting stuck at the "preflight" check... what are the odds that I have a dead carelink USB right out of the package? I can see it using lsusb but the $ mm-stick warmup || echo FAIL command only fails. I also couldn't get my dexcom G5 to work wtih the pi.. not sure what might be wrong :(
eszcloud
@eszcloud
Jul 14 2016 00:23 UTC
@flutelynne_twitter : I did in fact have --G5. Unfortunately placed typo.
Lynne Butts
@flutelynne_twitter
Jul 14 2016 00:24 UTC
Ok. Thanks
eszcloud
@eszcloud
Jul 14 2016 00:24 UTC
@mhaeberli I expected that openaps would be updated. I've fixed that one and have been running the updated version as far as I can tell.
@flutelynne_twitter the effects, however, are the same
Lynne Butts
@flutelynne_twitter
Jul 14 2016 00:25 UTC
Sorry to hear that.
eszcloud
@eszcloud
Jul 14 2016 00:29 UTC
This is particularly weird because it worked when I did it last month, hence asking here for any advice.
Julie
@julieraines
Jul 14 2016 00:31 UTC
@mariano42 and @jasoncalabrese I had this same problem with and thought I had the Nightscout dev branch so not sure what I did wrong there
jaylagorio
@jaylagorio
Jul 14 2016 00:38 UTC
Anyone know why the influx of people with "_twitter" tacked onto their usernames is happening? Is there a thing all the young cool kids are doing that I don't know about?
Julie
@julieraines
Jul 14 2016 00:39 UTC
@sarahspins I had some similar problems and did this from checking that the Dexcom is communicating: Workaround: If you continue to have problems, try increasing the mA output to the USB ports, you can do this by running the following command sudo bash -c "echo -e \"#Enable Max USB power\nmax_usb_current=1\" >> /boot/config.txt".
Reboot via sudo shutdown -r now to pick up the changes.
Paul Martin
@Spazholio
Jul 14 2016 00:49 UTC
@sarahspins Can you paste the entire error message as well?
eszcloud
@eszcloud
Jul 14 2016 00:50 UTC
@flutelynne_twitter can you tell me what version of openaps you're running?
sarahspins
@sarahspins
Jul 14 2016 00:50 UTC
I think it was the pi I was using... switching to another seems to have fixed it (and I had rebooted several times with the non-working one)
Paul Martin
@Spazholio
Jul 14 2016 01:07 UTC
:thumbsup:
Scott Leibrand
@scottleibrand
Jul 14 2016 01:15 UTC
@jaylagorio that's what happens when you sign in with twitter instead of github
gitter added twitter login support a month or two ago
Paul Martin
@Spazholio
Jul 14 2016 01:26 UTC
Yeah_google+, It’s_twitter pretty_facebook common_pinterest nowadays_instagram.
(god, that hurt to type)
Martin Haeberli
@mhaeberli
Jul 14 2016 01:30 UTC
openaps report add nightscout/recent-treatments.json JSON ns shell  format-recent-history-treatments monitor/pump-history.json model.json
fails because monitor/pump-history.json does not exists. How best to define and invoke that report / file?
Scott Leibrand
@scottleibrand
Jul 14 2016 01:33 UTC
there is a section in the docs for that. it might be out of order.
if so, we could use your help reordering things appropriately
Martin Haeberli
@mhaeberli
Jul 14 2016 01:34 UTC
@scottleibrand thx - I’m trying to carefully follow and reorder when I find things ...
sarahspins
@sarahspins
Jul 14 2016 01:34 UTC
I ran into that too @scottleibrand it's not that it's out of order, it's that some stuff is "hidden" in the headings, so if you aren't careful where you click, you'll miss things
Martin Haeberli
@mhaeberli
Jul 14 2016 01:35 UTC
@sarahspins thx - but if you know the specific answer here, please enlighten me - I’m carefully working through the phases and am in the middle of phase 1 right now ...
sarahspins
@sarahspins
Jul 14 2016 01:42 UTC
@mhaeberli I don't have a specific thing to tell you that you missed... I just noticed a whole bunch of things walking through it the second time that I didn't see at all the first time... you just have to be careful
Now more stupid questions from me..
Where is it getting this system time from? Do I need to fix it?
  {
    "trend_arrow": "FLAT", 
    "system_time": "2015-12-31T21:10:43", 
    "display_time": "2016-07-12T20:35:23", 
    "glucose": 133
  }
Eden Grown-Haeberli
@edengh
Jul 14 2016 01:48 UTC
also - can someone point me to an easy way to download the last 6 weeks of gitter for intend-to-bolus in one fell swoop so I can search it? (because some wisdom from, for example, @bewest , is buried in there! )
Martin Haeberli
@mhaeberli
Jul 14 2016 01:55 UTC
that @edengh posting was actually @mhaeberli
easiest to search it with google in my experience
Martin Haeberli
@mhaeberli
Jul 14 2016 01:59 UTC
@scottleibrand thx

advice how to fix missing:

monitor/pump-history.json

? - what report to define and invoke?

sarahspins
@sarahspins
Jul 14 2016 02:04 UTC
Is this because I'm using G5? What do I do to fix/get around this? :(
$ openaps do-everything
PREFLIGHT
PREFLIGHT OK
cgm://JSON/oref0_glucose/raw-cgm/glucose-raw.json
raw-cgm/glucose-raw.json  raised  Python int too large to convert to C long
sarahspins
@sarahspins
Jul 14 2016 02:12 UTC
I know this is from the openaps monitor-cgm command within that alias... but I'm not sure what to do to make it work
jaylagorio
@jaylagorio
Jul 14 2016 02:13 UTC
@Spazholio Nice, that must have taken a lot of effort (@scottleibrand thanks for the heads up)
Martin Haeberli
@mhaeberli
Jul 14 2016 02:16 UTC
@scottleibrand apologies re PR ...
Paul Martin
@Spazholio
Jul 14 2016 02:29 UTC
Downloading/unpacking mock (from openaps)
  Running setup.py egg_info for package mock
    ERROR:root:Error parsing
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/pbr/core.py", line 111, in pbr
        attrs = util.cfg_to_args(path, dist.script_args)
      File "/usr/lib/python2.7/site-packages/pbr/util.py", line 248, in cfg_to_args
        kwargs = setup_cfg_to_setup_kwargs(config, script_args)
      File "/usr/lib/python2.7/site-packages/pbr/util.py", line 431, in setup_cfg_to_setup_kwargs
        if pkg_resources.evaluate_marker('(%s)' % env_marker):
    AttributeError: 'module' object has no attribute 'evaluate_marker'
    error in setup command: Error parsing /tmp/pip-build-root/mock/setup.cfg: AttributeError: 'module' object has no attribute 'evaluate_marker'
    Complete output from command python setup.py egg_info:
    ERROR:root:Error parsing

Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/pbr/core.py", line 111, in pbr

    attrs = util.cfg_to_args(path, dist.script_args)

  File "/usr/lib/python2.7/site-packages/pbr/util.py", line 248, in cfg_to_args

    kwargs = setup_cfg_to_setup_kwargs(config, script_args)

  File "/usr/lib/python2.7/site-packages/pbr/util.py", line 431, in setup_cfg_to_setup_kwargs

    if pkg_resources.evaluate_marker('(%s)' % env_marker):

AttributeError: 'module' object has no attribute 'evaluate_marker'

error in setup command: Error parsing /tmp/pip-build-root/mock/setup.cfg: AttributeError: 'module' object has no attribute 'evaluate_marker’
Am I missing something basic? Setting up a dev rig, and it’s been a long time since I’ve done this from scratch.
Martin Haeberli
@mhaeberli
Jul 14 2016 02:34 UTC
@Spazholio - speculating, but perhaps see openaps setup instructions :
https://github.com/openaps/docs/blob/master/docs/docs/openaps-guide/installing.md

and:

sudo apt-get install python python-dev python-pip python-software-properties python-numpy
sudo pip install setuptools

?

@Spazholio hope that helps ...
Paul Martin
@Spazholio
Jul 14 2016 02:39 UTC
Running Yocto, so those don’t quite work. Going to try installing another way. I’ve just not seen this specific error before.
Scott Leibrand
@scottleibrand
Jul 14 2016 02:52 UTC
@mhaeberli no need for apologies. Thanks for putting in PRs to fix stuff.
Paul Martin
@Spazholio
Jul 14 2016 02:53 UTC
Ok, so two questions:
1) Under Yocto, I should have a reboot or shutdown command, right? Because somehow…I don’t.
2) I’m getting the dreaded serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyMFD2: [Errno 13] Permission denied: '/dev/ttyMFD2’ and my edison user is already part of the dialout group. What do?
Lynne Butts
@flutelynne_twitter
Jul 14 2016 02:58 UTC
@sarahspins Try using openaps use cgm config --G5 then openaps use cgm oref0_glucose --no-raw
Reference would be June 5, maybe 3something for time. From BenW
Scott Leibrand
@scottleibrand
Jul 14 2016 03:18 UTC
@Spazholio your PATH might be crippled.
IIRC the default install has games in PATH but not system tools.
Paul Martin
@Spazholio
Jul 14 2016 03:19 UTC
Well, NOW the reboot command works. I have no idea what I did differently. There’s only so many ways to type that command out...
I’ll check my PATH though. Thanks.
Scott Leibrand
@scottleibrand
Jul 14 2016 03:19 UTC
Root user has it right, but not Edison user, IIRC (on Ubilinux).
Paul Martin
@Spazholio
Jul 14 2016 03:19 UTC
However, now I’m more concerned with the whole can’t-use-the-ERF-that-I-just-soldered issue.
Scott Leibrand
@scottleibrand
Jul 14 2016 03:20 UTC
Or maybe that's pi user, not sure.
Paul Martin
@Spazholio
Jul 14 2016 03:20 UTC
That’s supposed to be the /dev/tty/MFD# device, right?
Scott Leibrand
@scottleibrand
Jul 14 2016 03:20 UTC
Intel breakout board?
Paul Martin
@Spazholio
Jul 14 2016 03:20 UTC
Correct.
Got a red light on the ERF.
Steady.
Scott Leibrand
@scottleibrand
Jul 14 2016 03:21 UTC
yeah, mine is ttyMFD1 on my Edisons.
TI and ubilinux though.
Paul Martin
@Spazholio
Jul 14 2016 03:22 UTC
At first, I got permission denied on /dev/ttyMFD2. So I manually added that device to the dialout group. Now I get mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?
I’ve tried ttyMFD0-2 and they all give the same error.
Martin Haeberli
@mhaeberli
Jul 14 2016 03:24 UTC

@Spazholio have you tried

dmesg | tail

(just after you re-plug in the TI Stick?) - this helped me to identify the correct /dev/ttyxxx on my RPi ...

Paul Martin
@Spazholio
Jul 14 2016 03:24 UTC
Not using a TI stick.
Martin Haeberli
@mhaeberli
Jul 14 2016 03:25 UTC
@Spazholio ok - what are you using?
Paul Martin
@Spazholio
Jul 14 2016 03:25 UTC
I only have one of those, and it’s soldered into my production rig. Might want to get another one one of these days, but since I have an ERF right here, I figure I’ll use that.
Martin Haeberli
@mhaeberli
Jul 14 2016 03:26 UTC

ok - and ERF is just directly serial-connected?
also, I assume you have tried:

lsusb

or sudo lsusb

Paul Martin
@Spazholio
Jul 14 2016 03:27 UTC
Serial connected, yes.
Martin Haeberli
@mhaeberli
Jul 14 2016 03:30 UTC
@Spazholio “teaching grandpa how to suck eggs” - this article looks distantly relevant : http://arduino.stackexchange.com/questions/17183/open-the-uart0-serial-port-on-intel-edison
I’m planning to go towards Edison but still trying to work through rpi setup
Martin Haeberli
@mhaeberli
Jul 14 2016 03:43 UTC
Q: If I’m going to follow the install process again, should I go with openaps / master or / dev or ??? ; (I understand that, for oref0, dev is preferred)
ericmtx
@ericmtx
Jul 14 2016 03:52 UTC
had to replace my daugheter's pump that took a swim in a pool tonight. Have a replacement 722. I've updated the pump.ini to communicate with the new pump BUT while the loop runs fine it consistently says "Not Enacted", even though she's 55 right now. cat enact/enacted.json
{
"requested": {
"duration": 30,
"rate": 0,
"temp": "absolute"
},
"bg": 57,
"temp": "percent",
"snoozeBG": 55,
"timestamp": "2016-07-13T22:48:29.351879",
"rate": 0,
"reason": "BG 57<77.5",
"eventualBG": 55,
"recieved": false,
"duration": 0,
"tick": -1
}
Does it maybe need more data since this pump just got turned on? not enough history?
Dana Lewis
@danamlewis
Jul 14 2016 03:54 UTC
Likely. Set a bunch of temps manually to fill up the history...
ericmtx
@ericmtx
Jul 14 2016 03:54 UTC
ok - will do thanks
Dana Lewis
@danamlewis
Jul 14 2016 03:56 UTC
:+1:
Dragan Maksimovic
@dm61
Jul 14 2016 03:58 UTC
@ericmtx that enacted.json looks ok, but "received": false means the pump for some reason did not accept the temp command. I am not sure how this would be related to lack of history. On the pump, is the temp basal type set to U/hour?
ericmtx
@ericmtx
Jul 14 2016 03:59 UTC
good point -thought that looked odd. I'll check that now for the U/hour
you were right - was set to % instead of U/H. I've updated that so that will probably fix it
Dragan Maksimovic
@dm61
Jul 14 2016 04:01 UTC
:+1:
Dana Lewis
@danamlewis
Jul 14 2016 04:01 UTC
Someone want to create the "most frequent reasons the loop won't work"? ;)
We've got some stuff in troubleshooting, but I'm tempted to link a short list somewhere in top of docs for people to see before they start so they can go back to it
@ericmtx I know you've looped before, but it just reminded me I was thinking similar idea a few days ago but forgot to suggest that then
sarahspins
@sarahspins
Jul 14 2016 04:08 UTC
@flutelynne_twitter that works, but adding the time constraint (==hours) breaks it
it also takes forever to return those results
openaps-use cgm iter_glucose 10 also works fine
Martin Haeberli
@mhaeberli
Jul 14 2016 04:12 UTC
@ericmtx what is the model / firmware version of your backup pump; have you confirmed that you can at least set its clock (this, at least for me, has been a proxy for whether the pump accepts temp basals)
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:14 UTC
@ericmtx also check that the pump is using absolutes instead of percents for temp basals in the settings
oh nevermind saw that was suggested
ericmtx
@ericmtx
Jul 14 2016 04:15 UTC
@mhaeberli It's a 722. I think that's always compatible but I'll check to make sure it's 2.4 and @jasoncalabrese I just updated to absolutes. I think that might have been the issue but she's rising now so it's not enacting (as expected). Go gummy bears
And I'll check setting the clock tomorrow if it's still not cooperative tonight
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:15 UTC
you could low temp and have the loop cancel it
ericmtx
@ericmtx
Jul 14 2016 04:16 UTC
low temp on the pump - good idea
Martin Haeberli
@mhaeberli
Jul 14 2016 04:17 UTC
anyone here looping based on uploaded Share / Nightscout CGM data?
ericmtx
@ericmtx
Jul 14 2016 04:18 UTC
yes, my daughter's Edison rig uses the data from NS to loop (from Share)
Martin Haeberli
@mhaeberli
Jul 14 2016 04:19 UTC
@ericmtx - cool - can you share your openaps.ini
Martin Haeberli
@mhaeberli
Jul 14 2016 04:21 UTC
yes! thx
ericmtx
@ericmtx
Jul 14 2016 04:22 UTC
sure
it also uses the TI stick so you'll see refs to mmtune, etc
oh and thanks for your suggestion @mhaeberli and @jasoncalabrese - updating to absolute solved the loop enacting issue.
I can sleep again tonight
Martin Haeberli
@mhaeberli
Jul 14 2016 04:23 UTC
cool!
can someone please remind me how to add the openaps.vendors.units
Scott Leibrand
@scottleibrand
Jul 14 2016 04:27 UTC
@mhaeberli the release / master version of everything but oref0 is fine.
Martin Haeberli
@mhaeberli
Jul 14 2016 04:27 UTC
@scottleibrand thx
Martin Haeberli
@mhaeberli
Jul 14 2016 04:28 UTC
openaps do-everything
fails
KeyError: ‘units’
but otherwise looks promising (this is using local dexcom cgm; I’ll try to figure out Share -> Nightscout next …
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:29 UTC
I think you need to add the units device
Martin Haeberli
@mhaeberli
Jul 14 2016 04:30 UTC
@jasoncalabrese ok - so openaps add device units ?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:30 UTC
I think you use units 2 times
Scott Leibrand
@scottleibrand
Jul 14 2016 04:30 UTC
@ericmtx we should probably make the output ("temp": "percent",) more clear ("Your pump is configured for percent basals: please change it to U/hr"), and/or add an explicit "check for this" in the docs.
Martin Haeberli
@mhaeberli
Jul 14 2016 04:31 UTC
@jasoncalabrese found it! manual says openaps device add units units
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:31 UTC
I'm not using the units device
I think it was added for mmol support, not sure if it has any use for mgdl
Martin Haeberli
@mhaeberli
Jul 14 2016 04:32 UTC
@jasoncalabrese ok; new error: KeyError: ‘oref0’ any guidance? the google hasn’t helped me yet ...
Jason Calabrese
@jasoncalabrese
Jul 14 2016 04:34 UTC
One of the issues on the docs has something about it, it's a device that wraps the oref0 scripts
Martin Haeberli
@mhaeberli
Jul 14 2016 04:39 UTC
oref0-monitor/profile.json report somehow not defined
trying to find how to define it ...
berat
@beratkurar
Jul 14 2016 09:23 UTC
Could someone tell me what nightscout is please?
Chris Oattes
@cjo20
Jul 14 2016 09:33 UTC
@beratkurar Nightscout is a website that people use to monitor CGM data http://www.nightscout.info/
as well as viewing the information on various watches / mobile devices
Julie
@julieraines
Jul 14 2016 11:38 UTC
@beratkurar join CGM in the Cloud on Facebook
Jarred Yaw
@jyaw
Jul 14 2016 11:57 UTC
Going to nightshift next week for a little less than a month! So glad to have OpenAPS for this, but I think my BGs are about to be knocked around a bit regardless. Anybody work these kind of hours with any tips?
Scott Leibrand
@scottleibrand
Jul 14 2016 14:51 UTC
No personal experience, but I would flatten out my basal schedule to something approximating the average, and then keep an eye on what the loop ends up doing and adjust accordingly as your body adjusts your sleep cycle. If the loop low temps, the basals ~90m prior need reducing slightly, etc.
David Cintron
@loudestnoise
Jul 14 2016 15:12 UTC
@live4sw So guess who got the same error as you were dealing with yesterday?
this guy
moving TI stick closer to pump seemed to fix it for me.
I think this is what I get for switching between RileyLink + Loop to OpenAPS
Hannah Crabtree
@lollydaggle
Jul 14 2016 15:32 UTC
I want to generate all my reports by hand - only issue is I'm confused what parameters are needed for tz and why. There's an example on the walkthrough for zoning CGM glucose but I don't see anything about how to zone pump data (clock, pump-history). I'm also assuming I don't need to worry about using the units device since I'm fine with mg/dL.
live4sw
@live4sw
Jul 14 2016 15:52 UTC
oh interesting @loudestnoise
Makes sense. I mean, I can see that the error seems to be that pumphistory.json is a long report and that connectivity poops out in the middle of grabbing it and that throws the error.
It's just weird since i am usually very close to the TI stick, plus it's something that has worsened over time
David Cintron
@loudestnoise
Jul 14 2016 15:53 UTC
I question my USB extension cable because of the way I have it bending and tucked inside this camera pouch
live4sw
@live4sw
Jul 14 2016 15:53 UTC
yeah that makes some sense, i ordered a new one from sparkfun to try
i would use that little USB adapter but it is too wide to work on the sparkfun board, at least for me
Makes me want to stop being lazy and relearn to solder and do a serial connection
David Cintron
@loudestnoise
Jul 14 2016 15:54 UTC
Yeah, I hear that’s the jam
I’m actually using an RPi rig
live4sw
@live4sw
Jul 14 2016 15:54 UTC
oh. my bedside rig is Pi with TI stick connected directly
David Cintron
@loudestnoise
Jul 14 2016 15:55 UTC
Nice, the rigs are like pokemon
Gotta build them ALL
loudestnoise @loudestnoise walks around his office looking for pokemon
Jarred Yaw
@jyaw
Jul 14 2016 15:55 UTC
@scottleibrand sounds like a good approach, thanks. I run a flat basal schedule right now and I let the loop handle the variance, might not be optimal, but it usually works. May just look and see if I can come up with a on/off shift basal schedule and tweak those values...
live4sw
@live4sw
Jul 14 2016 15:56 UTC
I knew pokemon was going to find its way into this channel somehow, was the only remaining pokemon-free area of my life
Having multiple rigs has been great, the only issue is that oftentimes one seems to have "priority" in that its command starts before the other rig each time, so if the first rig is stuck on an error the other one is always stepping out of the way in the wait-for-silence preflight. Has anyone found a good way of editing their aliases/cron to switch things up?
David Cintron
@loudestnoise
Jul 14 2016 15:59 UTC
now is the reason you use two rigs is you walk around and don’t want to have both nearby?
could you just power off the Edison rig before bed and power up the Pi?
or have both powered up and just comment out your cron line
live4sw
@live4sw
Jul 14 2016 16:00 UTC
I could, but part of it is for redundancy as well. If one goes down for some reason, other keeps running.
David Cintron
@loudestnoise
Jul 14 2016 16:00 UTC
makes sense
Jason Calabrese
@jasoncalabrese
Jul 14 2016 16:01 UTC
I'm using multiple short waits and 1 longer wait before preflight
David Cintron
@loudestnoise
Jul 14 2016 16:01 UTC
Yeah, what I’ve noticed this morning is there doesn’t seem to be much rhyme or reason (as far as I can tell) when I get the 0 values unpackthing
I ran the same alias back to back and the first time it threw the error, second time worked just fine
Jason Calabrese
@jasoncalabrese
Jul 14 2016 16:01 UTC
I noticed that after uploading, waiting for bg, etc other rigs would find the gap and get started
live4sw
@live4sw
Jul 14 2016 16:14 UTC
Hm, a little more detail? Just having a little trouble thinking about a way to make it so that the rigs aren't sort of synchronized. Right now I do a sleep 15 before my Edison rig so that it's staggered a little, but that often just means that if the Pi is hitting a communication error later in the loop, the Edison will never even really have a chance to get started.
I have both wait-for-silence-long and wait-for-silence
there are still some collisions, but I can run with 3 rigs close to the pump
Chris Oattes
@cjo20
Jul 14 2016 16:20 UTC
You should just make the rigs fight to the death for access to the pump! Survival of the fittest :P
It's probably overengineering things, but if they're all on the same network then some sort of auto-negotiation between them might be useful
Jason Calabrese
@jasoncalabrese
Jul 14 2016 16:27 UTC
@scottleibrand had a good link to a wikipedia page with that described something very similar to what we're basically doing
Dragan Maksimovic
@dm61
Jul 14 2016 16:31 UTC
@lollydaggle I also find the tz device very confusing, there are so many options. You can do openaps use tz --help to see a bit of help, including various USAGE options for tz: tz clock is what I think should be used for pump clock, and tz rezone for pump history. Each of these has some more arguments, which I do not remember - I'd need to look them up
Hannah Crabtree
@lollydaggle
Jul 14 2016 16:43 UTC
@dm61 thanks! I'll take a look at the help menu when I get back to my pi - I've been trying to piece together what I need to do beforehand between the walkthrough and example (https://github.com/bewest/openaps-example).
which has been great because I feel like I know how this all works just minus the tz device :)
Dragan Maksimovic
@dm61
Jul 14 2016 16:49 UTC
@lollydaggle I have my RPI with me, so I've found how I would manually zone the pump clock: openaps use tz clock --date None raw-pump/clock-raw.json (your pump clock file name could be different); Once you get that to work, you can create the corresponding report, e.g. openaps report add monitor/clock.json JSON tz clock --date None raw-pump/clock-raw.json
Scott Leibrand
@scottleibrand
Jul 14 2016 16:49 UTC
random sleep, and a long wait for silence on comms fail
Dragan Maksimovic
@dm61
Jul 14 2016 16:50 UTC
@lollydaggle here is what I would use to zone pump history: openaps use tz rezone --date timestamp --date dateString --date start_at --date end_at --date created_at raw-pump/pump-history-raw.json and then you can create a report similarly
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 16:51 UTC
you could use latest treatments in NS as the source of truth before running. Say if treatments <5 min wait else do treatment
@jasoncalabrese
Jason Calabrese
@jasoncalabrese
Jul 14 2016 16:52 UTC
@scottleibrand random sleep is a good idea
Scott Leibrand
@scottleibrand
Jul 14 2016 16:54 UTC
@kimstdennis_twitter I don't use NS for that, but I just added a check on temp basal duration: if >= 27m, don't enact based on BG alone until pulling a new pumphistory.
Hannah Crabtree
@lollydaggle
Jul 14 2016 16:56 UTC
@dm61 thanks, I'll try that! It seems like we just want to covert the input date-like fields from each device using '--date'?
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 16:56 UTC
I wonder what kind of pump battery usage that will see.
@jasoncalabrese do you run the checks every 3 minutes?
Dragan Maksimovic
@dm61
Jul 14 2016 16:57 UTC
yes, @lollydaggle, --date tells tz what fields to modify; all it does is add x hours to the date based on the current time zone
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 16:58 UTC
@scottleibrand is it you or Jason who is running a multi rig setup (or both!) ?
Dana Lewis
@danamlewis
Jul 14 2016 16:58 UTC
@kimstdennis_twitter both. many of us have multi-rigs
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 16:59 UTC
I suppose that beats my carrying my rig all over. :)
Dana Lewis
@danamlewis
Jul 14 2016 17:02 UTC
@kimstdennis_twitter if you haven’t already, re: battery you’ll probably want to a) switch to using lithium batteries and b) set up voltage warning alerts so you know when to change the battery before bedtime
Scott Leibrand
@scottleibrand
Jul 14 2016 17:03 UTC
Even with constant comms (every minute) a lithium lasts about a week.
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 17:03 UTC
I found the amazon bulk batteries to be more cost effective according to those battery tests, linked somewhere
Dana Lewis
@danamlewis
Jul 14 2016 17:05 UTC
that’s good data, but you might want to run your own tests to help you decide how to balance the cost vs the annoyance of changing a battery 2-3 days vs 1/week
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 17:06 UTC
indeed
@scottleibrand (I need an at scott and dana mention here. :) ) with the loop running and checking temp basal for if >= 27m, you're essentially running the loop every 3 minutes, correct?
Dana Lewis
@danamlewis
Jul 14 2016 17:10 UTC
every minute, actually
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 17:10 UTC
from multiple rigs. what drove you to land on every minute?
@danamlewis
Jason Calabrese
@jasoncalabrese
Jul 14 2016 17:22 UTC
there's a check in the cron to only run when it's not already started
* * * * * cd /home/indy/indy && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps retry-loop ) 2>&1 | logger -t openaps-loop
so the cron fires every minute, but if the loop is already running it doesn't get started again
Dana Lewis
@danamlewis
Jul 14 2016 17:33 UTC
@kimstdennis_twitter ^
Scott Leibrand
@scottleibrand
Jul 14 2016 17:52 UTC
@kimstdennis_twitter my refresh-loops script has a lot more logic than that
each report is refreshed if it's older than a certain configured time, or if other data is newer. so generally each rig refreshes its temp basal and pumphistory data on its first run after getting a new BG value, refreshes any other reports that are old enough, and then waits until the next one
you can read though the setup.sh to see all the logic. happy to answer questions (or comment it better) if anything is unclear
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 17:56 UTC
@scottleibrand that's great, thanks. the example is perfect. Also, @danamlewis and @jasoncalabrese do you see more adjustments taking place at 1min vs 3 / 5 min? is this based on using the G4 with noise?
Scott Leibrand
@scottleibrand
Jul 14 2016 17:57 UTC
I recently made a bunch of updates to reduce the number of spurious adjustments being made: the 27m thing was one of them
we're not using G4 raw data at all
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 17:58 UTC
?? what are you using for BG data?
Scott Leibrand
@scottleibrand
Jul 14 2016 17:58 UTC
the regular SGVs
not doing anything fancy with noise or anything else
now it generally sets one temp every 5 minutes, even with multiple rigs: the first one to get comms sets a temp, and the others see it's already got the right temp running and don't do anything except refresh their data for next time
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 18:00 UTC
ok :) my mind was starting to try to figure out what magic you had behind the curtain.
so the increased timing is due to the multi rig setup to ensure action is taken by the first rig that queries beyond the 5min mark.
Dana Lewis
@danamlewis
Jul 14 2016 18:04 UTC
yea, keep in mind we’ve done a lot of little fidgety improvements that aren’t necessary for a basic loop
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 18:06 UTC
agreed
should I keep my eyes open for a fidgety-improvements page in the docs then? :)
Paul Martin
@Spazholio
Jul 14 2016 18:07 UTC
Only after you write the PR for it. =)
Dana Lewis
@danamlewis
Jul 14 2016 18:08 UTC
:boom:
heh. exactly. there’s some stuff you’ll see in phase 6 about going on to advanced meal assist, automatic sensitivity mode, etc. but the kind of stuff you’re talking about, no one’s PRed into the docs, and you’re welcome to ;)
some people get the basic loop going, say “hooray”, and never come back and never do multiple rigs, etc.
some people never stop iterating
but most people who are making fidgety tweaks don’t think about writing those things up for the docs
Jarred Yaw
@jyaw
Jul 14 2016 18:10 UTC
"fidgety tweaks" looks like a great page title
Scott Leibrand
@scottleibrand
Jul 14 2016 18:11 UTC
lol
Dana Lewis
@danamlewis
Jul 14 2016 18:11 UTC
Yea. If someone wants to add that, I suggest in Phase 6 as a page after Configuring Automatic Sensitivity Mode.
Martin Haeberli
@mhaeberli
Jul 14 2016 18:28 UTC
:+1:
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 19:06 UTC
I've been reading Phase 6 stuff over and playing with things.. I'll try and take notes as I go (with the intention of updates). Any fidgety tweaks examples? Or should I just keep searching Ben and Jason's repos. :)
live4sw
@live4sw
Jul 14 2016 19:10 UTC
@scottleibrand It seems like all one needs to do to ensure some staggering is to have a random wait before starting the loop on each rig, basically the sleep $[ ( $RANDOM / 2048 ) ]s at the beginning of your loop alias. Alternatively I suppose you could do that in cron instead?
My current config has one rig doing sleep 15 at the beginning of its loop, but I realize that basically just means it will often just be pre-empted by the first rig, even if the first rig gets through most of the loop and then errors
Scott Leibrand
@scottleibrand
Jul 14 2016 19:17 UTC
@live4sw if you also have wait-for-silence, yeah
if not, I would recommend that, so the 2nd rig doesn't kill off the first one's comms
sarahspins
@sarahspins
Jul 14 2016 19:17 UTC
I am haivng trouble uploading to nightscout and I can't figure out what's going wrong
I had it working briefly last night but then I broke something, and it hasn't worked since
I've also NOT been able to get the openaps pills to shop up on my nightscout site
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:18 UTC
I've seen rigs start listening at the same time pretty often, so the random sleep should fix that
sarahspins
@sarahspins
Jul 14 2016 19:18 UTC
even when I had temp basal data uploading
any suggestions on what to do? The docs are unfortunately rather vague and it's pretty much "do this and it works" except mine isn't
live4sw
@live4sw
Jul 14 2016 19:19 UTC
@scottleibrand Yep, thanks, I have wait-for-silence on, just want to have a way to stagger things.
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:19 UTC
you should be able to turn on the plugin from the settings drawer in NS
sarahspins
@sarahspins
Jul 14 2016 19:19 UTC
it's not there
and I do have it listed under enable
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:20 UTC
what does YOURSITE/api/v1/status.json show
there are 2 uploads from OpenAPS to NS, device status and treatments
sarahspins
@sarahspins
Jul 14 2016 19:21 UTC
{"status":"ok","name":"Nightscout","version":"0.8.4","serverTime":"2016-07-14T19:20:47.633Z","apiEnabled":true,"careportalEnabled":true,"head":"bd6981f1dd0b242a7abad6fc45fcc163f5354375","settings":{"units":"mg/dL","timeFormat":12,"nightMode":true,"showRawbg":"never","customTitle":"Sarah (openAPS)","theme":"colors","alarmUrgentHigh":true,"alarmUrgentHighMins":[30,60,90,120],"alarmHigh":true,"alarmHighMins":[30,60,90,120],"alarmLow":true,"alarmLowMins":[15,30,45,60],"alarmUrgentLow":true,"alarmUrgentLowMins":[15,30,45],"alarmUrgentMins":[30,60,90,120],"alarmWarnMins":[30,60,90,120],"alarmTimeagoWarn":true,"alarmTimeagoWarnMins":15,"alarmTimeagoUrgent":true,"alarmTimeagoUrgentMins":30,"language":"en","scaleY":"log-dynamic","showPlugins":"","heartbeat":60,"baseURL":"","thresholds":{"bgHigh":240,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55},"DEFAULT_FEATURES":["delta","direction","upbat","errorcodes"],"alarmTypes":["simple"],"enable":["bridge","careportal","iob","basal","cob","bwp","openaps","pump","treatmentnotify","delta","direction","upbat","errorcodes","simplealarms"]},"extendedSettings":{}}
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:21 UTC
the treatments show the temp basals, boluses, etc
"version":"0.8.4"
you'll need the NS dev branch for the openaps plugin
sarahspins
@sarahspins
Jul 14 2016 19:22 UTC
ok, but how do I fix that?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:23 UTC
looks like your dev branch is current, so you just need to deploy dev instead of master
sarahspins
@sarahspins
Jul 14 2016 19:23 UTC
yes, but how?
nevermind I think I got it
mariano42
@mariano42
Jul 14 2016 19:24 UTC
@sarahspins i did this last night using https://github.com/nightscout/cgm-remote-monitor
sarahspins
@sarahspins
Jul 14 2016 19:24 UTC
now to impatiently wait while it redeploys :)
nope, no bueno, still says 0.8.4
mariano42
@mariano42
Jul 14 2016 19:27 UTC
@sarahspins did you disconnect from the deployment source and reconnect to the dev branch?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:28 UTC
I don't know anything about azure
I'm sure there's some magic button hidden 20 menus down
mariano42
@mariano42
Jul 14 2016 19:29 UTC
@jasoncalabrese lol.. sadly you arent far off.
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:29 UTC
heroku is nice and simple, reliable too
sarahspins
@sarahspins
Jul 14 2016 19:30 UTC
@mariano42 no, I can't figure out how
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:30 UTC
there was a page on nightscout.info, but I'm not seeing it
sarahspins
@sarahspins
Jul 14 2016 19:31 UTC
what I see and what is in the NS docs doesn't match since azure has changed
I hate the new portal :(
mariano42
@mariano42
Jul 14 2016 19:31 UTC
@sarahspins ok.. we got this :).. from azure open the settings, then choose deployment source under Publishing
choose your deployment then the disconnect icon
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:32 UTC
thanks @mariano42
mariano42
@mariano42
Jul 14 2016 19:32 UTC
then you can go back in and do another pull using your github user name and make sure you choose dev and not master
Chris Oattes
@cjo20
Jul 14 2016 19:32 UTC
I discovered the problem with using pump events for oref0 vs pulling from NS. No way to edit carb amounts.
mariano42
@mariano42
Jul 14 2016 19:33 UTC
@sarahspins then do a restart and refresh your browser and you should see the version is updated and you will get the new plug in checkboxes
sarahspins
@sarahspins
Jul 14 2016 19:33 UTC
@mariano42 working on it
Scott Leibrand
@scottleibrand
Jul 14 2016 19:33 UTC
@cjo20 yeah. as a workaround you could set a temp target...
sarahspins
@sarahspins
Jul 14 2016 19:34 UTC
alright, waiting patiently for redeployment again :)
I hate this part
Scott Leibrand
@scottleibrand
Jul 14 2016 19:36 UTC

weareonlywaitingforazure

hehe
mariano42
@mariano42
Jul 14 2016 19:36 UTC
@scottleibrand lol
sarahspins
@sarahspins
Jul 14 2016 19:37 UTC
pull request failed :(
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:37 UTC
I wish I tracked all the time MS has wasted, IE, azure, etc, I don't think any other company would ever come close
sarahspins
@sarahspins
Jul 14 2016 19:37 UTC
no kidding.....
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:38 UTC
@sarahspins it looked like your dev branch was current, you shouldn't need a PR
just a deploy
sarahspins
@sarahspins
Jul 14 2016 19:39 UTC
that's what it said after I reconnected it in azure... I haven't touched github
mariano42
@mariano42
Jul 14 2016 19:39 UTC
@sarahspins you didnt reconnect to master right? when you choose the new deployment source you should have seen more than one option, one of them named dev
sarahspins
@sarahspins
Jul 14 2016 19:40 UTC
yes and I selected dev
I'm going to do it again... something clearly didn't work
mariano42
@mariano42
Jul 14 2016 19:42 UTC
hmm..thats odd. yea, unfortunately since I am not up to date I can't get into where I was to do the fork yesterday to refresh my memory. what does http://nightscout.github.io/pages/update-fork/ say?
are you up to date according to that?
sarahspins
@sarahspins
Jul 14 2016 19:43 UTC
yes
when I add it into azure though, it's doing something and failing
all I'm getting is a white screen now :(
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:45 UTC
@mariano42 you can use http://nightscout.github.io/pages/test-beta/?branch=dev to create the PR to your dev branch, the update-fork tool only updates the master branch
mariano42
@mariano42
Jul 14 2016 19:45 UTC
@sarahspins white screen after you retried?
sarahspins
@sarahspins
Jul 14 2016 19:46 UTC
yes
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:46 UTC
after too many deploys azure hits a limit, I've heard of people getting around that by picking a different region
sarahspins
@sarahspins
Jul 14 2016 19:46 UTC
hmm
azure gave me an error on the deployment the first time, and now I have a green checkmark but the site isn't loading
mariano42
@mariano42
Jul 14 2016 19:47 UTC
@jasoncalabrese oh.. hmm, i used that yesterday to get to the dev branch (at least I thought I did, but maybe I am misremembering)
sarahspins
@sarahspins
Jul 14 2016 19:48 UTC
my other ns site is working fine
mariano42
@mariano42
Jul 14 2016 19:48 UTC
@sarahspins that might mean you have something going on in your app settings now
sarahspins
@sarahspins
Jul 14 2016 19:48 UTC
in the enable?
mariano42
@mariano42
Jul 14 2016 19:49 UTC
@sarahspins that would be my guess... the only other time that happened to me was when my API SECRET was less than 12 characters.
sarahspins
@sarahspins
Jul 14 2016 19:49 UTC
mine isn't but I went ahead and removed it for the moment
mariano42
@mariano42
Jul 14 2016 19:50 UTC
you have DEVICESTATUS_ADVANCED = true right?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:50 UTC
the dev branch should show an error screen if it can't start because of the api secret or mongo
sarahspins
@sarahspins
Jul 14 2016 19:51 UTC
I did but I removed it a second ago
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:51 UTC
DEVICESTATUS_ADVANCED wouldn't prevent it from starting
sarahspins
@sarahspins
Jul 14 2016 19:51 UTC
mongo settings were working before I changed branches
and they're worknig on my other NS site
(same DB, I created a second site to "play with" a while back)
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:52 UTC
there's a hack where some people remove the mongo setting before the deploy and then add it after
mariano42
@mariano42
Jul 14 2016 19:52 UTC
@jasoncalabrese thanks..wasnt sure about that.. that error screen is a good idea
sarahspins
@sarahspins
Jul 14 2016 19:54 UTC
@jasoncalabrese do you mean the connection string?
dougtakeuti
@dougtakeuti
Jul 14 2016 19:58 UTC
Hey @jasoncalabrese, great interview with Wes. It was really interesting to learn some more of the history of NS. I have a question for you regarding ssh into the rig using a cell phone. Do you use Serverauditor?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 19:58 UTC
you could try renaming the MONGO variable so it won't be found, it seems like deploys timeout on azure and with that hack the app doesn't start so the deploy takes less time
I'm using JuiceSSH on android, but Serverauditor looks like the popular option for iOS
dougtakeuti
@dougtakeuti
Jul 14 2016 20:00 UTC
I use the Android version. I can ssh into both the pi and the edison at home and at school, but only when using a fixed IP address.
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:00 UTC
the trick is setting up a ssh tunnel to your own server, then you ssh to the server, and then to the rigs
dougtakeuti
@dougtakeuti
Jul 14 2016 20:00 UTC
I cannot do it when using the phone's hotspot
sarahspins
@sarahspins
Jul 14 2016 20:01 UTC
I'm currently using a hotspot (home internet is out right now) and I can ssh into my pi, but I'm not trying to do it from my phone :)
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:01 UTC
I'm using something called autossh that trys to keep the tunnel open at all times, but even that needs to be killed and restarted
dougtakeuti
@dougtakeuti
Jul 14 2016 20:02 UTC
I see. is that fairly easy to setup?
David Cintron
@loudestnoise
Jul 14 2016 20:02 UTC
I just made an alias that does the reverse SSH into the one server
but that would require having access to the rig via some connection
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:02 UTC
takes some time to tweak it so it become reliable
sarahspins
@sarahspins
Jul 14 2016 20:02 UTC
re-deployed without the mongo string and it still isn't working... man this is frustrating :( I don't think it was this hard to set up NS the first time
I am about to just delete it all and start over
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:03 UTC
you also need a linux server for the rigs to connect to
David Cintron
@loudestnoise
Jul 14 2016 20:03 UTC
Yeah, that’s what I’m doing
it’s my Nightscout server ;)
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:03 UTC
and need to know how to secure it or you open up yourself to some really scary possibilities
David Cintron
@loudestnoise
Jul 14 2016 20:04 UTC
oh good point. I have SSH key and no password login
should I be doing more?
jwedding
@jwedding
Jul 14 2016 20:04 UTC
Just a throw away reminder that we have LOTS of resources at Azure if someone wants to stand up and play with a backup box for free.....
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:04 UTC
staying current with patches, watching logs, etc
dougtakeuti
@dougtakeuti
Jul 14 2016 20:05 UTC
How about just ssh into the rig using the phone's hotspot when you are on the go? what do I need for that?
David Cintron
@loudestnoise
Jul 14 2016 20:05 UTC
That works for me…most of the time
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:06 UTC
that doesn't work since you don't know the phone's mobile ip and even if you didn't would need to route to the rig
David Cintron
@loudestnoise
Jul 14 2016 20:06 UTC
hmm @jasoncalabrese maybe I should stop doing that. The funny thing is I’m only doing it because it’s a pain for me to get it on one network at work vs the other
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:07 UTC
yeah, I use papertrail most of the time and only need the tunnel when I need to run commands
David Cintron
@loudestnoise
Jul 14 2016 20:07 UTC
@jasoncalabrese I get it to work using raspberrypi.local
over iPhone hotspot
dougtakeuti
@dougtakeuti
Jul 14 2016 20:08 UTC
I can do that with the laptop, but not with the phone
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:08 UTC
easier when all the devices are with you
but when they're remote its nice to be able to get in
David Cintron
@loudestnoise
Jul 14 2016 20:09 UTC
So I’ve found @dougtakeuti it doesn’t work 100% of the time, but sometimes if I flip hotspot off, back on, wait a few minutes and then try pi@raspberrypi.local it will eventually work
I use Prompt 2 by Panic though on my iPhone for my SSH client
dougtakeuti
@dougtakeuti
Jul 14 2016 20:10 UTC
@loudestnoise thanks for the hint!
David Cintron
@loudestnoise
Jul 14 2016 20:11 UTC
Papertrail is awesome though if you wanna check out logs remotely
I use Papertrail + Pushover for notifications when my loop fails
I just use the free account on both
I think I had to pay $5 for the iOS notifications one time
Scott Leibrand
@scottleibrand
Jul 14 2016 20:13 UTC
if you hotspot the phone and the rig connects to it, it will always end up with the same IP (at least on iOS), so you can set up a second config in serverauditor to connect to that if the .local hostname isn't responding
David Cintron
@loudestnoise
Jul 14 2016 20:15 UTC
Yeah, I’ve tried that too, but for me for whatever reason it refuses to connect over the IP. It’s kind of a guessing game sometimes
I wish I could use one of those network scanner apps and it would just tell me the IP
dougtakeuti
@dougtakeuti
Jul 14 2016 20:16 UTC
@scottleibrand not sure how to do that second config.
Scott Leibrand
@scottleibrand
Jul 14 2016 20:16 UTC
just add a new host
sarahspins
@sarahspins
Jul 14 2016 20:16 UTC
okay, got new nighscout site up and running with dev... no idea why the other was broken :)
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:16 UTC
great
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:17 UTC
to add to this, I setup a cronjob to update no-ip.com to update a dynamic dns for my rig. I get dhcp'ed when my rig is out and about and never know the IP. This is not for connecting to a remote rig though.
dougtakeuti
@dougtakeuti
Jul 14 2016 20:17 UTC
@scottleibrand ok, I'll try that once Julia gets home, thanks.
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:19 UTC
@loudestnoise the no-ip dns is determining the private IP as I don't know it when out and about.
Scott Leibrand
@scottleibrand
Jul 14 2016 20:20 UTC
I thought about doing that
I have my rigs doing an http request with the private IP in the URL so I can look at my logs if I really need to. :)
usually my ssh tunnels come back up if the rig has connectivity though
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:21 UTC
nice
what's the http request going to?
Scott Leibrand
@scottleibrand
Jul 14 2016 20:21 UTC
my Digitalocean droplet
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:21 UTC
droplet...
thanks
what's running on the droplet? @scottleibrand
sarahspins
@sarahspins
Jul 14 2016 20:24 UTC
okay, now that I'm pretty much back where I started, but with the right deployment branch.... I'm still not able to get anything to upload successfully :(
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:24 UTC
url change?
sarahspins
@sarahspins
Jul 14 2016 20:24 UTC
no i fixed that :)
Scott Leibrand
@scottleibrand
Jul 14 2016 20:25 UTC
@kimstdennis_twitter my NS and various other custom stuff
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:27 UTC
test env or do you have a relay for pump comms?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:29 UTC
@sarahspins is the openaps pill showing now?
Scott Leibrand
@scottleibrand
Jul 14 2016 20:29 UTC
@kimstdennis_twitter was that question for me?
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:30 UTC
yes, sorry forgot the @ mention
sarahspins
@sarahspins
Jul 14 2016 20:30 UTC
@jasoncalabrese yes it is, but I can't get anything to upload and show up
dougtakeuti
@dougtakeuti
Jul 14 2016 20:30 UTC
I haven't updated my rigs since April and I still need to configure autosens. What would be the safest way to do so? Do I just follow the docs again? I'm starting with the pi, which is my night rig.
Scott Leibrand
@scottleibrand
Jul 14 2016 20:30 UTC
@kimstdennis_twitter not sure I understand the question then
sarahspins
@sarahspins
Jul 14 2016 20:30 UTC
@jasoncalabrese it just shows "OpenAPS ⚠unknown"
Scott Leibrand
@scottleibrand
Jul 14 2016 20:31 UTC
@dougtakeuti I would start a new openaps loop directory and configure everything fresh, then switch over when ready
unless you don't care about that rig being down while you get it working
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:31 UTC
@sarahspins check YOURSERVER/api/v1/treatments.json?find[enteredBy]=/openaps/ to see if there are any treatments
dougtakeuti
@dougtakeuti
Jul 14 2016 20:31 UTC
:thumbsup:
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:31 UTC
@scottleibrand so you've got the droplet in digital ocean, its running openaps, etc. but how are you getting pump information to it?
sarahspins
@sarahspins
Jul 14 2016 20:32 UTC
@jasoncalabrese yes I see stuff there
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:32 UTC
and /api/v1/devicestatus.json?find[openaps][$exists]=true to see if there are any status
Scott Leibrand
@scottleibrand
Jul 14 2016 20:32 UTC
@kimstdennis_twitter no, openaps is running locally on the edison and pi rigs. the droplet just runs NS, etc.
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:32 UTC
the pill is populated using the devicesstatus data, not the treatments
Scott Leibrand
@scottleibrand
Jul 14 2016 20:32 UTC
@kimstdennis_twitter it's also the server I use to remotely ssh to the edison/pi rigs as needed
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:33 UTC
also check the dates, something might not be zoned
Kim St. Dennis
@kimstdennis_twitter
Jul 14 2016 20:33 UTC
yeah, nicely done. @scottleibrand
sarahspins
@sarahspins
Jul 14 2016 20:33 UTC
@jasoncalabrese yes I see stuff there too
dougtakeuti
@dougtakeuti
Jul 14 2016 20:38 UTC
@scottleibrand when I run sudo easy_install -ZU openaps does that update everything I need? then switching to the AMA branch, configure the reports and update the aliases?
Jason Calabrese
@jasoncalabrese
Jul 14 2016 20:39 UTC
@sarahspins look at the dates, the data is probably in the past, but maybe in the future
sarahspins
@sarahspins
Jul 14 2016 20:41 UTC
okay, looks like maybe a timezone problem then?
Scott Leibrand
@scottleibrand
Jul 14 2016 20:48 UTC
@dougtakeuti that only updates the openaps toolkit, not oref0
oref0 is npm
dougtakeuti
@dougtakeuti
Jul 14 2016 20:49 UTC
thanks, I suspected that
dougtakeuti
@dougtakeuti
Jul 14 2016 21:05 UTC
@scottleibrand I got these warnings. Are they critical?
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
Paul Martin
@Spazholio
Jul 14 2016 21:43 UTC
Regarding the discussion above, if anyone has a rock-solid reverse SSH connection, I’m WAY interested. Nothing I’ve been able to find is very good.
GabeA23
@GabeA23
Jul 14 2016 21:47 UTC
Hey ya'll. I accidentally deleted a file (ns-status) from my /usr/local/bin/ folder. How do I find the source code for ns-status so I can re-add it to that directory?
This page is all I could find, but it doesn't have the actual code.
Scott Leibrand
@scottleibrand
Jul 14 2016 21:57 UTC
@dougtakeuti nope, you can ignore those
Martin Haeberli
@mhaeberli
Jul 14 2016 22:02 UTC
@Spazholio - I’m not rock-solid, but I have been happy experimentally with using a Digital Ocean droplet “in the middle” ...
Scott Leibrand
@scottleibrand
Jul 14 2016 22:05 UTC
Same. only issues are with speed of reconnecting when network changes
Chris Oattes
@cjo20
Jul 14 2016 22:05 UTC
I wish wpa_supplicant on the edison connected to networks a bit faster
Scott Leibrand
@scottleibrand
Jul 14 2016 22:10 UTC
do you have dhcp in /etc/network/interfaces, or manual?
Chris Oattes
@cjo20
Jul 14 2016 22:10 UTC
manual, because wpa-roam doesn't work with dhcp
Scott Leibrand
@scottleibrand
Jul 14 2016 22:11 UTC
hmm, what do you use wpa-roam for?
Chris Oattes
@cjo20
Jul 14 2016 22:12 UTC
defining multiple networks
Paul Martin
@Spazholio
Jul 14 2016 22:15 UTC
No no, I need an actual script that works. Nothing I have does. It never seems to survive switching networks, which I do quite often.
I already have a number of servers I can use as an SSH endpoint.
Scott Leibrand
@scottleibrand
Jul 14 2016 22:15 UTC
have you tried mine?
Paul Martin
@Spazholio
Jul 14 2016 22:16 UTC
I don’t recall - probably, since I’ve tried a few. Link me to it and I’ll try it again?
Scott Leibrand
@scottleibrand
Jul 14 2016 22:17 UTC
not sure it's posted anywhere, as it's just a one-liner
ok, 6:
if ! /bin/ps -ef | /bin/grep ssh | /bin/grep 2230 | /bin/grep -v grep; then
    /usr/bin/ssh -fN -R 2230:localhost:22 you@yourserver.net
fi
if ! /bin/ps -ef | /bin/grep sshd | /bin/grep pts/ | /bin/grep -v grep; then
    /usr/bin/killall -g --older-than 10m ssh
fi
@cjo20 I think wpa-roam is only needed if you want wifi to be disabled when you plug in eth0

I do:

auto wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

and it roams between wifi networks fine

Paul Martin
@Spazholio
Jul 14 2016 22:20 UTC
I think I’ve tried something similar, but what happens is that the ssh process never dies, even though it’s ostensibly dead. I’ll poke at it in a bit. Thanks.
Chris Oattes
@cjo20
Jul 14 2016 22:20 UTC
@scottleibrand how many networks do you have defined in the wpa_supplicant.conf?
Scott Leibrand
@scottleibrand
Jul 14 2016 22:20 UTC
a lot
Spazholio @Spazholio listens closely, as he uses wpa_supplicant.conf extensively.
Scott Leibrand
@scottleibrand
Jul 14 2016 22:21 UTC
edison@edison-rl ~ $ cat /etc/wpa_supplicant/wpa_supplicant.conf | grep -c network
13
and one of them is a wildcard:
network={
        key_mgmt=NONE
        priority=-999
}
Chris Oattes
@cjo20
Jul 14 2016 22:22 UTC
Everything I've seen suggests that wpa-roam is required for automatically connecting / reconnecting to different wireless networks
Scott Leibrand
@scottleibrand
Jul 14 2016 22:25 UTC
my config is an existence proof that is false. :)
Chris Oattes
@cjo20
Jul 14 2016 22:25 UTC
yes, I'd like to understand why it works like it does
Paul Martin
@Spazholio
Jul 14 2016 22:26 UTC
auto wlan0
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
That’s what works for me. I use dhcp instead of manual and it complains. Oddly enough, it’s not invoking dhclient automatically my way, so….yeah.
I may switch over to how @scottleibrand has it though and see what happens...
Scott Leibrand
@scottleibrand
Jul 14 2016 22:38 UTC
zcat /usr/share/doc/wpasupplicant/README.modes.gz | less
not sure it fully answers the question, but it provides a lot of details on how wpa-roam works
Chris Oattes
@cjo20
Jul 14 2016 22:43 UTC
I think I know what I was missing. I needed iface home inet dhcp in my interfaces file
Scott Leibrand
@scottleibrand
Jul 14 2016 22:44 UTC
seems like what wpa-roam does is set up a profile that can roam between interfaces, so you can have the same profile work on both eth0 and wlan0
if all you ever use is wifi, that's not necessary
Paul Dickens
@thebookins
Jul 14 2016 22:57 UTC
Has anyone considered building a computational model, along the lines of the Dalla Man model, as part of openaps? Would be a great way to test the algorithm against MDI, and also to make sure that iterative changes don't break anything. This paper describes the development of a large cohort of simulated patients, and the system has been accepted by the FDA. Keen to talk with anyone thinking along similar lines.
Dana Lewis
@danamlewis
Jul 14 2016 22:59 UTC
there have been a couple of people interested in ODE, but no one’s done any work and contributed it open source yet.
(btw, if we decide to submit to FDA at some point, we’d submit the same way as a precursor to clinical trials)
Matt Pressnall
@logichammer
Jul 14 2016 23:04 UTC

Hey all ( @bewest , @Spazholio , @dhermanns )

Working on setting up an Edison / Sparkfun set up and am connected just fine over SSH.

I have run

sudo apt-get install python python-dev python-pip python-software-properties python-numpy
sudo pip install setuptools

Just fine but when I go to set install openaps from source:

git clone git://github.com/openaps/openaps.git
cd openaps
git checkout dev
sudo python setup.py develop

I get here:

Processing setuptools-24.0.3.zip
Writing /tmp/easy_install-XXRLiW/mock-2.0.0/temp/easy_install-Z618A_/setuptools-24.0.3/setup.cfg
Running setuptools-24.0.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-XXRLiW/mock-2.0.0/temp/easy_install-Z618A_/setuptools-24.0.3/egg-dist-tmp-k7cyoL
warning: no files found matching '*' under directory 'setuptools/_vendor'

Installed /tmp/easy_install-XXRLiW/mock-2.0.0/setuptools-24.0.3-py2.7.egg
Marker evaluation failed, see the following error.  For more information see: http://docs.openstack.org/developer/pbr/compatibility.html#evaluate-marker
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pbr/core.py", line 111, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 248, in cfg_to_args
    kwargs = setup_cfg_to_setup_kwargs(config, script_args)
  File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 431, in setup_cfg_to_setup_kwargs
    if pkg_resources.evaluate_marker('(%s)' % env_marker):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1306, in evaluate_marker
    return cls.interpret(parser.expr(text).totuple(1)[1])
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1341, in interpret
    return op(nodelist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1254, in atom
    return cls.interpret(nodelist[2])
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1341, in interpret
    return op(nodelist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1275, in comparison
    raise SyntaxError(msg)
SyntaxError: '<' operator not allowed in environment markers
error: Setup script exited with error in setup command: Error parsing /tmp/easy_install-XXRLiW/mock-2.0.0/setup.cfg: SyntaxError: '<' operator not allowed in environment markers

I have confirmed that setuptools and pbr are installed via pip as I saw @Spazholio run into this issue but after running those commands via pip and then trying to rerun:

sudo python setup.py develop

I get the same error. Best way to install from source? I want to use the dev / AMA branch of oref0.

Thanks so much!

Paul Martin
@Spazholio
Jul 14 2016 23:07 UTC
I’m using Yocto, so I can’t speak to how well it’d work with Ubi (since there’s more flexibility with Ubi) but I followed: https://github.com/oskarpearson/mmeowlink/wiki/Prepare-Edison-for-OpenAPS-with-Yocto#install-other-dependencies
That fixed me right up.
Matt Pressnall
@logichammer
Jul 14 2016 23:08 UTC
Yup, running Ubi...thanks for the link! I will do some copying and pasting and cross fingers it works with Ubi!
Paul Dickens
@thebookins
Jul 14 2016 23:15 UTC
thanks @danamlewis , might start playing around with the Dalla Man model, see how it goes.
Dana Lewis
@danamlewis
Jul 14 2016 23:17 UTC
:+1:
Matt Pressnall
@logichammer
Jul 14 2016 23:26 UTC
@Spazholio , that looked like it worked! My only issue is that I want to make sure I am on the dev or AMA branch of oref0 and I don't see an oref0 dir (or a src dir for that matter) where I would expect it.
edison@rey:~/openaps$ ls
bin                     mmeowlink-source       README.md
circle.yml              openaps                setup.py
CONTRIBUTING.md         openaps-contrib        setuptools-19.7
importlib-1.0.3         openaps.egg-info       setuptools-19.7.tar.gz
importlib-1.0.3.tar.gz  pip-8.0.2              tests
LICENSE.txt             pip-8.0.2.tar.gz       wercker.yml
Makefile                pyserial-3.0.1
MANIFEST.in             pyserial-3.0.1.tar.gz
Any ideas as where I could mess wit h that?
Paul Martin
@Spazholio
Jul 14 2016 23:28 UTC
sudo npm install -g git://github.com/openaps/oref0.git'#dev'
Matt Pressnall
@logichammer
Jul 14 2016 23:31 UTC
sweet! Did the trick...looks like I can run that command with the branch I want and it will overwrite everything...I little different than what I am used to be will definitely work! Thanks so much...and now time to play with this micro computer!
@danamlewis / @scottleibrand / @oskarpearson, I can make documentation updates for Edison folks...any thought as to what documentation / branch it should go under?
Scott Leibrand
@scottleibrand
Jul 14 2016 23:35 UTC
there are a few links to the mmeowlink wiki where all that is documented
probably don't want to duplicate documentation, just make sure it's linked in the logical places
Matt Pressnall
@logichammer
Jul 14 2016 23:39 UTC
Gotcha...will go through @oskarpearson's stuff and see if I missed (or mention where I would expect to find it) / document anything I couldn't find...thanks!
Dana Lewis
@danamlewis
Jul 14 2016 23:42 UTC
Yup, stick it in the wiki!
And we should talk about if it’s time to make Pi/TI part of the standard flow of mainstream docs
Last time I asked, the consensus was no, but we’ve had a half dozen people navigate it successfully without the docs being integrated, so might be worth considering making that path more clear in the mainstream docs...
danamlewis @danamlewis opens the discussion, then goes back to work
Hannah Crabtree
@lollydaggle
Jul 14 2016 23:52 UTC
Id like to see a "transition from Carelink to TI" section cause I want to go the TI route once I get the basic rig set up with the Carelink
Also want to find someone in the DC area with a CC debugger :)
Matt Pressnall
@logichammer
Jul 14 2016 23:53 UTC
I'd agree with you, @danamlewis , that it should be clear that there are better options out there other than the Carelink...just looked through master and there is no real reference to the TI or the fact it buys you RANGE! We should add something....like the idea of a transition from Carelink...as most folks start as simple as possible.
Dana Lewis
@danamlewis
Jul 14 2016 23:54 UTC
I think a ‘transition’ way of incorporating it would be sensible
phase 6, eh?
Matt Pressnall
@logichammer
Jul 14 2016 23:55 UTC
Makes sense to me...I can take a stab at it, if you want...Pull latest dev docs?
Dana Lewis
@danamlewis
Jul 14 2016 23:55 UTC
master
Matt Pressnall
@logichammer
Jul 14 2016 23:56 UTC
gotcha
Dana Lewis
@danamlewis
Jul 14 2016 23:56 UTC
and that would be great! thx
Matt Pressnall
@logichammer
Jul 14 2016 23:56 UTC
you bet!
New / last question of the day: best code / documentation to look at to connect to dexcom over BLE from the edison?
Dana Lewis
@danamlewis
Jul 14 2016 23:59 UTC
@mhaeberli yes, we switched a few weeks (months) ago to just PRing to master