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

18th
Mar 2017
jmcrawford
@jmcrawford
Mar 18 2017 00:01
Can I get you a sandwich?
Dana Lewis
@danamlewis
Mar 18 2017 00:03
sudo make me a sandwich? :smile:
Scott Leibrand
@scottleibrand
Mar 18 2017 00:03
Scorponok
@Scorponok
Mar 18 2017 00:04
@logichammer nice!
Dana Lewis
@danamlewis
Mar 18 2017 00:05
@jmcrawford in the era of postmates etc we could totally order people sandwiches for testing. Lol.
PieterGit
@PieterGit
Mar 18 2017 00:11
well the PWD is asleep already :smile: , so eating a sandwich is not an option
Dana Lewis
@danamlewis
Mar 18 2017 00:12
Hehe
PieterGit
@PieterGit
Mar 18 2017 00:14
how does the G4-raw (now g4-upload) does it's upload to nightscout. can't find it in openaps.ini
upload of cgm/glucose.json i mean

i get

$ openaps upload
UploadInput file entries.json does not exist.
[Errno 2] No such file or directory
openaps: 'upload-pumphistory-entries' is not an openaps command. See 'openaps --help'.

No recent treatments to upload
ed

(after removing /dev/null in upload alias)

Scott Leibrand
@scottleibrand
Mar 18 2017 00:19
there's a completely separate myopenaps-cgm-loop repository
PieterGit
@PieterGit
Mar 18 2017 00:20
of course... i'm getting tired
PieterGit
@PieterGit
Mar 18 2017 00:27
found it ns.ini in the cgm dir has the API_SECRET token in it. that was wrong on setup time. the cgm-loop log doesn't tell you the upload fails
Scott Leibrand
@scottleibrand
Mar 18 2017 00:27
yeah, I recommend re-running oref0-setup if you screw up your API_SECRET the first time
PieterGit
@PieterGit
Mar 18 2017 00:29
fixed it in ns.ini and the upload works fine. I got a working rig on the devww branch. Two main manual patches:
  • fixed COB issue (6 hours ago), openaps/oref0#426
  • i run mmtune.py outside openaps on startup, implemented with custom /etc/udev/rules.d/90-mmeowlink.rules
udev rule is:
ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="8001", MODE="0664", GROUP="plugdev", SYMLINK+="mmeowlink", RUN+="/usr/local/bin/mmt.sh"
Scott Leibrand
@scottleibrand
Mar 18 2017 00:32
are you planning to make openaps mmtune run mmtune.py?
PieterGit
@PieterGit
Mar 18 2017 00:33
not possible, because i killall openaps with my custom mmt.sh, to make sure nothing is holding the pump locked
#!/bin/sh
killall -g openaps
echo `date ` mmtune start >> /var/log/openaps/mmtune.log
ls -al /dev/mmeowlink  >> /var/log/openaps/mmtune.log
# --port /dev/mmeowlink
/usr/local/bin/mmtune.py --subg_rfspy --radio_locale WW --port /dev/mmeowlink --serial 123456 >> /var/log/openaps/mmtune.log
echo `date ` mmtune end >> /var/log/openaps/mmtune.log
i'm switching back to the stable production rig for the night, and will try this new rig with carbs/sandwiches tommorow
i'm out, good day
francesc0-cgm
@francesc0-cgm
Mar 18 2017 00:40
Hi, I'm a loop user since november. today my explore block has arrived and i built and started the rig on a secondary pump i have (of course not on my 4yrs son). I decided to use xdrip as bg source because I'm using a parakeet but i could use also a standard xbridge wixel. I already set up bluetooth tethering but i can't understand how it works. My edison rebooted himself to correct radio errors (maybe because the pump is empty without insulin cartridge) then bt tethering didn't went up again by himself (it is still connected via home wifi so i presume that it is due to this). If bt tethering doesn't work it can't take bgs value...how can i manage to use only bt tethering to have a stable connection to the phone where xdrip+ is installed?
Thank you in advance
francesc0-cgm
@francesc0-cgm
Mar 18 2017 00:43
Hi @danamlewis yes of course bgs have been arriving on the rig since that reboot...after the reboot finding wifi i presume it has not tried to connect via bt tethering so bnep0 is not active and xdrip could not send bgs to the rig
The strange thing was that i write down the string for 120s sleep and also if wifi went back in a couple of mins bt tethering still remained on
Till i had that reboot of the edison
Now i'm trying again to put wifi on sleep to see if bt tethering will start automatically again
And it worked...
francesc0-cgm
@francesc0-cgm
Mar 18 2017 00:52
Ok this time when wifi came on, bt tethering has stopped...so i presume i have to put on sleep permanently the wifi connection to get it working. Of course if i have a problem on the rig i have to connect it via usb to a mac/pc to troubleshooting since i don't know if ssh via bluetooth is working...
RedCyclist1
@RedCyclist1
Mar 18 2017 00:57
@danamlewis Hey there, my PuTTy has gone inactive, I can't access it at all. I had to shut down rig as my BS were going extraordinarily high all day long. Was going to trouble shoot but can't even get into the rig. Any ideas? Do I need a new Edison? this has been going on for a few days while we attempted to BT and just can't seem to get it to work.. When I turn it on, my sugars go, high as it says I am going low... When I had the rig on, it turned itself off about every 90 minutes.
Dana Lewis
@danamlewis
Mar 18 2017 01:00
@RedCyclist1 sounds like a couple of things going on. Not sure what's up with putty - have you rebooted that computer? And would like to see some NS screenshots or log info to help determine what's going on bg wise...plus logs for knowing why the rig is rebooting. Is it getting hot? Can you tell?
RedCyclist1
@RedCyclist1
Mar 18 2017 01:03
@danamlewis yes it has been getting hot, one night I woke up because it just had a smell to it. It wasn't burning anything, but it was hot. I have rebooted 3 computers to try and get PuTTY up and all of them give the same error.. Network error: Connection timed out. I have been at home and at work to see if I would get the same error in PuTTY and I do
How do I get logs if I can't go into PuTTY? Isn't that where I would get those?
Scott Leibrand
@scottleibrand
Mar 18 2017 01:06
does it only get hot when charging? or is it hot when running off battery as well?
if you can't get in via SSH, you'll need to connect a microUSB cable to the UART port so you can get in via serial console (COMxx) like you did when originally flashing it.
RedCyclist1
@RedCyclist1
Mar 18 2017 01:07
@scottleibrand Mostly charging... I charge at my desk at work during the day and only take it off when traveling in between work
Scott Leibrand
@scottleibrand
Mar 18 2017 01:07
if you're trying to ssh by hostname, you might also try getting the IP address and ssh'ing that way
see the page in the docs on accessing your rig
you might want to contact ERD (the manufacturer of the Explorer boards) if yours is getting too hot to touch or causing funny smells while charging. they made some improvements in the latest round of boards to help prevent that
RedCyclist1
@RedCyclist1
Mar 18 2017 01:09
@scottleibrand would the heat have anything to do with it constantly turning itself off
@RedCyclist1 If I turn the rig off then on, it comes back on for about another 90 min and sometimes more, then shuts down and just stops tracking, so I do a couple reboots
Scott Leibrand
@scottleibrand
Mar 18 2017 01:12
try sudo apt-get install lm-sensors and then sensors
that will tell you how hot the Core temperature is, and how close it is to critical temperature levels, when the Edison will shut off to protect itself
that will also be good info if you end up contacting ERD
RedCyclist1
@RedCyclist1
Mar 18 2017 01:14
@scottleibrand ok, when I get in I will take a look.. need to go back to docs about accessing rig.. LOL this could take me a little bit. Ok - I will contact ERD too.
Scott Leibrand
@scottleibrand
Mar 18 2017 01:14
if it is overheating, you should also look at how well-ventilated it is
RedCyclist1
@RedCyclist1
Mar 18 2017 01:14
It is open, I don't have a case or anything around it. @scottleibrand
Dana Lewis
@danamlewis
Mar 18 2017 01:14
(@francesc0-cgm I am not using xdrip/android, but @ceben80 or @colinlennon might have some suggestions. )
francesc0-cgm
@francesc0-cgm
Mar 18 2017 01:15
Thank you @danamlewis
Scott Leibrand
@scottleibrand
Mar 18 2017 01:16
@RedCyclist1 ok, that makes it more likely a hardware issue. definitely contact ERD if you show it getting close to 90C
RedCyclist1
@RedCyclist1
Mar 18 2017 01:20
@scottleibrand Thanks, will have to head home, don't have a data micro usb with me in the office. Will call and also see if I can connect via microUSB cable to the UART port .
Scott Leibrand
@scottleibrand
Mar 18 2017 01:22
if you think the rig is working but just isn't online, you can also try hotspotting it from your phone
and then scan for its IP. docs have details on that
Scott Leibrand
@scottleibrand
Mar 18 2017 01:29
@andyhandy @thebookins @walker0 (or anyone more than 6 hours east of UTC) If any of you have any comments on openaps/oref0#426 or want to test it before I merge to dev, please comment. otherwise I'll plan to do so tomorrow
Paul Dickens
@thebookins
Mar 18 2017 02:03
@scottleibrand For some reason treatments are stored in NS with created_at in local time, whereas Temporary Targets have a created_attimestamp in UTC. So I think our friends west of UTC are going to have trouble with this one, unless we remove the -u in the date command.
Bit annoying that the mongoDB date comparison is just a string compare, but I guess we have to live with it...
Paul Dickens
@thebookins
Mar 18 2017 02:36
On second thoughts, a date comparison using local time prob isn't the best idea, because what if the users timezone changes? A workaround could be just to push the time comparison out to 9 or 12 hours; otherwise I think we need a way to convert created_at in NS from local time to UTC, before we do the comparison.
RedCyclist1
@RedCyclist1
Mar 18 2017 02:37
@scottleibrand We have always used the ip address to ssh in. I could never get the hostname to work.
fjungman
@fjungman
Mar 18 2017 02:46
Let me know what you think of this. Totally coincidentally, I was just debugging a startup error in the hostname service. I found this is the issue with the hostname not working (it never has for me):

/lib/systemd/system/systemd-hostnamed.service

has "PrivateNetwork=yes" set. Commenting / removing this line hostnamectl works fine

I changed it to "no" and we'll see what happens. I wonder if this poses a real security threat or not...
Scott Leibrand
@scottleibrand
Mar 18 2017 02:53
@thebookins my longer term plan is to do this filtering on the real date with JS instead of on the curl.
fjungman
@fjungman
Mar 18 2017 02:58
Nevermind the above. Upon reboot it still does not work, and checking the systemd-hostnamed file, I stepped into a pile of poop. I think I'll just back away from this, slowly...
fjungman
@fjungman
Mar 18 2017 03:04
For the life of me, I cannot get bluetooth to work. I've followed the directions, googled the crap out of it and searched this forum. The time I wait between issuing the two commands (with the & between them) does not matter, it always fails. I can manually turn it on and connect to the Android phone, perfectly, but it will not do it automatically. Any trick to making it work, automatically?
Paul Dickens
@thebookins
Mar 18 2017 03:09
@scottleibrand that would be better
Dana Lewis
@danamlewis
Mar 18 2017 04:16
@fjungman when was your edison flashed?
Paul Dickens
@thebookins
Mar 18 2017 04:23
Hey again, I've got the stuck edison problem again that I've seen a few times - lights on, no one home.
Trying to get in using sudo screen /dev/tty.usbserial-* 115200 but all I see is a blank screen
anything else to try?
Scott Leibrand
@scottleibrand
Mar 18 2017 04:48
@fjungman if you haven't freshly flashed the Edison, I would do that before spending any time troubleshooting.
@thebookins did it maybe overheat? Check logs after reboot?
Paul Dickens
@thebookins
Mar 18 2017 04:56
@scottleibrand having a look at the logs now. Anything in particular to look for? syslog looks pretty unremarkable
Scott Leibrand
@scottleibrand
Mar 18 2017 05:23
I don't recall if it logs before shutting down for an over temp exception, but I would presume so.
Paul Dickens
@thebookins
Mar 18 2017 05:32
Not sure it shutdown, just froze. None of the logs shed any light on the issue. Guess I'll just keep an eye on it.
twnsmm
@twnsmm
Mar 18 2017 06:13

Rebooting to fix radio errors!
The system is going down for reboot at Sat 2017-03-18 16:17:01 AEST!

Has anyone encountered this before? It's happened a couple of times now while I've been logged in via serial

and then this:
The system shutdown has been cancelled at Sat 2017-03-18 16:15:01 AEST!
Matthias
@ceben80
Mar 18 2017 06:30
@francesc0-cgm ( @colinlennon @danamlewis FYI)
unfortunately android hostname resolution doesn't work, so hardcoded IPs are needed (xdrip APS, SSH, http-widget etc etc.)
In case you're using wifi and bt you will need to adjust the hardcoded IP, when it's changing from wifi to bt and back.... that's really annoying :worried:
Due to this fact I have only setup bt tethering (wlan0 is disabled) and it works stable and reliable, I only have the same IP DHCPed from bt tethering.
fjungman
@fjungman
Mar 18 2017 06:36
@danamlewis @scottleibrand I flashed it Feb 27th. Not that long ago.
dan lightner
@danimaniac
Mar 18 2017 09:52
@thebookins @scottleibrand I have noticed the same "lights on, nobody home" phenomenon a few times. No, I have not dug into any logs (ever, not just to diagnose this). I suspected the battery level was too low to operate the rig, but still had plenty of juice to light the LED. I have seen that in other electronics before. The rig fires right back up when I connect a charger. Don't know if that helps or not.
francesc0-cgm
@francesc0-cgm
Mar 18 2017 10:02
@ceben80 i deactivated wlan0 and i put it on my son and i already looping flawlessly. Thank you
Matthias
@ceben80
Mar 18 2017 10:04
@francesc0-cgm btw today I have my PC also bt tethered, so I am able to SSH to the "bt rig", better than serial connection via putty :wink:
francesc0-cgm
@francesc0-cgm
Mar 18 2017 10:06
I would like to do the same with xdrip phone bt tethered but i think you have to edit the kernel
Matthias
@ceben80
Mar 18 2017 10:08
sounds perfect but here I am not really an expert :smile:
dan lightner
@danimaniac
Mar 18 2017 12:16
@ceben80 Would you mind posting or PMing the contents of /etc/network/interfaces?
Matthias
@ceben80
Mar 18 2017 12:27
@danimaniac you have PM :wink:
PieterGit
@PieterGit
Mar 18 2017 12:31

@thebookins @scottleibrand Did some further debugging into the issue with RoboMongo. Here are the queries I used:
db.getCollection('treatments').find({carbs: { '$exist' }, created_at : { '$gte': '2017-03-18'}})
showed indeed that carbs use a created_at in localtime, e.g. 2017-03-17T07:48:59+01:00

Temp targets use created_at in zulu/utc time, e.g. 2017-03-17T06:24:47.472Z. When I used the query:
db.getCollection('treatments').find({eventType: { '$regex' : 'Target'}, created_at : { '$gte': '2017-03-17'}})

I noticed that the carbs are created with mm://openaps/mm-format-ns-treatments/Meal Bolus, wheres the temp targets are set in NS.

So I think this is an oref0 bug and we should
change bin/mm-format-ns-treatments.sh or bin/oref0-normalize-temps.js so that created_at is converted to UTC before uploading it to NS.

I couldn't find any conversion logic in Nightscout.
Paul Dickens
@thebookins
Mar 18 2017 12:47
@PieterGit Nice digging! I too was confused why temp targets are in UTC but meal boluses are in local time. Somehow NS manages to parse both formats though. It sounds like a good idea to convert created_at to UTC, but I don't know enough about how it is used to know if there are any other dependencies that might break.
I had a look through our old treatments collection in mlab, and noticed that Loop has created_at in UTC (we switch between Loop and OpenAPS from time to time).
PieterGit
@PieterGit
Mar 18 2017 12:49
echo $(date --utc +%Y%-m-%dT%H:%M:%SZ)
in mm-format-ns-treatments.sh afaict
as far as i can see ns just copies the timestamp from the producer
Paul Dickens
@thebookins
Mar 18 2017 12:51
I'm guessing the convention with NS is to convert everything to UTC. Why does NS still correctly display the time in local format?
PieterGit
@PieterGit
Mar 18 2017 13:03
ns uses utc to store dates afaict. and probably converts to current timezone when dispalying. that's common practice.

I think the created_at in mm-format-ns-treatments.sh must be converted to UTC time. I can get the date/time converted, but am unable to integrated in to the mm-format-ns-treatments.sh. Help is appreciated.

The conversion can be done with
date --utc +%Y-%m-%dT%H:%M:%SZ --date "2017-03-17T07:48:59+01:00"
where the date must be taken from created_at and stored in created_at

if that's added to openaps/oref0#426 i think it even works for @andyhandy @thebookins @walker0 (or anyone more than 6 hours east of UTC)
francesc0-cgm
@francesc0-cgm
Mar 18 2017 13:21
@ceben80 just reading on your github instructions for http wiget. I have to type cron line in the prompt or i have to open cron file? I'm very n00b about linux...
garykidd
@garykidd
Mar 18 2017 13:28
would a bolus without any carbs add to basal iob?
Matthias
@ceben80
Mar 18 2017 13:28
crontab -e
francesc0-cgm
@francesc0-cgm
Mar 18 2017 13:31
Mmm not understanding...i have to write down sudo etcetc to download jq then it tells to edit cron...what i have to type? Then openaps.ini and then openaps pump-loop line...don't know if i have to paste it in the prompt or i have to use a command to get into the files you told
Matthias
@ceben80
Mar 18 2017 13:55
The alias needs to be add to the openaps.ini
pump-loop line modification in crontab
google is always your friend :wink:
garykidd
@garykidd
Mar 18 2017 14:00
hmmmm not sure why my openaps pill is showing unknown---any ideas on troubleshooting?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 14:06
Sorry @ceben80 will try thank you
garykidd
@garykidd
Mar 18 2017 14:34
hmmmm...fairly certain that I had re-run setup script with max basal iob of 4.....but then saw this while tailing log....
basaliob 0.98 > max_iob 0
francesc0-cgm
@francesc0-cgm
Mar 18 2017 14:35
.
garykidd
@garykidd
Mar 18 2017 14:36
does that mean that I dont have max_iob set to 4 actually?
katie disimone
@Kdisimone
Mar 18 2017 14:36
@garykidd if you ran the setup script again, looks like you need to edit your preferences.json again. Yes. Your max_iob is set to 0
garykidd
@garykidd
Mar 18 2017 14:38
hmmm...further....
root@purplebird:~/PURPLEAPS# cat preferences.json
{
    "max_iob": 4,
    "max_daily_safety_multiplier": 3,
    "current_basal_safety_multiplier": 4,
    "autosens_max": 1.2,
    "autosens_min": 0.7,
    "autosens_adjust_targets": true,
    "override_high_target_with_low": false,
    "skip_neutral_temps": false,
    "bolussnooze_dia_divisor": 2,
    "min_5m_carbimpact": 3,
    "carbratio_adjustmentratio": 1
francesc0-cgm
@francesc0-cgm
Mar 18 2017 15:35
Atm it is the second time the loop has stopped by itself from this morning. Using offline looping. Seems something bt related. How can I check the correct log?
Ns pill tell edison host is waiting
I think i have to reboot again the edison
But on my little son i can't accept all this problems...
So i would like to troubleshooting...but i don't know where looking at the error
It talks about radio errors...now on the terminal...
PieterGit
@PieterGit
Mar 18 2017 15:48
@francesc0-cgm check the pump log, you can do that with the command tail -f /var/log/openaps/pump-loop.log
francesc0-cgm
@francesc0-cgm
Mar 18 2017 15:50
It says no pump comes detected from other rigs
Now it says radio ok
But still no way
Seems it lost bt tethering with android phone
So no bg and no loop this morning a reboot worked. This time i rebooted 3 times but still no bt tethering
parenthetic
@parenthetic
Mar 18 2017 15:55
@bewest, @danamlewis , @scottleibrand : I'm curious about what seem to be a few regression coefficients in lib/iob/calculate.js. Is there source info on these? Also, is there a reason end is hard coded to 180 and peak is hard coded to 75? Seems like these make strong assumptions about dia being set to 3 hours. Am I interpreting all this correctly? Thanks.
francesc0-cgm
@francesc0-cgm
Mar 18 2017 15:57
Tried to reboot the phone, powering off and on the explorer but bt tethering doesn't start...
PieterGit
@PieterGit
Mar 18 2017 15:58
@francesc0-cgm i'm not using bt tethering, so i'm afraid i can't help you with that. notice there can be a difference in a rig that's working, but not sending it information to nighstcout. as long as openaps can get the cgm data the loop works fine. what kind of setup do you use?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 16:15
It was a bt tethering problem made again all the bluetooth setup and it went again working...not seems to stable though
Scott Leibrand
@scottleibrand
Mar 18 2017 16:57
@parenthetic the DIA is scaled from there. So if you had a DIA of 4, then peak would be 4/3 of 75m, or 100m
Those coefficients simply result in a linear insulin activity curve up from zero to the 75m peak, and then linearly down from there to zero at DIA. The IOB curve is simply the integral of that bi-linear activity curve.
garykidd
@garykidd
Mar 18 2017 17:07
can someone remond me if dev/ttyMFD1 is default port for serial connected TI stick with breakout board
Tim Street
@tim2000s
Mar 18 2017 17:10
@logichammer After my edison shut itself down as a result of Qi charging making it too hot, I stopped using it.
Matthias
@ceben80
Mar 18 2017 17:45
@garykidd I do have an ERF on my Eddie but it's also seriell connected, I guess /dev/ttyMFD1, I do have, is fine with the TI as well
francesc0-cgm
@francesc0-cgm
Mar 18 2017 18:48
I had another disconnection...but this time bluetooth tethering was on...i have openaps on the NS pill with waiting status since 20 mins...the rig (explorer+edison) is in a pocket next to the pump...any idea? Is normal to have about 3 failures per day?
Mark Brighton
@seattlebrighton
Mar 18 2017 18:52
Can someone give quick help for edison: should I clone oref0 into /root/src/ or into /home/edison/src/?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 18:52
Also this time a reboot fixed the issue...however i can't imagine to send my son wherever with so many failures.
Dana Lewis
@danamlewis
Mar 18 2017 18:58
@seattlebrighton are you running on an explorer board or ?
RedCyclist1
@RedCyclist1
Mar 18 2017 18:58
Is there a shortcut to change the nightscout url in my openaps rig? Still finding my way around linux
Dana Lewis
@danamlewis
Mar 18 2017 18:59
@RedCyclist1 it's in your NS.ini but if API secret is wrong it'll be easiest to rerun setup script than to change it everywhere
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:02
Again another failure...could rileylink interfere?
Dana Lewis
@danamlewis
Mar 18 2017 19:04
@francesc0-cgm you could try putting Loop into Open Loop mode while you're resting to rule that out
RedCyclist1
@RedCyclist1
Mar 18 2017 19:06
@danamlewis ok, thanks!
Dana Lewis
@danamlewis
Mar 18 2017 19:07
:+1:
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:08
It is already in open loop...seems a communication error i made a bolus from loop and on openaps ns it has not already calculated iob. Openaps is in "looping" status since 12 mins. In the same pocket he has also a parakeet
Till now the only failure i had were due to bt tethering...
And however, as a n00b i am not able to look at the log to understand what is happening
Mark Brighton
@seattlebrighton
Mar 18 2017 19:09
@danamlewis Yes, I'm running an explorer board.
@seattlebrighton k. Just follow the docs then and it'll install it in the right place for you
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:09
What have i to check?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:10
Yes i know, i mean what i have to expect :D
However this time reboot doesn't fix anything...still not looping. Very strange
Dana Lewis
@danamlewis
Mar 18 2017 19:11
Can you paste the logs?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:12
Mmm yes...i have to connect the rig. Just a min. TIA
"aCOB":[160,167,173,178,183,186,190,192,194,196,196,197,196,195,194,192,189,185,182,178,175,173,171,169,167,166,165,164,164,164,165,166,167,169,170,173,175,178,181,184,188,192,196,200,205,210,215,220,225,230,235,239,244,248,252],"COB":[160,160,159,158,155,153,150,146,142,137,132,126,120,113,106,98,90,81,72,64,56,48,41,39]},"COB":55,"IOB":1.757,"reason":"COB: 55, Dev: 11, BGI: -3.18, ISF: 163, Target: 126; Eventual BG 39 < 121, bolus snooze: eventual BG range 39-279, temp 0.55 ~ req 0.55U/hr"}
{"bg":157,"temp":"absolute","snoozeBG":267,"recieved":true,"predBGs":{"COB":[157,157,156,155,153,150,147,144,140,135,130,125,119,112,105,98,90,82,73,64,57,49,42,39],"aCOB":[157,164,170,175,180,184,187,190,192,194,195,195,195,194,193,191,189,186,182,179,176,174,172,170,169,168,167,167,167,167,168,169,171,172,174,176,179,182,185,189,192,196,200,205,209,214,220,225,230,235,239,244,248,253,257],"IOB":[157,157,155,153,151,147,142,137,131,124,117,109,100,90,81,70,60,48,39]},"rate":0.55,"reason":"COB: 55, Dev: 1, BGI: -3.1, ISF: 163, Target: 126; Eventual BG 39 < 121, bolus snooze: eventual BG range 39-267; setting current basal of 0.55 as temp. Setting neutral temp basal of 0.55U/hr","COB":55,"eventualBG":39,"timestamp":"2017-03-18T20:11:04.741314","duration":30,"tick":-3,"IOB":1.761}
Settings refreshed
pumphistory-24h refreshError, retrying
Listening: .No pump comms detected from other rigs
mmtune: pump://JSON/mmtune/monitor/mmtune.json
reporting monitor/mmtune.json
"916.660", 5, -86 Starting pump-loop at Sat Mar 18 20:14:15 CET 2017:
mmtune:
and now it went ok again
could be the ticatac box?
riley now is 30 mts away since 20 mins
Dana Lewis
@danamlewis
Mar 18 2017 19:16
That all looks good. Keep watching the logs and if it's not looping and there's an error message, that can help us figure out what's going on.
Mark Brighton
@seattlebrighton
Mar 18 2017 19:18
@danamlewis Thanks - so just stay dumb and follow the directions? :) Could we update the beginning of Phase-2 to say whether root or edison should be logged in, just to help the curious? I created /src from /root, so hoping that's right.
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:18
@dana now the rig is on the table next to the mac...before it was in the pocket...maybe something wrong with it?
Dana Lewis
@danamlewis
Mar 18 2017 19:19
@seattlebrighton you skipped all the places where it says explorer board users should be running as root? :) (not everyone runs EB)
@francesc0-cgm the logs say it is working, though. Keep watching the logs and see if you can reproduce the error of not looping and see what the logs say then
garykidd
@garykidd
Mar 18 2017 19:20
@ceben80 thx---that seemed to work for me too
anybody have any ideas why my openaps pill and Pump are undefined in NS...I relaunched through azure with no luck...
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:21
ok i will...thank you. maybe it is better i install papertrail to get it easily
Dana Lewis
@danamlewis
Mar 18 2017 19:21
@seattlebrighton but sounds like there's places to pr earlier so that's more clear
@francesc0-cgm bunch of tips here for accessing rigs and logs: http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/accessing-your-rig.html
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:23
now staying on the table a couple of meters from him gave this
then mmtune: pump://JSON/mmtune/monitor/mmtune.json
reporting monitor/mmtune.json
"916.708", 4, -96 Listening: .No pump comms detected from other rigs
Profile less than 60m old
glucose.json newer than temp_basal.json
Temp refresh
Mark Brighton
@seattlebrighton
Mar 18 2017 19:24
@danamlewis Thanks - I've been root all along, but there are places where the directions said to create the edison user (I did), and I see references to /edison/src and /edison/.git, etc, so just got nervous. Moving on now, as root. Thanks again.
parenthetic
@parenthetic
Mar 18 2017 19:25

@scottleibrand Hmmm. I'm having a hard time understanding your answer. diaratio appears to be scaling minAgo, not peak or end.

I also am having a hard time understanding what you mean by "simply the integral of that bi-linear activity curve," or "Those coefficients simply result in a linear insulin activity curve." Those coefficients (out to six decimal places), I would guess, came from someone estimating a model based on some data somewhere, no? Did they come from a journal article, perhaps? Would they match the algorithm Minimed uses to decay insulin activity?

The way I'm reading the code is that there is a positive quadratic function between [zero, peak) and then a negative quadratic function between [peak, end).

So in your example, if dia is equal to 4, then the first function applies up to about 56 minutes (75 3/4), and the second function applies up to 135 minutes (180 3/4).

Is that not what's happening?

I realize this is pretty in the weeds, but it also seems like it's at the heart of the overall algorithm, which I'd like to understand as thoroughly as possible. Thanks!

Dana Lewis
@danamlewis
Mar 18 2017 19:29
@parenthetic yes, it roughly matches what was published by Medtronic about their curves.
katie disimone
@Kdisimone
Mar 18 2017 19:29
@francesc0-cgm -96 is still a pretty weak signal strength...try moving closer and see if you can get that number into the -70s or -80s. Is the rig in a case?
francesc0-cgm
@francesc0-cgm
Mar 18 2017 19:34
yes in a tactic box...is just next to the pump
Scott Leibrand
@scottleibrand
Mar 18 2017 19:36
@parenthetic changing minAgo is the way we scale everything by DIA without changing any of the formulas
You have the multipliers inverted: it ends up being 4/3, not 3/4.
So the first function applies for 4/3*75=100 minutes, and the second function after that up to 240m.
The model was designed to "look like" the MDT IOB function, and also to fit insulin activity data showing insulin activity increasing to a 60-90m peak and then decreasing after that.
The relationship between IOB and insulin activity is that activity is the rate of change in IOB: the amount of insulin that got "used up" over a given time, and is no longer "on board" waiting to take effect.
Dana Lewis
@danamlewis
Mar 18 2017 19:40
^ have been wanting to get that in the docs, so if you want to take a stab at sticking it in, @parenthetic , we can help flesh out the details.
(Or anyone else)
parenthetic
@parenthetic
Mar 18 2017 19:45

If my dia is 4 (which it happens to be), then diaratio = 4/3, right?

if minAgo is scaled by 4/3 and peak is held fixed at 75, then I'll only fall into the else if (minAgo < peak) condition between 0 and 56 minutes, no? (56 * 4/3 = 74.6666)

What am I missing?

@danamlewis Happy to get this into the docs, once I've got my brain wrapped around it!
Mark Brighton
@seattlebrighton
Mar 18 2017 19:54
I must have missed a step in setting up Edison+Explorer. All worked great until Phase-1 offline where I kill and restart bluetooth. I don't have /usr/local/bin/bluetoothd, so can't restart it. I do have /usr/local/bin/bluetoothctl, so how can I be missing the daemon? So I'm stuck there, in phase 1, so skipped to phase-2:), where I also got stuck in trying to clone github's oref0. I don't have /root/.git, in case that's a clue. I get: # mkdir -p ~/src; cd ~/src && git clone git://github.com/openaps/oref0.git || (cd oref0 && git checkout master && git pull)
Cloning into 'oref0'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.113]: errno=Connection timed out
github.com[1: 192.30.253.112]: errno=Connection timed out
Can anyone help me get past either the bluetoothd problem or the github clone timeout?
Dana Lewis
@danamlewis
Mar 18 2017 19:55
@seattlebrighton is your rig online? Good connection?
Also fwiw - I would do setup first without bluetooth then come back and do Bluetooth later
Mark Brighton
@seattlebrighton
Mar 18 2017 20:00
@danamlewis Ok - that's what I was thinking by skipping past Phase 1 offline and going to phase 2, but thought I may have missed installing something that git clone needs (like a .git under /root?)
Dana Lewis
@danamlewis
Mar 18 2017 20:03
@seattlebrighton if you missed anything vital it would have been in phase 0
I'd skim back over and see if there was anything you missed on the Edison setup page (and again confirm if your rig is online).
Mark Brighton
@seattlebrighton
Mar 18 2017 20:04
What's the best way to check if rig has a good connections? I did #ifconfig wlan0 and got:

ifconfig wlan0

wlan0 Link encap:Ethernet HWaddr 90:b6:86:01:35:XX
inet addr:10.0.0.150 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31645 errors:0 dropped:0 overruns:0 frame:0
TX packets:743 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11690809 (11.1 MiB) TX bytes:93423 (91.2 KiB)
Dana Lewis
@danamlewis
Mar 18 2017 20:05
That should be ok. Did you switch over to ssh when it suggested?
Mark Brighton
@seattlebrighton
Mar 18 2017 20:10
yes, but ping www.google.com and ping www.github.com doesn't give any joy, though I was able to pull down all the packages needed to pass Phase 0.
Dana Lewis
@danamlewis
Mar 18 2017 20:12
If you can't ping, you shouldn't be able to get packages. So if it was working it broke, or it didn't successfully pull packages. So I would troubleshoot your network some more.
Mark Brighton
@seattlebrighton
Mar 18 2017 20:12
I've rebooted edison, but will try powering down and restarting now, in case that helps. Thanks.
Can everyone else ping www.google.com and get a response, from root@edison?
PieterGit
@PieterGit
Mar 18 2017 20:18

Can somebody help me with openaps/oref0#426
I don't know how I can convert created_at from timezone (e.g. 2017-03-17T07:48:59+01:00) to utc (e.g.
2017-03-17T06:48:59Z) in a json file. I know how to do the date conversion part: date --utc +%Y-%m-%dT%H:%M:%SZ --date "2017-03-17T07:48:59+01:00", but I don't know how to modify the json file the most efficient.

Then I can try to integrate it in
https://github.com/openaps/oref0/blob/dev/bin/mm-format-ns-treatments.sh#L30
so that getting carbs from Nightscout is more efficient, and probably causes no double COB's anymore.

PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:19
Can anyone explain how to tell if my edison board is flashed or not? I purchased it from sparkfun, via the link on the openaps walkthrough docs
Dana Lewis
@danamlewis
Mar 18 2017 20:21
@popcornpam it's not. You'll need to follow the phase 0 instructions for flashing it with jubilinux.
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:25
ok, I am trying to install homebrew and it keeps asking for a password, any idea what that would be? Does not seem to be my computer security password
Dana Lewis
@danamlewis
Mar 18 2017 20:28
Should be your computer password
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:35
ok.. so that worked, and I have downloaded and extracted jubilinx, but can't get the terminal to find it with the command "cd jubilinux"
Dana Lewis
@danamlewis
Mar 18 2017 20:37
Make sure to follow the directions including copying/pasting anything in gray specifically
If you type it in, typos will trip you up
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:40
ok, I don't understand how to make sure that it is in my root directory
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:46
Screen Shot 2017-03-18 at 4.46.13 PM.png
It can't seem to find it still
katie disimone
@Kdisimone
Mar 18 2017 20:49
@popcornpam The jubilinux download in mac computers goes to a Downloads folder. You need to change to that folder. cd downloads
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:50
oh, ok, thanks!
katie disimone
@Kdisimone
Mar 18 2017 20:50
cd ~/Downloads/jubilinux
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:53
Awesome! That worked! OK, on break now til I can go out to get a data cable, of the 20 microusb cables I have, exactly zero turned out to be data
Also, curious if there is a workaround to use openaps when there is no data from wifi or cell available (like if you are hiking and there is no cell service)
PopcornPam
@PopcornPam_twitter
Mar 18 2017 20:57
Thank you!
Dana Lewis
@danamlewis
Mar 18 2017 20:59
:+1:
Scott Leibrand
@scottleibrand
Mar 18 2017 21:21
@parenthetic if you are at 99 minutes, then that will be scaled to 3/4 (74 minutes), which will put you just at the end of the first formula. 2 minutes later, your 101 will be scaled down to 76, putting you just at the beginning of the 75-180m formula.
leighkdavis
@leighkdavis
Mar 18 2017 21:27
Hi friends, is there a command to basically erase an edison to try to start from scratch? I have one edison board that I purchased a few months ago that is completely messed up and I'd like to try to erase what I've done and start with a fresh build? I've tried to reflash over top of whats there and it doesn't seem to work. I think that I need to wipe it all clean and start over. Thanks!
Dana Lewis
@danamlewis
Mar 18 2017 21:37
Hm. Maybe flash yocto; then back to jubilinux?
leighkdavis
@leighkdavis
Mar 18 2017 21:42
thanks @danamlewis . will try that!
Paul Dickens
@thebookins
Mar 18 2017 22:12
Hi All, I'm trying to get camping mode working with G5 and iPhone uploading the bg data to the xDripAPS microservice. I'm finding that when the data in the edison database is old (e.g. when we've switched to the home wifi and the edison IP address changes) the monitor-xdrip task continues to copy the old data to monitor/glucose.json and the loop will fail due to old data. ns-loop writes to the same file, so sometimes the loop will run, depending on which task wrote to it most recently.
Thought I'd try to copy the behaviour when a G5 receiver is plugged in, but I can't see if get-bg has solved the problem of writing old data to monitor/glucose.json.
What's the best approach here? Would it make sense to 'preference' local data, and stop ns-loop from running if we have up-to-date local data?
garykidd
@garykidd
Mar 18 2017 22:25
what causes ssh to be so darn slow sometimes?
PieterGit
@PieterGit
Mar 18 2017 22:27
found a small bug in the /usr/local/bin/oref0-online It suspects to get a ipv4 address back, but the regexp fails for ipv6 adress. All curls should add a -4 or the regexp must be changed:
$  curl -s -m 15 icanhazip.com
2001:985:656:1:f723:a840:ef28:fc66
$ curl -s -m 15 -4 icanhazip.com
83.160.189.76
garykidd
@garykidd
Mar 18 2017 22:37
LTNS @Spazholio
francesc0-cgm
@francesc0-cgm
Mar 18 2017 22:59
Another failure @dana installed paper trail but in the log i can't see pump-loop infos...
Bt tethering was on...it was a green straight line and it stacked on zero temp...so now he is rising...i'm sorry i find openaps a great system but it is too difficult to use...
For me i mean...
francesc0-cgm
@francesc0-cgm
Mar 18 2017 23:04
If it finds a communication error it tries again or it crashes? Could anyone help me?
i have a lot of:
dhclient.c:1966: Failed to send 300 byte long packet over wlan0 interface.
Mar 18 16:06:05 localhost libmraa: libmraa version v1.5.1-46-g21e0ff7 initialised by user 'root' with EUID 0
Mar 18 16:06:06 localhost libmraa: gpio214: init: Failed to write to 'export': No such device
Mar 18 16:06:06 localhost libmraa: edison: Arduino board not detected, assuming Intel Edison Miniboard
Mar 18 16:06:06 localhost libmraa: libmraa initialised for platform 'Intel Edison' of type 2
Mar 18 16:06:08 localhost libmraa: libmraa version v1.5.1-46-g21e0ff7 initialised by user 'root' with EUID 0
Mar 18 16:06:08 localhost libmraa: gpio214: init: Failed to write to 'export': No such device
Mar 18 16:06:08 localhost libmraa: edison: Arduino board not detected, assuming Intel Edison Miniboard
Mar 18 16:06:08 localhost libmraa: libmraa initialised for platform 'Intel Edison' of type 2
Mar 18 16:06:08 localhost CRON: (CRON) info (No MTA installed, discarding output)
Mar 18 16:06:08 localhost CRON: pam_unix(cron:session): session closed for user root
these errors...looking at the pic in the guide for paper trail i can see loop-pump.log but i have not there
Scott Leibrand
@scottleibrand
Mar 18 2017 23:12
@PieterGit hmm, did icanhazip.com just add v6 support? I've never seen that, and I have v6 at home... probably easiest to just add -4 for now.
garykidd
@garykidd
Mar 18 2017 23:43
trouble with all 3 rigs now....I'll get them back up but could definitely use a hand for abit.
If I'm re-setting-up my edison with explorer and TI stick wired via serial....that should all be able to be handled via the setup script right? I mean assuming I set up dependencies correctly?