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

25th
Jan 2016
JaysonEwer
@JaysonEwer
Jan 25 2016 00:00
ok, see this is where I got confused. I started doing this using one set of documents and got very confused, then @dm61 sent me the link to his document. I was halfway through setting things up the first way and then started using the newer document.
I should probably remove that ns-upload.ini then, right?
Scott Leibrand
@scottleibrand
Jan 25 2016 00:00
don't remove the file
you can remove the device if you're not using it
do it all via openaps foo remove commands
JaysonEwer
@JaysonEwer
Jan 25 2016 00:01
right
Scott Leibrand
@scottleibrand
Jan 25 2016 00:01
what does your alias look like?
JaysonEwer
@JaysonEwer
Jan 25 2016 00:01
status-upload ! bash -c "openaps report invoke monitor/upload-status.json && ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json"
Scott Leibrand
@scottleibrand
Jan 25 2016 00:02
k
so run each of those manually, and then run them together (with the &&)
tazitoo
@tazitoo
Jan 25 2016 00:02
@mccgm - one other bit - what timezone is set for your pi? (Can try "cat /etc/timezone" to double check)
JaysonEwer
@JaysonEwer
Jan 25 2016 00:02
Which is what i've been doing, that's what the output I pasted above is.
Scott Leibrand
@scottleibrand
Jan 25 2016 00:03
yeah, just need to run the actual upload part
JaysonEwer
@JaysonEwer
Jan 25 2016 00:03
ok, let me try just running that alias then
Scott Leibrand
@scottleibrand
Jan 25 2016 00:04
you're trying to build your way up to testing the whole thing, by running each component individually, and stringing together working components, until you reproduce the problem
JaysonEwer
@JaysonEwer
Jan 25 2016 00:04
understood
JaysonEwer
@JaysonEwer
Jan 25 2016 00:09
So, there is an ns-status device, but the ns-upload is not a device, its just an openaps function, am I understanding that correctly?
Scott Leibrand
@scottleibrand
Jan 25 2016 00:10
an openaps alias, yes
it could be a device, but that's not how I've done it
JaysonEwer
@JaysonEwer
Jan 25 2016 00:12
status-upload is the alias, which calls/executes ns-upload, but I don't have ns-upload as an alias.
Let me just delete the ns-upload device and see if that's what's been causing problems all along. Thanks for your help, Sir!
Scott Leibrand
@scottleibrand
Jan 25 2016 00:17
if you can't run ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json from the command line and get that to work, none of your aliases or devices matter
JaysonEwer
@JaysonEwer
Jan 25 2016 00:18
right
I guess that's what I was asking, ns-upload is part of openaps, right?
Scott Leibrand
@scottleibrand
Jan 25 2016 00:19
no, it's part of oref0
JaysonEwer
@JaysonEwer
Jan 25 2016 00:19
ah
Scott Leibrand
@scottleibrand
Jan 25 2016 00:19
it's a standalone script
JaysonEwer
@JaysonEwer
Jan 25 2016 00:19
ok
how do I dig into that
Scott Leibrand
@scottleibrand
Jan 25 2016 00:20
which ns-upload will show you where it lives
JaysonEwer
@JaysonEwer
Jan 25 2016 00:20
k
pi@Ewer-Open-APS:~/Documents/openaps $ which ns-upload
/usr/local/bin/ns-upload
Scott Leibrand
@scottleibrand
Jan 25 2016 00:22
line 58 of that script is where the action starts
curl -m 30 -s -X POST --data-binary @- \
  -H "API-SECRET: $API_SECRET" \
  -H "content-type: application/json" \
  $REST_ENDPOINT
)
JaysonEwer
@JaysonEwer
Jan 25 2016 00:23
It looks like it requires an "entries.json" Does that sound right?
Scott Leibrand
@scottleibrand
Jan 25 2016 00:23
nope
that's one of the API endpoints
in your case, that's $NIGHTSCOUT_HOST/api/v1/devicestatus.json
since you're passing devicestatus.json as an argument to the script
tazitoo
@tazitoo
Jan 25 2016 00:25
@danamlewis - newbie git question - if I want to make changes to the docs, how do I 'git' the dev branch?
Scott Leibrand
@scottleibrand
Jan 25 2016 00:26
@JaysonEwer so if you want to, you can construct a curl to mimic what the script does
Dana Lewis
@danamlewis
Jan 25 2016 00:27
I use github web interface :) to make it easy, and just fork a copy of dev that way
Scott Leibrand
@scottleibrand
Jan 25 2016 00:27
you fork the entire repo. all the branches come along for the ride
tazitoo
@tazitoo
Jan 25 2016 00:30
thanks for the clarification - guess I was afraid of pressing the 'fork' button for some reason...
Dana Lewis
@danamlewis
Jan 25 2016 00:45
You will never break anything by forking, or submitting a PR, etc.
Very easy to reverse anything that gets done, or adjust as needed, so click away :)
tazitoo
@tazitoo
Jan 25 2016 00:50
click made :+1:
Dana Lewis
@danamlewis
Jan 25 2016 00:52
:+1:
JaysonEwer
@JaysonEwer
Jan 25 2016 01:12
@scottleibrand Or in my case, what the script doesn't do. ;-)
Aaron Michelson
@Aaybob
Jan 25 2016 04:58
this is funny...I was using a shorter cord for RPi2 to Dexcom receiver, put it all in my pockets, and ready to go out but it wasn't working because of the cord. but before i figured that out I reformatted the memory card, reinstalled raspberry, openaps dependencies, and followed along "setting up openaps" and read the report from the cgm and it was the same as before. then i realised. so I cloned my just done commit, rewrote a crontab and its back.
Jason Curry
@mccgm
Jan 25 2016 05:25
Suddenly, my pump does not communicate with Carlink stick. Any quick fixes? The stick is live. That I know.
Dana Lewis
@danamlewis
Jan 25 2016 05:26
Unplug, re plug. Also can do stick reset
Jason Curry
@mccgm
Jan 25 2016 05:47
mm-stick warmup shows the stick is good
Dana Lewis
@danamlewis
Jan 25 2016 05:48
Any thing change with regards to where your pump is located relative to the Carelink?
Jason Curry
@mccgm
Jan 25 2016 05:48
Pump and stick are within a foot of each other
Dana Lewis
@danamlewis
Jan 25 2016 05:49
Try moving it closer
Scott Leibrand
@scottleibrand
Jan 25 2016 05:56
Pump battery?
Does the light come on with a down arrow?
Aaron Michelson
@Aaybob
Jan 25 2016 06:02
is there an example for how to make a logfile more useful like piping it through a formater?
@mccgm what about taking the battery out of the pump and putting it back in and doing a reboot on RPi2
Scott Leibrand
@scottleibrand
Jan 25 2016 06:10
Don't do that.
Aaron Michelson
@Aaybob
Jan 25 2016 06:10
I make lots of mistakes
Scott Leibrand
@scottleibrand
Jan 25 2016 06:11
If you take the AAA battery out of the pump, you'd better have a replacement.
Because the pump won't boot again on anything but a brand new battery.
Rebooting the Pi is a good idea though.
The pump will shut off RF (and the backlight) when battery gets low.
Aaron Michelson
@Aaybob
Jan 25 2016 06:13
Well I'm on for my second night, the log file is going to be useless though
Scott Leibrand
@scottleibrand
Jan 25 2016 06:14
What are you writing to the log?
Aaron Michelson
@Aaybob
Jan 25 2016 06:15
oh it just gave me a temp basal... i wish i knew a program to read the log file and pull out .....ugh
Dragan1 at tudiabetes gave me his ps aux | grep -v | grep -q 'openaps' && echo OpenAPS already running || openaps loop 2>&1 | tee -a logfile
Scott Leibrand
@scottleibrand
Jan 25 2016 06:21
If there is stuff in your aliases you don't want logged, you can 2>/dev/null or >/dev/null it.
For example: openaps alias add wait-loop '! bash -c "openaps preflight && openaps gather && openaps enact && openaps report invoke monitor/temp_basal.json 2>/dev/null >/dev/null && openaps upload && openaps get-settings 2>/dev/null >/dev/null && openaps wait-for-bg && openaps enact && openaps upload-ns-status >/dev/null"'
openaps alias add loop '! bash -c "openaps preflight && openaps gather && openaps get-settings 2>/dev/null >/dev/null && openaps enact; openaps upload"'
Aaron Michelson
@Aaybob
Jan 25 2016 06:23
i don't want lines begining with "reporting" or lines begining with "<device>".... okay
Scott Leibrand
@scottleibrand
Jan 25 2016 06:25
Start by running the commands manually, and then doing the redirects. Once the right output is getting filtered from the manual ones, you can update the aliases the same way.
Aaron Michelson
@Aaybob
Jan 25 2016 06:25
sounds good
Thomas Emge
@ThomasEmge
Jan 25 2016 06:26
@danamlewis did you have success with connecting the dexcom share over BLE?
Dana Lewis
@danamlewis
Jan 25 2016 06:27
@ThomasEmge Not yet
Thomas Emge
@ThomasEmge
Jan 25 2016 06:33
@danamlewis I talked to Gary Scheiner last night and got a chance to show him my device. He has heard about OpenAPS but he had never seen one in action. He was impressed. :muscle:
Dana Lewis
@danamlewis
Jan 25 2016 06:34
Neat :)
Ben West
@bewest
Jan 25 2016 06:35
@kenstack ^^ ;-)
Jason Calabrese
@jasoncalabrese
Jan 25 2016 06:48
we need to find a way to do a cwd like install workshop
but doing all the steps
Scott Leibrand
@scottleibrand
Jan 25 2016 06:52
Would take all day, maybe two.
Dana Lewis
@danamlewis
Jan 25 2016 06:54
Hm. Not sure that would be ideal given all the learning curves will vary based on people's experience with various languages and tools...and given the need for people to learn what they're doing..
Jason Calabrese
@jasoncalabrese
Jan 25 2016 07:16
would have to be on cruse ship or something
Jim Matheson
@jmatheson
Jan 25 2016 07:16
so nobody would be tempted to walk out?
Jason Calabrese
@jasoncalabrese
Jan 25 2016 07:17
just that it would have to be a multiday thing, openaps bootcamp
Jim Matheson
@jmatheson
Jan 25 2016 07:17
(my humor is pretty dry)
Jason Calabrese
@jasoncalabrese
Jan 25 2016 07:17
but international waters would sound cool
Jim Matheson
@jmatheson
Jan 25 2016 07:18
true. i still have never been on a cruise.
as long as it is not like this https://www.youtube.com/watch?v=UMbg9V2m394
Jim Matheson
@jmatheson
Jan 25 2016 07:24
i do think some sort of bootcamp (live or video) would be great.
Ben West
@bewest
Jan 25 2016 07:50
wow that ship's engines must be out
Ben West
@bewest
Jan 25 2016 08:27
how about train?
trains have wifi :)
Ben West
@bewest
Jan 25 2016 09:42
does edison have a hardware clock?
hmm, because I swap pis around a lot, they are not always powered all the time
some of them can go days, or if I switch the SD card, the time is wrong
Ben West
@bewest
Jan 25 2016 09:48
should add ntpdate to the list of packages to be installed
Ben West
@bewest
Jan 25 2016 10:20
ok, that's a big check in the edison column
Sulka Haro
@sulkaharo
Jan 25 2016 10:41
Hey I'm having an issue with our Android phone turning off the hotspot in a seemingly random fashion. Samsung UI doesn't seem to expose the parameter to turn off the timeouts. Anyone else seem this?
John Males
@johnmales
Jan 25 2016 11:59
RTC in Edison - it has an input for a backup battery - could have a coin cell batery like a “real” pc and keep time.
Oskar Pearson
@oskarpearson
Jan 25 2016 13:43
@bewest You get little rtcs for the raspberry pi, btw
make sure you get one that's coin-battery-backed rather than capacitor-backed, otherwise the backup only lasts for a short time
Sulka Haro
@sulkaharo
Jan 25 2016 13:59
Yeah @oskarpearson / @scottleibrand I'm now using the units tool to convert the units in the json. Would prefer not to need to do that though as it makes the loop logic code more complex and all the added file IO just causes more battery drain / general unreliability.
Oskar Pearson
@oskarpearson
Jan 25 2016 14:00
I'm going to submit a pr to oref0 soon that fixes both
not sure it's worth updating the docs to add the conversion step if I'm going to do that?
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:02
@oskarpearson not more than maybe a note that its happening in the bg
Sulka Haro
@sulkaharo
Jan 25 2016 14:07
BTW I'm getting inconsistent results with wpa_supplicant. The Edison does randomly drop from wifi and doesn't handshake back cleanly. No idea how to fix "properly"; I suspect I'll have to write a script that does something like ping a site and stop/start wifi on fail.
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:08
Is it possible to read the Medtronic Enlite sensor without having a medtronic pump - using the Medtronic CareLink usb stick
Sulka Haro
@sulkaharo
Jan 25 2016 14:17
@danibjor not sure if that's possible with CareLink, but you can use mmcommander on a TI stick and https://github.com/arbox0/MedtronicUploader to listen to Enlite on Adroid and upload to Nightscout
I did that for 14 months
Sulka Haro
@sulkaharo
Jan 25 2016 14:22
Or rather - there's no existing solution to use CareLink to do that, but it could maybe be possible
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:23
@sulkaharo interesting
We have two 754 pumps that cannot receive commands from the USB stick, and one 715 pump witch dont have an option for sensor - so have to find a way around this mess
Paul Andrel
@stavlor
Jan 25 2016 14:24
@danibjor pretty sure that the only way a carelink stick can read enlite is through a pump not entirely sure on that though
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:25
I think its how it does it now, but maybe it could be possible to read the sensor
Or somehow downgrade the firmware on one of the 754 pumps to allow for sending commands to it
Sulka Haro
@sulkaharo
Jan 25 2016 14:26
The solution above just passively listens to the Enlite transmissions and uses calibrations you give to the software
It's not as good as the pump algorithm and Enlite by itself is terrible compared to Dexcom
So if you're considering between CGMs, I really, really recommend using a Dex. I'd never trust an Enlite to run a APS
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:27
Problem is we get the stuff on free medical care over here
you take what they give you - or you get nothing at all
Sulka Haro
@sulkaharo
Jan 25 2016 14:28
Having said that, based on talking to multiple people including an endo who's tried all CGMs herself, it looks like different people have different body chemistries. Enlite works for some people really well
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:29
The Enlite have good results compared to readings when we measure blood gluco
Sulka Haro
@sulkaharo
Jan 25 2016 14:29
Same here in Finland. We've been fighting the system and are getting results - we were the first to get continuous monitoring in our city in a long while and looks like we might get Dex sensors now as well
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:30
Its a big fight just to get the sensor - i can't imagine trying to get a custom brand that they dont have on the list in the first place
Sulka Haro
@sulkaharo
Jan 25 2016 14:30
The MedTronic uploader also hears the Contour Next Link transmissions and uploads those to Nightscout too -> very handy
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:30
true
Sulka Haro
@sulkaharo
Jan 25 2016 14:30
We have to get the Dex equipment ourselves, only sensors might be covered
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:31
but as it is now, we would have to use the 715 pump with insulin - and control that one. then use the 754 pump just to read the sensor
starting to become a lot of gadgets to carry around
:P
Sulka Haro
@sulkaharo
Jan 25 2016 14:31
For us though, Enlite only works around 4 days reliably. Dex is good for 2-3 weeks on one sensor. So even Dex sensors costing more, it ends up being much cheaper
Daniel Bjørnbakk
@danibjor
Jan 25 2016 14:31
good point. The Enline works reliable for 6-7 days here
Sulka Haro
@sulkaharo
Jan 25 2016 14:33
I recall @oskarpearson had in mind what'd need to happen for the ERF sticks to start supporting listening to the Enlite.
Chris Oattes
@cjo20
Jan 25 2016 14:49
most enlites are 6-7 days for me. I sometimes get to 14.
JaysonEwer
@JaysonEwer
Jan 25 2016 15:35

Ok, I'm ready to add oref0-reset-usb to my preflight. :-D I've gone ahead and done it, but i'm getting a "Permissions denied" I see that my oref0-reset-usb is located in the following location with the following permissions:

lrwxrwxrwx 1 root staff 48 Jan 11 23:25 oref0-reset-usb -> ../lib/node_modules/oref0/bin/oref0-reset-usb.sh

How have others fixed this in the past? Did you change the ownership of all the oref0 files to be pi?

Dragan Maksimovic
@dm61
Jan 25 2016 15:45
you need sudo in front of the oref-reset-usb
JaysonEwer
@JaysonEwer
Jan 25 2016 15:48
will that work on my preflight?
having sudo, that is?
Dragan Maksimovic
@dm61
Jan 25 2016 15:48
I have it in my preflight
JaysonEwer
@JaysonEwer
Jan 25 2016 15:49
ok, cool
thanks
Dragan Maksimovic
@dm61
Jan 25 2016 15:49
sudo gives you root-like permissions
JaysonEwer
@JaysonEwer
Jan 25 2016 15:49
BTW, i'm still STRUGGLING with the openaps plugin setup. :-/
yes, I'm aware of sudo's powers. :-D
Dragan Maksimovic
@dm61
Jan 25 2016 15:50
you mean nightscout?
JaysonEwer
@JaysonEwer
Jan 25 2016 15:56
I lost 12 pings when the 'oref0-reset-usb', I guess I'm not crazy about it resetting every USB device attached to the pi. :-/ I'm sure its not the end of the world, but am wondering if others have figured out a slightly more graceful recovery, aside from unplugging the carelink, to recover from the 'fail NO MEDTRONIC CARELINK STICK AVAILABLE' message? :-) Thanks for the assist, @dm61!
yes, nightscout
Dragan Maksimovic
@dm61
Jan 25 2016 15:59
oref0-reset-usb cycles power to all usb ports, so yes, you loose wi-fi for a short period of time. the reset should be used only when really needed. Unfortunately, it looks like it is impossible to power-cycle individual USB ports on most pi's
JaysonEwer
@JaysonEwer
Jan 25 2016 15:59
@dm61, i'm still working through your https://github.com/dm61/docs/blob/dev/docs/Automate-system/vizualization.md, but i'm not having any luck. Did you have to modify the ns-upload script?
Thank you, @dm61.
Dragan Maksimovic
@dm61
Jan 25 2016 16:01
I struggled through the ns setup a lot. I did make use of Scott's script, especially in the last part (upload treatments). However, as far as I remember now, it does not cover the status upload part
JaysonEwer
@JaysonEwer
Jan 25 2016 16:02
do you have scott's script in your document?
I think i've got all the pieces in place, but the following command does not appear to work:
ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json
Dragan Maksimovic
@dm61
Jan 25 2016 16:03
I have doubts about the very first command in my version of that section. Instead of executing the command, you may try to just edit your openaps.ini and enter the lines for ns-upload manually, and also in ns-upload.ini
I mean ns-status, sorry
JaysonEwer
@JaysonEwer
Jan 25 2016 16:04
Yeah, the first document I started to work through to get this going was guiding me to make manual changes to the openaps.ini, which i'm ok with, vi is my friend. :-D
Dragan Maksimovic
@dm61
Jan 25 2016 16:05
Try to that manually, see after the line The corresponding entry in your openaps.ini file should look like this: in the document
however, if you are generating monitor/upload-status.json already, this should not matter, ns-upload command should work
JaysonEwer
@JaysonEwer
Jan 25 2016 16:08
:-/ Yeah, that's what is very frustrating. I apparently have the hard part working :-D
when you do echo $API_SECRET, does your output include quotes?
Dragan Maksimovic
@dm61
Jan 25 2016 16:08
can you paste here the contents of your upload-status.json?
no it does not
JaysonEwer
@JaysonEwer
Jan 25 2016 16:11
IT WORKED!!!
Dragan Maksimovic
@dm61
Jan 25 2016 16:11
:+1:
JaysonEwer
@JaysonEwer
Jan 25 2016 16:11
I woke up this morning and realized that I was passing the quotes
Dragan Maksimovic
@dm61
Jan 25 2016 16:11
aha!
JaysonEwer
@JaysonEwer
Jan 25 2016 16:11
I removed them, but then was fighting with figuring out the best way to reset the usb
YES!!
Dragan Maksimovic
@dm61
Jan 25 2016 16:11
great, congratulations!
the rest of the ns setup should be a breeze :smile:
JaysonEwer
@JaysonEwer
Jan 25 2016 16:13
So in your document, the export commands have the quotes, but when you add those to your .profile,they should not have quotes
Perhaps they don't need quotes in either case
Dragan Maksimovic
@dm61
Jan 25 2016 16:14
correct, in .profile they should not have quotes. Perhaps you are right - we shoudl probably remove the quotes from the document, but I'd rather test that first
JaysonEwer
@JaysonEwer
Jan 25 2016 16:14
Now I just need to add that to my loop and i'll be looking very good.
I've already got my ns stuff working, my pill has been populated!! :-D
Dragan Maksimovic
@dm61
Jan 25 2016 16:15
great!
JaysonEwer
@JaysonEwer
Jan 25 2016 16:15
that was my first test
Thanks for your document, it was very helpful.
Dragan Maksimovic
@dm61
Jan 25 2016 16:15
glad to hear that; we still need to clean up the front part
JaysonEwer
@JaysonEwer
Jan 25 2016 16:16
just a few minor additions. Did you see the other stuff I sent you on that chat window?
I'm not sure it's necessary, I thought I had to zone everything, but I might only need to zone the clock? I worked through zoning the one you mentioned at the bottom of the page and provided the details in case you wanted to add them to the document.
Dragan Maksimovic
@dm61
Jan 25 2016 16:19
yes, thanks, I can include that in the document. You do need to have pumphistory zoned as well, that's coming up in the upload treatment part
JaysonEwer
@JaysonEwer
Jan 25 2016 16:31
yep, just ran into that, i'm setting it up now
the rezone option threw me a bit, certainly worth adding to the doc, I think.
Dragan Maksimovic
@dm61
Jan 25 2016 16:35
ok
Jim Matheson
@jmatheson
Jan 25 2016 17:02
@JaysonEwer i can’t get the NS openaps plugin going either. Wondering if there was a recently introduced bug we are running in to. @dm61
sorry, guess i posted before reading all the way down to your most recent messages :)
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:06
you're running the dev branch?
Jim Matheson
@jmatheson
Jan 25 2016 17:07
yes
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:08
doesn't show or the data is missing/wrong?
Jim Matheson
@jmatheson
Jan 25 2016 17:12
i can’t get the OpenAPS pill box to show up at all in NS.
JaysonEwer
@JaysonEwer
Jan 25 2016 17:12
I"ve got it working now!!! I am pretty sure it was my quotes. When you add your $NIGHTSCOUT_HOST and $API_SECRET to your .profile make sure you don't include the quotes.
@jmatheson ^^
Jim Matheson
@jmatheson
Jan 25 2016 17:14
first question, should it show an empty pill box regardless of if data is getting sent over or not? i know it shows empty pill boxes for IOB for example if nothing is being sent over.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:14
it's needs to be enabled and shown, you can show it in the setting drawer, or add it to the shown plugins env var
JaysonEwer
@JaysonEwer
Jan 25 2016 17:14
@jmatheson Oh, did you add openaps to the enable section under app settings? Are you using azure?
Dragan Maksimovic
@dm61
Jan 25 2016 17:14
yes, it should show the pill box
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:15
the idea is that not every enabled plugin should be shown by default
Jim Matheson
@jmatheson
Jan 25 2016 17:15
the tick box to display it is not avaiable as achoice for me in settings.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:16
if you look at yoursite/api/v1/status.json is it listed for enable
openaps was added to the ENABLE env var?
Jim Matheson
@jmatheson
Jan 25 2016 17:17
yes, it is listed in my status.json
but it is not listed as a option in settings under show plugin
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:17
maybe something cached?
Jim Matheson
@jmatheson
Jan 25 2016 17:19
i just tested in safari (which i have never used) and same issue
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:19
really weird, can you pm me the url?
Jim Matheson
@jmatheson
Jan 25 2016 17:20
i tested with different variants of options in my ENABLE. any chance a different plugin is blocking it?
Paul Andrel
@stavlor
Jan 25 2016 17:20
perhaps paste your status.json
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:20
some people have had problems with spaces in enable when slef hosting
the site isn't loading, getting some JS errors, think they're data related
maybe some bad treatment data in mongo
Jim Matheson
@jmatheson
Jan 25 2016 17:23
i can try clearning that. where are you seeing errors? not passing any live data right now (but there is history)
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:27
@jmatheson can you please paste the enable string here? maybe it's just a typo :)
Jim Matheson
@jmatheson
Jan 25 2016 17:28
portal rawbg iob basal cob bwp cage basal openaps
"enable":["portal","rawbg","iob","basal","cob","bwp","cage","basal","openaps","delta","direction","upbat","errorcodes","profile","ar2"]},"extendedSettings":{}}
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:29
and what's on yous NS settings pane version?
for me it is:
About
Nightscout
version 0.9.0-dev
head
Jim Matheson
@jmatheson
Jan 25 2016 17:30
version 0.9.0-dev
Paul Andrel
@stavlor
Jan 25 2016 17:30
About
Nightscout
version 0.9.0-dev
head 307ff55
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:30
I saw the errors in the js console when trying to load the site, also bg says undefined
Paul Andrel
@stavlor
Jan 25 2016 17:31
hmm undefined usually is a sign of a mongo issue from my experience
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:32
the app isn't handling the data it gets, some d3 errors
Milos Kozak
@MilosKozak
Jan 25 2016 17:32
i see some d3 errors with default settings too
Jim Matheson
@jmatheson
Jan 25 2016 17:33
ok, i will check the JS console and possibly try to rebuild.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:33
Screen Shot 2016-01-25 at 9.32.46 AM.png
Jim Matheson
@jmatheson
Jan 25 2016 17:33
i see some complaints about treatment profile needing to be set.
thought i had one set. this may be the issue.
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:33
also maybe you could add pump plugin to see if only openaps plugin has problems or all treatment-related plugins fail to load
Milos Kozak
@MilosKozak
Jan 25 2016 17:33
do you have something in your profile?
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:33
think it's just blowing up with now data
we should handle that better
Milos Kozak
@MilosKozak
Jan 25 2016 17:34
guessing profile is empty
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:34
there is a profile
Jim Matheson
@jmatheson
Jan 25 2016 17:34
yeah, actually. i cleared out treatments 10 mins ago
thinking if there was a problem in there i’d just clean it out
Milos Kozak
@MilosKozak
Jan 25 2016 17:34
basals filled too?
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:35
was the profile filled automaticaly or manualy?
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:35
looks like 2 profiles
Jim Matheson
@jmatheson
Jan 25 2016 17:35
yeah profile is set up
i did it manually
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:36
maybe it would be better to fill it automaticaly from the pump data
mm-format-ns-profile settings/settings.json settings/carb_ratios.json settings/basal_profile.json settings/insulin_sensitivities.json settings/bg_targets.json to_ns.json
ns-upload http://yourname.herokuapp.com hashed_api_key profile.json to_ns.json report.json
Jim Matheson
@jmatheson
Jan 25 2016 17:39
added pump plugin. nothing there either.
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:39
but first ensure you have latest openaps/oref0 version as there was a bug about this uploading
Jason Calabrese
@jasoncalabrese
Jan 25 2016 17:40
I'll be back later
Jim Matheson
@jmatheson
Jan 25 2016 17:40
pretty sure i have the latest. is there an easy way to double check?
thanks jason
JaysonEwer
@JaysonEwer
Jan 25 2016 17:40
@ktomy How do I know if I have the latest oref0 version?
Alin Artiom Kenibasov
@ktomy
Jan 25 2016 17:40
pull it from git... ? :)
I really don't know any other way to see if you have last dev version
JaysonEwer
@JaysonEwer
Jan 25 2016 17:42
ok, thanks
Jim Matheson
@jmatheson
Jan 25 2016 17:42
thanks for the help. i need to do some day job work but let you know if i make progress tonight.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:00
Had to go over to school since the rig want working, something happened that I saw while camping, had to reboot to get network back. Replugging the WiFi dongle didn't work and didn't want to get a console cable out
Need to automate that
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:13
I'm was offline after Andrew put his backpack down for PE, so pump was out of range, wonder if it restarted USB a bunch of times
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:18
guess that's 1 more reason to replace the carelink
eyim
@eyim
Jan 25 2016 20:22
Unfortunately I've seen similar with the TI stick. The pi just couldn't communicate with the TI stick. No reason why. I rebooted everything and it goes back working fine. Sometimes it need me to change which USB port the TI stick is in. Has happened a few times in the last week or so.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:24
doesn't seem to happen often, this is the 3rd time I've seen it
Sulka Haro
@sulkaharo
Jan 25 2016 20:24
Might be of interest here too: I've noticed there's a significant difference in the range of the radion comms between the pump and carelink/ERF/TI if the pump battery is depleting. So if you're testing for range, make sure you have a battery in the pump with more than one bar left.
JaysonEwer
@JaysonEwer
Jan 25 2016 20:25

Hello all. I'm trying to automate my status-upload, but when I add that alias to my loop I get the following message

Jan 25 15:08:05 Ewer-Open-APS openaps: ns-status://JSON/shell/monitor/upload-status.json
Jan 25 15:08:05 Ewer-Open-APS openaps: reporting monitor/upload-status.json
Jan 25 15:08:05 Ewer-Open-APS openaps: cat: entries.json: No such file or directory

and the update to Nightscout doesn't complete. However, if I run it manually it works well.

pi@Ewer-Open-APS:~/Documents/openaps $ openaps status-upload
ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
[{"pump":{"battery":{"status":"normal","voltage":1.27},"status":{"status":"normal","timestamp":"2016-01-25T20:18:42.000Z","bolusing":false,"suspended":false},"reservoir":37.3,"clock":"2016-01-25T15:17:41-05:00"},"openaps":{"suggested":{"bg":251,"temp":"absolute","snoozeBG":174,"timestamp":"2016-01-25T20:18:55.000Z","rate":2.2,"reason":"max_iob 2, temp 1.95<2.194U/hr","eventualBG":174,"duration":30,"tick":-2},"iob":{"timestamp":"2016-01-25T20:18:39.000Z","activity":0.04482940325126263,"iob":1.8776732052151408,"bolusiob":0},"enacted":{"bg":251,"temp":"absolute","snoozeBG":174,"recieved":true,"reason":"max_iob 2, temp 1.95<2.194U/hr","rate":2.2,"eventualBG":174,"timestamp":"2016-01-25T20:19:00.000Z","duration":30,"tick":-2}},"created_at":"2016-01-25T20:19:09.660Z","_id":"56a6833dfd420d3417a0a473"}]

I'm not sure what i'm missing. I've tried adding it to the end of my loop with && openaps status-upload, and i've tried adding it to my cron job, but neither seem to upload the status correctly. Any assistance would be greatly appreciated.

Ali Mazaheri
@amazaheri
Jan 25 2016 20:27
@eyim same happened today with us too (TI)
justgot back from school.
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:28
auto reboot would be good, just need to make sure it doesn't break full camping mode
Scott Leibrand
@scottleibrand
Jan 25 2016 20:34
@JaysonEwer the entries.json: No such file or directory means that you're not passing enough arguments to the upload script, because you don't have $NIGHTSCOUT_HOST and $API_SECRET set in your crontab like you do in your shell
we need to get that added to the troubleshooting section: it's a really common mistake
@danamlewis ^^
JaysonEwer
@JaysonEwer
Jan 25 2016 20:35
Ah, dang...I know i've read that about 30 times over the last week. That's my bad.
in the chat, I just went brain dead apparently
Thank you @scottleibrand!! Shouldn't I also be able to add it to my loop and it work?
Scott Leibrand
@scottleibrand
Jan 25 2016 20:36
it would help if it were a more descriptive error message too
Dana Lewis
@danamlewis
Jan 25 2016 20:36
@scottleibrand may I recommend a PR to the dev docs Troubleshooting page? :D :D :D
Scott Leibrand
@scottleibrand
Jan 25 2016 20:36
:-p
JaysonEwer
@JaysonEwer
Jan 25 2016 20:36
That should be on me, really. I promise to get a PR in SOON!!
:-D
Dana Lewis
@danamlewis
Jan 25 2016 20:37
:) :) :)
Scott Leibrand
@scottleibrand
Jan 25 2016 20:37
open an issue for the error message too
JaysonEwer
@JaysonEwer
Jan 25 2016 20:37
I will go so far as to say I will submit a PR today!!
Scott Leibrand
@scottleibrand
Jan 25 2016 20:37
that should be a relatively easy fix
JaysonEwer
@JaysonEwer
Jan 25 2016 20:38
@scottleibrand I think you are correct, if I add those to my crontab, it will work, but why won't it work when I add it to the end of my loop alias?
Scott Leibrand
@scottleibrand
Jan 25 2016 20:39
not sure what you mean by "add it to the end of your loop alias"
JaysonEwer
@JaysonEwer
Jan 25 2016 20:42
The @dm61 document i'm working from says the following, "To automate the status upload each time the loop is executed you can simply add status-upload to your main OpenAPS loop alias. " https://github.com/dm61/docs/blob/dev/docs/Automate-system/vizualization.md
Scott Leibrand
@scottleibrand
Jan 25 2016 20:43
sure, but status-upload has to know where to upload, and with what secret
you could hard-code those in, but it's better to just define the variables at the top of your crontab, like you do with PATH
JaysonEwer
@JaysonEwer
Jan 25 2016 20:44
gotit, thank you
Even though I've got them defined in my .profile, I still need to pass them realtime in the alias, but when I am sitting at my openaps directory and issue the command "openaps status-upload" it works fine. I think it has to do with the way the ns-upload script is passing stdout into the entries.json dynamically, but when its run in the alias, there is no stdout being displayed. But when I issue the command manually, I see all the output of the variables. Because i'm still getting the error, "Jan 25 15:43:00 Ewer-Open-APS openaps: cat: entries.json: No such file or directory" Does that make sense?
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:48
cron doesn't use your bash profile
you can also put them in device ini's
JaysonEwer
@JaysonEwer
Jan 25 2016 20:50
@jasoncalabrese Ok, but I've defined them in my crontab and i'm still getting the error message I was before. Am I add them to my crontab as export statements or just like I have here:
Jason Calabrese
@jasoncalabrese
Jan 25 2016 20:52
I never put them in my crontab, have only setup devices and added the urls and secrets in those ini's
JaysonEwer
@JaysonEwer
Jan 25 2016 20:52
@jasoncalabrese I"m also noticing that when I manually issue the status-upload command, my Nightscout doesn't autorefresh the OpenAPS pill. Is that a known issues? I'm finding I have to manually click the Refresh button on my IPad?
@jasoncalabrese Ok, I can try to work through that. Now that I know I've got things almost working, I might be able to figure out the device ini's. Do you have an example of your ns-upload.ini handy?
@jasoncalabrese @scottleibrand Thanks for the help. I need to run out for a bit. I appreciate all the insights. @danamlewis I have committed to getting a PR submitted today!! :-D Thanks again, all!
Dana Lewis
@danamlewis
Jan 25 2016 20:58
hooray :)
Jim Matheson
@jmatheson
Jan 25 2016 21:04
rather than including in my ini or cron i simply add the following to the front of any cron lines that need it : . $HOME/.profile;
Jason Calabrese
@jasoncalabrese
Jan 25 2016 21:05
$ cat ns-upload.ini
[device "ns-upload"]
fields = type report
cmd = ns-upload
args = https://host 123abchash
Ben West
@bewest
Jan 25 2016 21:22
I vastly prefer this way ^^
this way it works exactly the same everywhere... eliminates a "mode" you have to worry about
it comes with a ns-upload --config tool to help generate the right commands
Jason Calabrese
@jasoncalabrese
Jan 25 2016 21:44
having it setup that way is nice for testing too, I can pull from 1 NS and post status updates to a test site, multiple sites, etc
dhermanns
@dhermanns
Jan 25 2016 21:50
@scottleibrand @danamlewis Too bad that the remote control communication cant be used effectively. Is there anywere a documentation how to downgrade the firmware?
Dana Lewis
@danamlewis
Jan 25 2016 21:54
@dhermanns no one has done that successfully (change the firmware) that I know of.
Sulka Haro
@sulkaharo
Jan 25 2016 22:08
yeah if someone figures out how to downgrade a pump firmware, they'll be insta-heroes :)
Jim Matheson
@jmatheson
Jan 25 2016 22:10
agreed :)
is there any way to upgrade firmware on the pump? or is it just if they mail you a new pump
Ben West
@bewest
Jan 25 2016 22:20
there is a way, but they won't do it :-)
Dana Lewis
@danamlewis
Jan 25 2016 22:36
hahaha.
recommended: don't send your old pump (i.e. working with openaps) back to Medtronic, you'll get an upgraded firmware version in return
Jim Matheson
@jmatheson
Jan 25 2016 22:47
i sort of assume there are no in warranty pumps that work with openaps anyway...
Dana Lewis
@danamlewis
Jan 25 2016 22:47
Correct.
However, when people call and mention which version pump they're using, the manufacturer often suggest a pump swap (which is something they're obligated to do)
Just wanted to reiterate :)
Jim Matheson
@jmatheson
Jan 25 2016 22:49
my 722 is two pumps ago. my 723 finally went out of warranty. they called me to get a new one and i told them there was no point.
Dana Lewis
@danamlewis
Jan 25 2016 22:50
I got a call from my rep over the holiday break about my 523 being out of warranty.
Jim Matheson
@jmatheson
Jan 25 2016 22:51
offer to let them bill insurance for a new one if they send a few old 522s to you?
Dana Lewis
@danamlewis
Jan 25 2016 22:53
I also happened to have just switched insurances in November due to job change, and am having trouble getting everything verified on the new insurance for basic site/reservoir supplies, so my response was more along the lines of "I need to get the basics sorted first"
Jim Matheson
@jmatheson
Jan 25 2016 22:54
:(
Eric
@ecc1
Jan 25 2016 23:03
I'm planning to set up openaps with a 522 pump initially for nighttime only. Is it feasible to keep using my 523 during the day, and switch to the 522 + openaps system at bed time? If anyone is doing something similar, how exactly do you switch?
Dana Lewis
@danamlewis
Jan 25 2016 23:04
Yes. but curious - what's the reason for the 523 during the day? Most people switching are doing it because they're using a non-Medtronic pump during the day
Eric
@ecc1
Jan 25 2016 23:06
I thought it would be less wear and tear on the openaps-capable pump, and would let me keep using cheapo batteries for the 523 while using lithiums for the 522. I might be overthinking it though :-)
Dana Lewis
@danamlewis
Jan 25 2016 23:06
Hmm, yea. IMO that's not worth the hassle of keeping IOB similar between the pumps and keeping 2 reservoirs, etc.
Eric
@ecc1
Jan 25 2016 23:07
I have a new-in-box 523 warranty replacement when my current one breaks too
I was thinking I could detach the infusion set, move the reservoir, and do a rewind and re-prime.
Dana Lewis
@danamlewis
Jan 25 2016 23:09
Yea. If you're willing to do that every single night, that'd work. You'd want to shadow bolus on the 522 to match some of your evening boluses before the switch, though, to make IOB similar. (without the reservoir in, obviously, so you don't waste insulin).
Jason Calabrese
@jasoncalabrese
Jan 25 2016 23:16
I'm so glad to be done with pump swapping, was a waste of time and insulin, and screwed us up a few times