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

6th
Feb 2016
Jim Matheson
@jmatheson
Feb 06 2016 00:59
How are folks managing git backups with multiple rigs?
Jason Calabrese
@jasoncalabrese
Feb 06 2016 01:03
I have each rig pushing to a different github repos
I keep all the SNs, urls, etc in ini's that are in .gitignore
but I think most people don't care about the history
JaysonEwer
@JaysonEwer
Feb 06 2016 01:04
Congrats, @mccgm!!
Jim Matheson
@jmatheson
Feb 06 2016 01:06
I am trying to figure out if i need different setups on the pi vs edison. so far the only changes will be related to if the carelink is plugged in or not. If not look for TI stick and plug away. then again i may never use a carelink again.
i only had one paid repo left, so i might have to venture out. i have mine in gitignore anyway, so no biggie.
eyim
@eyim
Feb 06 2016 01:09
I have different repos for each major step I take - carelink vs TI stick and rPi vs Edison. That way when i want to set up a new one, I can just pull down the right repo
Jason Calabrese
@jasoncalabrese
Feb 06 2016 01:19
my pi and edison openaps.inis are a little different, think it would make them too complicated to unify it within the ini
Jim Matheson
@jmatheson
Feb 06 2016 01:22
i might try one repo with two inis and a symbolic link
I use different branches on different rigs/checkouts
git can be used to sync history, so long as your git-reset thing doesn't hose it
for the ini handling, I just added this import/export tools to a dev branch last week
it's possible to import openaps config direct from json now
so no need to use openaps tools, per se, any tool that can print json can be used to create a config to import into openaps
Scott Leibrand
@scottleibrand
Feb 06 2016 03:26
Need to figure out how to move my setup script over to use that.
Jason Calabrese
@jasoncalabrese
Feb 06 2016 03:27
I was using different branches but repo got so big
Scott Leibrand
@scottleibrand
Feb 06 2016 03:27
Maybe make ns-uploader-setup.sh use that before we add it to @danamlewis' new docs.
Dana Lewis
@danamlewis
Feb 06 2016 03:28
:+1:
Dana Lewis
@danamlewis
Feb 06 2016 05:31
Ahhh. Just hacked a much easier way for people to get into the Omni APS channel (for discussion on Animas, Omnipod, etc.): http://bit.ly/1nTtccH
danamlewis @danamlewis goes to update openaps.org and all the OpenAPS docs
Sulka Haro
@sulkaharo
Feb 06 2016 08:56
Hey, trying to improve the rig for daily use. Our current combo is the Edison-based OpenAPS with ERF in a small package that's on the dude's belt (5 years, can't realistically carry more gear) and G4 Platinum plugged onto an Android in a bag that follows him through the day. This works pretty reliably but the phone + platinum receiver are pretty big and the battery life is not optimal given the Android is also an WiFI hotspot. I was wondering if it'd make sense to integrate an xDrip into the OpenAPS package so the Dex receiver is eliminated from the equation. This would allow something like the Melrose phone with an extended battery, which would be smaller than the current Samsung+Receiver combo but still have better battery life. I'd love to hear what everyone here is using as the daily rig - anyone spent time minimizing the rig for a kid?
Another requirement we have is, this is for daycare use, where the daycare staff is 100% non-technical. They have a Pebble that connects to the Android, which is awesome in that it has near zero chance of the user being able to mess up (shut down an app / needing know how to use Android menus).
Jason Calabrese
@jasoncalabrese
Feb 06 2016 09:07
I'm ok with the phone and a bag of d-supplies following him around, but would like to drop the g4 receiver and use a wixel
what I'd really like is a combination of the edison breakout board and the RL with a wixel
Jason Calabrese
@jasoncalabrese
Feb 06 2016 09:12
I think the xdrip+ style calibrations would work good too
then you don't need a ui
Sulka Haro
@sulkaharo
Feb 06 2016 10:01
xdrip+ ? auto-calibration?
My biggest deterrent against xDrip right now is, looks like the algorithm shows lower lows than Dex (as in, lower than real) for us, and dismissing the alarm is very complicated compared to the real receiver. The personnel in the daycare would accidentally quit the app OR SOMETHING every day if they had to use the xDrip menus, especially with the tiny Melrose screen
Sulka Haro
@sulkaharo
Feb 06 2016 10:07
Also the low alarm cannot be disabled; would need to do a custom build to disable it :(
JamOrHam
@jamorham
Feb 06 2016 10:59
@sulkaharo I think the unchangeable low alarm may already be disabled in master branch of xdrip experimental - there was a discussion about it recently, it definitely already is in my fork https://jamorham.github.io/#xdrip-plus
Sulka Haro
@sulkaharo
Feb 06 2016 11:04
Right, I don't think it's in the latest dev (installed that to have scrollable UI for Melrose). I'll check the Plus build out. :)
Peter Miller
@ochenmiller
Feb 06 2016 16:09
We've been using a wixel from the get go. I run a Dex receiver in parallel. I have two js scripts to derive calibration records. The first does a linear regression from mbg records. The second does a linear regression from raw vs dex receiver records. We run OpenAPS a little high (target 120) to leave margin in case there's been drift between calibrations. It's worked well so far.
But the loop is wixel, RPi Z, Carelink.
Jason Curry
@mccgm
Feb 06 2016 16:16
I'm trying to follow the docs and switch to the dev branch of NightScout, but everytime I try to fork, it switches back to master. What am I doing wrong?
Jim Matheson
@jmatheson
Feb 06 2016 16:19
in the drop downs make sure you have the base/head set correctly.
The easiest way of thinking about the branch range is this: the base branch is where you think changes should be applied, the head branch is what you would like to be applied.
so you want the head to be nightscout and the base you want to be your instance.
Jason Curry
@mccgm
Feb 06 2016 16:29
I'm not seeing "openaps" available on the plugin list. I have enabled it on my azure site
Jim Matheson
@jmatheson
Feb 06 2016 16:30
did you get your dev branch updated?
Jason Curry
@mccgm
Feb 06 2016 16:32
dev.png
Jason Curry
@mccgm
Feb 06 2016 16:41
How do I see the head and base?
Jim Matheson
@jmatheson
Feb 06 2016 16:44
this is what you want
do a pull request and then merge it from that link
it says you are 35 commits behind. openaps is one of them, so it should work after you update
i will be back later
Jason Curry
@mccgm
Feb 06 2016 17:08
I have done that and I've enabled all the other plugins, but OpenAPS is not in my list
Thomas Emge
@ThomasEmge
Feb 06 2016 17:27
https://github.com/mccgm/cgm-remote-monitor#openaps-openaps here is the explanation of parameters
Thomas Emge
@ThomasEmge
Feb 06 2016 17:33
did you redeploy your website?
Jason Curry
@mccgm
Feb 06 2016 17:47
Yes, I did
Thomas Emge
@ThomasEmge
Feb 06 2016 17:54
hmm, then my only other suggestions would be to close your browser and reopen it in case it has cached the page
Jason Curry
@mccgm
Feb 06 2016 17:57
I have restarted my browser a couple times, I'll have to go through and verify everything again. Thanks for the help
And I've killed my nightscout
Thomas Emge
@ThomasEmge
Feb 06 2016 18:08
blob
can you double-check in your deployment panel that you see the dev branch mentioned
Jason Curry
@mccgm
Feb 06 2016 18:10
Untitled2.png
Thomas Emge
@ThomasEmge
Feb 06 2016 18:11
almost looks like you are not targeting the right branch
Jason Curry
@mccgm
Feb 06 2016 18:11
Untitled3.png
Thomas Emge
@ThomasEmge
Feb 06 2016 18:13
hmm, looks like mine
Jim Matheson
@jmatheson
Feb 06 2016 18:14
it looks like you’ve got dev updated now, so that is good.
i had this same issue, so trying to go back through and see what else i had to do.
go to your nightscout and go to settings, scroll to the bottom to make sure you are on the current version you think you deployed. while you are in there see if you see the openaps tick box or not and if it’s there maybe you just need to tick it.
Thomas Emge
@ThomasEmge
Feb 06 2016 18:19
@mccgm just wondering why @jasoncalabrese is listed as your deployment author as opposed to yourself
Jason Curry
@mccgm
Feb 06 2016 18:21
Not sure about that. Openaps is not on my list of plugins and the head listed at the bottom looks like a hashed number
Milos Kozak
@MilosKozak
Feb 06 2016 18:22
it's last commit
Jason Curry
@mccgm
Feb 06 2016 18:24
yeah, they match up
Jim Matheson
@jmatheson
Feb 06 2016 18:25
did you add DEVICESTATUS_ADVANCED as true to your connection settings?
Jason Curry
@mccgm
Feb 06 2016 18:30
DEVICESTATUS_ADVANCED is set to true
Jim Matheson
@jmatheson
Feb 06 2016 18:32
did you clap twice, pat your head and rub your belly at the same time?
Jason Curry
@mccgm
Feb 06 2016 18:32
I'm ready to give it a shot!
Jim Matheson
@jmatheson
Feb 06 2016 18:32
was the status already set? if you just sent it remember to reboot, etc.
Jason Curry
@mccgm
Feb 06 2016 18:32
It must be something with how I did my merge or the head settings
Jim Matheson
@jmatheson
Feb 06 2016 18:33
i think your merge looks right
and if what you see in the interface matches that version it seems like azure has the right one.
did you reboot azure?
Jason Curry
@mccgm
Feb 06 2016 18:34
I redeployed. I assume a reboot is different
Jim Matheson
@jmatheson
Feb 06 2016 18:35
i think it’s the same.
thats what i meant
if you look at yoursite/api/v1/status.json is it listed for enable
openaps was added to the ENABLE env var?
Jason Curry
@mccgm
Feb 06 2016 18:38
Untitled4.png
Thomas Emge
@ThomasEmge
Feb 06 2016 18:46
When you open your settings panel on your NS website, what version do you see on the bottom of your panel?
Jason Curry
@mccgm
Feb 06 2016 18:47
0.8.4
Jim Matheson
@jmatheson
Feb 06 2016 18:48
thats the wrong one
https://YOURSITE.azurewebsites.net/api/v1/status.json - does it list enable there? assuming no with 0.8.4
you need to be on 0.9
8.4 is the master instead of dev
Jim Matheson
@jmatheson
Feb 06 2016 18:54
i think you go into your azure deployments and disconnect then reconnect it to your dev branch.
then hopefully it’ll work
Scott Leibrand
@scottleibrand
Feb 06 2016 18:59
:+1:
Ben West
@bewest
Feb 06 2016 19:00
lots of nice stuff there
the import/export stuff is really nice It hink
wanted to get that stuff out before I change things too much to include the daemon
right now there are 4 high level objects in openaps
vendors, devices, reports, aliases
for the daemon I need at least one more type, maybe two
Jason Curry
@mccgm
Feb 06 2016 19:03
OK, that's got to be it
Trying...
Jason Curry
@mccgm
Feb 06 2016 19:11
Got it. @jmatheson Thank you!
Jim Matheson
@jmatheson
Feb 06 2016 19:11
awesome
Dana Lewis
@danamlewis
Feb 06 2016 19:12
Woot. And kudos @jmatheson For continuing to pay it forward :)
Toby Canning
@TC2013
Feb 06 2016 19:15
I know I've seen people talk about setting up cron scripts to keep connected to wifi and switching to the preferred network. Are there instructions posted somewhere?
Jim Matheson
@jmatheson
Feb 06 2016 19:27
I think @jasoncalabrese is furthest along, but i don’t think he has it perfected yet.
Jim Matheson
@jmatheson
Feb 06 2016 19:33
i started by adding a priority line to each entry in the wpa_supplicant, which is a start. it switches to my hotspot when i leave the house. but not consistently switching back to the higher prioirty home wifi when both wifi are avail.
JaysonEwer
@JaysonEwer
Feb 06 2016 19:37
@jmatheson you rock! Way to hang in there @mccgm! @jmatheson helped me through that section too!! :-D
Jason Curry
@mccgm
Feb 06 2016 19:39
Such a big help. I'm not done yet, I'm still trying to sort out all the directories for the upload files and the alias. I'm getting errors on the line that reads [device "ns-upload"] extra - ns-upload.ini
Jason Curry
@mccgm
Feb 06 2016 20:11
[device "ns-upload"]
extra - ns-upload.ini
vendor =

[device "ns-status"]
fields = clock iob sugested enacted battery reservoir status
cmd = ns-status
vendor = openaps.vendors.process
args =

[report "monitor/upload-status.json"]
use = shell
device = ns-status
clock = monitor/clock-zoned.json
iob = iob.json
suggested = oref0.json
enacted = enact/enacted.json
battery = monitor/battery.json
reservoir = monitor/reservoir.json
status = monitor/status.json
reporter = JSON
The "extra" line in the ns-upload device seems to be throwing the whole thing off
Jim Matheson
@jmatheson
Feb 06 2016 20:14
the extra line should say extra = instead of extra -
i also have my vendor as vendor = openaps.vendors.process
Jason Curry
@mccgm
Feb 06 2016 20:15
OH, I thought so, but the DOCS say "-"
Scott Leibrand
@scottleibrand
Feb 06 2016 20:17
We need to get the docs away from specifying ini contents and provide openaps add commands instead.
JaysonEwer
@JaysonEwer
Feb 06 2016 20:18
@scottleibrand I didn't tag you on my TI source comment. I used Digi-Key. When I was putting my order together, I think they had 75 available about a week ago.
Scott Leibrand
@scottleibrand
Feb 06 2016 20:19
Thx. I ended up ordering from TI.
Ben West
@bewest
Feb 06 2016 20:21
or even do oref0-generate-config --std-reports | openaps import
shouldn't need to edit ini manually, ever, if you do please file issue :-)
Ali Mazaheri
@amazaheri
Feb 06 2016 20:25
nice @bewest :)
Ben West
@bewest
Feb 06 2016 20:25
that's a hypothetical suggestion
Ali Mazaheri
@amazaheri
Feb 06 2016 20:25
:)
Ben West
@bewest
Feb 06 2016 20:25
openaps import will import any correct json and create ini's correctly
Ali Mazaheri
@amazaheri
Feb 06 2016 20:26
moved on 10 on all my riggs
Ben West
@bewest
Feb 06 2016 20:32
also, support wise, all the show commands now support --ini and --json switches that will print the full config for the named thing
so if a specific report is wrong, the the openaps report show bad-report.json --json will print the full config, not just the brief one liner url
Scott Leibrand
@scottleibrand
Feb 06 2016 20:33
Awesome. :-)
Ben West
@bewest
Feb 06 2016 20:34
also means typos and things can be fixed using json and piping back to openaps import
openaps report show broken-report.json --json | json -e "this.broken_field = 'fixed-value';" | openaps import will edit just the one field
Scott Leibrand
@scottleibrand
Feb 06 2016 20:40
:+1:
Jason Curry
@mccgm
Feb 06 2016 21:21
pi@raspberrypi:~/ayeletssail $ openaps report invoke monitor/upload-status.json
ns-status://JSON/shell/monitor/upload-status.json

module.js:485
    throw err;
          ^
SyntaxError: /home/pi/ayeletssail/enact/suggested.json: Unexpected end of input
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:482:27)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
Jason Calabrese
@jasoncalabrese
Feb 06 2016 21:23
@TC2013 @jmatheson the cron I'm using to switch back to wifi is:
*/15 * * * * ( (wpa_cli status | grep $YOUR_HOME_NETWORK > /dev/null && echo already on $YOUR_HOME_NETWORK) || (wpa_cli scan > /dev/null && wpa_cli scan_results | egrep $YOUR_HOME_NETWORK > /dev/null && wpa_cli select_network $(wpa_cli list_networks | grep $YOUR_HOME_NETWORK | cut -f 1) && echo switched to $YOUR_HOME_NETWORK && sleep 15 && (for i in $(wpa_cli list_networks | grep DISABLED | cut -f 1); do wpa_cli enable_network $i > /dev/null; done) && echo and re-enabled other networks) ) 2>&1 | logger -t wifi-select
Jason Curry
@mccgm
Feb 06 2016 21:23
My upload-status is not able to grab from my suggested.json???
Jason Calabrese
@jasoncalabrese
Feb 06 2016 21:23
it works most of the time but not perfect
I took the edison rig on the cub scout hike today, some network issues at first, but then worked till almost the end
then got hung up, mmtune was getting stuck, when I got home I tried to figure it out, even rebooted, nothing was working, the fix was to pull the cable from the RL, somehow it got into a bad state, not sure why
Ben West
@bewest
Feb 06 2016 21:27
should try http://cockpit-project.org/, see if they allow controlling wifi rules
Jason Calabrese
@jasoncalabrese
Feb 06 2016 21:29
also sometime on the edison enacted.json is empty sometimes, I'm not even deleting, seems like something with the json -e to hack recieved
it's nice and small, but going to take some work to get it to be as reliable as the pi
Scott Leibrand
@scottleibrand
Feb 06 2016 21:38
I've seen the RL getting stuck when I try to have two commands use the RL at the same time
if you have anything using the RL outside of your main loop, that would trigger it
only less intrusive way to get the RL back is to halt the edison and then plug USB power back in to do a full powercycle of the RL
we should probably add something to mmeowlink to detect the port is in use, like we have in decocare
Jim Matheson
@jmatheson
Feb 06 2016 21:43
@mccgm what’s in your suggested.json
Toby Canning
@TC2013
Feb 06 2016 21:56
@jasoncalabrese That's totally awesome, thank you!!!
Jason Calabrese
@jasoncalabrese
Feb 06 2016 22:00
feels way too complicated, on the edison I need sudo for wpa_cli, not on the pi
Scott Leibrand
@scottleibrand
Feb 06 2016 22:01
did you give the edison user passwordless sudoers?
if not, sudo visudo and append edison ALL=(ALL) NOPASSWD: ALL at the end
these directions brought to you by the Bureau of Redundancy Department
Jason Calabrese
@jasoncalabrese
Feb 06 2016 22:08
yeah I have that
but there's something else different from the pi, since on the pi I don't need sudo for wpa_cli
Jason Calabrese
@jasoncalabrese
Feb 06 2016 22:16
can't get it work on the edison
Eric
@ecc1
Feb 06 2016 22:49
wpa_cli needs to write to /var/run/wpa_supplicant; are the permissions of that dir different on Edison vs. RPi? On my Debian laptop that dir is only accessible to root, so I also need sudo to run wpa_cli.
Jason Calabrese
@jasoncalabrese
Feb 06 2016 23:12
Thanks I'll check in a bit
Toby Canning
@TC2013
Feb 06 2016 23:19
So, I put together a repo that includes the script to switch to the home/primary network and another that re-establishes lost connections
https://github.com/TC2013/edison_wifi/blob/master/README.md
I will submit it to the OpenAPS docs later
Dana Lewis
@danamlewis
Feb 06 2016 23:21
:+1:
Jason Calabrese
@jasoncalabrese
Feb 06 2016 23:27
Nice