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

26th
Aug 2016
Mitchell Slep
@moomoobloo
Aug 26 2016 01:58
What needs to be done to get the nightscout IOB plugin to show the OpenAPS IOB?
diabeticgonewild
@diabeticgonewild
Aug 26 2016 02:35
@moomoobloo First, are you running (and have deployed) the dev branch of Nightscout on your hosted site (such as Azure or Heroku—note that Heroku is likely much cheaper than Azure)
Mitchell Slep
@moomoobloo
Aug 26 2016 02:48
Yes, running the dev branch, and OpenAPS status is working fine. I'm pretty sure the IOB plugin used to show the OpenAPS IOB, but I must have changed something and it's not working anymore.
diabeticgonewild
@diabeticgonewild
Aug 26 2016 03:13

Well, I have only setup Nightscout ONCE for OpenAPS, so can't give any real advice with pointers except for the generic stuff already out there in DOCS.

But, if you think you made a mistake, I would start over from scratch. Yes, from the very beginning of the Nightscout setup aspect of OpenAPS setup.

Because each deployment service that hosts your NS page is proprietary to the service itself, it's harder to trace errors.

You're better off just starting from the beginning, and redoing steps until you get it right, even if it's frustrating.

Scott Leibrand
@scottleibrand
Aug 26 2016 03:37
@moomoobloo if you think it's mostly working and just want to troubleshoot, I would start with the nightscout API and see if the devicestatus is being uploaded successfully
that will tell you if it's a problem with the upload or with NS displaying it
https://<yournightscouthostname.net>/api/v1/devicestatus.json
Mitchell Slep
@moomoobloo
Aug 26 2016 04:24

@scottleibrand Thanks, the uploaded devicestatus looks good. I stepped through the iob plugin code in the debugger and iob.fromDeviceStatus seems to be doing the right thing. But the sbx object passed in to iob.setProperties has atime value which is one day in the past, so this piece of code in iob.lastIOBDeviceStatus is throwing away all the devicestatus iob:

      .filter(function (iobStatus) {
        return iobStatus.mills <= futureMills && iobStatus.mills >= recentMills;
      })

Where does sbx.time come from?

Scott Leibrand
@scottleibrand
Aug 26 2016 04:49
I don't know the NS code base that well, unfortunately
do you see any weird times in your devicestatus data with the API?
jmcrawford
@jmcrawford
Aug 26 2016 04:50
The WirelessThings interfaces - to wire them up, you just need Vin, Gnd, RX and TX?
Brandon Faloona
@bfaloona
Aug 26 2016 05:00
@scottleibrand Your setup script is looking great. The wait-for-silence alias is not working for me because this test is failing, even though I can run openaps mmtune and all (?) other commands that talk to the pump.
pi@openaps-lp:~/openaps-lp3 $ ~/mmeowlink-source/bin/mmeowlink-any-pump-comms.py --port /dev/ttyACM0 --wait-for 30
No comms detected
For now I disabled that test. We only have one rig active.
Brandon Faloona
@bfaloona
Aug 26 2016 05:07
What's the best approach to running this loop in debug mode? Silent and cascading failures seem to eat up a lot of my time working with OpenAPS.
John Sjolund
@sjolundjohn
Aug 26 2016 05:55
@Spazholio I want to connect from my Android phone to the PI when they are connected on the same network. It could be home wifi, work OR hotspot. I was hoping to do it locally rather then IP if possible.
diabeticgonewild
@diabeticgonewild
Aug 26 2016 07:20
@sjolundjohn Avahi-Daemon allows you to SSH into your Pi by the name of the device, rather than the IP address. It works NICELY on the Pi. (However, I haven't tried it out in Ubilinux. I have heard that the setup may be complex on ubilinux due to the proprietary nature of these chips...)
diabeticgonewild
@diabeticgonewild
Aug 26 2016 07:37

I believe you do this on the Edison (in Ubilinux) to enable Avahi:

In /etc/avahi/avahi-daemon.conf add wlan0 as: 'allow-interfaces=wlan0,eth0'

Then you just SSH in using SSH root@<your-Edisons-name>.local or similar depending on whether you are using Terminal or PuTTY....
So nothing really special.
diabeticgonewild
@diabeticgonewild
Aug 26 2016 08:16
If you guys just absolutely cannot go without the Yocto version of connman which enables BLE tethering, but you want to retain the functionality of Ubilinux, including with access to apt-get, there is a way to get both!!!

You just have to inject the Yocto kernel into Ubilinux OS, before you flash the Edison.

The guide is here: https://github.com/LGSInnovations/Edison-Ethernet/blob/master/guides/ubilinux-splice-kernel.md

I'm still looking into it, and will test it out, likely in the morning.
In my opinion, it looks a lot less "flaky" than using bleno (and configuring a cron-like script to ensure connection via BLE between Edison and phone) with Ubilinux, among other things, for BLE bluetooth tethering to a mobile phone.
Paul Martin
@Spazholio
Aug 26 2016 11:39
Your ideas are intriguing to me and I wish to subscribe to your newsletter.
Colin Lennon
@colinlennon
Aug 26 2016 13:09
Hi @diabeticgonewild . How much storage space is left on your Ubilinux rig after setting up OpenAPS and everything that's needed for BLE tethering? I'm considering switching from Yocto to Ubilinux, but would need enough space to run mongodb as well
Gina
@gclyon
Aug 26 2016 14:01
@diabeticgonewild how do you do this on pi?
Avahi-Daemon
kenstack
@kenstack
Aug 26 2016 14:33
for those of you doing ble tethering - are you able to share a wifi connection or just cellular, ie if the phone is in "airplane mode" but is connected to wifi, can you share internet access with your pi or Edison? or are you just sharing cellular data ? I'm struggling with this issue as my kid heads back to school - zero cell coverage and the school is a bit of a pain about allowing multiple devices to connect on their reliable staff network versus the highly unreliable students network - thanks !
Colin Lennon
@colinlennon
Aug 26 2016 14:36
@kenstack Yes, on Android at least, it shares whatever internet connection the phone itself is using
Eric Jensen
@elnjensen
Aug 26 2016 14:37
Not sure about other phones, but for my U.S. iPhone with AT&T, tethering only shares cellular data - turning tethering on disconnects from any active wifi connection. So whether or not the tethering connection is wifi or BLE, the internet connection shared is only cellular data. Sounds like it's different from Android.
Colin Lennon
@colinlennon
Aug 26 2016 14:37
This message was deleted
Eric Jensen
@elnjensen
Aug 26 2016 14:37
Possible that there's some setting I'm missing, but that's been my experience - haven't found a way to share wifi connection.
My NS site stopped updating this morning - still shows past treatments and BGs, but not current ones. I'm using RileyLink iOS app to upload pump info, and I updated it last night to the latest version - possibly related, possibly unrelated. Any general troubleshooting advice? It is not only not showing new pump treatment info, but also not showing new BGs, which come through a different route (Dexcom Share bridge to NS - and data in Share look ok and up to date). The api/v1/status.json file looks ok, but if I try to access entries.json or treatments.json it just spins its wheels. Both Azure and Mlab portals seem to think everything is OK. Thanks for any thoughts - sorry if off-topic.
Chris Oattes
@cjo20
Aug 26 2016 14:42
elnjensen: Have you tried restarting the site in azure?
Eric Jensen
@elnjensen
Aug 26 2016 14:43
No - was looking for the right button for that, but haven't yet found it. :worried:
Ah, I see it now.
Trying it out....
Eric Jensen
@elnjensen
Aug 26 2016 14:49
OK, looks like it's back. Thanks!
Jason Calabrese
@jasoncalabrese
Aug 26 2016 14:53
@kenstack maybe a hootoo would work, then that device would be on the school network, home network, etc, and other devices would connect to it
I used it on a plane to share wifi between several devices, in using the version without a battery but they have one with battery built in
kenstack
@kenstack
Aug 26 2016 14:55
@colinlennon really wow - like @elnjensen I have an att iPhone and it doesn't share wifi - @jasoncalabrese - yeah those look interesting but since he's driving now I'd then need to hootoo to grab his cellular connection when needed ...
Colin Lennon
@colinlennon
Aug 26 2016 14:57
@kenstack Yeah, I didn't realise that iOS behaved differently.
kenstack
@kenstack
Aug 26 2016 14:59
@colinlennon are you in the U.S. ? I was told android had the same limitations here (carrier based im assuming)
But will find an android to try either way thanks
Colin Lennon
@colinlennon
Aug 26 2016 15:00
@kenstack I'm in the UK - I guess it could be carrier restrictions in the US then
No problem :)
kenstack
@kenstack
Aug 26 2016 15:00
@jasoncalabrese do you run into the same issues when your kid is in school or places where there is no cell coverage re remote login ?
Jason Calabrese
@jasoncalabrese
Aug 26 2016 15:03
we have good cell coverage at school, so far I've been near by when he's somewhere without network
kenstack
@kenstack
Aug 26 2016 15:04
Got it - thanks
Wait until he gets his drivers license - whole new world :smile:
Chris Oattes
@cjo20
Aug 26 2016 15:05
hopefully by the time your kids can drive, tehy can monitor their own diabetes
Jason Calabrese
@jasoncalabrese
Aug 26 2016 15:05
hoping we'll be fully transitioned to self driving cars by then
7 more years, doesn't seem so far fetched
Chris Oattes
@cjo20
Aug 26 2016 15:06
it does, given that the average lifespan of a car is something like 7 or 8 years
apparently it's up to 10 years now
Jason Calabrese
@jasoncalabrese
Aug 26 2016 15:07
more worried about having an AP that works as good as what I have now
Chris Oattes
@cjo20
Aug 26 2016 15:07
so unless there are some pretty big financial incentives to switch, it'll probably take 10 years from the time that all cars on the market switch to self-drive before it is fully transitioned
@jasoncalabrese I'm trying not to think about what happens if my looping pump dies
Jason Calabrese
@jasoncalabrese
Aug 26 2016 15:10
I think about that too much
Chris Oattes
@cjo20
Aug 26 2016 15:12
I think I'm going to rely on the fact that it's not technically impossible for medtronic to flash an old firmware on to a pump, so there is probably some route to getting hold of one, even if noone has discovered it yet
I've been wondering what could be done with a letter from an endocrinologist saying that they want someone to be able to use openaps
Jason Calabrese
@jasoncalabrese
Aug 26 2016 15:20
I think we know that it is possible and that medtronic uses a carelink to flash firmware, maybe it was more of a guess but thought we knew for sure
Chris Oattes
@cjo20
Aug 26 2016 15:22
I heard something about it being similar to the bolus command in one of the chatrooms
warren-scott
@warren-scott
Aug 26 2016 15:50
sorry I'm not sure this is the best venue for this question but I know people use Pebble watches to monitor Nightscout users. Can the Pebble also be used with the Dexcom G5?
never mind... I just found the perfect write up here: http://www.nightscout.info/wiki/cgm-watchfaces Thanks! (The answer is yes.)
Scott Leibrand
@scottleibrand
Aug 26 2016 15:56
@bfaloona for debugging I usually tail -n 100 -F /var/log/openaps/pump-loop.log
@cjo20 don't forget that it doesn't matter if everyone replaces their existing cars with self-driving cars for purposes of 16-year-olds not needing licenses: they just need to live in some place where they can get an Uber (preferably a self-driving one) whenever they need to get somewhere
Chris Oattes
@cjo20
Aug 26 2016 16:00
@scottleibrand my original point was more that hopefully you can trust your kid to manage their diabetes before you can trust them to wander off to somewhere with no mobile signal on their own
Scott Leibrand
@scottleibrand
Aug 26 2016 16:01
true that. :)
kenstack
@kenstack
Aug 26 2016 16:04
@cjo20 trust I do - but kids - even 16 year olds like mine who are really good at managing their diabetes etc - can get themselves into lots situations that are tough to manage even for an adult - and being a new driver adds a whole other dimension - couple of with lows from hard exercise while driving home ... Having some remote data to help seems pretty reasonable at least to this t1d dad
Chris Oattes
@cjo20
Aug 26 2016 16:06
I didn't mean that they shouldn't have any help at all. But I'd hope they'd be able to manage, perhaps suboptimally, for some time at least
kenstack
@kenstack
Aug 26 2016 16:11
it's like the 1% doctrine problem - 99 % of the time it's great kid handles no worries - great bgs, safe etc - but in those 1% moments where things are heading the wrong direction ... Nice to be able to give some remote help when needed - but everyone is different and no solution fits all
Chris Oattes
@cjo20
Aug 26 2016 16:14
That's what I meant by no-optimally. In 99.9999% of siutations that require immediate action are hypos, which can be sub-optimally solved by "eat all the sugar"
Eric
@ecc1
Aug 26 2016 16:25

Some promising developments on the Edison kernel front: the mainline Linux kernel now boots on Edison (https://github.com/andy-shev/linux, "eds" branch):

$ uname -a
Linux tesla 4.8.0-rc3 #1 SMP Thu Aug 25 02:35:56 EDT 2016 i686 GNU/Linux

It boots on a mini-breakout board but not on a SparkFun base block yet. I haven't tried all the devices I need yet, but it looks like it will finally be possible to bring the Edison platform up to date.

Martin Haeberli
@mhaeberli
Aug 26 2016 16:33
:+1: @ecc1 !
diabeticgonewild
@diabeticgonewild
Aug 26 2016 17:28
@ecc1 That looks awesome!

I asked Kathy Fairbanks, a spokeswoman for the No on 61 Campaign, if she’d characterize sky-high drug prices as a problem for patients. No, she said, that’s not how she’d put it.

“It’s an issue, how about that?” Fairbanks allowed.

“Healthcare and healthcare costs are top of mind for a lot of people,” she said. “However, Proposition 61 isn’t the answer.”

I asked Fairbanks if she was taking any prescription meds.

“No,” Fairbanks answered. “Are you?”

I told her that, as a person with Type 1 diabetes, I’ve watched helplessly as the price of insulin has tripled since 2002.

“Oh,” Fairbanks replied.

Oh indeed.

PieterGit
@PieterGit
Aug 26 2016 21:47
@jasoncalabrese (or others): what nightscout branch should I use with openaps currently. The dev branch is "closed" according to GitHub, the master branch hasn't been updated for two months. I Best to be adventourous and use dev branch or should I stick to the 0.9-beta2 branch?
Jason Calabrese
@jasoncalabrese
Aug 26 2016 21:48
The dev branch, there have been several PRs that get submitted by mistake that try to merge dev to master, so you're just seeing one of those
PieterGit
@PieterGit
Aug 26 2016 21:49
ok, i'll try tommorow, thanks
Brandon Faloona
@bfaloona
Aug 26 2016 22:30
@scottleibrand I finally figured out that the cron loop did not have my two nightscout ENV vars. Things started working after I added them to my crontab. Testing commands manually was working, so troubleshooting was confusing. Specifically, the nightscout upload was failing silently.
Scott Leibrand
@scottleibrand
Aug 26 2016 22:49
@bfaloona yeah, that stuff all needs replacing with the stuff based on nightscout autoconfigure-device-crud
Brandon Faloona
@bfaloona
Aug 26 2016 23:46
@bewest @scottleibrand Looking at the ns-upload script, I can't figure out how to invoke help.
Also, I notice that if I give it a bad nightscout host, it reports success. This is what was tripping me up.
Is that script part of oref0? I'm happy to open a bug if that's useful.
Scott Leibrand
@scottleibrand
Aug 26 2016 23:52
ns-upload is deprecated
we need to switch over to the new way of doing a lot of this stuff, as documented in the openaps docs or https://github.com/openaps/docs/wiki/CGM-Loop-with-openxshareble-scratchpad
Brandon Faloona
@bfaloona
Aug 26 2016 23:55
Ok, thanks for the pointer.
David
@david-t1
Aug 26 2016 23:57
got my open loop mostly working. it executes temp basals but always with following error: determine-basal://text/shell/enact/suggested.json
Error: date field not found: cannot calculate avgdelta
using G4 plugged into rpi2
Scott Leibrand
@scottleibrand
Aug 26 2016 23:59
@david-t1 there's no 'date' field in your glucose data