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

2nd
Jul 2016
ryanchen26
@ryanchen26
Jul 02 2016 00:09
I've observed total failure of our APS unit's wi-fi hotspot connection to a iPhone when in Barns and Noble bookstores, and when inside the Kaiser Hospital. It seems to resume just fine when we leave the building and go outside. Probably just need to pull glucose data directly from the Dexcom receiver in those instances...
Paul Martin
@Spazholio
Jul 02 2016 00:10
That’s interesting. Do you have a script set up to automatically join networks? I’ve found that helps with that sort of thing.
Chris Oattes
@cjo20
Jul 02 2016 00:11
My edison is really bad at connecting to my iphone wifi. I can see the network in iwlist wlan0 scan, but it doesn't connect
Paul Martin
@Spazholio
Jul 02 2016 00:14
That’s a problems I’m glad I don’t have. I think it would drive me insane.
ryanchen26
@ryanchen26
Jul 02 2016 00:15
@cjo20 I'm troubleshooting right now why the edison won't connect to the iPhone hotspot. I ended up leaving it behind and taking the RPi this morning. No I don't have a script setup up to auto switch. In the case of the edison (the ideal travel unit) I only want it to know the particular iPhone hotspot. Anyway...researching...
Paul Martin
@Spazholio
Jul 02 2016 00:15
On a lighter note - does anyone have any recommendations for a nice, preferably Amazon-Prime-worthy metal watchband for a Pebble Time? Has to be black. =)
C-Ville
@C-Ville
Jul 02 2016 01:04
does anyone use a 715? Mine is really slow when bolusing. It takes 40 sec for 1 unit.
Lynne Butts
@flutelynne_twitter
Jul 02 2016 01:26
@C-Ville I have noticed that the boluses are slower than any other pumps I remember. The 515 is slow as is the 722. I seem to be doing mostly ok with the slower deliveries. Still a work in progress.
@Spazholio I have a Speidel (gold-silver) that works on my pebble, but was a pain to size. My husband managed to put in the tiny u clips. I could take them out though...which really frustrated him. ; )
cdaccarett
@cdaccarett
Jul 02 2016 01:29
Error: Cannot find module '/home/pi/raspPiAPS/oref0-monitor/iob.json' how do i create the module for iob.json?
Lynne Butts
@flutelynne_twitter
Jul 02 2016 01:29
I still have hotspot issues with my iphone working with the pi. I have fing, weaved, and serverauditor. Work ok at home to ssh, but not away.
Scott Leibrand
@scottleibrand
Jul 02 2016 01:40
@ed-nykaza you'll want to set up an enacted.json report and invoke that in the loop, rather than doing a use in the loop directly.
@mm22dl sounds like the behavior you're seeing is specific to the 640G with PLGM, right? would be interesting to do some experimentation on a disconnected pump and see exactly when it cuts off boluses.
ryanchen26
@ryanchen26
Jul 02 2016 01:44
Another random observation: my RPi stopped looping so I unplugged and replugged into the same lithium battery bank (showing a charge of 3/4 dots) but it was still non-responsive. Then I plugged the Pi in the wall outlet and it came back online and started looping just fine. So I guess my battery just isn't reliable.
cdaccarett
@cdaccarett
Jul 02 2016 01:50
Could not require: /home/pi/raspPiAPS/oref0-monitor/iob.json { [Error: Cannot find module '/home/pi/raspPiAPS/oref0-monitor/iob.json'] code: 'MODULE_NOT_FOUND' }
Could not require: /home/pi/raspPiAPS/oref0-predict/oref0.json [SyntaxError: /home/pi/raspPiAPS/oref0-predict/oref0.json: Unexpected end of input]
Could not require: /home/pi/raspPiAPS/oref0-enacted/enacted-temp-basal.json { [Error: Cannot find module '/home/pi/raspPiAPS/oref0-enacted/enacted-temp-basal.json'] code: 'MODULE_NOT_FOUND' }
Can anyone give me a hand on this please
C-Ville
@C-Ville
Jul 02 2016 01:59
@flutelynne_twitter thanks, i started using the pen again for meals, so the 722 is not much of an improvement in that department
Lynne Butts
@flutelynne_twitter
Jul 02 2016 02:01
@C-Ville yes, definitely slower then. I was trying untethered for a while, then MDI for a while. OpenAPS is so much better, but will always be a work in progress for me.
cdaccarett
@cdaccarett
Jul 02 2016 03:09
my system_time vs my display_time is off but my clock is set correct not sure why its getting different times
  {
    "trend_arrow": "FLAT", 
    "system_time": "2016-07-03T03:28:14", 
    "display_time": "2016-07-01T19:28:03", 
    "glucose": 186
  }
Paul Martin
@Spazholio
Jul 02 2016 03:10
I don’t think you need to sweat that one. IIRC, those two times are always different.
cdaccarett
@cdaccarett
Jul 02 2016 03:14
Okay, just wondering because of this:
determine-basal://text/shell/enact/suggested.json
BG data is too old, or clock set incorrectly Fri Jul 01 2016 20:02:25 GMT+0000 (UTC) vs Sat Jul 02 2016 03:12:55 GMT+0000 (UTC)
reporting enact/suggested.json
Paul Martin
@Spazholio
Jul 02 2016 03:16
Where are you getting your CGM data from? The G4 receiver?
cdaccarett
@cdaccarett
Jul 02 2016 03:16
yeah receiver
Paul Martin
@Spazholio
Jul 02 2016 03:19
Pull it again, and check the latest entry?
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:21
hi everyone; seems like a simple thing but when we are trying to clone our repository from github we are getting error: "permission denied, public key, could not read from remote repository"
cdaccarett
@cdaccarett
Jul 02 2016 03:22
    "system_time": "2016-07-03T04:18:18", 
    "display_time": "2016-07-01T20:17:27"
Paul Martin
@Spazholio
Jul 02 2016 03:23
27? Odd. If you go to the Date/Time section on the G4, is that accurate?
cdaccarett
@cdaccarett
Jul 02 2016 03:24
On receiver its accurate
it might be that the pi clock is wrong
Paul Martin
@Spazholio
Jul 02 2016 03:25
And the output of date?
That’s pretty common.
cdaccarett
@cdaccarett
Jul 02 2016 03:25
yeah thats whats wrong
Paul Martin
@Spazholio
Jul 02 2016 03:25
Know how to fix it?
@mariannesmith77_twitter Does the URL start with git or https?
cdaccarett
@cdaccarett
Jul 02 2016 03:27
just go to the config page and edit there im guessing?
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:27
@Spazholio googling how to fix it, think we have an idea but don't really know. :) URL starts with git
Paul Martin
@Spazholio
Jul 02 2016 03:27
@cdaccarett Try running this:
sudo /etc/init.d/ntp stop                                                                                                                                                                                                                                                                                              
sudo ntpd -q -g
sudo /etc/init.d/ntp start
@mariannesmith77_twitter Did you get the URL from the Github page? The green button?
cdaccarett
@cdaccarett
Jul 02 2016 03:28
still wrong date
Paul Martin
@Spazholio
Jul 02 2016 03:29
Wrong how?
cdaccarett
@cdaccarett
Jul 02 2016 03:29
Sat 2 Jul 03:28:39 UTC 2016
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:29
yes, the green button, selected clone with SSH
Paul Martin
@Spazholio
Jul 02 2016 03:30
Click the link that says “Use HTTPS” and try that instead.
@cdaccarett Try running sudo raspi-config
cdaccarett
@cdaccarett
Jul 02 2016 03:33
sudo -i
tzselect
then it took me on steps to set timezone lol
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:34
@Spazholio seems to have worked. doesn't seem to have a crontab file but we can recreate that
Paul Martin
@Spazholio
Jul 02 2016 03:35
@mariannesmith77_twitter Your git repo likely wouldn’t have your crontab entry in it unless you had something in place to back it up. If you did and it’s STILL not there, then it likely wasn’t git added previously.
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:36
@Spazholio lesson learned for next time :)
Paul Martin
@Spazholio
Jul 02 2016 03:36
=)
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:42
@Spazholio, we have all the files we need but it doesn't appear to be an openaps repository officially. Ran pi@raspberrypi:~/myopenaps $ touch openaps.ini pi@raspberrypi:~/myopenaps $ git add openaps.ini pi@raspberrypi:~/myopenaps $ git commit -avm 'init openaps' and then told it who we are but still doesn't recognize openaps commands
cdaccarett
@cdaccarett
Jul 02 2016 03:47
man the times are still off comming in but my system date is updated
Paul Martin
@Spazholio
Jul 02 2016 03:47
@mariannesmith77_twitter If you type ls -Al do you see a .git dir?
Wait…what do you mean by “doesn’t recognize openaps commands”? Specifically?
@cdaccarett I’ve had issues with that before, but don’t recall how I fixed it. It’s happened a few times, and for quite a few different reasons. =/
@bewest or @scottleibrand Might be able to provide some further assistance?
cdaccarett
@cdaccarett
Jul 02 2016 03:48
Thanks for the help anyways :)
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 03:49
@Spazholio yes, I see .git - and, when I type openaps report show it returns -bash: openaps: command not found
Paul Martin
@Spazholio
Jul 02 2016 03:51
@mariannesmith77_twitter Sounds like you’re setting up from scratch, am I right? It sounds like you haven’t actually installed openaps, you just installed all the config files for it.
cdaccarett
@cdaccarett
Jul 02 2016 04:11
Current default time zone: 'US/Pacific'
Local time is now:      Fri Jul  1 21:09:56 PDT 2016.
Universal Time is now:  Sat Jul  2 04:09:56 UTC 2016.
then my cgm reading has a whole new system time
   "system_time": "2016-07-03T05:08:13", 
    "display_time": "2016-07-01T21:07:22",
Not sure where its getting the 2016-07-03
Paul Martin
@Spazholio
Jul 02 2016 04:13
Me neither, but IIRC, my system_time was always radically different than my display_time. Which is fine, since I think the loop uses display_time for comparison...
cdaccarett
@cdaccarett
Jul 02 2016 04:14
so i could continue with the enact/suggested.json even though it says the BG data is too old?
Paul Martin
@Spazholio
Jul 02 2016 04:17
When it says that the BG data is too old, is it matching the system_time or the display_time?
cdaccarett
@cdaccarett
Jul 02 2016 04:18
BG data is too old, or clock set incorrectly Fri Jul 01 2016 20:52:23 GMT-0700 (PDT) vs Fri Jul 01 2016 21:18:45 GMT-0700 (PDT)
Okay it worked now lol
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 05:40
anybody still awake? Struggling with entries.json file does not exist when trying to upload data to nightscount. we solved this problem before but we can't remember how.....
Ben West
@bewest
Jul 02 2016 07:21
@AndyProbolus_twitter which commands are you working with?
for uploading enties, I recommend these two commands:
(and creating reports for them, these are the use versions)
openaps use ns shell format-recent-type tz entries monitor/glucose.json  | json -a dateString | wc -l
# Add it as a report
openaps report add nightscout/recent-missing-entries.json JSON ns shell format-recent-type tz entries monitor/glucose.json
# fetch data for first time
openaps report invoke nightscout/recent-missing-entries.json

# add report for uploading to NS
openaps report add nightscout/uploaded-entries.json JSON  ns shell upload entries.json nightscout/recent-missing-entries.json
# upload for fist time.
openaps report invoke nightscout/uploaded-entries.json
actually this is a mix of uses and reports
for openaps use ns shell upload, note that it takes two arguments
the first is the URI endpoint, eg entries.json or treatments.json or similar
this helps us understand which NS endpoint to target
the second argument is the file to upload
notice it says ns shell upload $endpoint $file-to-upload
that's the pattern
Ben West
@bewest
Jul 02 2016 07:29
hmm
it turns out instead of using ns shell upload, I use the following:
openaps use ns shell upload-non-empty-type entries.json nightscout/recent-missing-entries.json
I have that as a report instead of ns shell upload
that one is the new upload-non-empty-type which works same way as upload (it takes first the endpoint name, and secondly the file to upload)
the difference is it won't error if the file is empty (which is common and OK)
mm22dl
@mm22dl
Jul 02 2016 08:09
@scottleibrand apparently yes...
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 12:25
@bewest this is the command that is presenting the error : ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json we have those values defined in crontab
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 12:42

@bewest both of these return good data, so I'm thinking it has to do with our $NIGHTSCOUT_HOST and $API_SECRET but can't figure out the problem.

openaps use ns shell get entries.json 'count=10'
openaps use ns shell upload entries.json upload/laest-treatments.json

crontab file looks like this:
NIGHTSCOUT_HOST=https://<ourwebsitename>.azurewebsites.net API_SECRET=<reallylongstringofnumbers>

Another clue that this is the problem is that we lost our crontab file and had to rebuild it. I'm guessing we are missing something there.
Bill Stackpole
@billstackpole
Jul 02 2016 13:47
looks like I have exceeded some mongo quota - trying to upload data to nightscout from OpenAPS and getting a 500 error - "uploading to NightScout
{"status":500,"message":"Mongo Error","description":{"name":"MongoError","message":"quota exceeded","driver":true,"index":0,"code":12501,"errmsg":"quota exceeded"}}" - anyone have some insight for me?
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 14:10

@bewest figured it out. we needed to add the $NIGHTSCOUT_HOST and $API_SECRET to our profile, then it all worked

Question; we learned through this process that our back up is missing crontab and profile changes. Anybody have a process figured out to back those up too?

Matthias
@ceben80
Jul 02 2016 14:14
@scottleibrand @bewest
I have installed my Edision with ubilinux and openaps, so far so good.
As I can remember 2 folders can be moved due the shortage of space on the root partition, but I don't know which folders and how to move. Would be great you can help me
Bill Stackpole
@billstackpole
Jul 02 2016 14:28
@AndyProbolus_twitter - you can simply "crontab -l > backupfilename" at command line then save that file somewhere for your crontab backup. Not sure what profile you are looking to back up.
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 14:33
@billstackpole thank you; that was simple. We are looking to also back up /home/pi/.profile
David Cintron
@loudestnoise
Jul 02 2016 14:38
cp ~/.profile ~/.profile.backup
~ means user folder so it equals /home/pi
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 14:43
@loudestnoise thank you. cp means copy I suppose. :) could I do something like this so that it saves in myopenaps file structure? cp ~/.profile ~/openaps/.profile.backup then I can send it to github with evreything else
David Cintron
@loudestnoise
Jul 02 2016 14:54
Yep, cp is copy. Yep, you can copy that. Just be careful I guess if you have your API secret and Nightscout URL in there as variables and don’t want people to see it
Andy Probolus
@AndyProbolus_twitter
Jul 02 2016 14:58
thanks @loudestnoise
Saskia
@Missdazzle
Jul 02 2016 15:31
I was trying to set up AMA today, but this is what I get when I run my alias monitor-pump:
meal://text/shell/monitor/meal.json
Warning: could not parse monitor/carbhistory.json
Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json
I just don´t get it. I need a helping hand...
That´s what my meal.ini looks like:
[device "meal"]
fields = pumphistory profile clock carbs glucose basal
cmd = oref0
args = meal
And my monitor/meal.json:
[report "monitor/meal.json"]
profile = settings/profile.json
clock = monitor/clock-zoned.json
reporter = text
json_default = True
use = shell
pumphistory = monitor/pumphistory-zoned.json
basal = settings/basal_profile.json
carbs = monitor/carbhistory.json
device = meal
remainder =
glucose = monitor/glucose.json
David
@dakago
Jul 02 2016 15:37
This message was deleted
Saskia
@Missdazzle
Jul 02 2016 15:41
And this is what I did at first today:
sudo npm install -g git://github.com/openaps/oref0.git'#advanced-meal-assist'
Matthias
@ceben80
Jul 02 2016 16:28
@Missdazzle good question, unfortunately I'am not familiar with AMA, but I think you'll get help here :+1:
Scott Leibrand
@scottleibrand
Jul 02 2016 16:50
@ceben80 I think one was /var/log and another was a cache dir. I used du to find them.
sudo du -xh -d 3 / | egrep "[0-9][0-9][0-9]M|[0-9]G"
Then you have to mv them and ln -s them back to the old location.
Matthias
@ceben80
Jul 02 2016 17:00
yes great @scottleibrand thanks a lot :+1:
that's my output
edison@ubilinux:~$ sudo du -xh -d 3 / | egrep "[0-9][0-9][0-9]M|[0-9]G"
277M    /usr/share
285M    /usr/lib
685M    /usr
116M    /root
101M    /var/cache/apt
105M    /var/cache
188M    /var
1.1G    /
Matthias
@ceben80
Jul 02 2016 17:25

@scottleibrand that's correct :question:

I would like to move /var/cache to home

mv /var/cache /home/var/cache
ln -s /home/var/cache /var/cache

Saskia
@Missdazzle
Jul 02 2016 17:44
This message was deleted
Scott Leibrand
@scottleibrand
Jul 02 2016 17:49
@ceben80 I use /home/cache, but same idea. Your way may require a mkdir first.
Saskia
@Missdazzle
Jul 02 2016 17:49
Okay, got a little further.
Matthias
@ceben80
Jul 02 2016 17:50
yes sure I mkdir /home/var/cache before
but the ln -ssyntax okay?
Saskia
@Missdazzle
Jul 02 2016 17:50
openaps report invoke monitor/meal.json
meal://text/shell/monitor/meal.json
Warning: could not parse monitor/carbhistory.json
reporting monitor/meal.json
Scott Leibrand
@scottleibrand
Jul 02 2016 17:51
I believe so.
Matthias
@ceben80
Jul 02 2016 17:51
:+1:
works great
root@ubilinux:/var/cache# mv /var/cache/ /home/var/cache/
root@ubilinux:/var/cache# ln -s /home/var/cache /var/cache
root@ubilinux:/var# pwd
/var
root@ubilinux:/var# ls -l
total 32
drwxr-xr-x  2 root root  4096 Jul  7  2014 backups
lrwxrwxrwx  1 root root    15 Jul  2 19:52 cache -> /home/var/cache
Matthias
@ceben80
Jul 02 2016 17:56
now rootfs has more space available (from 81%) :star2: - thanks again @scottleibrand
will look for other directories....
root@ubilinux:/var# df -h
Filesystem       Size  Used Avail Use% Mounted on
rootfs           1.4G  961M  355M  74% /
/dev/root        1.4G  961M  355M  74% /
devtmpfs         480M     0  480M   0% /dev
tmpfs             97M  308K   96M   1% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            193M     0  193M   0% /run/shm
tmpfs            481M     0  481M   0% /tmp
/dev/mmcblk0p7    32M  5.3M   27M  17% /boot
/dev/mmcblk0p10  1.3G  264M  1.1G  21% /home
Marianne Smith, PMP
@mariannesmith77_twitter
Jul 02 2016 18:00

trying to recreate our crontab and finding that it will initiate the command but then stop before it runs the loop. here is our crontab command
# Below line runs loop every 5 minutes and sends outputs to a file */5 * * * * cd /home/pi/myopenaps && openaps loop >>/tmp/output

when we run the journal feature on the pi we get this output
Jul 02 13:55:01 raspberrypi CRON[19186]: pam_unix(cron:session): session opened for user pi by (uid=0) Jul 02 13:55:01 raspberrypi CRON[19190]: (pi) CMD (cd /home/pi/myopenaps && openaps loop) Jul 02 13:55:01 raspberrypi CRON[19186]: (CRON) info (No MTA installed, discarding output) Jul 02 13:55:01 raspberrypi CRON[19186]: pam_unix(cron:session): session closed for user pi
Any hints?

C-Ville
@C-Ville
Jul 02 2016 18:50
export
sorry fc
Dana Lewis
@danamlewis
Jul 02 2016 19:15
nice add, @SirBinky re: ‘why NS’ in the docs
Paul Martin
@Spazholio
Jul 02 2016 20:35
@bewest or @scottleibrand I can’t recall - did you guys get openxshareble working under Yocto?
Scott Leibrand
@scottleibrand
Jul 02 2016 20:48
that was @amazaheri and @jasoncalabrese IIRC
Paul Martin
@Spazholio
Jul 02 2016 20:55
Ok, I wasn’t sure if ANYONE had gotten it working under Yocto, and I know that both you and @bewest use it. Thanks.
Trying to decide if I want to switch to Yocto or stick with Ubi. I’d REALLY like to know how much battery I have left. =)
Dana Lewis
@danamlewis
Jul 02 2016 20:55
yea
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jul 02 2016 21:29
@mariannesmith77_twitter Not sure if it matters but I use Parenthesis. And send output to Syslog
 */5 * * * * (cd ~/jlucasvt && do-loop) 2>&1 | logger -t LOOP

To watch it run you can type

tail -f var/log/syslog
and it will show you as the contab is running

Jason Calabrese
@jasoncalabrese
Jul 02 2016 21:32
I'm using Ubi, only played with Yocto for a little and stopped when it started causing problems on my network @Spazholio
Paul Martin
@Spazholio
Jul 02 2016 21:33
Can you elaborate on the problems it caused on your network? That’s a new one.
Jason Calabrese
@jasoncalabrese
Jul 02 2016 21:36
I think it was doing some kind of multicast, probably too make setup easy, thought i fixed it once and then it happened a 2nd time do I flashed back to Ubi
@billstackpole
I think others have hit mongo quota too
Think we're going past the free limits there too
Saskia
@Missdazzle
Jul 02 2016 22:17
:muscle: Finally got it!
Adjusting sens from 30 to 30.9
Dana Lewis
@danamlewis
Jul 02 2016 23:24
:confetti_ball: @Missdazzle
Saskia
@Missdazzle
Jul 02 2016 23:47
:)