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

2nd
Sep 2016
japrobo
@japrobo
Sep 02 2016 00:15
@garykidd I agree, looks like a typo
@garykidd did you figure out the part you were stuck on last night when I went to bed?
Sebastien Lussier
@SebastienLussier
Sep 02 2016 00:40
Hi everyone! My son has T1D since about two years ago... Got his first pump in May of this year. At the time we weren't aware of OpenAPS so we went with the Animas Ping.
Now, Marius did a great job with PingRF, so there is still hope for us :)
We don't have a CGM yet, we are meeting with the doc at the end of the month and i'm confident we will be able to get one...
In the meantime, i'd like to dig a bit and look into how i could add support in OpenAPS for the Ping and its lack of remote temp basal rate...
I know it goes against the first design constraint of OpenAPS, but i'm willing to put the efforts needed to make it safe.
So if anyone could gives me pointers on where to start, it would be greatly appreciated :)
garykidd
@garykidd
Sep 02 2016 00:47
@japrobo I will make PR then.
and I didnt really figure out my issue from last night..thanks for inquiring...but in consultation with @scottleibrand ---we figure it is an issue and not inconsistent with reports of others.....and as such...I opened #106.
japrobo
@japrobo
Sep 02 2016 01:02
@garykidd :clap:
@SebastienLussier I have no pointers but would love to help if you get something going. We have an Animas ping we put on the shelf in order to do OpenAPS
Sebastien Lussier
@SebastienLussier
Sep 02 2016 01:08
great !
however i don't think any work has been done on that... but i can be wrong
Paul Martin
@Spazholio
Sep 02 2016 01:54
I would love the ability to bolus remotely. I mean, if it’s just easier than dealing with the pump directly if I’ve already got my phone in hand or on my watch. Then again, I understand why anyone would be leery about that sort of functionality...
garykidd
@garykidd
Sep 02 2016 01:57
been awhile. following rtd instructions for "Making your first PR" Can't seem to find the rights section version to address my issue.....are these instructions out of date maybe?
can someone walk me through it if possible?
David
@davidkeddydb
Sep 02 2016 02:00
All set on pump-history. Running into an error on uploading. Can you look through the code and tell me what I goofed up? Thanks in advance:

openaps use ns shell status monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
<html><body>You are being <a href="https://heroku.com/api/v1/status.json">redirected</a>.</body></html>
^
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
<html><body>You are being <a href="https://heroku.com/api/v1/status.json">redirected</a>.</body></html>
^
No JSON object could be decoded

<html><body>You are being <a href="https://heroku.com/api/v1/status.json">redirected</a>.</body></html>

Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 743, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1531, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 58, in run
reporter(output)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/init.py", line 33, in call
self.blob = self.serialize(data)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/init.py", line 31, in serialize
return self.method.serialize(render(data), self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 56, in prerender_json
return json.loads(data)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")

garykidd
@garykidd
Sep 02 2016 02:05
what do you need in monitor/pump-history.json read_history_data 1?
garykidd
@garykidd
Sep 02 2016 02:18
openaps report add monitor/pump-history.json JSON pump read_history_data 2 maybe something like that?
Eric Luhrs
@eluhrs
Sep 02 2016 02:21
@garykidd It is easy to move your config over to the Edison. Get in touch if I can help with v2.
garykidd
@garykidd
Sep 02 2016 02:27
@eluhrs thanks a lot--I appreciate it.
David
@davidkeddydb
Sep 02 2016 02:27
ok, so some of my screw up is that I put some of the files directly in the main directory rather than the openaps one. Is there an easy way to switch the files from the main into my openaps directory?
garykidd
@garykidd
Sep 02 2016 02:45
@davidkeddydb I wish I knew...actually wish I had known....cause I must've done that about half a dozen times. I'm thinking getting files over is easy--it's the tie to git that might be more of an issue.
or not issue but dont know how to address that myself
lmaguire
@lmaguire
Sep 02 2016 03:03
Hi there, would anybody be able to tell me what order exactly should I be doing my Nightscout steps? Should I be following the order in the walkthrough, or is there a different order? Sorry if this has been asked before!
garykidd
@garykidd
Sep 02 2016 03:04
@lmaguire I'm right there with you in walkthrough myself.
lmaguire
@lmaguire
Sep 02 2016 03:05
Ok, it's good to know that I'm not just slow on this! Have you had any success so far?
garykidd
@garykidd
Sep 02 2016 03:07
I'm basically re-engaging in the process. I was stuck for days because it appears there is an issue with invoking reports for oref0_glucose for G5...so I've reverted to iter_glucose. Well now I'm not sure if this is contributing to my latest issue/s.
lmaguire
@lmaguire
Sep 02 2016 03:09
Aaah okay that makes sense. I've been trying to start the Nightscout tools in openaps section, but right away I've run into problems. Hopefully it works out for you!
garykidd
@garykidd
Sep 02 2016 03:11
@lmaguire have you nightscout autoconfigure-device-crud <NIGHTSCOUT_HOST> <API_SECRET>
?
lmaguire
@lmaguire
Sep 02 2016 03:16
Yes, I have done that and it set up the process, which (from what I believe) is what's supposed to happen. But once I try to next command, the 'use ns shell get entries.json' command, I get an output that tells me that no json object could be decoded
garykidd
@garykidd
Sep 02 2016 03:30
and I guess you added and invoked all the underlying reports too right?
lmaguire
@lmaguire
Sep 02 2016 03:34
I believe so, yes, but just to make sure which of the underlying reports would that be?
garykidd
@garykidd
Sep 02 2016 03:37
will get to that bt=ut what happens if you ... openaps use ns shell get entries.json
lmaguire
@lmaguire
Sep 02 2016 03:40
when I do that it just outputs 'No json object could be decoded'
garykidd
@garykidd
Sep 02 2016 03:42
and the reports I was referring to were the settings/model.json and monitor/pump-history.json
what happens when you openaps use ns shell get status.json
lmaguire
@lmaguire
Sep 02 2016 03:47
from what I can see when I look in openaps.ini I have the monitor/pump-history.json, but I have model.json. I can't find any report named settings/model.json
When I tried, it just output 'No json object could be decoded again'
garykidd
@garykidd
Sep 02 2016 03:48
and you're absolutely sure that you have the correct API secret and that your host NS site is up and working fine?
also what happens when you cat monitor/pump-history.json
lmaguire
@lmaguire
Sep 02 2016 03:52
Yes I'm absolutely sure about both of those. And when I did that it said no such file or directory
garykidd
@garykidd
Sep 02 2016 03:55
and your API secret is yourplain API?
hmmm ...did you mean to say that you don't have the monitor/pump-history.json ?
lmaguire
@lmaguire
Sep 02 2016 03:59
Yes, it is. It may be. It showed that I had the monitor/pump-history.json report, but when I tried cat monitor/pump-history it showed that no such file or directory existed. There was no settings/model.json report at all when I looked in openaps.ini
garykidd
@garykidd
Sep 02 2016 04:00
I think the no settings/model.json is an issue actually.
how bout model.json?
lmaguire
@lmaguire
Sep 02 2016 04:01
Again it shows that the report exists but when I use cat model.json it tells me that no such file or directory exists
garykidd
@garykidd
Sep 02 2016 04:02
just curious if you can openaps report add settings/model.json JSON <your pump name> model
and then openaps report invoke settings/model.json
@eluhrs still working the soft implentation but curious if you can direct me to wiring details for edison with TI stick/ charger board etc.
lmaguire
@lmaguire
Sep 02 2016 04:08
it shows up with a list of reports and the -h screen
garykidd
@garykidd
Sep 02 2016 04:11
for former?
can you paste the input and the output?
lmaguire
@lmaguire
Sep 02 2016 04:14
openaps report add settings/model.json JSON LindseysPump
usage: openaps-report add report {base,text,stdout,JSON} LindseysPump
[-h] USAGE ...
openaps-report add report {base,text,stdout,JSON} LindseysPump: error: too few arguments
garykidd
@garykidd
Sep 02 2016 04:16
looks like you forgot model at the end
lmaguire
@lmaguire
Sep 02 2016 04:19
Ahh of course, thank you
openaps report add settings/model.json JSON LindseysPump 723
usage: openaps-report add report {base,text,stdout,JSON} LindseysPump
[-h] USAGE ...
openaps-report add report {base,text,stdout,JSON} LindseysPump: error: argument USAGE: invalid choice: '723' (choose from 'Session', 'bolus', 'config', 'filter_glucose_date', 'filter_isig_date', 'iter_glucose', 'iter_glucose_hours', 'iter_pump', 'iter_pump_hours', 'model', 'mytest', 'press_keys', 'read_basal_profile_A', 'read_basal_profile_B', 'read_basal_profile_std', 'read_battery_status', 'read_bg_targets', 'read_carb_ratios', 'read_clock', 'read_current_glucose_pages', 'read_current_history_pages', 'read_glucose_data', 'read_history_data', 'read_insulin_sensitivies', 'read_insulin_sensitivities', 'read_selected_basal_profile', 'read_settings', 'read_status', 'read_temp_basal', 'reservoir', 'resume_pump', 'scan', 'set_clock', 'set_temp_basal', 'settings', 'status', 'suspend_pump', 'test_oref0_compat_menu')
garykidd
@garykidd
Sep 02 2016 04:19
nope you need the actual word model
and not 723
lmaguire
@lmaguire
Sep 02 2016 04:22
Oh ok there we go it works now thank you!
This shows up when I invoke the report: openaps report invoke settings/model.json
LindseysPump://JSON/model/settings/model.json
garykidd
@garykidd
Sep 02 2016 04:23
I actually, unfortunately, don't think this is your issue exactly
and if you invoke it openaps report invoke settings/model.json
lmaguire
@lmaguire
Sep 02 2016 04:27
If I invoke it, it shows up with: LindseysPump://JSON/model/settings/model.json
Also, it says 'reporting settings/model.json'
garykidd
@garykidd
Sep 02 2016 04:29
right so it should say "723" if you cat settings/model.json
lmaguire
@lmaguire
Sep 02 2016 04:31
Alright, that worked
garykidd
@garykidd
Sep 02 2016 04:32
maybe try to openaps device remove ns
lmaguire
@lmaguire
Sep 02 2016 04:35
ok, i did that. should I try the whole thing again? adding ns and getting entries.json?
garykidd
@garykidd
Sep 02 2016 04:35
I think so, yes.
nightscout autoconfigure-device-crud <YOUR NS HOST WEBSITE ADDRESS> <YOUR PLAIN API SECRET...NOT HASHED>
are you using azurewebsites.net?
lmaguire
@lmaguire
Sep 02 2016 04:40
yes I am using azurewebsites. This may be a silly question, but when I put azurewebsites, should I include .net?
garykidd
@garykidd
Sep 02 2016 04:42
No, not silly; Yes, include.
https://<XXXXXXXXXX>.azurewebsites.net and <PLAIN API>
let me know what that does.
lmaguire
@lmaguire
Sep 02 2016 04:47
ok perfect it added the process
garykidd
@garykidd
Sep 02 2016 04:48
now try openaps use ns shell get entries.json
lmaguire
@lmaguire
Sep 02 2016 04:50
ok thank you so much! This is where it went wrong last time and it worked. It's showing the direction and the trend
I cannot thank you enough for your time!
garykidd
@garykidd
Sep 02 2016 04:53
I am happy I was able to help you...really. You're halfway there...now you just need to figure out getting info to NS (as opposed to from). And now I am no longer a half a step ahead of you--that's what I am working on.
Brandon Faloona
@bfaloona
Sep 02 2016 04:53
:+1: Yay!
garykidd
@garykidd
Sep 02 2016 04:54
Are you US...west coast maybe?
Let me know how you progress. I'm hitting the hay.
Rest easy guys.
Brandon Faloona
@bfaloona
Sep 02 2016 04:56
goodnight!
lmaguire
@lmaguire
Sep 02 2016 04:56
Yes, I'm in California. Goodnight and thanks again!
Brandon Faloona
@bfaloona
Sep 02 2016 04:57
Seattle
nightscout-openaps-trend-lines.png
Brandon Faloona
@bfaloona
Sep 02 2016 05:02
First time seeing these purple OpenAPS BG forecasts tonight.
Where is the data the backs these up? Or are they calculated on the NS server?
Dana Lewis
@danamlewis
Sep 02 2016 05:02
:+1: purple lines for the win! :)
Brandon Faloona
@bfaloona
Sep 02 2016 05:05
Are there multiple lines because multiple forecasts have been made? Different algorithms, or... ?
Very useful to visualize the impact over time like this.
Scott Leibrand
@scottleibrand
Sep 02 2016 05:29
Those are the IOB, COB, and aCOB arrays in the suggested.json and enacted.json
IOB (bottom one) is with no more carb absorption. aCOB (top one usually) is 10 mg/dL/5m absorption. COB (usually middle) is current rate of observed carb absorption, gradually tailing off as all carbs are absorbed.
Something is not quite right with yours: they shouldn't have an sharp corners like that.
Dana Lewis
@danamlewis
Sep 02 2016 05:34
Do you have AMA @bfaloona ?
Brandon Faloona
@bfaloona
Sep 02 2016 05:35
How can I check?
Dana Lewis
@danamlewis
Sep 02 2016 05:37
You'd know if you had enabled it so probably not.
Brandon Faloona
@bfaloona
Sep 02 2016 05:51
I walked through this page https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-6/Configure-Automatic-Sensitivity-Mode.html?highlight=meal%20assist
and was able to verify auto-sens feature was configured and working, but I was unsure how to verify meal assist is working.
Dana Lewis
@danamlewis
Sep 02 2016 05:52
Are you entering carbs consistently at meals?
Brandon Faloona
@bfaloona
Sep 02 2016 05:52
Yes, via bolus wizard.
Brandon Faloona
@bfaloona
Sep 02 2016 06:01
fyi... Here's the most recent pump loop log output: https://gist.github.com/bfaloona/31f603131e9ddf75a0d3e4e4f8156055
Matthias
@ceben80
Sep 02 2016 08:59
This message was deleted
Matthias
@ceben80
Sep 02 2016 12:28

@cjo20 Q regarding the EdisonVoltage

I'm using the 1000c Adafruit PowerBoost https://www.adafruit.com/products/2465
5 v is going into the Edison Breakout board

I am running the voltage shortcommand quite a long time but the voltage doesn't show any changes, always 100%

edison@ubilinux:~/myopenaps$ tail -f /var/log/messages | grep EdisonVoltage
Sep  2 13:30:01 ubilinux EdisonVoltage: 100% 4496mV
Sep  2 13:40:02 ubilinux EdisonVoltage: 100% 4496mV
Sep  2 13:50:01 ubilinux EdisonVoltage: 100% 4496mV
Sep  2 14:00:01 ubilinux EdisonVoltage: 100% 4496mV
Sep  2 14:10:01 ubilinux EdisonVoltage: 100% 4496mV
Sep  2 14:20:01 ubilinux EdisonVoltage: 100% 4496mV
Chris Oattes
@cjo20
Sep 02 2016 12:43
If you're passing in 5V, it will always show 100%
The Adafruit board boosts the battery voltage before passing it to the edison, the edison has no way of knowing what the voltage is the other side of the Adafruit board
@ceben80 ^
Matthias
@ceben80
Sep 02 2016 13:02
what charger are you using @cjo20 :question:
Chris Oattes
@cjo20
Sep 02 2016 13:07
I use the on-board one on the edison breakout
Dave Ewall
@daveewall
Sep 02 2016 13:12
Has there been any discussion or plans to change the carb ratios on the pump based on ISF? i.e. My usual ISF is 30 or so, and since I've been sick, it's around 20. My pump wizard still wants me to use the same carb ratios from when I put them in based on not being sick, which makes the predictions completely off. Maybe the calculation should be in the predictions, so it can give extra due to underdosing before it goes too high?
Dana Lewis
@danamlewis
Sep 02 2016 13:14
It won't change the base pump values, but auto sens will change things in calculations. Have you tried AMA and auto sens yet?
Dave Ewall
@daveewall
Sep 02 2016 13:16
I'm already on AMA and Auto-sens, which is where I'm getting the ISF numbers from. But it seems that it's not really helping when I'm sick. Maybe there's just more to it that it can't adjust for, I don't know. or maybe the auto-sens is averaging out too much over the non-eating times to wash out the resistivity during eating?
Chris Oattes
@cjo20
Sep 02 2016 13:19
When you are more resistant, it also adjusts your target down
Dana Lewis
@danamlewis
Sep 02 2016 13:20
It should be excluding meal time stuff from calculation..so if you're only resistant for meals (?) it probably won't do enough..
Keep in mind isf and I:c are two different things, also. Auto sens only recommends changing isf
Dave Ewall
@daveewall
Sep 02 2016 13:21
I'm only saying that I'm resistant during mealtimes because that's when it jumps up more than expected, which led me to the carb ratio thought... maybe I'm thinking about it wrong.
It seems to adjust me back to normal typically by the next meal.
Dana Lewis
@danamlewis
Sep 02 2016 13:22
There may be something else going on, but I have never found myself adjusting I:c when s
If you feel like sharing a NS screenshot we may be able to ID some options/get a better feel for what's happening
Dave Ewall
@daveewall
Sep 02 2016 13:23
So when you're sick, you bolus normally, and it tends to keep you somewhere near your normal range?
blob
Dana Lewis
@danamlewis
Sep 02 2016 13:24
Yea. Auto sens will kick in with target and basal adjustments for in between to keep things reasonable, even if I might run higher (say 140s) than when not sick
Dave Ewall
@daveewall
Sep 02 2016 13:24
For that same meal I had this morning when I'm not sick, it wouldn't have gone higher than 150 or so.
Chris Oattes
@cjo20
Sep 02 2016 13:25
Can you show a couple more hours before?
Dave Ewall
@daveewall
Sep 02 2016 13:25
The purple line has the opposite parabola down to about 130, but if yesterday is any indication, that won't happen.
blob
Chris Oattes
@cjo20
Sep 02 2016 13:27
How many carbs did you have at 3am?
Dave Ewall
@daveewall
Sep 02 2016 13:29
questionable, actually... I had a juice for correction (25g?), and probably too much because I saw nothing happening within 30 minutes. That I don't blame on anything by myself.
Chris Oattes
@cjo20
Sep 02 2016 13:29
And did you do a finger-prick befroe bolusing for the breakfast?
Dave Ewall
@daveewall
Sep 02 2016 13:29
No, I tend to trust it at this point, since it's been very accurate during this sensor run.
^^^ slacker ^^^
Chris Oattes
@cjo20
Sep 02 2016 13:29
It's not something that needs blame assigning really. Just trying to get a better idea of what caused the shape
Can you check that current reading against a blood tesT?
Dave Ewall
@daveewall
Sep 02 2016 13:30
np. I just did one now, and it's 9 points off of the sensor, which I'd say is pretty good.
243, it said.
Chris Oattes
@cjo20
Sep 02 2016 13:31
Do you ever get compression lows?
'lows'
Dave Ewall
@daveewall
Sep 02 2016 13:36
Ever? Yes, but not usually. I'm on an Enlite, if that makes a difference.
Dana Lewis
@danamlewis
Sep 02 2016 13:36
Another Q - are you pre bolusing or doing eating soon mode?
That might be an easier next step to try for the next meal
Dave Ewall
@daveewall
Sep 02 2016 13:37
I'm not. I'd like to, but never remember to.
Dana Lewis
@danamlewis
Sep 02 2016 13:37
You could also preprogram an eating soon temp target if you generally know what time you'll eat
Dave Ewall
@daveewall
Sep 02 2016 13:38
I'll give that a shot. I've also been afraid of bolusing for corrections, because whenever I do, there's already too much IOB, and I end up low.
Dana Lewis
@danamlewis
Sep 02 2016 13:38
(You can also do an eating soon or temp target to 80 to help drop you faster without having an extra correction that risks going low)
Dave Ewall
@daveewall
Sep 02 2016 13:38
I never did figure out the Temp Target thing. Isn't that in NS? I don't have any data from NS helping my loop, only reporting.
Dana Lewis
@danamlewis
Sep 02 2016 13:38
Yea. Temp target lower helps for that too - has been saving me from a lot of lows I'd otherwise get
Yea, you'd need to configure it. Or just change the targets on your pump, but that's a pain IMO so programming NS to do it is easier
Dave Ewall
@daveewall
Sep 02 2016 13:40
I'll try the eating soon mode and see how that goes. Thanks for the help, as always!
Dana Lewis
@danamlewis
Sep 02 2016 13:41
:+1:
Hope you feel bette soon, too!
Dave Ewall
@daveewall
Sep 02 2016 13:44
Thanks! It's been getting passed around in a circle from me to my wife to my child. Been a wonderful few weeks. :-)
Dana Lewis
@danamlewis
Sep 02 2016 13:45
Bleh :/
Scott Leibrand
@scottleibrand
Sep 02 2016 13:46
Sebastien Lussier
@SebastienLussier
Sep 02 2016 13:47
Hello @danamlewis & @scottleibrand ! You probably didn't see my question regarding the Animas Ping and OpenAPS, there's quite a bit of traffic here :)
I'd like to add support for the ping, but that requires supporting micro boluses
Dana Lewis
@danamlewis
Sep 02 2016 13:50
@SebastienLussier sorry for missing it! I think the answer was: we haven't done any work on a bolus based OpenAPS strategy, still not sure we will anytime soon because there's no way to send a temp basal to zero for safety if you start dropping.
Have you given any thought to that safety aspect of cancelling out the boluses?
Scott Leibrand
@scottleibrand
Sep 02 2016 13:51
Yeah, I think the main issue with the Ping isn't having to do microboluses, it's the complete inability for an APS to reduce insulin delivery.
So the only way around that (what @mariusae does) is to run a basal at / close to 0, and do microboluses to replace normal basal. That means any system failure will send you into DKA eventually, so monitoring becomes crucial.
Sebastien Lussier
@SebastienLussier
Sep 02 2016 13:52
Yeah you are right... i would at least like to have it working for the nights, where we could react if anything goes wrong
Scott Leibrand
@scottleibrand
Sep 02 2016 13:53
If you can do the safety engineering to absolutely 100% guarantee you'll know if anything happens to the loop and it stops delivering microboluses, you can take the PingAPS approach. But I wouldn't recommend that to anyone: much better to go with a temp basal based system that can simply fall back to normal basal delivery on failure.
Chris Oattes
@cjo20
Sep 02 2016 13:54
(offtopic, but @SebastienLussier, nice Mandelbrot)
Scott Leibrand
@scottleibrand
Sep 02 2016 13:54
Heh, yes. :+1:
Sebastien Lussier
@SebastienLussier
Sep 02 2016 13:55
Yes i've been reading about this for a while now... I would start with the nights and add the necessary safeguards until we are confident we can respond to any incident
Hehe thanks
My son is 9 yo and never gets really far without us being around yet :)
Dana Lewis
@danamlewis
Sep 02 2016 13:55
You might want to join the omniaps slack channel, there's a ping channel there where you could talk with Marius about that approach.
Scott Leibrand
@scottleibrand
Sep 02 2016 13:56
Nights are the scariest IMO, because by default everyone is asleep and not watching the loop.
Sebastien Lussier
@SebastienLussier
Sep 02 2016 13:57
Yes i've read that channel, @mariusae approch is great but he isn't using OpenAPS and all it's nice features :)
With some alarms I think it couldn't be as bad as our current nights
Reading about all your cool stories with closed loop makes me feel like we're living in the prehistoric age heh
Dana Lewis
@danamlewis
Sep 02 2016 14:00
If you want all the nice features :) will require a MdT pump..
Chris Oattes
@cjo20
Sep 02 2016 14:01
"The prehistoric age" or, what, 2014?
Sebastien Lussier
@SebastienLussier
Sep 02 2016 14:01
haha yeah, improvements have been huge in so little time
Scott Leibrand
@scottleibrand
Sep 02 2016 14:02
You could also look at what @pazaan is discussing for the 640G if/when they figure out how to do microboluses to it.
Dana Lewis
@danamlewis
Sep 02 2016 14:02
(But the ping won't have low glucose suspend like the 640)
Yeah, it would still require all the safety engineering of PingAPS.
Sebastien Lussier
@SebastienLussier
Sep 02 2016 14:04
Great, thanks for the link, i'll take a look at that
Brandon Faloona
@bfaloona
Sep 02 2016 15:53
How often should the autosens report be run to still be effective? Our Pi Zero takes a long time to run it.
David
@davidkeddydb
Sep 02 2016 17:02
This message was deleted
@garykidd I ended up using mv -r and that moved them from the home directory into my openaps directory. I have the pump talking and the dex talking with openaps-use but I still have something screwed up with pumphistory. I will try to post later with what error it is giving me. I am sure it is my lack of linux programming getting in the way.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:10
@bfaloona if you run it outside the pump-loop like in my setup, it can run every time pumphistory-24h refreshes and not slow down the main loop.
Mine runs it in the NS upload/download loop, so that just delays NS stuff a minute or two, NBD.
Paul Martin
@Spazholio
Sep 02 2016 17:22
So I have a new rig I’m building, one that’s got the Dexcom directly connected to the Edison. However, my time is always off on the data from the CGM. It thinks it’s June 19th. I’ve checked on the Dexcom and it’s accurate. Any ideas?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:22
Try the CGM read clock command.
And then pull the last glucose values and compare them to what the CGM is displaying.
Paul Martin
@Spazholio
Sep 02 2016 17:24
Unfamiliar with that one. Is it openaps use cgm ReadClockMode?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:25
Don't think so. The help is fairly explicit.
Inverse of the command to set CGM clock.
Paul Martin
@Spazholio
Sep 02 2016 17:26
None of the openaps use cgm commands appear to be working. And I don’t see anything else with “clock” in the help, other than the one I posted. =/
(edison) [testrig: ~/openaps] $ openaps use cgm ReadBatteryLevel
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/dexcom.py", line 74, in main
    return self.dexcom.ReadBatteryLevel( )
AttributeError: 'NoneType' object has no attribute 'ReadBatteryLevel'
(edison) [testrig: ~/openaps] $
Scott Leibrand
@scottleibrand
Sep 02 2016 17:26
Cable is borked?
Paul Martin
@Spazholio
Sep 02 2016 17:26
Hope not. It’s the only OTG one I have...
Scott Leibrand
@scottleibrand
Sep 02 2016 17:26
If iter_glucose doesn't work it might be.
Is it charging the Dex?
Paul Martin
@Spazholio
Sep 02 2016 17:27
And if it were truly wonked, wouldn’t I get NO data when attempting to pull glucose values? I’ll try that command...
No, it’s not. Which is kinda preferable - I don’t want it to charge it.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:27
You might have an old version of Dexcom reader or openaps.
Unless you manually disabled charging that indicates a cable problem.
Reseat and see if it charges?
Sailing out of St. Petersburg now, so may lose signal soon.
Russia has been better than Finland about offshore LTE though.
Paul Martin
@Spazholio
Sep 02 2016 17:31
What’s the quickest way to update Dexcom reader? Or to just update everything, for that matter?
I don’t have my notes handy...
Scott Leibrand
@scottleibrand
Sep 02 2016 17:31
There's that pip command to update openaps and dependencies...
Or quick-src.sh if you did that last time.
I'm on an iPhone on a boat, so... ;-)
Paul Martin
@Spazholio
Sep 02 2016 17:32
sudo pip install -U openaps openaps-contrib ?
Does that look right?
Brandon Faloona
@bfaloona
Sep 02 2016 17:32
@scottleibrand I just timed it at 10 minutes, so I'm going to put it in it's own loop in hopes that will prevent the kinda-frequent 'BG too old' state we're hitting.
pi@openaps-lp:~/openaps-lp3 $ time openaps report invoke settings/autosens.json
...

real    10m1.589s
user    4m16.990s
sys    0m3.830s
Paul Martin
@Spazholio
Sep 02 2016 17:32
And thank you for your nautically-based assistance. =)
Scott Leibrand
@scottleibrand
Sep 02 2016 17:33
@Spazholio that will get latest release, so sure, start with that.
There's a dev one too, but this stuff is all released I think.
@bfaloona good call
Brandon Faloona
@bfaloona
Sep 02 2016 17:34
By "It's own loop" what I really mean is: put get-ns-bg it its own loop, so it never gets delayed by autosens.
Paul Martin
@Spazholio
Sep 02 2016 17:34
Nope, still failed. And this cable is pretty much untested, and my first foray into actually using the OTG aspect of the Edison.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:35
Should have two of everything for process of elimination troubleshooting.
Or at least everything cheap. ;-)
Paul Martin
@Spazholio
Sep 02 2016 17:36
Ironically enough, this is the ONE cable I don’t have a backup for. Naturally. =)
I wonder if I can get openxshareble working in the next 15 mins? =)
Scott Leibrand
@scottleibrand
Sep 02 2016 17:38
Hah doubt it. NS not good enough?
Paul Martin
@Spazholio
Sep 02 2016 17:39
I’m gonna be in a place where I have zero internet coverage. Just for a few days.
The horror...
Is there a way to make sure that I have the OTG capabilities enabled? I don’t recall explicitly disabling them, but….
Scott Leibrand
@scottleibrand
Sep 02 2016 17:39
Which breakout board / base block?
Paul Martin
@Spazholio
Sep 02 2016 17:40
Intel breakout.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:40
That won't work.
Paul Martin
@Spazholio
Sep 02 2016 17:40
…you’re one helluva problem solver, dammit. =)
So there’s no way to wire a Dexcom to an Intel breakout board?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:40
Only sparkfun base block will power an OTG device from lipo
Paul Martin
@Spazholio
Sep 02 2016 17:41
The bitch of it is, now that you say that, I totally remember that. Grr.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:41
If you wire a 9v battery in you can.
Paul Martin
@Spazholio
Sep 02 2016 17:41
Well, at least now I have spare parts. =)
Scott Leibrand
@scottleibrand
Sep 02 2016 17:41
But I'd go to openxshareble at this point.
Paul Martin
@Spazholio
Sep 02 2016 17:42
I’m going to have to try that again. I had too many issues last time, but I think I may have gotten around them now that I can kill certain processes the way I want.
Mitchell Slep
@moomoobloo
Sep 02 2016 17:42
@scottleibrand you said you have a separate loop for auto-sens, do you do anything in you main loop to ensure that the auto-sens report is not stale?
Paul Martin
@Spazholio
Sep 02 2016 17:42
May just have to haul my Pi3 rig around. That one I KNOW I can wire in.
Scott Leibrand
@scottleibrand
Sep 02 2016 17:43
That's what we've been doing in Russia.
Pi2, but still.
Paul Martin
@Spazholio
Sep 02 2016 17:44
Stupid bulky camera case. =)
Mitchell Slep
@moomoobloo
Sep 02 2016 17:44
I've been wanting to split out auto-sens into a separate loop because getting pumphistory-24h.json is by far the most failure-prone step in my loop. Not sure what issues there are with running concurrent loops other than ensuring data is fresh.
Paul Martin
@Spazholio
Sep 02 2016 17:45
Also - Russia? I’ve been out of the loop. It’s been a while since I’ve gotten the chance to practice my Russian.
(it’s what I did in the AF)
Scott Leibrand
@scottleibrand
Sep 02 2016 17:45
@moomoobloo not in the main loop, no. If it's stale the ns-loop will run it again. If it can't run it defaults to regular sensitivity.
Brandon Faloona
@bfaloona
Sep 02 2016 17:45
With respect to making openaps easier for folks to use, I'd like to see a rigid framework or a flexible DSL to define and combine aliases. Right now openaps alias and bash handle this well, but it is difficult for those with little linux shell experience. Just curious if this idea has been explored. @bewest @scottleibrand @danamlewis
Scott Leibrand
@scottleibrand
Sep 02 2016 17:45
DSL?
Mitchell Slep
@moomoobloo
Sep 02 2016 17:46
domain specific language?
Brandon Faloona
@bfaloona
Sep 02 2016 17:46
yes
Scott Leibrand
@scottleibrand
Sep 02 2016 17:46
@Spazholio overnight cruise/ferry from Helsinki to St. Petersburg for a day there.
we're moving in the other direction: taking complex aliases like in refresh-loops and making them oref0 bash scripts.
We = @danamlewis @sulkaharo @jasoncalabrese
Brandon Faloona
@bfaloona
Sep 02 2016 17:48
Smarter bash scripts can be a way to make bash programming easier!
Scott Leibrand
@scottleibrand
Sep 02 2016 17:50
Certainly easier to merge changes in a real script than in a json file full of bash one liners. ;-)
And comment the code. ;-)
Mitchell Slep
@moomoobloo
Sep 02 2016 17:51
How about an API in something like python?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:52
@moomoobloo that sounds way outside my expertise.
And rather more complex than necessary.
Brandon Faloona
@bfaloona
Sep 02 2016 17:52

I'm mostly concerned with the basic logic tests:

  • did the last step succeed?
  • is the file there?
  • is the file old?

I just find it hard when those important bits are spread across a long alias definition.
And: clarity/simplicity/visibility are key goals for operating a medical device! no?

Scott Leibrand
@scottleibrand
Sep 02 2016 17:52
Totally agreed. As is "getting it working" ;-)
Need to move on from working to the rest of them now.
Paul Martin
@Spazholio
Sep 02 2016 17:53
"taking complex aliases like in refresh-loops and making them oref0 bash scripts” <— is there a gist or a specific branch where this is happening so I can take a look as well?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:53
Not yet. We just decided to do it, no code yet.
Mitchell Slep
@moomoobloo
Sep 02 2016 17:54
i guess it would be more of a doc change than a code change?
Scott Leibrand
@scottleibrand
Sep 02 2016 17:54
The refresh-loops and json-import branches of my openaps-sh are what I want to start with though.
Our thought is we can dramatically simplify setup with setup.sh scripts like that and redo the docs to focus on how to test and troubleshoot, vs assembly details.
Setting up a max-iob: 0 oref0 loop should be easy, and then people can focus on testing that before enabling anything more aggressive.
It's almost bedtime over here. Any other questions before I head below decks and lose signal?
This is a good discussion: happy to be having it now while I can still participate.
Scott Leibrand
@scottleibrand
Sep 02 2016 18:02
Ok, night all!
Brandon Faloona
@bfaloona
Sep 02 2016 18:09
@scottleibrand Depending on how you write the scripts, it would be easy to wrap them in a simple DSL. I can't advise if that's a great idea, but python might handle it nicely. Conversely, you might get most of the simplicity of a DSL with a few high level bash scripts.
Brandon Faloona
@bfaloona
Sep 02 2016 18:33

@moomoobloo Have you written any DSLs in python?

With the primary goal of making the loop/enact logic readable, a DSL could provide a simple organizational wrapper on the entire existing toolset. This could be an optional layer, but I'd prefer a high level abstraction be included by default. Either way works.

Speaking of understanding system functionality, I'm a big believer in the "ubiquitous language" aspect of domain driven design. We can create better software if we all agree on what we call things.

[carefully descends pile of soapboxes]

David
@davidkeddydb
Sep 02 2016 19:17
hello again, so I am plugging along and getting things from the pump and the cgm. now trying to invoke the openaps report. Getting this error:
$ openaps report invoke nightscout/openaps-status.json
ns://JSON/shell/nightscout/openaps-status.json
No JSON object could be decoded
Unknown request: monitor/clock.json
I added monitor/clock.json so what did I miss, I added: openaps report add monitor/clock.json JSON pump read_clock
What did I miss?
Brandon Faloona
@bfaloona
Sep 02 2016 19:18
what do you get when you run openaps report show --cli nightscout/openaps-status.json ??
David
@davidkeddydb
Sep 02 2016 19:20
@bfaloona I get: openaps use ns shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json
David
@davidkeddydb
Sep 02 2016 19:33
ok now when attempting pump-history I get the following: what have I messed up?: $ openaps report add pump-history.json JSON pump iter_pump
usage: openaps-report add report {base,text,stdout,JSON} pump iter_pump
[-h] count
openaps-report add report {base,text,stdout,JSON} pump iter_pump: error: too few arguments
garykidd
@garykidd
Sep 02 2016 23:05
must've deleted the wrong file when cleaning up but now neither openaps report show not openaps device show work? Any thoughts on what I can do to fix?
Also, is it possible to establish a separate openaps instance in a separate directory? or will only one set-up instance be possible on a a given rig?