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

15th
Feb 2016
Ben West
@bewest
Feb 15 2016 00:11
been playing with being able to inspect/audit openaps in a more user-friendly way: https://gist.github.com/bewest/178ec0513c393ae315ac
Ali Mazaheri
@amazaheri
Feb 15 2016 03:29
:+1:
diabeticgonewild
@diabeticgonewild
Feb 15 2016 09:58

Any 3D printing tips would be appreciated! This is for OpenAPS!

I have access to a Hackerspace with 3D laser scanners and 3D printers (that can print both PLA and ABS plastic—I need ABS plastic in this particular case) and Solidworks CAD modeling software.

I am trying to print an all-in-one integrated case for carrying OpenAPS and the insulin pump, and if successful, I will provide files so others can use.

I am going to laser scan the Medtronic 522 and 722 pumps individually so I get proper curvature of the objects that I will be creating the case around.

So, 4 versions of cases will be made for the following minimalist OpenAPS configurations:

• Case for Medtronic 522 insulin pump and Intel Edison with mini breakout board, ERF antenna chip, and battery

• Case for Medtronic 522 insulin pump and Intel Edison with mini breakout board, RileyLink antenna chip, and battery

• Case for Medtronic 722 insulin pump and Intel Edison with mini breakout board, ERF antenna chip, and battery

• Case for Medtronic 722 insulin pump and Intel Edison with mini breakout board, RileyLink antenna chip, and battery

I am an electrical engineering student with very basic 3D modeling experience.

I found this article 5 mistakes to avoid when printing 3D models: https://i.materialise.com/blog/5-mistakes-to-avoid-when-designing-a-3d-model-for-3d-printing

I also have access to several books digitally via a library for people with print related disabilities (I have a visual impairment that does not affect sight) via Bookshare.org so I have several books I can reference and download.

But any tips and pointers would help!

diabeticgonewild
@diabeticgonewild
Feb 15 2016 10:05
Found a book: http://imgur.com/SXMtrmP
part of benefit of having our own daemon is we can provide progress updates to clients
what is it doing, what is it planning on doing?
Jason Calabrese
@jasoncalabrese
Feb 15 2016 10:41
that looks really nice @bewest
do you have an idea for how we'll do things like wait for bg when pulling from NS
Peter Miller
@ochenmiller
Feb 15 2016 17:05
@diabeticgonewild - a few thoughts, many of which I'm sure you're already considering for case. 1. Think about heat. Be sure that any component that might generate heat is well away from the insulin reservoir. 2. Battery charging and/or exchange. Perhaps a design where you swap out the battery could save the space of a charging unit. 3. A clip. It may be a good idea to consider commercially available clips that could be attached to your case rather than attempt to print one. 4. Room for a wixel!! My favorite item. With this, you could have a stand alone loop attached right to the pump!! 5. Antenna orientation. The RL or ERF antennas could be cut down considerably, and made to face the pump. While the Edison etc could/should face away.
Oh, and a power switch. Sometimes you just want to turn the thing off!
Peter Miller
@ochenmiller
Feb 15 2016 17:42
Another thought, think about connectors or any other items which could be removed from the edison, wixel, erf, etc. These can take up a lot of space inside an enclosure.
Aaron Michelson
@Aaybob
Feb 15 2016 18:11
HI all. Is openapscontrib.timezones matched by a second python keyword when one is doing the pump history? is it perhaps openapscontrib.mmhistorytools. I have a version of Visualisation.md. Is it the lates?
Aaron Michelson
@Aaybob
Feb 15 2016 18:15
that looks the same. there is no mention of python. so am I rigtht that instead of openapscontrib.clockzones I use openapscontrib.mmhistorytools?
I'm following these steps and modifying them to do the last step of visualization.
$ openaps vendor add openapscontrib.timezones
$ openaps device add tz timezones
$ git add tz.ini
$ openaps report add monitor/clock-zoned.json JSON tz clock monitor/clock.json
But what do I replace <timezones> with?
joannestevens
@joannestevens
Feb 15 2016 18:19
This message was deleted
Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:20
@Aaybob you need to install openapscontrib, but mmhistorytools is optional
mmhistorytools is designed for a local web app that runs on the pi/edison
Aaron Michelson
@Aaybob
Feb 15 2016 18:21

$ openaps vendor add openapscontrib.historical
No module named historical
openapscontrib.historical doesn't seem to be an importable python module
If it is a python module, try using --path to influence
PYTHONPATH

pi@raspberrypi:~/pancreas/First-commit $ openaps vendor add openapscontrib.mmhistorytools
No module named mmhistorytools
openapscontrib.mmhistorytools doesn't seem to be an importable python module
If it is a python module, try using --path to influence
PYTHONPATH

Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:22
did you install via source or packages?
Aaron Michelson
@Aaybob
Feb 15 2016 18:22
packages
Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:24
that should have got openapscontrib
Aaron Michelson
@Aaybob
Feb 15 2016 18:24
can I skip that step and start with openaps device add tz timezones
I got timezones working but I'm on pumphistory and trying to follow the same patern I used for timezones
Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:27
if you have the tz device and you should be good
Aaron Michelson
@Aaybob
Feb 15 2016 18:28
perhaps i just need this one line?
openaps report add monitor/clock-zoned.json JSON tz clock monitor/clock.json
modified for pumphistory
the document refers me to the five lines of code but maybe it means just the last line?
Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:29
and use bit and pieces from there
joannestevens
@joannestevens
Feb 15 2016 18:31

Evening all, I posted in the google group last night, you might all have to bear with me as I ask a number of stupid questions .. I'm not that tech savvy but I will learn quickly. Apologies in advance ...

The pi arrived (as a canakit) today so I have put all the bits together and started ... first question. The SD card has obviously come imaged. Do I have to reformat it when I know it has Jessie on it? or can I skip that step?

Jim Matheson
@jmatheson
Feb 15 2016 18:37
welcome @joannestevens, if you can veriy it has the version in the docs then you should be good to go without a reformat.
Jason Calabrese
@jasoncalabrese
Feb 15 2016 18:37
they don't usually come with jessie, but maybe it's a new kit
you can double check with cat /etc/os-release
after you login to the pi
Jim Matheson
@jmatheson
Feb 15 2016 19:29
trying to figure out what i am missing from my loop that is leaving me without visualisation in NS for basal adjustments that openaps is doing. I can see in NS the temps under the openaps pill but the blue line is not changing.
Ben West
@bewest
Feb 15 2016 19:57
need to enable basal
or is it basals
@jasoncalabrese yes, for "wait for bg", we need a few more features
1.) vendor devices wiil each have their own daemon, which will emit system events/signals on the bus when things happen
so there won't be a bash sleep/wait deal...
that feels hard to support to me
2.) there needs to be one more high level feature, signals, which allow routing signals from various things to various other things
maybe openaps signal add --from dexcom with-cgm --on NewGlucose do update-cgm or something
Ben West
@bewest
Feb 15 2016 20:04
haven't quite figured exactly how it will work yet
maybe something similar, run some process over stdin/stdout
have it echo events emitted, and read things to do
so we would end up writing our loop logic inside of something like this:
while read signal from details ; do
  case $signal in
     NewGlucose)
      echo "do fetch predict analyze"
      ;;
    esac
done
Ben West
@bewest
Feb 15 2016 20:10
but that's a few features away I think
Jim Matheson
@jmatheson
Feb 15 2016 20:15
@bewest i have basal enabled. it shows my standard rate, just has not been adjusting to the temp basal rates enacted.
i think i am missing something from my openaps.ini after doing some cleaning house
Ben West
@bewest
Feb 15 2016 20:16
ah, how is treatment data going into NS?
I run mine through mm-format-ns-treatments I think
several, tools I think
Jim Matheson
@jmatheson
Feb 15 2016 20:17
thanks for the tip. somehow my clock is wrong...
new edison i forgot to set the tz
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:12
I did that yesterday too
I used sudo dpkg-reconfigure tzdata
setting the envs editing files wasn't working right
was probably missing 1 thing
I like the idea of some devices having their own daemon was wondering how we'd be able to get a wixel hooked in
Ben West
@bewest
Feb 15 2016 21:17
same deal, wixel would be it's own daemon
I mean, we start with the uses
but once the uses are in place, it's relatively easy to have a daemonizing tool that can daemonize that device
was trying to explain to xdrip group
that thing really needs to support full runtime config
really can't be asking people to edit and recompile the code...
joannestevens
@joannestevens
Feb 15 2016 21:20
Second stupid question ... I have downloaded putty but I can't click on the screen to put the password in? Any tips?
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:21
did you see xdripOaps that @jstevensog setup?
Ben West
@bewest
Feb 15 2016 21:22
haven't kept up to date with his latest work
think it goes a long way towards that though :-D
yeah, that makes it suitable for openaps I think
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:22
it's setup for it be in promiscuous mode till it gets the SN
Ben West
@bewest
Feb 15 2016 21:22
also want to be able to ...
yeah
want to be able to offer menu/list of available SNs
turns out there's absolutely no need to type it...
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:23
and switch between them
Ben West
@bewest
Feb 15 2016 21:23
yeah, just slightly different uses
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:23
yeah
right now the weakest link in my system is receiver to xdrip
Ben West
@bewest
Feb 15 2016 21:24
yeah, will be really nice to eliminate most common setup error
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:24
have 3 rigs going so most of the house can talk to the pump
but phone doesn't cover all that area
Ben West
@bewest
Feb 15 2016 21:25
we can do similar trick with medtronic I think....
if we tell user "authorize meter 909090 in your pump..."
we can beacon as a meter, and read the serial from the ack?
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:25
that does an announce?
meter gets the pump SN?
Ben West
@bewest
Feb 15 2016 21:26
still have to put in serial, but it's reverse
I haven't confirmed, but I suspect the ack must contain the serial
dunno
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:29
just merged nightscout/cgm-remote-monitor#1515 to dev, if you're running openaps with NS you probably want to update, big perf improvements
Sulka Haro
@sulkaharo
Feb 15 2016 21:31
Yay
Jason Calabrese
@jasoncalabrese
Feb 15 2016 21:33
think this fixes several of the issues your treatment conversion handled openaps/oref0#73
Sulka Haro
@sulkaharo
Feb 15 2016 21:42
Cool. The performance gain in dev is really noticeable even on a laptop
joannestevens
@joannestevens
Feb 15 2016 21:49

curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -

Can someone please tell me what the symbol is after the .sh

Jim Matheson
@jmatheson
Feb 15 2016 21:59
@joannestevens that is a vertical bar (called pipe), location shift backslash on my mac
you will be learning lots of commands with pipe :)
joannestevens
@joannestevens
Feb 15 2016 22:02
@jmatheson ..... many thanks ....never heard of it .... :)
@jmatheson shift and backslash on my windows laptop too
Jim Matheson
@jmatheson
Feb 15 2016 22:05
figured, but was not positive.
Ben West
@bewest
Feb 15 2016 22:07
the pipe
Jim Matheson
@jmatheson
Feb 15 2016 22:09
@jasoncalabrese i just made a note at the end of the wiki to remind people to set their TZ up.
Ben West
@bewest
Feb 15 2016 22:14
nice
Aaron Michelson
@Aaybob
Feb 15 2016 22:28
if I am to make the report "latest-treatments.json" I would $openaps report add <dir>/latest-treatments.json JSON <pumpname> WHAT+GOES+HERE
John
@jstevensog
Feb 15 2016 22:28
All, feel free to ping me personally with any questions regarding xBridgeOaps. The protocols will diverge soon (planning some changes in xBridge2.1 to make configuring it from xDrip easy, but this isn't needed in xBridgeOaps), so I will document xBridgeOaps so it can stand alone. One thing to note, if you are connecting it via serial/uart rather than USB, it will go into a deeper sleep mode. Good thing is it will save more battery for your APS. No real downside, as all modes will stay asleep and not respond to comms while they are.
Aaron Michelson
@Aaybob
Feb 15 2016 22:45
I keep getting stuck on visualization...........now I'm stuck on the last "alias". I had made two directories visualize and visualization......the documentation started using "uploaded". I think I resolved that but I try the command nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > visualize/latest-treatments.json
but the visualize/latest-treatments.json does not exist
Jim Matheson
@jmatheson
Feb 15 2016 22:49
This message was deleted
Aaron Michelson
@Aaybob
Feb 15 2016 22:50
So do I have to add the report visualize/latest-treatments.json? and if so what is the command to use?
Jim Matheson
@jmatheson
Feb 15 2016 22:50
that code is saying run cull with those other files and then create the file visualize/latest-treatments.json with the output
that is what that greater than sign is doing
what error do you get when you run the command
when you run this nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time)
Aaron Michelson
@Aaybob
Feb 15 2016 22:56

$ nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time)
json: error: could not read "settings/model.json": Error: ENOENT, no such file or directory 'settings/model.json'

module.js:340
throw err;
^
Error: Cannot find module '/home/pi/pancreas/First-commit/visualize/pumphistory-zoned.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-normalize-temps.js:30:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
pi@raspberrypi:~/pancreas/First-commit $ ls settings
basal_profile.json insulin_sensitivities.json profile.json
bg_targets.json max_iob.json settings.json
pi@raspberrypi:~/pancreas/First-commit $ ls monitor
clock.json glucose.json iob.json pumphistory.json temp_basal.json upload-status.json
pi@raspberrypi:~/pancreas/First-commit $

Dragan Maksimovic
@dm61
Feb 15 2016 22:56
looks like you are missing model.json
Jim Matheson
@jmatheson
Feb 15 2016 22:57
yep
Jason Calabrese
@jasoncalabrese
Feb 15 2016 22:57
Maybe your saving model.json somewhere else?
Aaron Michelson
@Aaybob
Feb 15 2016 22:57
wasn't model.json just a blank file we make with nano?
Jim Matheson
@jmatheson
Feb 15 2016 22:57
it contains the model number of your pump
Dragan Maksimovic
@dm61
Feb 15 2016 22:58
like "522"
Aaron Michelson
@Aaybob
Feb 15 2016 22:58
I see it in my main repository directory
Jim Matheson
@jmatheson
Feb 15 2016 22:58
(side note, i am pulling model every loop which seems like a waste of cycles)
Dragan Maksimovic
@dm61
Feb 15 2016 22:58
minor waste probably
Jim Matheson
@jmatheson
Feb 15 2016 22:58
then your command should point to that one nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json $(openaps latest-ns-treatment-time)
without the directory in front of it. or when you create model.json put it in the directory your command was looking for it in
Dragan Maksimovic
@dm61
Feb 15 2016 22:59
yup
Aaron Michelson
@Aaybob
Feb 15 2016 22:59

$ nightscout cull-latest-openaps-treatments visualize/istory-zoned.json model.json $(openaps latest-ns-treatment-time)

module.js:340
throw err;
^
Error: Cannot find module '/home/pi/pancreas/First-commit/visualize/pumphistory-zoned.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-normalize-temps.js:30:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
p

Jim Matheson
@jmatheson
Feb 15 2016 22:59
@dm61 i feel like reading from the pump is super slow on the TI stick. so looking for areas to improve
Aaron Michelson
@Aaybob
Feb 15 2016 22:59
making progress thanks so far
Jim Matheson
@jmatheson
Feb 15 2016 23:00
see if you can figure out what this error is by going through the same process
Dragan Maksimovic
@dm61
Feb 15 2016 23:00
@jmatheson, I see; I am yet to try the TI stick
Aaron Michelson
@Aaybob
Feb 15 2016 23:01
I see that pumphistory-zoned.json is missing
Dragan Maksimovic
@dm61
Feb 15 2016 23:01
yes
Aaron Michelson
@Aaybob
Feb 15 2016 23:02
Invoked pumphistory-zoned.json and then the command got good results $ nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json $(openaps latest-ns-treatment-time)
[
{
"duration": "30",
"raw_duration": {
"_type": "TempBasalDuration",
"_description": "TempBasalDu
Jim Matheson
@jmatheson
Feb 15 2016 23:06
the command you are trying to get to run fully is looking for visualize/pumphistory-zoned.json
does that exist?
Aaron Michelson
@Aaybob
Feb 15 2016 23:07
Yes that one looks great. But I'm back to the same place of having no "latest-treatments.json"
Jim Matheson
@jmatheson
Feb 15 2016 23:07
go back and run your command that outputs the data to latest-treatments.json
Aaron Michelson
@Aaybob
Feb 15 2016 23:08
the one with > ? I did.
nightscout cull-latest-openaps-treat mentsvisualize/pumphistory-zoned.json model.json $(openaps latest-ns- treatment-time) > visualize/latest-treatments.json
It just exits with no error but no output
Jim Matheson
@jmatheson
Feb 15 2016 23:10
if that file does not exist then maybe the 3rd thing is having a problem
when you run openaps latest-ns-treatment-time what happens
Aaron Michelson
@Aaybob
Feb 15 2016 23:11
no error....return to command line in one second
maybe two seconds
Jim Matheson
@jmatheson
Feb 15 2016 23:11
does it return one line that is a date/time stamp?
Aaron Michelson
@Aaybob
Feb 15 2016 23:12
no nothing
Jim Matheson
@jmatheson
Feb 15 2016 23:12
ok, so that is not working
Dragan Maksimovic
@dm61
Feb 15 2016 23:13
how does your latest-ns-treatment-time alias look like?
Jim Matheson
@jmatheson
Feb 15 2016 23:13
latest-ns-treatment-time = ! bash -c "openaps use latest-treatments shell | json created_at"
so the next step is to try to run the part of the command before the pipe. so run openaps use latest-treatments shell
and see what happens
Aaron Michelson
@Aaybob
Feb 15 2016 23:13
Ugh,,,thats still in directory visualization which I was using by mistake for visualize
Jim Matheson
@jmatheson
Feb 15 2016 23:13
just keep drilling down until you find the root problem
ok, great. easy fix.
Aaron Michelson
@Aaybob
Feb 15 2016 23:29

Now I have all reference to the "ization" directory removed from aliases. But I get this error:
$ openaps upload-recent-treatments
cat: visualization/latest-treatments.json: No such file or directory
^CTraceback (most recent call last):
File "/usr/local/bin/openaps", line 4, in <module>

would it be looking for "ization" because of a previous command? Maybe when I ran the "tz" command?

but that was for pumphistory and clock
Jim Matheson
@jmatheson
Feb 15 2016 23:32
what does your upload-recent-treatments alias do
Aaron Michelson
@Aaybob
Feb 15 2016 23:34
there was the problem....that alias still referenced "ization"
Jim Matheson
@jmatheson
Feb 15 2016 23:35
just remember to "double click” down when you have issues. as you peel back the onions it gets easier to figure out what went wrong.
Aaron Michelson
@Aaybob
Feb 15 2016 23:37
I don't have mouse function on my development platform.
Jim Matheson
@jmatheson
Feb 15 2016 23:37
lol
Aaron Michelson
@Aaybob
Feb 15 2016 23:38
I may be missing the meaning
okay figuratively look in on functions....
well upload-recent-treatments is running now
woohoo, I jsut see a temp basal in the blue graph
Jim Matheson
@jmatheson
Feb 15 2016 23:41
nice
Dragan Maksimovic
@dm61
Feb 15 2016 23:42
@Aaybob , great! :+1:
Aaron Michelson
@Aaybob
Feb 15 2016 23:59
Looks like I got just one upload that showed a thirty minute temp basal of 1.1 two hours ago. My temp basal just set by OpenAPS to 2.4 but that doesn't show up on the graph. upload-recent-treatments responds with "No recent treatments to upload" is something wrong?