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

3rd
Oct 2016
Scott Leibrand
@scottleibrand
Oct 03 2016 00:04
yeah, I've been using it for both. it works quite well, but it's sorta doing double duty on reading vs. setting time depending on status of ntp. for automated use we might want to have it just read from the pump/cgm, and leave setting the device times to a script that's run manually...
the main problem right now is when the rig is online (has ntp) and can't get BG data (but can talk to the pump), it will keep setting the pump time every few minutes, making lots of grey circles in NS. :)
John Benjamin
@Bender1061
Oct 03 2016 00:10
when i run it on my edison i get "sudo: fake-hwclock: command not found"
Scott Leibrand
@scottleibrand
Oct 03 2016 00:11
@tmecklem shareble cd thing fixed
@Bender1061 it does this:
sudo fake-hwclock load || (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done;
so when fake-hwclock fails, it tries to set it directly using dateinstead

if you want to add something like

&& echo date set to `date`

to the end, that might make it more clear that it worked

and/or add a 2>/dev/null before the first || if you want to completely hide errors there. maybe couple that with a || echo Could not set date at the end
PRs welcome as always
John Benjamin
@Bender1061
Oct 03 2016 00:16
yeah this is what I get
edison@Bender1061:~/johnopenaps$ ~/src/oref0/bin/clockset.sh
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Restarting ntp (via systemctl): ntp.service.
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Sun Oct 2 23:59:13 UTC 2016
sudo: fake-hwclock: command not found
Fri Dec 31 19:04:18 EST 1999
edison@Bender1061:~/johnopenaps$ date
Fri Dec 31 19:04:34 EST 1999
edison@Bender1061:~/johnopenaps$
ok how in the world do you guys get the formating to show it like it's in putty?
Scott Leibrand
@scottleibrand
Oct 03 2016 00:17
put ``` on its own line before and after
that's three backticks
John Benjamin
@Bender1061
Oct 03 2016 00:17
ah
it would be nice if i could get this to work, but I don't know how to get rid of the extra 'something'
( cat monitor/clock-zoned.json; echo ) | while read line; do date +%F%T%:z -s $line; done
Scott Leibrand
@scottleibrand
Oct 03 2016 00:20
edison@edison-sf ~/myopenaps $ sudo date -s @147545393
Wed Sep  4 09:49:53 PDT 1974
edison@edison-sf ~/myopenaps $ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct  2 17:19:30 PDT 2016
edison@edison-sf ~/myopenaps $ date
Sun Oct  2 17:19:32 PDT 2016
edison@edison-sf ~/myopenaps $
what does your monitor/clock-zoned.json look like?
what I did there was set the time to be wrong, then run the command clockset.sh runs, and confirmed it set the time properly
John Benjamin
@Bender1061
Oct 03 2016 00:21
"2016-10-02T19:33:23-04:00"
sudo date +%F%T%:z -s "2016-10-02T19:33:23-04:00"
works
Scott Leibrand
@scottleibrand
Oct 03 2016 00:22
that might be more elegant than what I have too. let me try that
John Benjamin
@Bender1061
Oct 03 2016 00:22
then we could make it an alias
and that's simple to call when we need it
Scott Leibrand
@scottleibrand
Oct 03 2016 00:23
I'd like to have it run any time the loop fails due to date mismatch
John Benjamin
@Bender1061
Oct 03 2016 00:24
i would want it to delete the current clock-zoned first, get the clock-zoned, then run it
Scott Leibrand
@scottleibrand
Oct 03 2016 00:24

how does:

sudo date +%F%T%:z -s `cat $CLOCK | sed 's/"//g'`

work for you?

there is some other logic in my script to only set the time if the pump time is newer than the rig time. that reduces the need for having an absolutely up-to-date clock-zoned.json every time
oh, now I remember: that's why I did the more complicated conversion to epoch time first: that's how I can choose the later of rig time and pump time
Scott Leibrand
@scottleibrand
Oct 03 2016 00:29
so let's go back to that. can you try this?
export CLOCK=monitor/clock-zoned.json
sudo date -s @12345
date
(date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
date
that will confirm that it properly sets the time when the clock-zoned.json time is newer than the rig system time. and then a few seconds later, run the last three lines again to confirm that it does not set the rig system time back if the clock-zoned.json time is older.
John Benjamin
@Bender1061
Oct 03 2016 00:32
Ok, I'm a bit confused, are you wanting me to run that in the clockset.sh? cause I can't run that from the terminal
Scott Leibrand
@scottleibrand
Oct 03 2016 00:32
This message was deleted
oh, sorry, forgot one you have to do first, editing
there, now you can run it at a terminal
John Benjamin
@Bender1061
Oct 03 2016 00:34
yes that worked
Scott Leibrand
@scottleibrand
Oct 03 2016 00:35
ok, and if you try just the last three lines again, can you confirm it does not change the time backwards?
John Benjamin
@Bender1061
Oct 03 2016 00:37
what do you mean by backwards?
it just resets it to the latest clock-zoned
Scott Leibrand
@scottleibrand
Oct 03 2016 00:38
it should not do that
John Benjamin
@Bender1061
Oct 03 2016 00:39
ok let me double check that
Scott Leibrand
@scottleibrand
Oct 03 2016 00:39
it should reset it to the current system time (so a few ms back, but essentially no change)
John Benjamin
@Bender1061
Oct 03 2016 00:43
so on my rig, that i stopped from getting on the wifi, it's just resetting the time, it's currently not wining the race to the pump, so it's time is about 30 mins old
Scott Leibrand
@scottleibrand
Oct 03 2016 00:44
I'm not sure I'm following. can you paste the output?
maybe throw in a cat monitor/clock-zoned.json too
John Benjamin
@Bender1061
Oct 03 2016 00:45
''' edison@Bender1061:~/johnopenaps$ (date +%s; date -d ( cat $CLOCK; echo ) | sed 's/"//g' +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct 2 19:59:13 EDT 2016
edison@Bender1061:~/johnopenaps$ date
Sun Oct 2 19:59:14 EDT 2016
edison@Bender1061:~/johnopenaps$
'''
'''edison@Bender1061:~/johnopenaps$ (date +%s; date -d ( cat $CLOCK; echo ) | sed 's/"//g' +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct 2 19:59:13 EDT 2016
edison@Bender1061:~/johnopenaps$ date
Sun Oct 2 19:59:14 EDT 2016
edison@Bender1061:~/johnopenaps$'''
Scott Leibrand
@scottleibrand
Oct 03 2016 00:46
you did single quotes (') instead of backticks (`)
backticks are on the same key as ~
and they need to be on their own line, both before and after the code block
John Benjamin
@Bender1061
Oct 03 2016 00:46
yes i just realized that
edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done Sun Oct 2 19:59:13 EDT 2016 edison@Bender1061:~/johnopenaps$ date Sun Oct 2 19:59:14 EDT 2016 edison@Bender1061:~/johnopenaps$
edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct  2 19:59:13 EDT 2016
edison@Bender1061:~/johnopenaps$ date
Sun Oct  2 19:59:14 EDT 2016
edison@Bender1061:~/johnopenaps$
sucess!
Scott Leibrand
@scottleibrand
Oct 03 2016 00:48
so you're not pasting the date command before resetting it
but it looks like it keeps resetting the time back to the clock-zoned.json time, which it's not supposed to do
can you paste the output of:
(date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s)
echo
(date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort
are you on yocto or ubilinux? maybe also man date | tail -1
John Benjamin
@Bender1061
Oct 03 2016 00:52
edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s)
1475452917
1475452753
edison@Bender1061:~/johnopenaps$ echo

edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort
1475452753
1475452919
edison@Bender1061:~/johnopenaps$
i am using ubilinux
edison@Bender1061:~/johnopenaps$ export CLOCK=monitor/clock-zoned.json
You have new mail in /var/mail/edison
edison@Bender1061:~/johnopenaps$ sudo date -s @12345
Wed Dec 31 22:25:45 EST 1969
edison@Bender1061:~/johnopenaps$ date
Wed Dec 31 22:25:45 EST 1969
edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct  2 19:59:13 EDT 2016
edison@Bender1061:~/johnopenaps$ date
Sun Oct  2 19:59:15 EDT 2016
edison@Bender1061:~/johnopenaps$
sorry, the edit mode started messing me up
Scott Leibrand
@scottleibrand
Oct 03 2016 00:54
heh, was just about to ask for that. :)

ok, so it's setting the date forward correctly. can you do:

date
(date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
date

again?

John Benjamin
@Bender1061
Oct 03 2016 00:56
edison@Bender1061:~/johnopenaps$ date
Sun Oct  2 20:01:58 EDT 2016
edison@Bender1061:~/johnopenaps$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct  2 20:01:58 EDT 2016
edison@Bender1061:~/johnopenaps$ date
Sun Oct  2 20:01:59 EDT 2016
edison@Bender1061:~/johnopenaps$
so if i run that clockset.sh while connected to the ntp server, it's going to set my pump time?
is that really needed?
John Benjamin
@Bender1061
Oct 03 2016 01:05
cause it's that, that would put all the time change stuff to nightscout, right?
Scott Leibrand
@scottleibrand
Oct 03 2016 01:06
I agree, that's not ideal. hence: openaps/oref0#234 :-)
so with that, it will make sure the rig time is at least as recent as the last clock-zoned.json time every time oref0-determine-basal reports "clock set incorrectly", but it won't set the device times unless you run that manually
want to give that a read-through and either :+1: or comment on what else you'd do differently?
and ideally, pull down that branch, run npm run global-install on it, and test it out to make sure it does what you want
John Benjamin
@Bender1061
Oct 03 2016 01:09
sounds like a plan
John Benjamin
@Bender1061
Oct 03 2016 01:35
@scottleibrand should I be able to run
mkdir -p ~/src; cd ~/src && git clone -b clockset git://github.com/openaps/oref0.git || (cd oref0 && git checkout clockset && git pull)
to get that and run it all
does not want to work
Matthias
@ceben80
Oct 03 2016 01:39
@scottleibrand dramatically growth in, loop has stopped now, /root is 100% full, please advice
pi@pi3-aps-ti:~ $ sudo du -xh -d 3 /home/pi/myopenaps | egrep "[0-9][0-9][0-9]M|[0-9]G"
8.8G    /home/pi/myopenaps/.git/objects/pack
8.9G    /home/pi/myopenaps/.git/objects
9.0G    /home/pi/myopenaps/.git
pi@pi3-aps-ti:/var $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   14G     0 100% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           463M     0  463M   0% /dev/shm
tmpfs           463M  6.3M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   21M   43M  33% /boot
tmpfs            93M     0   93M   0% /run/user/1000
Matthias
@ceben80
Oct 03 2016 01:48
@scottleibrand but it is the middle of the night in germany I'am terribly sleepy. Unfortuantly will switch of my loop :cry: I have to sleep on.
I would appreciate a solution later, good night :zzz:
Scott Leibrand
@scottleibrand
Oct 03 2016 01:52
sorry, missed this in real time
you should be able to just rm -rf .git and oref0-reset-git will create a new one
@ceben80 let me know if that doesn't work
@Bender1061 you forgot to do npm run global-install
that installs the two new commands
then, if you want to update your loop to use oref0-set-system-clock instead of clockset.sh, you'll need to run oref0-setup.sh again (or make the modification directly yourself)
John Benjamin
@Bender1061
Oct 03 2016 01:56
edison@johnyfive:~$ npm run global-install
npm ERR! Error: ENOENT, open '/home/edison/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.10.17-yocto-standard-r2
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "global-install"
npm ERR! cwd /home/edison
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/edison/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/edison/npm-debug.log
npm ERR! not ok code 0
edison@johnyfive:~$
```
Scott Leibrand
@scottleibrand
Oct 03 2016 01:56
need to cd ~/src/oref0/ first
John Benjamin
@Bender1061
Oct 03 2016 01:56
lol, ok, yeah i guess that makes more sence
Dana Lewis
@danamlewis
Oct 03 2016 01:56
Gathering input in one place - what do you wish you knew before you started looping; what do you think others should know when considering closed loop technology, etc.? If you care to share your feedback, please fill out this form: https://goo.gl/forms/k4eclSWF0om3Oq2t2 Thanks!
John Benjamin
@Bender1061
Oct 03 2016 02:07
@scottleibrand that did not put the new .sh files into my oref0, What am I missing here, I'm not very familiar with npm so ...
i use WinSCP so I can look at files easy when I'm playing, and it does not show up there even after a refresh
Scott Leibrand
@scottleibrand
Oct 03 2016 02:26
it should allow you to run just oref0-set-system-clock (no .sh)
try typing oref0-set<tab>
@Bender1061 if that doesn't work, maybe paste the output of the npm run global-install
John Benjamin
@Bender1061
Oct 03 2016 02:32
edison@Bender1061:~/src/oref0$ sudo npm run global-install

> oref0@0.2.0 global-install /home/edison/src/oref0
> npm install && sudo npm install -g && sudo npm link && sudo npm link oref0

npm WARN deprecated lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
/usr/local/bin/clockset -> /usr/local/lib/node_modules/oref0/bin/clockset.sh
/usr/local/bin/oref0-calculate-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js
/usr/local/bin/oref0-meal -> /usr/local/lib/node_modules/oref0/bin/oref0-meal.js
/usr/local/bin/oref0-normalize-temps -> /usr/local/lib/node_modules/oref0/bin/oref0-normalize-temps.js
/usr/local/bin/send-tempbasal-Azure -> /usr/local/lib/node_modules/oref0/bin/send-tempbasal-Azure.js
/usr/local/bin/oref0-fix-git-corruption -> /usr/local/lib/node_modules/oref0/bin/oref0-fix-git-corruption.sh
/usr/local/bin/oref0-get-profile -> /usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js
/usr/local/bin/oref0-mint-max-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-mint-max-iob.sh
/usr/local/bin/oref0-ifttt-notify -> /usr/local/lib/node_modules/oref0/bin/oref0-ifttt-notify
/usr/local/bin/oref0-raw -> /usr/local/lib/node_modules/oref0/bin/oref0-raw.js
/usr/local/bin/oref0-reset-usb -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-usb.sh
/usr/local/bin/oref0-reset-git -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-git.sh
/usr/local/bin/mm-format-ns-glucose -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-glucose.sh
/usr/local/bin/mm-format-ns-profile -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-profile.sh
/usr/local/bin/mm-format-ns-treatments -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-treatments.sh
/usr/local/bin/mm-format-ns-pump-history -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-pump-history.sh
/usr/local/bin/oref0 -> /usr/local/lib/node_modules/oref0/bin/oref0.sh
/usr/local/bin/mm-stick -> /usr/local/lib/node_modules/oref0/bin/mm-stick.sh
/usr/local/bin/ns-upload-entries -> /usr/local/lib/node_modules/oref0/bin/ns-upload-entries.sh
/usr/local/bin/ns-upload -> /usr/local/lib/node_modules/oref0/bin/ns-upload.sh
/usr/local/bin/ns-get -> /usr/local/lib/node_modules/oref0/bin/ns-get.sh
/usr/local/bin/ns-status -> /usr/local/lib/node_modules/oref0/bin/ns-status.js
/usr/local/bin/nightscout -> /usr/local/lib/node_modules/oref0/bin/nightscout.sh
/usr/local/bin/ns-dedupe-treatments -> /usr/local/lib/node_modules/oref0/bin/ns-dedupe-treatments.sh
/usr/local/bin/oref0-html -> /usr/local/lib/node_modules/oref0/bin/oref0-html.js
/usr/local/bin/oref0-template -> /usr/local/lib/node_modules/oref0/bin/oref0-template.js
/usr/local/bin/oref0-copy-fresher -> /usr/local/lib/node_modules/oref0/bin/oref0-copy-fresher
/usr/local/bin/oref0-pebble -> /usr/local/lib/node_modules/oref0/bin/oref0-pebble.js
/usr/local/bin/oref0-crun -> /usr/local/lib/node_modules/oref0/bin/oref0-conditional-run.sh
/usr/local/bin/oref0-find-insulin-uses -> /usr/local/lib/node_modules/oref0/bin/oref0-find-insulin-uses.js
/usr/local/bin/oref0-detect-sensitivity -> /usr/local/lib/node_modules/oref0/bin/oref0-detect-sensitivity.js
/usr/local/bin/oref0-determine-basal -> /usr/local/lib/node_modules/oref0/bin/oref0-determine-basal.js
oref0@0.2.0 /usr/local/lib/node_modules/oref0
├── yargs@4.3.2 (decamelize@1.2.0, camelcase@2.1.1, y18n@3.2.1, require-main-filename@1.0.1, window-size@0.2.0, lodash.assign@4.2.0, yargs-parser@2.4.1, os-locale@1.4.0, string-width@1.0.2, cliui@3.2.0, pkg-conf@1.1.3, read-pkg-up@1.0.1)
├── share2nightscout-bridge@0.1.5 (request@2.53.0)
├── moment@2.15.1
├── timezone@0.0.47
└── lodash@4.16.2
/usr/local/bin/clockset -> /usr/local/lib/node_modules/oref0/bin/clockset.sh
/usr/local/bin/oref0-calcu
Scott Leibrand
@scottleibrand
Oct 03 2016 02:32
looks like you didn't get the clockset branch
git branch ?
John Benjamin
@Bender1061
Oct 03 2016 02:33
ok this is what is throwing me
how do i set the git branch first?
Scott Leibrand
@scottleibrand
Oct 03 2016 02:33
if it's not already there, do git fetch && git checkout clockset
John Benjamin
@Bender1061
Oct 03 2016 02:34
when i was running the oref0-setup I was just modifying the command that's on the wiki, and i was wondering why the same thing would not work with clockset
Scott Leibrand
@scottleibrand
Oct 03 2016 02:34
it probably would: paste what you ran, and what you got?
John Benjamin
@Bender1061
Oct 03 2016 02:36
OK I put in
mkdir -p ~/src; cd ~/src && git clone -b clockset git://github.com/openaps/oref0.git || (cd oref0 && git checkout clockset && git pull)
this time it worked
did not 10 mins ago
Scott Leibrand
@scottleibrand
Oct 03 2016 02:36
probably because you ran git fetch or git pull since then
without one of those, it won't know about the new clockset branch on the server
John Benjamin
@Bender1061
Oct 03 2016 02:36
man, i need do so some reading on git
lol
Scott Leibrand
@scottleibrand
Oct 03 2016 02:37
or you can do like I did and learn it all the hard way, googling or asking questions when you get stuck. ;-)
David
@davidkeddydb
Oct 03 2016 03:07
I was curious about how long a 3350mah battery would run an edison and sparkfun board. I don't know that yet, but I can tell you that the 3350 will run a Raspberry Pi3 for approximately 4.5 hours. That is with a carelink stick and the dexcom not plugged into the Pi3.
Scott Leibrand
@scottleibrand
Oct 03 2016 03:15

@Bender1061 can you do:

export CLOCK=monitor/clock-zoned.json
cat $CLOCK
date
(date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
date

for me?

John Benjamin
@Bender1061
Oct 03 2016 03:16
edison@Bender1061:~/johnopenaps1$ export CLOCK=monitor/clock-zoned.json
You have mail in /var/mail/edison
edison@Bender1061:~/johnopenaps1$ date
Fri Dec 31 19:30:00 EST 1999
edison@Bender1061:~/johnopenaps1$ sudo date -s @12345
Wed Dec 31 22:25:45 EST 1969
edison@Bender1061:~/johnopenaps1$ date
Wed Dec 31 22:25:45 EST 1969
edison@Bender1061:~/johnopenaps1$ (date +%s; date -d `( cat $CLOCK; echo ) | sed 's/"//g'` +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done
Sun Oct  2 23:13:54 EDT 2016
edison@Bender1061:~/johnopenaps1$ date
Sun Oct  2 23:13:55 EDT 2016
edison@Bender1061:~/johnopenaps1$
Scott Leibrand
@scottleibrand
Oct 03 2016 03:16
hmm
John Benjamin
@Bender1061
Oct 03 2016 03:17
is the script not getting to the monitor/clock-zoned.json correctly
I tried changing the PATH as well to the one that is in my cron but that did not help
and i did make a new loop, but i never did see it try to run that script as well, and i watched it for maybe 10 mins
Scott Leibrand
@scottleibrand
Oct 03 2016 03:19
not sure if that would be visible if it's failing. need to figure that part out first
try running oref0-set-system-clock monitor/clock-zoned.json
and let me go see if I can reproduce
John Benjamin
@Bender1061
Oct 03 2016 03:24
when you ask me to run that, are you meaning directly or ...
Scott Leibrand
@scottleibrand
Oct 03 2016 03:24
yeah, should be able to copy and paste that directly
John Benjamin
@Bender1061
Oct 03 2016 03:25
edison@Bender1061:~/johnopenaps1$ oref0-set-system-clock monitor/clock-zoned.json
-bash: oref0-set-system-clock: command not found
You have new mail in /var/mail/edison
edison@Bender1061:~/johnopenaps1$
Scott Leibrand
@scottleibrand
Oct 03 2016 03:25
hmm, your npm run global-install never worked either
did you re-run that after switching branches?
John Benjamin
@Bender1061
Oct 03 2016 03:26
nope
doing that now
Scott Leibrand
@scottleibrand
Oct 03 2016 03:27
I also just pushed an update with an extra echo statement that might be useful
so it'll output Setting system time to newer of Sat Oct 1 16:40:17 PDT 2016 or "2016-10-01T16:37:58-07:00": or similar before the time
John Benjamin
@Bender1061
Oct 03 2016 03:28
ok cool
Scott Leibrand
@scottleibrand
Oct 03 2016 03:28
give that a shot and LMK
John Benjamin
@Bender1061
Oct 03 2016 03:29
will do
diabeticgonewild
@diabeticgonewild
Oct 03 2016 03:54
I never puked so hard and long ever in my life. Finally stopped heaving. Hopefully it's just that I caught something or something like that. Gastric pacemaker battery is running low so kind of concerned.
It scared my dogs. And I'm surprised nobody else woke up from the loud noise of it.
John Benjamin
@Bender1061
Oct 03 2016 04:29
@scottleibrand
edison@Bender1061:~/johnopenaps2$ oref0-set-system-clock monitor/clock-zoned.json
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Restarting ntp (via systemctl): ntp.service.
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Setting system time to later of Fri Dec 31 19:19:57 EST 1999 or "2016-10-03T00:24:50-04:00":
Fri Dec 31 19:19:57 EST 1999
edison@Bender1061:~/johnopenaps2$ date
Fri Dec 31 19:20:17 EST 1999
I've got to go to bed but wanted you to see that before.
Scott Leibrand
@scottleibrand
Oct 03 2016 04:34
that is bizarre
it's doing the exact same thing in the script that you did successfully on the command line
I'll add another debug statement so we can see exactly what it's doing and then try that exact command manually
tomorrow is fine
Scott Leibrand
@scottleibrand
Oct 03 2016 04:43
ok, pushed. you can do a cd ~/src/oref0/ && git pull and then cd ~/johnopenaps2 && ~/src/oref0/bin/oref0-set-system-clock.sh (or do the full npm run global-install and re-run what you did above)
that will print out the exact string the script is about to run. in my case, the output looks like:
Setting system time to later of Sun Oct 2 21:41:44 PDT 2016 or "2016-10-02T21:11:49-07:00":
(date +%s; date -d 2016-10-02T21:11:49-07:00 +%s) | sort | tail -1 | while read line; do sudo date -s @$line; done;
Sun Oct  2 21:41:44 PDT 2016
Stewart
@sbalint
Oct 03 2016 04:48
@kellyisworking my old medtronic pump (now my opens pump) has a similar crack, no issues. I used the pump for year like that :)
Matthias
@ceben80
Oct 03 2016 04:57
@scottleibrand quity easy but thought the best way is asking you, thanks, my loop is running again :star2:
Fortunately I wake up with 101 but not in double digits, that's bad :cry:
.....joke :smile: :smile: :smile:
pi@pi3-aps-ti:~/myopenaps $ rm -rf .git
pi@pi3-aps-ti:~/myopenaps $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  5.1G  9.0G  37% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           463M     0  463M   0% /dev/shm
tmpfs           463M  6.3M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   21M   43M  33% /boot
tmpfs            93M     0   93M   0% /run/user/1000
pi@pi3-aps-ti:~/myopenaps $ oref0-reset-git
Attempting to fix git corruption.  Please wait 15s.
fatal: Not a git repository (or any of the parent directories): .git
find: `.git/logs/refs/heads/': No such file or directory
Error: Could not find last valid commit; aborting.
fatal: Not a git repository (or any of the parent directories): .git
/usr/local/bin/oref0-reset-git: line 52:  3315 Terminated              ( sleep 15; killall oref0-fix-git-corruption )
Saving backup to: /tmp/git-1475470116
mv: cannot stat ‘.git’: No such file or directory
Initialized empty Git repository in /home/pi/myopenaps/.git/
[master (root-commit) b5bb832] initializing openaps 0.1.5
 1 file changed, 334 insertions(+)
 create mode 100644 openaps.ini
Scott Leibrand
@scottleibrand
Oct 03 2016 05:09
@ceben80 lol
you and your better-than-non-T1 A1c. ;-)
Kelly Watson
@kellyisworking
Oct 03 2016 05:14
thanks @sbalint :) great to hear.
Matthias
@ceben80
Oct 03 2016 05:22
@scottleibrand I'm cured by using openAPS, might be offer my rig and pump in ebay :sunglasses:
Scott Leibrand
@scottleibrand
Oct 03 2016 05:22
you might get un-cured really fast that way. ;-)
Matthias
@ceben80
Oct 03 2016 05:26
:smile:
Today I'm gonna try to attach a sparkfun sd card to my Edison....
blob
Scott Leibrand
@scottleibrand
Oct 03 2016 05:28
why?
Matthias
@ceben80
Oct 03 2016 05:28
ns and mongo local installation, fuxxing azure, want to get rid of this stuff
Scott Leibrand
@scottleibrand
Oct 03 2016 05:29
ah.
Matthias
@ceben80
Oct 03 2016 05:30
@SandraK82 has been successfully installed both on her local device, will try her script at https://github.com/SandraK82/deploy-ns-local-raspi
Matthias
@ceben80
Oct 03 2016 05:42
@scottleibrand Q to logs in /var/log/openaps
Log rotation in place here :question:
Scott Leibrand
@scottleibrand
Oct 03 2016 05:43
should be. check /etc/logrotate.d/openaps
Matthias
@ceben80
Oct 03 2016 05:45
great, will do :+1:
only set for loop.log
/var/log/openaps/loop.log {
  rotate 30
  daily
  size 0M
  compress
  delaycompress
  missingok
  notifempty
Scott Leibrand
@scottleibrand
Oct 03 2016 05:48
oops, need to fix that
Matthias
@ceben80
Oct 03 2016 05:48
Should be add in your script :wink:
for the new logs
today night I was running out to space I noticed that the ´pump-loop.log` and the others were growth extrem
Scott Leibrand
@scottleibrand
Oct 03 2016 05:50
fix pushed
you'll need to re-run oref0-setup or change yours manually
just changed it from loop.log to *.log
Matthias
@ceben80
Oct 03 2016 05:55
great Scott :+1:
Matthias
@ceben80
Oct 03 2016 06:00
just nano /etc/logrotate.d/openaps
....
Scott Leibrand
@scottleibrand
Oct 03 2016 06:02
yeah, just to not have to do this again. :)
Matthias
@ceben80
Oct 03 2016 06:04

it't to early here and I am sleepy :smile:

/var/log/openaps/*.log {
rotate 30
daily
size 10M
compress
delaycompress
missingok
notifempty
}

Scott Leibrand
@scottleibrand
Oct 03 2016 06:05
not sure 0M will work right
that tells it to rotate the log file if it gets more than 10M
Matthias
@ceben80
Oct 03 2016 06:07
wtf paste/copy error
too sleepy
ah...ok, copy error here in gitter
no....gitter does not show the "1" in size 0M
Scott Leibrand
@scottleibrand
Oct 03 2016 06:10
weird
Matthias
@ceben80
Oct 03 2016 06:10
strange
looks better :wink:
Scott Leibrand
@scottleibrand
Oct 03 2016 06:11
very odd
Matthias
@ceben80
Oct 03 2016 06:12
finally making my breakfast now, bye :wink:
Scott Leibrand
@scottleibrand
Oct 03 2016 06:12
have a good Monday. :)
Matthias
@ceben80
Oct 03 2016 06:20
There is a public holiday in Germany - yeah "Tag der Deutschen Einheit"
Scott Leibrand
@scottleibrand
Oct 03 2016 06:22
nice. not many holidays commemorate something I actually remember happening. :)
Matthias
@ceben80
Oct 03 2016 06:25
somebody should establish a openAPS holiday :smile:
John Sjolund
@sjolundjohn
Oct 03 2016 07:55

@scottleibrand in the new setup script, on Pi, I note that preflight is going. There are many aliases for the mmtune setup, but not much in terms of preflight for PI.

Last night it seems USB stick died, and there was no way to cycle it.

I assume I should add a USB powercycle line to cron tasks? Any tips?

I would have wanted to add USB cycle lines directly in setup script

Tim Street
@tim2000s
Oct 03 2016 08:50
@sjolundjohn I added the oref0-reset-usb command to the error handling in the pump-loop alias. That handled it nicely.
Heiner1
@Heiner1
Oct 03 2016 09:14
@scottleibrand , Hi Scott, I had not mch time the last days and couldn't answer (and ask you again).
My I old and new question is: I have, as an adult! person, a max. Basal Rate of 0.45U/h with a daily summary of 7,8U. Is, on your opinion, there a chance to handle the great peaks, up and down, in this situation?
I know there are children with these low BR rates. But you cannot compare a small children body with a weight from may be 10 to 30 kilos with the body and metabolic system of an adult person.
John Sjolund
@sjolundjohn
Oct 03 2016 09:14

@tim2000s thanks! I tested adding:

* * * * * killall -g --older-than 7m openaps && sudo oref0-reset-usb

So far so good

John Sjolund
@sjolundjohn
Oct 03 2016 12:11

Could somebody that has a fully working wifi setup on a Edison rig share their wpa_supplicant.conf contents in full (minus password) and any other file of relevance?

I can connect fine to any wifi network, but it never switches, I need to restart Edison for it to hop to next one.

IE if I have rig at home, leave home network, it won't switch over to Mobile hotspot

Hannah Crabtree
@lollydaggle
Oct 03 2016 13:18
what battery pack are people using for the Edison that does pass through charging? I am struggling. The Anker on the mmeowlink page must be older because the newer ones don't seem to support pass through?
It was sufficient to recharge my edison rig for a week during a recent canoe trip. (And it does pass through charging...)
Hannah Crabtree
@lollydaggle
Oct 03 2016 13:38
@tazitoo thanks! can the Edison be charged like a phone or does it have to be constantly connected to a battery pack (like the Pi)? Because I thought the issue was the larger packs wouldn't recognize the power draw with the Edison.
will be using the sparkfun board
Dana Lewis
@danamlewis
Oct 03 2016 14:09
@lollydaggle I use a smaller (2200mah) hour that works good with edison rigs, and I just leave it plugged in to charge. https://twitter.com/danamlewis/status/781693069494063108
David
@davidkeddydb
Oct 03 2016 14:31
@danamlewis When you are mobile, how much time roughly in hours will the 2200mah get you using the smaller explorer board vs say what @lollydaggle and I will be doing with a TI stick and a sparkfun board?
Just curious if you have used the 2200mah with any of your other bigger rigs and how it did for time?
Dana Lewis
@danamlewis
Oct 03 2016 14:39
Haven't done enough battery tests to compare specific to explorer, but with Edison/ti, a fully charged 2200 lasts me something like 20 hours for this Erica
*for those rigs
David
@davidkeddydb
Oct 03 2016 14:45
@danamlewis Thanks. @lollydaggle will have hers set up in a night....mine will take a little longer. If I were to bet :smile:
Dana Lewis
@danamlewis
Oct 03 2016 15:03
:)
David
@davidkeddydb
Oct 03 2016 16:12
Can you flash the TI stick direct from the Raspberry or do you have to be on a pc or a mac to do it?
Rob Kresha
@rkresha
Oct 03 2016 16:19
with the cgm raw entries report, does this get us past the 2 hour warm up period?
Hannah Crabtree
@lollydaggle
Oct 03 2016 16:31
@davidkeddydb the pi rig was straightforward for me but already lost on the edison haha
I should've upgraded when my pi rig was working and there'd be less pressure.
Sandra Keßler
@SandraK82
Oct 03 2016 16:40
@davidkeddydb i was Not able to get the cc-tool running on the raspi
Scott Leibrand
@scottleibrand
Oct 03 2016 17:08
There is a new ccprog that can flash TI from Pi. No one has documented the pinout to command mapping yet afaik though.
@lollydaggle are you following the mmeowlink wiki for the Edison?
@davidkeddydb I would expect about half the battery life from a USB battery pack and sparkfun base block with OTG vs. a lipo and serial TI stick of the same mAh.
C-Ville
@C-Ville
Oct 03 2016 17:12
the switch from carelink (USB) to ERF serial got me a lot of mileage from my 10400 mAh power bank
Hannah Crabtree
@lollydaggle
Oct 03 2016 17:14
@scottleibrand Yep, mmeowlink is my starting point. Is that the most up to date spot?
Scott Leibrand
@scottleibrand
Oct 03 2016 17:15
Yep. I've updated the Edison one there and tested it recently with jubilinux, so it should work.
David
@davidkeddydb
Oct 03 2016 17:15
@scottleibrand @SandraK82 @lollydaggle Thanks. Undocumented for this means I will go via Windows :) I know I am already in over my head, now that I am messing with hardware too. I was just psyched that Edison has a sticky on the back to attach to the Sparkfun board vs needing to find the right size screws!
Hannah Crabtree
@lollydaggle
Oct 03 2016 17:17
@davidkeddydb you just saved me because I was about to buy screws :smile:
David
@davidkeddydb
Oct 03 2016 17:19
I just go the sparkfun board today and I had the Edison so I was trying to figure how to put them together when I saw the little sticky pad. (At least I hope that it is what it is) :)
I have the lipstick size 3350mah which people have posted they have gotten 12 hours running, so that will more than do what I need hopefully.
C-Ville
@C-Ville
Oct 03 2016 17:21
@lollydaggle one gets so addicted to looping it is not even fun anymore ;-)
Hannah Crabtree
@lollydaggle
Oct 03 2016 17:22
@C-Ville I started to think of it as a hobby first with an added bonus of improving my quality of life
Chris Oattes
@cjo20
Oct 03 2016 17:23
You should be able to do more than 12 hours with an edison and 3350mAh
With an edison that should easily do 24 hours fully charged
Pete Schwamb
@ps2
Oct 03 2016 17:23
@davidkeddydb @SandraK82 The ccprog tool should work with any available GPIO pins. You just need to pick three, and connect those DD, DC, and RST on whatever cc111x board you’re using.
Eric
@ecc1
Oct 03 2016 17:23
No sticky pad on the Edison module unless they've changed it very recently. Are you talking about the label on the bottom?
C-Ville
@C-Ville
Oct 03 2016 17:24
@lollydaggle it definetly improves quality of live :-) I only learned by how much when I had so turn off the loop on my holidays for 2 weeks. (I directly switched from getting a pump to looping the next day)
David
@davidkeddydb
Oct 03 2016 17:24
@ecc1 I am laughing. I will have to take it out of the bag.
Eric
@ecc1
Oct 03 2016 17:26
On the Sparkfun base board, I found it helpful to put a couple of low-profile stick-on plastic feet underneath the module, to prevent it from being levered off the connector. It stays on reasonably well then (but not as well as on the mini-breakout with its 2 screw posts)
David
@davidkeddydb
Oct 03 2016 17:27
@ecc1 @lollydaggle Had I actually taken it out of its little plastic holder, I would have realized that it is not a sticky as I had thought. @lollydaggle Can I buy 2 screws from you? Do most even screw the board down?
@ecc1 Thanks. I would think it would stay pretty connected just given the connector on the board but I will fasten it down.
Hannah Crabtree
@lollydaggle
Oct 03 2016 17:29
@davidkeddydb There's a hardware kit from Sparkfun for the Edison so that's where I assumed I'd need to screw it to the board
Eric
@ecc1
Oct 03 2016 17:30
Those are mainly for assembling stacks of Sparkfun boards (base board + whatever)
David
@davidkeddydb
Oct 03 2016 17:30
@lollydaggle Someone was just talking about those screws and commenting they might be too big, but I could be wrong
C-Ville
@C-Ville
Oct 03 2016 17:31
@davidkeddydb yes the screws for interconnecting sparkfun blocks are to large to connect the edison to the sparkfun
David
@davidkeddydb
Oct 03 2016 17:34
@C-Ville Thanks. I thought I read that somewhere. Once I get all this flashed, hopefully this week, I need to find something to jam it all into that is easy to carry around. Lot of cool small plastic boxes and 3d stuff that had been done. Hopefully I can get the flashing done fairly easily. I am not going near my mac as I don't want the extra work!
Tim Street
@tim2000s
Oct 03 2016 17:37
If you're having issues with cc-tool on Linux, Ti provide a windows tool that allows you to do the same thing. I ended up using that.
C-Ville
@C-Ville
Oct 03 2016 17:38
@davidkeddydb I asked @ceben80 to help me out by measuring the breakout board screws with calipers and he came to about 1.5 mm so I decided to get myself 1.6 mm screws
@davidkeddydb I accidentially disconnected the Edison from my loop recently, this is why I started paying attention to that
David
@davidkeddydb
Oct 03 2016 17:41
@tim2000s Thanks. I will keep that in mind when I get ready to do the cc-tool. @C-Ville Thanks. I will either do screws or see if I can find a thin 3m adhesive or double sided tape and put it under it
David
@davidkeddydb
Oct 03 2016 17:47
@C-Ville How short are the screws that you ended up getting?
C-Ville
@C-Ville
Oct 03 2016 17:49
@davidkeddydb I did not get scews yet, but from my knowledge in the lab I know that M1.6 even in stainless steel can easily be capped by a wire cutter
David
@davidkeddydb
Oct 03 2016 17:55
@C-Ville Thanks. Perfect.
Scott Leibrand
@scottleibrand
Oct 03 2016 17:59
not sure why people think the Sparkfun screws don't work. That's what we're using and they work great.
you place one of the brass spacers in between the edison and the base block, screw in from the edison side, and use one of the nuts on the back side of the base block (or another brass spacer if you have another block)
C-Ville
@C-Ville
Oct 03 2016 18:01
@scottleibrand the diameter of the nut seems to be larger than the distance from the plastic of the hirose connector
Scott Leibrand
@scottleibrand
Oct 03 2016 18:03
not sure what a hirose connector is
Pete Schwamb
@ps2
Oct 03 2016 18:07
The hirose connector is what the edison plugs into.
They do come in slightly different depths.
Scott Leibrand
@scottleibrand
Oct 03 2016 18:09
IMG_7936.jpg
IMG_7936.jpg
That's on the Explorer. I did the same thing with the Sparkfun base block.
Eric
@ecc1
Oct 03 2016 18:21
Sorry for spreading misinformation; for some reason I eyeballed those Sparkfun screws and spacers and never considered them for the Edison module itself.
Scott Leibrand
@scottleibrand
Oct 03 2016 18:25
Dunno if they're designed for that, but they work fine. :smile:
Sandra Keßler
@SandraK82
Oct 03 2016 18:27
how can i adjust the aggressives of the loop? it think it calculated isf wrong (>40 instead of 30 what worked very well for me) and now I have been ~200 for last 3 hours
Dana Lewis
@danamlewis
Oct 03 2016 18:28
you can set a cap on auto-sens in either end of ISF to max what it will calculate for you
Sandra Keßler
@SandraK82
Oct 03 2016 18:30
ok, I will try
Dana Lewis
@danamlewis
Oct 03 2016 18:31
might also be worth digging in and ensuring it’s pulling in the right amount of data to calculate, etc.
John Benjamin
@Bender1061
Oct 03 2016 18:37
@sjolundjohn Setup multiple wifi access Points
$ sudo nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#auto usb0
iface usb0 inet static
    address 192.168.2.15
    netmask 255.255.255.0

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
   wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp
#iface wlan0 inet dhcp
    # For WPA
   # wpa-ssid DasDing
   # wpa-psk ********
    # For WEP
    #wireless-essid Emutex
    #wireless-mode Managed
    #wireless-key s:password
# And the following 4 lines are for when using hostapd...
#auto wlan0
#iface wlan0 inet static
#    address 192.168.42.1
#    netmask 255.255.255.0


$ sudo nano  /etc/wpa_supplicant/wpa_supplicant.conf

network={
        ssid="John's iPhone"
        psk="*****"
        key_mgmt=WPA-PSK
}

network={
        ssid="Verizon-SM-G930V-2598"
        psk="*****"
}

network={
        ssid="DasDing"
        psk="******"
        key_mgmt=WPA-PSK
}
Heiner1
@Heiner1
Oct 03 2016 18:37
My old question is: I have, as an adult! person, a max. Basal Rate of 0.45U/h with a daily summary of 7,8U. Is there a chance to handle the great peaks, up and down, in this situation?
I know there are children with these low BR rates. But you cannot compare a small children body with a weight from may be 10 to 30 kilos with the body and metabolic system of an adult person.
Are there any T1D who are in the same situation?
Sorry I think it's the wrong moment, but whom or when should I ask?
John Benjamin
@Bender1061
Oct 03 2016 18:37
That's what I use at least on my edison
Dana Lewis
@danamlewis
Oct 03 2016 18:38
@Heiner1 are you having uncontrolled peaks? Without additional data, it’s hard to answer this question.
John Sjolund
@sjolundjohn
Oct 03 2016 18:39
@Bender1061 thanks! And you have a static IP - any issues when moving between work/home/mobile and possible locked DHCP or firewall?
Dana Lewis
@danamlewis
Oct 03 2016 18:39
There are other factors that go into whether the system can handle peaks, including your max basal rate; your ISF; your target(s), etc.
Scott Leibrand
@scottleibrand
Oct 03 2016 18:39
@SandraK82 the most important thing to get right for autosens is your basal profile. If basals are too high, and it's always having to low-temp you, it will adjust accordingly, which can have side effects on trying to bring you down from highs.
@sjolundjohn no he is using dhcp on the wireless interface.
Static is only for usb0
John Benjamin
@Bender1061
Oct 03 2016 18:40
when it does it's scan it tries to start at the first network then down. I like having my iphone or android beable to connect over my homewifi if I want, and the new script checks it with cron and scans if it needs too
but i've had no issues at all
John Sjolund
@sjolundjohn
Oct 03 2016 18:41
OK - I will give it a test. My Edison rig is down due to my Powerboost shorting - will get my spare wired up tomorrow and will test.
Scott Leibrand
@scottleibrand
Oct 03 2016 18:42
@sjolundjohn I think you're barking up an empty tree with the interfaces and wpa_supplicant files. If you want dhcp to work more reliably you have to do something out of band to test connectivity and restart things if it's down.
We should add such a check to oref0-setup probably.
John Sjolund
@sjolundjohn
Oct 03 2016 18:43
@scottleibrand I do not have a need for advanced settings. On my Pi it works perfectly - I just haven't gotten the Edison rigs to be able to change WIFI networks when one goes out of range
Scott Leibrand
@scottleibrand
Oct 03 2016 18:43
Have you looked at it on console when that happens?
C-Ville
@C-Ville
Oct 03 2016 18:43
@sjolundjohn the raspberry pi is way more forgiving with the wifi settings
Scott Leibrand
@scottleibrand
Oct 03 2016 18:44
Need to differentiate between not switching networks and not getting a new IP
John Sjolund
@sjolundjohn
Oct 03 2016 18:44
@scottleibrand no I have not been able to check in console well. When it happens, I am totally locked out so can't connect. I could check via serial I suppose, but have not
Scott Leibrand
@scottleibrand
Oct 03 2016 18:44
I would plug in the USB cable next time it happens.
John Sjolund
@sjolundjohn
Oct 03 2016 18:45

Need to differentiate between not switching networks and not getting a new IP

Fair - I can not say with certainty which it is

So - get a serial connection and check?
Scott Leibrand
@scottleibrand
Oct 03 2016 18:45
Ya. Use the wpa CLI tools and check ifconfig.
Or ssh to the USB static ip over USB if you prefer.
Heiner1
@Heiner1
Oct 03 2016 18:46
@danamlewis , sure without any data it's complicated. But my question is, if only changing the BR could take an influence on my BG. Yesterday for example my BS was slowly decreasing, I stopped the BR for 2 hours and after an hour I saw no changes and had to take dextrose.
John Sjolund
@sjolundjohn
Oct 03 2016 18:46

Ok - going to test and report back.

Thanks for the help :-)

Scott Leibrand
@scottleibrand
Oct 03 2016 18:47
@Heiner1 the loop can only shut off insulin. It will do so early, and keep it off until you start rising. But if you have endogenous insulin production, your body gets to decide how low you go.
Dana Lewis
@danamlewis
Oct 03 2016 18:47
@Heiner1 can you share a NS screenshot from that time? depending on previous boluses and basals, there could have been so much insulin impact that you were going to need to do carbs regardless. but without full context, hard to answer Qs about it or recommend adjustments
C-Ville
@C-Ville
Oct 03 2016 18:47
@sjolundjohn if you can figure something out I would be highly interested. I do have a rig with Block SD and Block GPIO but no console access. Therefore I once in a while need to coldstart my edison to reconnect to a Wifi
Scott Leibrand
@scottleibrand
Oct 03 2016 18:48
Have you tried @TC2013's script?
John Sjolund
@sjolundjohn
Oct 03 2016 18:50
@scottleibrand @danamlewis I have given some feedback on the script - but what I haven't said his how much I love the new process logic and what you see in tail when following it. A world of difference from what I had in my earlier tail when it would report back the reports being invoked. This is so nice. Thanks
Dana Lewis
@danamlewis
Oct 03 2016 18:51
:+1: thanks for the continued feedback! it’s very helpful.
C-Ville
@C-Ville
Oct 03 2016 18:52
@scottleibrand I was hoping for a complete offline loop so pinging google did not seem appealing to me, therefore I did not yet use that script.
John Sjolund
@sjolundjohn
Oct 03 2016 18:54
I did test the script but was not successful. Likely I need to go back and see what/where I made a error
Hannah Crabtree
@lollydaggle
Oct 03 2016 18:58
I should've asked this question a week ago: can I pull CGM data from my receiver with an Edison rig still?
Heiner1
@Heiner1
Oct 03 2016 18:58
@scottleibrand , I have no endogenous insulin production :worried: .
@danamlewis , Difficult because I have till now no running Loop. I've only xDrip+ with libre and LimiTTer for measuring, I'll try to send you a screenshot from the mobile, but this is only tomorrow possible, when I have the latest xDrip version installed.
I ask you, because I have to decide whether to build my loop system or not. It has to make sense for me - and, in this case, I have to buy another insulin pump (much money for me) .
Dana Lewis
@danamlewis
Oct 03 2016 19:00
ah, so you’re manually reducing temp basal rate it sounds like? are you tracking net iob? that may help more
David
@davidkeddydb
Oct 03 2016 19:00
@lollydaggle I am curious also. You have no spot to plug a usb into on the sparkfun board. I am guessing you would need to add another board on to do that.
Heiner1
@Heiner1
Oct 03 2016 19:02
@danamlewis , tracking net iob..... what does this mean?
Scott Leibrand
@scottleibrand
Oct 03 2016 19:02
@davidkeddydb what do you mean "no spot to plug a USB into"? that's what USB OTG is for.
@Heiner1 have you tried HAPP yet?
@Heiner1 net IOB is the same as the IOB you'd see on a pump, but adjusted up or down for temporary basals
Heiner1
@Heiner1
Oct 03 2016 19:05
@scottleibrand , HAPP I tried a month before, but it doesn't work for me. Should I try it again? Improvements?
Scott Leibrand
@scottleibrand
Oct 03 2016 19:05
the way OpenAPS works is to calculate your current BG, plus the effect of net IOB (times your ISF), and compare that to the target BG range. so if you're 140 mg/dL with 1.5U IOB and an ISF of 40, then it will low-temp (even though you're still a bit high) to keep you from dropping all the way to 80
"doesn't work for you" how?
Hannah Crabtree
@lollydaggle
Oct 03 2016 19:06
@davidkeddydb still only two micro-usb ports on the base block so now I know why I need a 2 pin JST connected battery... Then, I don't really see a reason why I couldn't pull it from a receiver
C-Ville
@C-Ville
Oct 03 2016 19:42
has anyone tried to splice the new yocto kernel 3.10.98 into ubilinux? I was wondering if this would help for wifi and BT and of course if that is feasible using https://github.com/LGSInnovations/Edison-Ethernet/blob/master/guides/ubilinux-splice-kernel.md
tazitoo
@tazitoo
Oct 03 2016 19:45
@C-Ville - I use BT on ubilinux upgraded to jessie using @oskarpearson 's upgrade guide and @bewest 's opensharexble with my G4 share...no splicing of new kernel necessary...
Scott Leibrand
@scottleibrand
Oct 03 2016 19:45
@tazitoo what kernel is that?
my ubilinux and jubilinux boxes are all 3.10.17-yocto-standard-r2
@tazitoo also, are you using BT tethering, or just openxshareble?
getting BT tethering working on the edison with jubilinux is one of the next things on my list to try
C-Ville
@C-Ville
Oct 03 2016 19:48
@tazitoo unfortunately G4 share is exclusive in US, so I need my data in from Xdrip/Xdrip+ I have not seen anything doing that, therefore I am running NS and Mongo on my edison, which is somewhat overkill, currently I am using my cell as Wifi Hotspot but would prefer BT tethering, which still seems to be a pain with the current ubilinux
Scott Leibrand
@scottleibrand
Oct 03 2016 20:04
@garykidd there is a bug in openxshareble master that causes it to fail in the presence of BLE devices with non-ascii characters (like curly quotes) in their names. it's fixed in openxshareble dev, which is what openaps/oref0#235 uses for now
garykidd
@garykidd
Oct 03 2016 20:06
and openxshareble only works with G4 at this point, is that correct?
Scott Leibrand
@scottleibrand
Oct 03 2016 20:07
right
garykidd
@garykidd
Oct 03 2016 20:10
I'll be happy if I can get m rig working as an uploaded for G5...the receiver is a little bulky...but can be really helpful to keep you looping in the face of cruddy interenet/BT connections......I keep my receiver plugged in at night now as a backup.
Scott Leibrand
@scottleibrand
Oct 03 2016 20:11
should be pretty straightforward to adapt openaps/oref0#235 to support G5 as well (disabling the raw stuff etc.)
C-Ville
@C-Ville
Oct 03 2016 20:12
are you guys in the US really blessed and get the G5 from health insurrances?
Eric
@ecc1
Oct 03 2016 20:12
I don't think you can use "US", "health insurance", and "blessed" in the same sentence.
amoskane
@amoskane
Oct 03 2016 20:13
amen, Eric. Yes, but only at 50% covereage for me, C-Ville.
C-Ville
@C-Ville
Oct 03 2016 20:15
@ecc1 okay I take that back, I assume you are ripped of at other edges
+f
Scott Leibrand
@scottleibrand
Oct 03 2016 20:15
@rkresha yes, openaps/oref0#235 can loop based on raw data. there's a cap of 150 for BGs calculated from raw, though, to prevent it from high-temping when brand new sensors read way too high during the first few minutes of warmup
we probably should disable that by default though
garykidd
@garykidd
Oct 03 2016 20:18
@scottleibrand will have to study that a bit more---not intuitive for me what to chance exactly
David
@davidkeddydb
Oct 03 2016 20:31
@scottleibrand I was planning on using the USB OTG for power. I guess like @lollydaggle suggested I could use a 2 pin JST connected to leave the usb/otg open
Scott Leibrand
@scottleibrand
Oct 03 2016 20:32
@davidkeddydb is this the Sparkfun base block? If so, you can use USB UART jack for power, can't you?
David
@davidkeddydb
Oct 03 2016 20:37
@scottleibrand I can use the what? Sorry, I have the sparkfun base block in front of me. I wouldn't know a USB UART if I ran into it.
Scott Leibrand
@scottleibrand
Oct 03 2016 20:38
the other USB port. :)
they both work for powering the Edison, right?
David
@davidkeddydb
Oct 03 2016 20:39
Well, I have on labeled Console and the other labeled OTG. I need to hook one to the TI stick and the other to power, no?
Scott Leibrand
@scottleibrand
Oct 03 2016 20:40
are you trying to connect two USB OTG devices?
if so, you'll need a small USB OTG hub
David
@davidkeddydb
Oct 03 2016 20:42
Right. So if I want to be able to connect the Dex direct, I need another port as at present, I only have 2 unless as @lollydaggle suggested I go with getting power through a 2 pin JST connected battery
Scott Leibrand
@scottleibrand
Oct 03 2016 20:42
you can only use the one labeled OTG for connecting devices like the Dex and TI stick. freeing up your console port doesn't help.
David
@davidkeddydb
Oct 03 2016 20:44
Ahh. Gotcha.
size wise is their a board I could add that would do the same thing? Just trying to keep it small. I am not losing sleep if I am just going off NS but would love to keep the option open when power goes down, etc
Scott Leibrand
@scottleibrand
Oct 03 2016 20:45
can you just stack two base blocks?
probably not: they probably would fight over the same pins
David
@davidkeddydb
Oct 03 2016 20:47
ok. I will keep the otg to usb splitter option in mind. May just need a bigger box. It is all still smaller than the Pi so we are moving in the right direction. See if I can get everything flashed tonight or tomorrow
David
@davidkeddydb
Oct 03 2016 21:09
I know the Pi running with a battery gets a little warm. Same heat generated running an Edison with a non lipo battery or is it fairly cool?
Scott Leibrand
@scottleibrand
Oct 03 2016 21:11
yes. (those terms are too vague for a more specific answer.) ;-)
Edison power draw is about half the Pi, so by definition it will produce about half as much heat
David
@davidkeddydb
Oct 03 2016 21:19
with what I do, I should know better. Thanks Scott.
C-Ville
@C-Ville
Oct 03 2016 22:09
I am more worried to switch from plain openAPS to autosense and AMA than I was before switching from no pump too openAPS. Am I just paranoid?
Scott Leibrand
@scottleibrand
Oct 03 2016 22:17
autosens has built-in and (configurable) limits to prevent it from raising or lowering basals/ISF/targets by more than about 20%.
AMA will only kick in as long as you have COB, so you can go back to normal by simply not entering carbs, or you can disable the meal.json report explicitly
for testing, you can also set a temporary target (or adjust your pump targets) to be a bit higher than usual...
C-Ville
@C-Ville
Oct 03 2016 22:20
@scottleibrand from what I read here I am eager to give it a shot. The concept totally makes sense. I will set up a second rig and try with that
Scott Leibrand
@scottleibrand
Oct 03 2016 22:26
:+1:
C-Ville
@C-Ville
Oct 03 2016 22:32
@scottleibrand it is hard to escape @ceben80 motivation :-)
Dana Lewis
@danamlewis
Oct 03 2016 22:33
:) it’s contagious!
tazitoo
@tazitoo
Oct 03 2016 22:37
Just spent a week on a back country canoe trip, firing up my edison rig during the evening when we made camp, and shutting down again in the morning when it was time to paddle and portage. Looking at reports this morning, my avg BG was 127 over that 7 day period - probably a personal best ever (in the 2 years since diagnosis). A BIG THANKS to everyone for helping make this happen...
Dana Lewis
@danamlewis
Oct 03 2016 22:38
:clap: :clap: :sparkles:
Scott Leibrand
@scottleibrand
Oct 03 2016 22:54
:-D good job!
tazitoo
@tazitoo
Oct 03 2016 22:55
could not have done it without you guys!
tazitoo
@tazitoo
Oct 03 2016 23:11
alt
Scott Leibrand
@scottleibrand
Oct 03 2016 23:12
niiiice
tazitoo
@tazitoo
Oct 03 2016 23:13
Algonquin Provincial Park in Ontario - nice people (although we hardly saw anyone), beautiful lakes, and reaally dark skies at night for star gazing
Dana Lewis
@danamlewis
Oct 03 2016 23:13
gorgeous!
C-Ville
@C-Ville
Oct 03 2016 23:18
Loks amazing
+O
tazitoo
@tazitoo
Oct 03 2016 23:35
...all vacations have to end. So it was back to work today...and this evening is customizing header pins for a Pi Zero + Redbear IoT Phat + RFM69 radio...it's all good.
garykidd
@garykidd
Oct 03 2016 23:47
what would cause this to happen..even if BG's are being updated both on receiver (g5) and from share to NS?
{"reason":"BG data is too old, or clock set incorrectly.  Your CGM time is Mon Oct 03 2016 18:20:46 GMT-0400 (EDT) but your system time is Mon Oct 03 2016 18:31:01 GMT-0400 (EDT)"}
glucose.json newer than pumphistory: Refreshed pumphistory
tazitoo
@tazitoo
Oct 03 2016 23:53
@garykidd - did a reboot of your rig happen just before this?