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

21st
Nov 2015
Jason Calabrese
@jasoncalabrese
Nov 21 2015 00:59
only reason we're using the ping during the day is for the remote, when I'm with him for the day I've been using the 522
but it's not a big deal to switch, just need to use NS to track iob then
Jason Calabrese
@jasoncalabrese
Nov 21 2015 01:29
@MilosKozak hope you can get it going even if just to experiment
maybe @LorelaiL could help you find a controllable pump
Jason Calabrese
@jasoncalabrese
Nov 21 2015 02:11
is there docs anywhere to setup local mode? or just clone decoding-dexcom and dexcom_reader
Scott Leibrand
@scottleibrand
Nov 21 2015 03:31
if you run either of the setup scripts at https://github.com/openaps/docs/blob/master/docs/getting-started/openaps.md, you can follow https://github.com/openaps/docs/blob/master/docs/Build-manual-system/Using-oref0-tools.md to get and use glucose data from the CGM directly. Is that what you mean?
Jason Calabrese
@jasoncalabrese
Nov 21 2015 03:47
openaps device add cgm dexcom isn't working for me, maybe my openaps install isn't right
Jason Calabrese
@jasoncalabrese
Nov 21 2015 03:57
Do you need to define a vendor, or its built in?
Scott Leibrand
@scottleibrand
Nov 21 2015 03:57
That one should be built in and show up in -h
Jason Calabrese
@jasoncalabrese
Nov 21 2015 04:00
Think I'll try installing an inforked version
It's really oref0 that I want to be able to switch branches
Scott Leibrand
@scottleibrand
Nov 21 2015 04:08
Yeah
Jason Calabrese
@jasoncalabrese
Nov 21 2015 04:49
now openaps device add cgm dexcom works, didn't need to change anything, guess I just needed dinner
Scott Leibrand
@scottleibrand
Nov 21 2015 04:53
lol
Jason Calabrese
@jasoncalabrese
Nov 21 2015 05:19
ok, offline is working good now
eyim
@eyim
Nov 21 2015 05:28
I just leave a report that pulls from nightscout and another that pulls directly from the pump as two different reports and then just change up the names of the reports to switch modes
Scott Leibrand
@scottleibrand
Nov 21 2015 05:28
openaps alias add get-bg '! bash -c "openaps monitor-cgm 2>/dev/null || ( openaps get-ns-glucose && grep -q glucose monitor/ns-glucose.json && mv monitor/ns-glucose.json monitor/glucose.json )"'
openaps alias add monitor-cgm "report invoke monitor/glucose.json"
openaps alias add get-ns-glucose "report invoke monitor/ns-glucose.json"
Jason Calabrese
@jasoncalabrese
Nov 21 2015 05:35
nice, I was thinking something like that
with the fallback
Jason Calabrese
@jasoncalabrese
Nov 21 2015 05:47
seems like my wifi dongle get put to sleep or something if it isn't used often
anyone see that?
Scott Leibrand
@scottleibrand
Nov 21 2015 05:47
yep. you really should read all the docs. ;-)
try that and see if it helps
Jason Calabrese
@jasoncalabrese
Nov 21 2015 05:49
was expecting an answer like that
Dana Lewis
@danamlewis
Nov 21 2015 05:49
;p
Milos Kozak
@MilosKozak
Nov 21 2015 13:10
any pump from these working with openaps alowing remote boluses too?
Lori
@LoriLori
Nov 21 2015 13:40
This message was deleted
Tim Howard
@tghoward
Nov 21 2015 16:26

drat, I was really hoping a fresh install would fix this problem. I thought I might have the wrong version of node installed or something (googling the error below brings up an old version of node as one of the issues).

I have data in my treatments collection on Mongo. Trying to query the latest treatment gives this:

pi@betacb3 ~/bcb-t $ nightscout latest-openaps-treatment $NIGHTSCOUT_HOST
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
        <head><title>Document Moved</title></head>
        ^
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
        <head><title>Document Moved</title></head>
        ^
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="https://bcbteddy.azurewebsites.net/api/v1/treatments.json?find[enteredBy]=/openaps:\/\//&amp;count=1?">here</a></body>

Note that it is going to $NIGHTSCOUT_HOST so it is not my environment settings.

But there seems to be a redirect happening somewhere along the line.
What drives me crazy is that if I paste the url supplied at the bottom of that error message into my browser ... I get raw json! (which is what I want!).
Has anyone else seen this? I'm getting it with two oref0 installations. (the second created with your scripts @scottleibrand )
Tim Howard
@tghoward
Nov 21 2015 16:34
I'm guessing it is a setting on Azure that isn't allowing it to resolve. Possibly that what is suggested here:
http://stackoverflow.com/questions/6747458/document-moved-error-when-using-web-service
I'll go fishing there.
Scott Leibrand
@scottleibrand
Nov 21 2015 17:53
@MilosKozak yes, you can bolus with the 522. I would never recommend doing so programmatically, though, due to the risk of repeating the command and overdosing.
@tghoward what is $NIGHTSCOUT_HOST there, or the resulting URL? Is it http:// and giving you an https:// redirect?
Milos Kozak
@MilosKozak
Nov 21 2015 17:58
@scottleibrand is that common situation?
Tim Howard
@tghoward
Nov 21 2015 18:07
@scottleibrand $NIGHTSCOUT_HOST is
bcbteddy.azurewebsites.net
I'm on my phone now so can't test for a couple of hours
Yes, the URL at the bottom of the error msg is HTTPS
Does 'nightscout latest-openaps-treatment' call http instead?
Scott Leibrand
@scottleibrand
Nov 21 2015 18:15
Not sure what it defaults to if you don't specify protocol, but that seems consistent with your results. Try changing it to https://bcbteddy.azurewebsites.net.
it=curl in this case, which IIRC does default to http.
Tim Howard
@tghoward
Nov 21 2015 18:24
I'll give it a shot. Thanks.
eyim
@eyim
Nov 21 2015 19:18
@tghoward I have the same issue on my azure website. I was able to make it work on my heroku implementation of Nightscout
Scott Leibrand
@scottleibrand
Nov 21 2015 19:24
I think azure does https redirects by default, but heroku maybe doesn't?
eyim
@eyim
Nov 21 2015 19:26
blob
I've been struggling all week to get the rig working all night. Many of the issues not related to the code. The carelink can't talk to my son's pump even though a blanket. After a couple of nights, I resorted to running it on battery power and putting it next to him under the blanket and even then I have to move it around a couple of times per night to get them close enough. Hopefully I just have a bad carelink. I've ordered another. Finally last night was able to get 6 hours or so of both solid CGM data and good communication to the rig and the pump. Here is the results.
Pretty good overall but then the cgm failed at around 4am
Scott Leibrand
@scottleibrand
Nov 21 2015 19:29
We use a USB extension cord to get the carelink under Dana's mattress.
Ben West
@bewest
Nov 21 2015 19:29
the signal comes out the back
I use a cord to position the back of the stick pointing at my pump
eyim
@eyim
Nov 21 2015 19:32
Ya it crazy. I literally had the back facing the pump 5 inches away and only with the blanket between them and it failed. I put it under the blanket with him and it worked. But if he is laying on the pump so his body is blocking it then no communication. Seems to work better when it is close by like when he is sitting at his desk studying. Sounds like others are having better luck. Hopefully the new carelink will help. My current one is 8 years old.
Tim Howard
@tghoward
Nov 21 2015 20:32
@scottleibrand that did it! Thanks. @eyim , a syntax that works is to not use $NIGHTSCOUT_HOST, but use the full path to the host, prefaced by https://, like this nightscout latest-openaps-treatment https://bcbteddy.azurewebsites.net
I tried concatenating https:// with $NIGHTSCOUT_HOST, but couldn't get that to work, so I went with hardcoding it.
Scott Leibrand
@scottleibrand
Nov 21 2015 20:34
Try just setting $NIGHTSCOUT_HOST to https://yoursite
Tim Howard
@tghoward
Nov 21 2015 20:34
will that work in all uses?
I thought there were some specific cases where it was expecting only the parts after the https://
Scott Leibrand
@scottleibrand
Nov 21 2015 20:48
If so we should fix that
Tim Howard
@tghoward
Nov 21 2015 20:55
You are probably right that it will work ... I'm stepping through it. :smile:
Lori
@LoriLori
Nov 21 2015 21:05
had some fun with nodejs and ble usb stick, https://github.com/LorelaiL/BLEnodeAndroid
you can send json via ble to android from node js, like from rPi
Ben West
@bewest
Nov 21 2015 21:42
wow, very cool
very very cool
this could help bridge mobile space... get benefit of dedicated device while including mobile workflow
Lori
@LoriLori
Nov 21 2015 21:44
though about monitor on the phone and upload of status, where it would push to phone and phone would upload to cloud
Ben West
@bewest
Nov 21 2015 22:19
yeah, also potentially allow some interactivity...
"eating-soon-mode", "activity mode", etc