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

2nd
May 2016
fallon225
@fallon225
May 02 2016 01:14
We're back :) William's rig did great at the robotic's world competition. He was in range most of the time (forgot to bolus once, I think that's the only time he went high into the red, and was high over night the night before playoffs.) He actually used more low candy this competition than at any previous competition thanks to actually being in range! Thanks! :) Of about 3,000 registered teams this year, his team finished in the top 80. (There are 8 fields at World's, and his team was 10th on one of the fields.) https://www.thebluealliance.com/team/2137 www.firstinspires.org - Being a robotics competition, a lot of people were impressed by his openaps :)
Yes, @jasoncalabrese and @Bender1061 , that was me and @inform880 :)
JaysonEwer
@JaysonEwer
May 02 2016 01:16
đź‘Ť
fallon225
@fallon225
May 02 2016 01:22
@jasoncalabrese we would definitely plaster the stickers all over our stuff. @danamlewis , William and I were very excited. I always say hi to other people with pumps, so the initial intro was normal for me. But then @Bender1061 said "open" something and I mentally lost it!
Dana Lewis
@danamlewis
May 02 2016 01:22
:) :)
fallon225
@fallon225
May 02 2016 01:26
Oh, and even more awesome, @Bender1061 's team is one of our team's favorite teams!
Jason Calabrese
@jasoncalabrese
May 02 2016 01:32
That's great
Iain
@iainct
May 02 2016 01:51
@xpucuto you're already helping me out, looking through your debugging of night-scout upload identified the final error, i had included a / at the end of my website... its working now! @bewest thank you so much for your efforts. I am soooo happy this is working so i can finally visualise my loop :-D
2016-05-02 01.49.01.png
Dana Lewis
@danamlewis
May 02 2016 01:51
woohoo!
Iain
@iainct
May 02 2016 01:52
now i can actually show off what is going on :-)
it does think its not enacted, when it has, but hey that's just details i can finally see it live without ssh! :-D
Dana Lewis
@danamlewis
May 02 2016 01:54
:) makes it a lot more useable
hoping some of the how-to’s Ben has been sharing & helping people with might also inspire someone who gets it working to PR some additions/edits to the docs so it’s easier for everyone else to get working, too :)
Iain
@iainct
May 02 2016 01:55
for sure, is there a work in progress on this part of the docs? i would like to contribute my case as a G5 user uploading from the pi
or should i just PR it?
Ben West
@bewest
May 02 2016 01:57
there's an off by one error, it will report what enacted previous attempt
rather than this attempt
Dana Lewis
@danamlewis
May 02 2016 01:58
would be good to improve it overall, and DEFINITELY include a section about G5 uploading from the pi successfully :)
Iain
@iainct
May 02 2016 01:59
happy to help :-)
Dana Lewis
@danamlewis
May 02 2016 01:59
awesome :)
Iain
@iainct
May 02 2016 02:07
@bewest how do I fix the off by one error?
Ben West
@bewest
May 02 2016 02:08
right now you just know about it :-)
if it gives you dose this time, it uploads it next time in 5 minutes
Iain
@iainct
May 02 2016 02:08
including zero temp?
Ben West
@bewest
May 02 2016 02:09
what's happening is we fetch some history
then we create new history items using set_temp_basal
then we take the history we got earlier and upload it
Iain
@iainct
May 02 2016 02:10
ah on the night-scout server?
Ben West
@bewest
May 02 2016 02:10
but the new history for set_temp_basal isn't in that batch yet
so next time we run, in 5 minutes
it will get the history again
the previous temp rate will be in there, and it will go to NS
set_temp_basal rate doesn't modify the history being uploaded to NS
Iain
@iainct
May 02 2016 02:10
should the not enacted go away after 2 uploads?
Ben West
@bewest
May 02 2016 02:11
right each round uploads what happened previously, basically
Iain
@iainct
May 02 2016 02:12
2016-05-02 02.12.35.png
hmm, just re-uploaded and enacted a temp rate of zero (i cancelled it just before) but still says not enacted (zoom in)...
am i missing something from a report?
pi@raspberrypi:~/slicaps/enact $ cat enacted.json 
{
  "requested": {
    "duration": 30, 
    "rate": 0, 
    "temp": "absolute"
  }, 
  "bg": 119, 
  "temp": "absolute", 
  "snoozeBG": 112, 
  "timestamp": "2016-05-01T20:11:24.444045", 
  "rate": 0.0, 
  "reason": "Meal assist: undefinedg, undefinedU, setting -2.334U/hr", 
  "eventualBG": 116, 
  "recieved": false, 
  "duration": 30, 
  "mealAssist": "On: 14%, 14%, Carbs: undefined Boluses: undefined Target: 130 Deviation: 25 BGI: -6.7", 
  "tick": "+3"
also the IOB isn't in the top right box, but it is in the info when i hang over the openAPS pill.
Jason Calabrese
@jasoncalabrese
May 02 2016 02:16
With the current NS the iob pill uses OpenAPS device status
Current NS dev
Iain
@iainct
May 02 2016 02:21
i just curl'ed the devicestatus.json from my website and the IOB data was there...
David Daniels
@ddaniels1
May 02 2016 02:22
We're going through the docs for configuring openaps and nightscout. We don't have a pump yet, but want to test out how to send pump data to nightscout. Is there a way to get a set of fake/test data to test the upload process?
Andrew Baugh
@baughaw
May 02 2016 03:18

@bewest is there anyway to utilize the new oref0_glucose with the medtronic cgm. I dont have a cgm device add in my openaps config so everytime I add

 openaps report add raw-cgm/raw-entries.json JSON cgm oref0_glucose

I get

openaps-report add: error: argument device: invalid choice: 'cgm'

Should I add a fake dexcom device just so I can utilize the tools?

Scott Leibrand
@scottleibrand
May 02 2016 03:39
I don't think oref0_glucose is the tool you want for medtronic cgm
there is an existing documented method for retrieving CGM data from the pump device, and it should already be formatted pretty much the way you want it, ready for units and tz treatment
Andrew Baugh
@baughaw
May 02 2016 03:43
can you give me a sample of what the json file should look like?
Scott Leibrand
@scottleibrand
May 02 2016 03:43
I don't have a medtronic CGM myself
paste one of your records and I might be able to see if it has any obvious stuff missing
Andrew Baugh
@baughaw
May 02 2016 03:44
darn. when I upload the glucose data it seems like it is successful.. But the entries.json is always blank
Scott Leibrand
@scottleibrand
May 02 2016 03:45
might need a date field renamed or something
Andrew Baugh
@baughaw
May 02 2016 03:45
ok, let me grab a file
Scott Leibrand
@scottleibrand
May 02 2016 03:45
not sure if anyone else is using openaps as an uploader for medtronic CGM. if so, they're probably in Europe, so you'lll have better luck asking earlier in the day
Andrew Baugh
@baughaw
May 02 2016 03:47
[
  {
    "name": "DataEnd",
    "date_type": "none",
    "_tell": 1,
    "packet_size": 0,
    "date": "2016-05-01T23:44:00",
    "op": "0x01"
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 2,
    "packet_size": 0,
    "date": "2016-05-01T23:39:00",
    "sgv": 144,
    "op": 122
  },
Scott Leibrand
@scottleibrand
May 02 2016 03:48
are you running that through the tz tool before uploading?
Andrew Baugh
@baughaw
May 02 2016 03:48
yep
Scott Leibrand
@scottleibrand
May 02 2016 03:49
ours looks like:
{
_id: "5726cdef10427da5c036e067",
sgv: 110,
date: 1462160824000,
dateString: "2016-05-02T03:47:04.000Z",
trend: 4,
direction: "Flat",
device: "share2",
type: "sgv"
},
try renaming date to dateString
Andrew Baugh
@baughaw
May 02 2016 03:50
ok, let me edit the file
Scott Leibrand
@scottleibrand
May 02 2016 03:51
openaps report add monitor/glucose.json JSON tz rezone --date display_time --date dateString raw-cgm/raw-entries.json
that might do the field renaming for you
if you change display_time to date
so: openaps report add monitor/glucose.json JSON tz rezone --date date --date dateString raw-cgm/raw-entries.json
Andrew Baugh
@baughaw
May 02 2016 03:52
ok, hang on
Andrew Baugh
@baughaw
May 02 2016 04:02
still shows date instead of dateString.. :(
Scott Leibrand
@scottleibrand
May 02 2016 04:02
ok, then you probably need to use the json tool to change it
Andrew Baugh
@baughaw
May 02 2016 04:03
ok
Scott Leibrand
@scottleibrand
May 02 2016 04:03
cat file | json -e "this.dateString = this.date" > file2
Andrew Baugh
@baughaw
May 02 2016 04:07
this look correct?
 cat  monitor/glucose.json | json -e "this.dateString = this.date">  monitor/glucose2.json
yep it worked
let me try uploading now
Scott Leibrand
@scottleibrand
May 02 2016 04:08
:+1:
Andrew Baugh
@baughaw
May 02 2016 04:14
still no luck. It looks like it works but when I look at xxxx.azurewebsites.net/api/v1/entries.json it give me empty brackets
Scott Leibrand
@scottleibrand
May 02 2016 04:15
can you paste the zoned version after the field rename?
the one you're actually uploading?
Andrew Baugh
@baughaw
May 02 2016 04:17
[
  {
    "name": "DataEnd",
    "date_type": "none",
    "_tell": 1,
    "dateString": "2016-05-02T00:04:00",
    "packet_size": 0,
    "date": "2016-05-02T00:04:00",
    "op": "0x01"
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 2,
    "dateString": "2016-05-01T23:59:00",
    "packet_size": 0,
    "date": "2016-05-01T23:59:00",
    "sgv": 132,
    "op": 116
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 3,
    "dateString": "2016-05-01T23:54:00",
    "packet_size": 0,
    "date": "2016-05-01T23:54:00",
    "sgv": 134,
    "op": 117
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 4,
    "dateString": "2016-05-01T23:49:00",
    "packet_size": 0,
    "date": "2016-05-01T23:49:00",
    "sgv": 136,
    "op": 118
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 5,
    "dateString": "2016-05-01T23:44:00",
    "packet_size": 0,
    "date": "2016-05-01T23:44:00",
    "sgv": 140,
    "op": 120
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 6,
    "dateString": "2016-05-01T23:39:00",
    "packet_size": 0,
    "date": "2016-05-01T23:39:00",
    "sgv": 144,
    "op": 122
  }
Scott Leibrand
@scottleibrand
May 02 2016 04:17
that's not zoned
you need to run it through the tz tool
Andrew Baugh
@baughaw
May 02 2016 04:19
ok, let me try again
does my zoned definition look ok?
[report "monitor/glucose-zoned.json"]
use = rezone
reporter = JSON
date = timestamp dateString start_at end_at created_at
adjust = missing
input = monitor/glucose.json
device = tz
timezone = EDT
astimezone = True
Scott Leibrand
@scottleibrand
May 02 2016 04:24
my brain can't syntax-check ini's. give it a try and see if it works (adds timezones to all the date/dateString fields)
Andrew Baugh
@baughaw
May 02 2016 04:24
so i would see EDT at the end of the date string?
Scott Leibrand
@scottleibrand
May 02 2016 04:25
or -0400 or something
Andrew Baugh
@baughaw
May 02 2016 04:26
must be broken. My glucose-zoned looks like this
{
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 6,
    "packet_size": 0,
    "date": "2016-05-01T23:54:00",
    "sgv": 134,
    "op": 117
  }
thanks for your help. I will troubleshoot this issue and see what I can come up with
Scott Leibrand
@scottleibrand
May 02 2016 04:27
try this: openaps report add monitor/glucose-zoned.json JSON tz rezone --date display_time --date dateString monitor/glucose.json
Andrew Baugh
@baughaw
May 02 2016 04:27
ok
added, invoked and here is the output
 {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 6,
    "packet_size": 0,
    "date": "2016-05-01T23:54:00",
    "sgv": 134,
    "op": 117
  }
pi@raspberrypi:~/loopy $ openaps report add monitor/glucose-zoned.json JSON tz rezone --date display_time --date dateString monitor/glucose.json
added tz://JSON/rezone/monitor/glucose-zoned.json
pi@raspberrypi:~/loopy $ openaps report invoke monitor/glucose-zoned.json
tz://JSON/rezone/monitor/glucose-zoned.json
reporting monitor/glucose-zoned.json
pi@raspberrypi:~/loopy $ cat  monitor/glucose-zoned.json
[
  {
    "name": "DataEnd",
    "date_type": "none",
    "_tell": 1,
    "packet_size": 0,
    "date": "2016-05-02T00:19:00",
    "op": "0x01"
  },
Scott Leibrand
@scottleibrand
May 02 2016 04:30
hmm, not sure. no errors when running it?
nope. not sure. time for the @bewest bat signal
Andrew Baugh
@baughaw
May 02 2016 04:30
:D
i really appreciate your help
Ben West
@bewest
May 02 2016 06:10
the medtronic cgm needs some more work, relative to dexcom cgm, the data as you can see is quite different
I'd love to see thirty days or even 6 months of json data in a gist or similar
the date field needs to be renamed to dateString, many other things
Scott Leibrand
@scottleibrand
May 02 2016 06:15
@bewest @jasoncalabrese @TC2013 and others interested in using openxshareble: I think I finally got it set up and working offline to my satisfaction. ended up implementing a separate loop for retrieving CGM data, either from NS, or if the NS data is more than 5m old, from the CGM directly. all the gory details are at https://github.com/scottleibrand/openaps-sh/blob/cgm-loop/setup.sh if you want to see how I did it. will definitely want to clean that up at some point, maybe to look more like the dexcom daemon @bewest was talking about at one point.
Ben West
@bewest
May 02 2016 06:32
can you export the --json?
Scott Leibrand
@scottleibrand
May 02 2016 06:34
I could, but for which part(s)?
Ben West
@bewest
May 02 2016 06:34
def all reports
maybe aliases
Scott Leibrand
@scottleibrand
May 02 2016 06:35
what was that for loop to do it all?
Ben West
@bewest
May 02 2016 06:35
the for loop that does it all:
should probably save this as export somewhere
openaps import -l | grep -v trigger | grep -v schedule | while read type ; do openaps $type show --json ; done | json -g | tee complete-loop.json
something along those lines ;-)
trigger and schedule are only available if you have oacids installed
openaps use ns shell get entries.json 'count=100' | openaps use tz rezone --astimezone --date dateString - | openaps use tz lsgaps --date dateString --before now - | json -a prev current is super, fwiw
will spit out date selections that need gap sync
Scott Leibrand
@scottleibrand
May 02 2016 06:43
This message was deleted
so how would we sync data for those gaps?
Ben West
@bewest
May 02 2016 06:56
still thinking through that..., we do something similar already for treatments
diff --git a/bin/nightscout.sh b/bin/nightscout.sh
index f67a7cb..a931018 100755
--- a/bin/nightscout.sh
+++ b/bin/nightscout.sh
@@ -71,10 +71,17 @@ ns)
     ;;
     get)
     exec ns-get host $NIGHTSCOUT_HOST $*
+    exit 0
+    ;;
+    latest-entries-time)
+      PREVIOUS_TIME=$(ns-get host $NIGHTSCOUT_HOST entries.json 'find[type]=sgv'  | json 0
+      test -z "${PREVIOUS_TIME}" && echo -n 0 || echo $PREVIOUS_TIME | json -j dateString
+      exit 0
     ;;
     latest-treatment-time)
       PREVIOUS_TIME=$(ns-get host $NIGHTSCOUT_HOST treatments.json'?find[enteredBy]=/opena
it's similar to this
if NS is hosted locally this is not really expensive, so maybe make areports for above flow
the make a --gap argument for oref0_glucose or adopt above
Scott Leibrand
@scottleibrand
May 02 2016 06:58
kinda hard to run mongo on a rig, though, and not a great solution for multiple rigs
Ben West
@bewest
May 02 2016 06:58
json -f monitor/glucose.json | json -c "Date.parse(this.dateString) > Date.parse('2016-05-01T18:19:12-07:00')" works great
it's not that hard
I'm running on jessie and intel
it's particularly great for multiple rigs this way actually, especially if we can tweak things to use mqtt
Scott Leibrand
@scottleibrand
May 02 2016 06:59
wonder if you could set up a properly replicated DB cluster between rigs and a cloud NS instance
Ben West
@bewest
May 02 2016 06:59
or use mqtt
Scott Leibrand
@scottleibrand
May 02 2016 06:59
how would mqtt solve it?
Ben West
@bewest
May 02 2016 06:59
mqtt has notion of a broker counting who got which updates and re-sending
so when you reconnect, in theory broker sends you messages meant for you but missed
and it's tiny overhead, especially compared to http
it's literally $100's off my bills
Scott Leibrand
@scottleibrand
May 02 2016 07:00
also need to figure out what to do with SGVs from multiple receivers
Ben West
@bewest
May 02 2016 07:01
it's like binary websockets
Scott Leibrand
@scottleibrand
May 02 2016 07:01
the openxshareble receiver and the dexcom share one usually aren't calibrated exactly the same
Ben West
@bewest
May 02 2016 07:01
yeah, so lsgaps is really nice in that it can aggregate multiple sources
so you can feed lsgaps inputs from share, NS, and usb, and it'll generate correct gaps report
Scott Leibrand
@scottleibrand
May 02 2016 07:02
yeah, just don't upload if you already have something from the other source is one option
Ben West
@bewest
May 02 2016 07:02
so then trick is how to sync the gap from which source...
Scott Leibrand
@scottleibrand
May 02 2016 07:02
but then you have race conditions for who enters the most recent data
not sure how easy it'd be to make the NS share bridge check whether we already have a SGV and not add one if so
Ben West
@bewest
May 02 2016 07:03
well, it's same kind of logic as above
check date of this vs that
allow that if not this
Scott Leibrand
@scottleibrand
May 02 2016 07:04
or maybe it'd be better to upload all the data and then do some sort of deduplication before using it
Ben West
@bewest
May 02 2016 07:04
I've been thinking of tool similar to lsgap which would be slice
Scott Leibrand
@scottleibrand
May 02 2016 07:05
could have an API that presents a single SGV every 5m, and if there are multiple, does some sort of averaging
Ben West
@bewest
May 02 2016 07:05
so slice [--before 'lastmonth'] [--after now] <type> [gaps.json ...]
ah, that's a v2 endpoint
something like that
lsgaps takes multiple inputs
I did it with mixed sensor + egv records
across different timespans
called it with --before and --after, and it generated appropriate gaps
so assuming there's data on disk already to satisfy the gap
say from oref0_glucose 24
because of AMA...
then we just need a slice tool to get latest to send to NS
Scott Leibrand
@scottleibrand
May 02 2016 07:08
I'm usually less interested in backfilling historical gaps vs. making sure we use whichever data source has current data right now
Ben West
@bewest
May 02 2016 07:09
yeah, that's slightly different problem
that's at the other end of spear
lol
Scott Leibrand
@scottleibrand
May 02 2016 07:09
I already do "if NS is more than 5-6 minutes old, pull from CGM" logic
Ben West
@bewest
May 02 2016 07:09
for that I would look at extending one of the shell tools similar to nightscout setup
and taking as args names of known devices
Scott Leibrand
@scottleibrand
May 02 2016 07:10
would probably extend that to be something like "if NS is more than ~9m old, upload missing data"
Ben West
@bewest
May 02 2016 07:10
and creating a preflight there that tests availability of different devices
a select-cgm, select-pump tool
see what comes out of that
Scott Leibrand
@scottleibrand
May 02 2016 07:11
I found that we really want to avoid using openxshareble if we have current data from NS: it takes multiple minutes to get all the data over BLE sometimes
Ben West
@bewest
May 02 2016 07:11
you might find yourself writing reports about which devices to use, and meta scripts about how to use them
you're definitely pushing the design constraints... I'm focused on much simpler things ;)
Scott Leibrand
@scottleibrand
May 02 2016 07:13
the other interesting thing I've noticed is that once in awhile a USB-connected dexcom receiver will somehow cause dexcom_reader to hang indefinitely
Ben West
@bewest
May 02 2016 07:13
hmmm
on heartbeat?
oh, you probably don't know
Scott Leibrand
@scottleibrand
May 02 2016 07:13
so openaps use cgm iter_glucose never completes
and never times out
Ben West
@bewest
May 02 2016 07:13
I saw a bug on that I think
Scott Leibrand
@scottleibrand
May 02 2016 07:13
eventually my cron will kill openaps, but the next read will do the same thing
I usually unplug and replug the CGM to fix
Ben West
@bewest
May 02 2016 07:14
any evidence of the other fix-usb stuff happening around same time?
Scott Leibrand
@scottleibrand
May 02 2016 07:14
this rig never does reset-usb
or didn't. I may have actually added that as a workaround, can't recall
Ben West
@bewest
May 02 2016 07:14
well that's damning
lol
I had an issue last night where I bent a TI stick
Scott Leibrand
@scottleibrand
May 02 2016 07:15
some of my rigs have killall -g --older-than 7m && oref0-reset-usb
Ben West
@bewest
May 02 2016 07:15
I had to restart PC to get usb stack to respond properly for any device after
Scott Leibrand
@scottleibrand
May 02 2016 07:15
my mac will sometimes give me a "usb devices disabled" warning if USB shorts out
it recovers if you unplug them though
Ben West
@bewest
May 02 2016 07:16
I'm very interested in uses hanging
maybe openaps wrapper can enforce a timeout
Scott Leibrand
@scottleibrand
May 02 2016 07:17
my new logic will work around this one by always checking NS first, and only asking CGM when NS data is old. so if CGM read hangs, it will kill openaps and then be able to refresh data from NS
but I actually think the other fix (* * * * * killall -g --older-than 7m openaps && sudo oref0-reset-usb) will make that irrelevant
I know some people do a full reboot if things get hung
I had to do that on my sparkfun USB-TI rig, because its OTG hub cable is flaky
Ben West
@bewest
May 02 2016 07:19
what would you do if you could ping nearby openaps rigs as part of a preflight?
or verify via uses other openaps rigs are nearby, and what they are doing
Scott Leibrand
@scottleibrand
May 02 2016 07:19
I already have wait-for-silence working well...
Ben West
@bewest
May 02 2016 07:20
that's different
I mean literally what the other ones are doing
so the fact that there's another one literally fetching history specifically
and you could even pick up on the history and rest of the sequence
Scott Leibrand
@scottleibrand
May 02 2016 07:20
trying to think of anything I could do with inter-rig coordination that wouldn't add more complexity than it's worth
synchronization would be a big headache if we wanted to actually share data
Ben West
@bewest
May 02 2016 07:21
so you would just cancel/sleep
Scott Leibrand
@scottleibrand
May 02 2016 07:22
yeah, which is what I already do with wait-for-silence
I suppose if we reworked everything to have TTLs on each data type, we could sync it around between rigs to avoid extra refreshes
I could implement that today with rsync up to a central server and back down
Ben West
@bewest
May 02 2016 07:23
how can I get you hacking on the --json and templates stuff :-D
Scott Leibrand
@scottleibrand
May 02 2016 07:23
but I'm not sure it's worth the trouble of dealing with cache invalidation
Ben West
@bewest
May 02 2016 07:23
and also
how can I intro you to oacids
Scott Leibrand
@scottleibrand
May 02 2016 07:23
one of the things on my list is to start over building a new rig with templates
Ben West
@bewest
May 02 2016 07:24
recommend doing a blank one on your mac laptop for fun
Scott Leibrand
@scottleibrand
May 02 2016 07:24
I want to get to the point where we can spin up a read-only NS-uploader rig with a single script
Ben West
@bewest
May 02 2016 07:24
it leaves out a bunch of things, but does reduce complexity by maybe 70%
yeah, this should help
Scott Leibrand
@scottleibrand
May 02 2016 07:24
and have most of the plumbing in place for people to build full rigs on that foundation
Ben West
@bewest
May 02 2016 07:24
trick is need option for both batch and interactive tools
yeah, I hope you will find the raw-foo and tz and units stuff agreeable
look forward to any proposals/feedback
Scott Leibrand
@scottleibrand
May 02 2016 07:25
yeah, I think that's a good framework to use
Ben West
@bewest
May 02 2016 07:25
in last few days I've been updating all mine
and testing walkthroughs and stuff
there's definitely a huge complexity-burden relief
Scott Leibrand
@scottleibrand
May 02 2016 07:26
not sure where all this fits in priority-wise vs. working on getting dev released to master and AMA to dev
Ben West
@bewest
May 02 2016 07:26
this gap sync and multi-rig stuff is obviously very complex still
btw
you will love:
oref0 device-helper and oref0 alias-helper
eases the bash syntax for both by a lot
more like watch if you know how to feed complicated commands into that, it's same deal
many less \
Scott Leibrand
@scottleibrand
May 02 2016 07:28
definitely want to refactor and simplify a bunch of stuff when we templatize
Ben West
@bewest
May 02 2016 07:29
some of the templates assume you already haven tz, pump and other devices and vendors create
the vendor/device relationship is actually where most of the customization comes in
different people use different things
I need a large sample of MM CGM data to translate to NS
it's completely different
that's another aside
Ben West
@bewest
May 02 2016 07:43
v2 is supposed to be stuff you could do with v1, only optimized a bit
so find averages, or trends across time periods, deviations, gaps, etc
Hristina Dimova
@xpucuto
May 02 2016 10:48
@iainct :clap: im very happy for you :)
Andrew Baugh
@baughaw
May 02 2016 12:01
@bewest I would be happy to provide MM sensor data to you.
Hristina Dimova
@xpucuto
May 02 2016 12:13
@inform880 how did you fix your problem with PREFLIGHT FAIL ? I can not see the whole conversation .
Andrew Baugh
@baughaw
May 02 2016 13:15
I pulled the latest version of dev and auto-sens seems to have broken. Anyone have any thoughts?
Optional feature Auto Sensitivity not enabled:  [SyntaxError: Unexpected token E]
Hristina Dimova
@xpucuto
May 02 2016 13:35
Ignore mi previous comment i found the bug.
@bewest before adding the ti device i had to remove the pump device. This crashed somehow my loop. It was working all night long but today when i got out it stoped working and was giving preflight fail and it wasnt responding to device commands.
The solution i deleted my pump device from openaps.ini and added it as a new one ( but now for mmeowlink , as i dont know some of the variables in the add command) . so now everythings is working smoothly with my carelink stick and i am very proud with myself. :dancer: Ti stick is flashed but i will look further details about it in the other group cause i dont want to stay out of the loop again .
Andrew Baugh
@baughaw
May 02 2016 15:12
Fixed my issue. wasnt pulling enough history. thx
Dana Lewis
@danamlewis
May 02 2016 15:40
Nice work @xpucuto
@baughaw :+1:
Hristina Dimova
@xpucuto
May 02 2016 16:07
is there anyone using 3g modem stick as internet connection for the pi? Making hotspot from my phone kills the battery very fast.
i have Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)
live4sw
@live4sw
May 02 2016 16:07
Just had my first really annoying AAA alkaline battery experience - new battery died on day 2 after a set change during my morning commute. What do you guys use for lithium batteries, and is there anything special you do with them since they don't provide the low battery alerts?
Jason Calabrese
@jasoncalabrese
May 02 2016 16:19
there are NS warnings/alerts for battery level, the lithiums last about a week
Voltage levels drop steadily, so you can set a low voltage alarm in Nightscout for 1.39v and you know you have about 8-12 hours left.
I think a battery lasts around 11 days if running openaps 24x7
live4sw
@live4sw
May 02 2016 16:48
Thanks @TC2013 ! How do you set a voltage alarm? I have the voltage display when I mouseover pump on my site, just don't know how to set the alarm.
Toby Canning
@TC2013
May 02 2016 16:49
Use PUMP_WARN_BATT_V and set that equal to 1.39 or so
in your env vars
Also, for PUMP_FIELDS I have reservoir battery
That puts both of those values in a pill under the clock in NS
There are other values you can include, but let me find that link
live4sw
@live4sw
May 02 2016 16:56
Thanks very much - just added
Dana Lewis
@danamlewis
May 02 2016 18:57
::that would be good to add to the docs:: :)
live4sw
@live4sw
May 02 2016 19:03
Hi Dana, I'm happy to update that, where are the current docs btw? Is it still https://github.com/openaps/docs/ ?
Dana Lewis
@danamlewis
May 02 2016 19:05
that’s it! you’ll want to target dev.
Thinking that might be a good thing to add to “Advanced features” under phase 6? Or maybe add another page under phase 6 section?
live4sw
@live4sw
May 02 2016 19:17
Will do, just added to phase 6
Dana Lewis
@danamlewis
May 02 2016 19:17
:+1: looks good, merging!
Dana Lewis
@danamlewis
May 02 2016 19:23
just made a few additional adds to it as well, feel free to continue to add/tweak it with more PRs of course! https://github.com/openaps/docs/blob/dev/docs/docs/walkthrough/phase-6/advanced-features.md
thanks for getting that started :) @live4sw
those are the little things that are AWESOME to capture and get punted into the docs
benhamou
@benhamou
May 02 2016 19:41
hello does anyone has expierience in uploading pump values from the 712
benhamou
@benhamou
May 02 2016 19:43
Thank u dana I have all the static files, but now I want to upload to see them
openaps monitor-pump
openaps monitor-cgm
openaps report invoke monitor/iob.json
openaps report invoke enact/suggested.json
openaps use pump set_temp_basal enact/enacted.json
openaps enact
this all works so beautifully already
Ben West
@bewest
May 02 2016 19:46
openaps/docs#129 @benhamou
Dana Lewis
@danamlewis
May 02 2016 19:46
you said “uploading pump values”, you mean to Nightscout? or ?
benhamou
@benhamou
May 02 2016 19:49
yes
thanks to both of you, bewest my xdrip values are all uploaded to azurewebsite. Now I want to upload my pump values, but as mentioned in the table I sent you once, my pump cannot read most of the commands
ok read temp_basal works
Scott Leibrand
@scottleibrand
May 02 2016 19:55
your monitor-pump alias should pull pumphistory.json or similar. that is what gets uploaded as "treatments"
benhamou
@benhamou
May 02 2016 19:58
nightscout get
[
{
works beautifully
ok
pi@raspberrypi:~/my_openaps $ nightscout dedupe-treatments
Usage: ns-dedupe-treatments --find <NIGHTSCOUT_HOST> - No-op version, find out what delete would do.
ns-dedupe-treatments --list <NIGHTSCOUT_HOST> - list duplicate count per created_at
ns-dedupe-treatments delete <NIGHTSCOUT_HOST> - Delete duplicate entries from ht
Scott Leibrand
@scottleibrand
May 02 2016 20:01
no need for deduplication at this point
benhamou
@benhamou
May 02 2016 20:01
then he shows my azure page
ok
Scott Leibrand
@scottleibrand
May 02 2016 20:01
this stuff is in the docs
benhamou
@benhamou
May 02 2016 20:01
alrighty
the link Ben pasted above, openaps/docs#129, is a new and much simpler method for doing the same thing
benhamou
@benhamou
May 02 2016 20:05
as the other one i did before, he gets the values, but doesnt upload so far, i will try the a/m link from ben
```nightscout hash-api-secret
thats how I enter the values?
Ben West
@bewest
May 02 2016 20:47
any opinions on new use name? current candidates: cull, clip, select
the hash-api-secret tool allows you to verify that your config is correct
the nightscout autoconfigure-device-crud command will create an ns device
then you can use/report the ns device using format-recent-history-treatments and upload-non-empty-treatments, this replaces all the previous alias complexity
it does the same deduping steps, but inside the format-recent-history-treatments... it just knows how to do that
now working on similar tool, that selects elements from a timeseries given a "spec" (before/after dates)