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

22nd
Aug 2016
David
@david-t1
Aug 22 2016 00:01
I wonder what others experience for the range of the TI stick? Running clock.json at different distances, it seems like I can't count on much more than 3 feet even with clear line of sight and that I should't veer more than 45 degrees at an angle. If I sit at my desk with the rpi2 on the desk, the test usually fails and this is a distance of less than 2 feet (but through the wood of the desk.) Any thoughts? I am starting to think I will have to be careful at night to place the rig within 3 feet at bed level and I wonder if even then sometimes my body will be in between the TI stick and the pump. The pump, btw, is a 515 which mmtune sets to freq 916.63 .
...scary 'cause many report the TI as an improvement over the Carelink
Eric Luhrs
@eluhrs
Aug 22 2016 00:12
Something is wrong then. I get at least 20 feet with TI.
David
@david-t1
Aug 22 2016 00:12
!!!
20 ft you can walk around in the room, sweet
Eric Luhrs
@eluhrs
Aug 22 2016 00:14
At least 20. If I leave it upstairs I still get a half way decent connection downstairs. It is really incredible.
David
@david-t1
Aug 22 2016 00:15
is why I chose it over Carelink but yes something is off
dex drawing off too much power? a bad stick? poor tuning from mmtune? no idea
Eric Luhrs
@eluhrs
Aug 22 2016 00:20
I'm not sure either. Try ruling things out one at a time. I'm not sure if reflashing would help. Seems like it would either work or not. I've heard of faulty TI sticks.
Brandon Faloona
@bfaloona
Aug 22 2016 00:22
TI Stick has greatly reduced range errors for us vs carelink. Imperfect test showed about 20ft is our TI range.
David
@david-t1
Aug 22 2016 00:22
Tx, I may try reflashing. Not sure how to proceed diagnostically but I will say the range for running mmtune is much more generous (13 feet, maybe more). Something about running clock.json is different
I am able run an open loop but I do get the occasional bytearray or out of range error message
Tx Brandon, you are helping to confirm something isn't right
Scott Leibrand
@scottleibrand
Aug 22 2016 00:31
What kind of RSSI does mmtune give you at ~10ft?
David
@david-t1
Aug 22 2016 00:34
\\i@raspberrypi:~/my_openaps $ openaps use pump mmtune
{
"scanDetails": [
[
"916.300",
0,
-99
],
[
"916.324",
0,
-99
],
[
"916.348",
0,
-99
],
[
"916.372",
0,
-99
],
[
"916.396",
0,
-99
],
[
"916.420",
0,
-99
],
[
"916.444",
0,
-99
],
[
"916.468",
0,
-99
],
[
"916.492",
0,
-99
],
[
"916.516",
0,
-99
],
[
"916.540",
0,
-99
],
[
"916.564",
0,
-99
],
[
"916.588",
0,
-99
],
[
"916.612",
0,
-99
],
[
"916.636",
0,
-99
],
[
"916.660",
0,
-99
],
[
"916.684",
0,
-99
],
[
"916.708",
0,
-99
],
[
"916.732",
0,
-99
],
[
"916.756",
0,
-99
],
[
"916.780",
0,
-99
],
[
"916.804",
0,
-99
],
[
"916.828",
0,
-99
],
[
"916.852",
0,
-99
],
[
"916.876",
0,
-99
]
],
"setFreq": 916.63,
"usedDefault": true
\\
rssi? that was at 10 ft or so. running clock.json fails at half that distance
i moved TI stick to different port but getting same results
Dana Lewis
@danamlewis
Aug 22 2016 00:45
Where is the pump on your body?
David
@david-t1
Aug 22 2016 00:45
front pocket of jeans
sitting at desk just 2 feet from rig, clock.json never works unless I place pump on the desk. Mmtune is fine
dunno if this is true for all but seems like openaps has to warm up everytime I re-power the rpi2. the best way I have found so far to wake up the pump and get comms working seems to be to run mmtune whereas I don't like having clock.json as part of my preflight because it often knocks out my loop
garykidd
@garykidd
Aug 22 2016 01:06
Can anyone walk me through fixing multiple 'Duplicate src declaration' errors when trying to prepare edison for OpenAPS instance?
....like....
Collected errors:
Eric Jensen
@elnjensen
Aug 22 2016 01:19
@garykidd I think @eluhrs had the answer to this above, earlier today: > And that error above simply means that you have two repositories named src in your base-feeds.conf file. Just change one to src2 (or something else) and run the opkg update command again.
I think you just need to edit the file, and make sure the names (initial strings on each line of the file) don't have any duplicates; if they do, just modify the second instance of each one.
garykidd
@garykidd
Aug 22 2016 01:43
where is the file located?
and how to I edit it?
Eric Jensen
@elnjensen
Aug 22 2016 01:53
It's the file /etc/opkg/base-feeds.conf that you created earlier in the setup (you can see it in the docs in the section "Install git and cronie". You can edit it with the command nano /etc/opkg/base-feeds.conf
I made two changes to the text in the walkthrough.
Mine now looks like this:
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
src all2 http://iotdk.intel.com/repos/3.0/iotdk/all
src x86 http://iotdk.intel.com/repos/3.0/iotdk/x86
src i586 http://iotdk.intel.com/repos/3.0/iotdk/i586
The two differences are:
On the fourth line, change all to all2.
Also, in each of the last three lines, change 2.0 to 3.0, since we are now using Yocto 3.0
Then after changing, re-run the next command in the setup docs, opkg update.
Then you should no longer get that error.
garykidd
@garykidd
Aug 22 2016 02:02
root@APS:~# nano /etc/opkg/base-feeds.conf
root@APS:~# opkg update
Downloading http://repo.opkg.net/edison/repo/all/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/all.
Downloading http://repo.opkg.net/edison/repo/edison/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/edison/Packages.gz.
Updated list of available packages in /var/lib/opkg/edison.
Downloading http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Updated list of available packages in /var/lib/opkg/core2-32.
Downloading http://iotdk.intel.com/repos/3.0/iotdk/all/Packages.
Updated list of available packages in /var/lib/opkg/a112.
Downloading http://iotdk.intel.com/repos/3.0/iotdk/x86/Packages.
Updated list of available packages in /var/lib/opkg/x86.
Downloading http://iotdk.intel.com/repos/3.0/iotdk/i586/Packages.
Updated list of available packages in /var/lib/opkg/i586.
Downloading http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586//Packages.
Updated list of available packages in /var/lib/opkg/iotkit.
Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/all/Packages.
Updated list of available packages in /var/lib/opkg/iotdk-all.
Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/core2-32/Packages.
Updated list of available packages in /var/lib/opkg/iotdk-core2-32.
Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/edison/Packages.
Updated list of available packages in /var/lib/opkg/iotdk-edison.
root@APS:~#
~~~~
root@APS:~# opkg install cronie
Package cronie (1.4.11-r0) installed in root is up to date.
root@APS:~# opkg install git
Package git (2.0.1-r0.0) installed in root is up to date.
root@APS:~#
~~
THANKS!
Eric Jensen
@elnjensen
Aug 22 2016 02:04
Glad it's working!
Scott Leibrand
@scottleibrand
Aug 22 2016 02:37
@david-t1 looks like mmtune is failing: none of those got any signal, so it's using the default frequency. Is your pump on US frequencies, or might it be from overseas and on 868?
David
@david-t1
Aug 22 2016 02:38
it is a 515. let me look at its settings
Scott Leibrand
@scottleibrand
Aug 22 2016 02:38
You might try the WW settings for mmeowlink, and/or try a wider frequency range to tune over. If that doesn't work, you might have bad hardware.
Check model numbers etc. for clues too.
David
@david-t1
Aug 22 2016 02:43
so you are thinking the pump has an optimal frequency that mmtune isn't identifying and that might be why my range is suffering?
Scott Leibrand
@scottleibrand
Aug 22 2016 02:44
correct
David
@david-t1
Aug 22 2016 02:44
wow, well I can't be the only 515 user!
Scott Leibrand
@scottleibrand
Aug 22 2016 02:44
it's not about 515, but it might be about US vs. WW (worldwide). there is a second set of mmeowlink presets for WW pumps to try the frequencies around 868MHz
David
@david-t1
Aug 22 2016 02:45
ok, I will investigate. tx for the tip. weird to think a US pump might need to use WW
Scott Leibrand
@scottleibrand
Aug 22 2016 02:45
or your pump (or TI stick) may have been manufactured with a slightly out-of-spec radio, in which case the optimal frequency may not be in the standard ranges. in that case, you can try widening the mmtune range and see where it finds it
if you're sure it's a US pump, then WW is probably not the thing
another possibility is 900MHz interference, from cordless phones or similar
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:46

You're better off with Ubilinux compared to Yocto It does everything Yocto does, plus more. And it's more versatile and easier to work with.

But, installing/"flashing" Ubilinux on the Edison is flaky. I spent 40 hours at least trying to install it, to no avail. The least flaky way of installing Ubilinux, in my opinion, is using Windows.

David
@david-t1
Aug 22 2016 02:46
i am reasonably sure it is US and I don't use 900mhz phones
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:47
This is the best way of installing Ubilinux, in my opinion http://www.whiteboardcoder.com/2016/03/faster-install-ubilinux-on-edison.html
Scott Leibrand
@scottleibrand
Aug 22 2016 02:47
@david-t1 ok, I'd explore adjusting your mmtune source code to try a wider range of frequencies. it might be easier to work with the ruby bin/mmtune for your initial exploration
David
@david-t1
Aug 22 2016 02:48
ok, tx
Scott Leibrand
@scottleibrand
Aug 22 2016 02:48
but you have to install some dependencies to get ruby working, so not sure
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:50
Since Ubilinux can't be downloaded publicly anymore, here's an Ubilinux download that I uploaded: https://www.dropbox.com/s/k2pxz3o4tmrlabu/ubilinux-edison-150309.zip?dl=0
Scott Leibrand
@scottleibrand
Aug 22 2016 02:50
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:51
Even Bluetooth tethering can be done easily on Ubilinux. I have been successful with it for 24+ hours now.
Scott Leibrand
@scottleibrand
Aug 22 2016 02:51
@diabeticgonewild thanks for doing and documenting that. I'm really looking forward to trying it: was never able to get it to work with the scripts I was trying.
@david-t1 actually, looks like the mmeowlink settings are even easier to tweak: https://github.com/oskarpearson/mmeowlink/blob/dev/mmeowlink/mmtune.py#L10
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:53
You're welcome. The key is bleno. Plus that ble_echo.js file. You DO have to use a BLE pairing app and keep it open at all times, if you are using Android or iPhone though...
But in the initial install directions, I missed an _ somewhere, so an error may be generated. But I mentioned the error somewhere later in the chat stream...
Scott Leibrand
@scottleibrand
Aug 22 2016 02:54
yeah, bleno sounds interesting. I bet there's a way to get around the pairing app requirement; we'll see.
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:54
I don't think so. But, once the BLE is paired via the app, it shows as "paired" in iOS bluetooth settings...
And you will need a "npm crontab utility" of some sort to ensure that the device is paired so that it uploads periodically...
David
@david-t1
Aug 22 2016 02:55
lots of great leads but yeah maybe tweaking the mmeowlink settings is best way forward other than buying a different TI stick
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:55
But no big deal..
Scott Leibrand
@scottleibrand
Aug 22 2016 02:56
I know that triggering the iOS personal hotspot from the Pi with bluetooth activates the wifi hotspot as well, so you can then switch over to wifi if you want
(I did get BT tethering working on the Pi, just not the Edison)
diabeticgonewild
@diabeticgonewild
Aug 22 2016 02:57
Yeah, but you also don't have to worry about having multiple networks to connect to in /etc/network/interfaces IF your PHONE always connects by default to certain WIFI networks, such as when you get home or whatever.
But I DID find a nice way to have multiple WIFI networks configured on the Edison, that is intuitive....unlike in the guides.

Here's the guide I found, that differs from OpenAPS/mmeowlink guides, that makes it INTUITIVE on the Edison, for having MULTIPLE WiFi networks...

http://www.geeked.info/raspberry-pi-add-multiple-wifi-access-points/

Since Ubilinux is no longer being supported (or updated for that matter, but one could do that MANUALLY...), it would be relatively easy to make an install script. I'm not endorsing it, but I'm just saying...
diabeticgonewild
@diabeticgonewild
Aug 22 2016 03:03
Actually, I'm going to add that guide to mmeowlink for multiple WiFi networks, cause it's much better than the one that they have been using!
I just added that link to the guide.
diabeticgonewild
@diabeticgonewild
Aug 22 2016 03:11

Here's the instructions (again) for Bluetooth (BLE) tethering on Ubilinux.

sudo apt-get install libbluetooth-dev
sudo apt-get install nodejs
sudo npm install bleno (WARNING: it puts out errors and loads slowly but the install ends up working....)
cd node_modules/bleno/
sudo rfkill unblock bluetooth
sudo hciconfig hci0 up
sudo hcitool dev

Then go to nano and save this as ble_echo.js
/**
 * Simple bleno echo server
 * Author: Shawn Hymel
 * Date: November 22, 2015
 *
 * Creates a Bluetooth Low Energy device using bleno and offers one service
 * with one characteristic. Users can use a BLE test app to read, write, and
 * subscribe to that characteristic. Writing changes the characteristic's
 * value, reading returns that value, and subscribing results in a string
 * message every 1 second.
 *
 * This example is Beerware (https://en.wikipedia.org/wiki/Beerware).
 */ // Using the bleno module var bleno = require('bleno'); // Once bleno starts, begin advertising our BLE address bleno.on('stateChange', function(state) { console.log('State change: ' + state); if (state === 'poweredOn') { bleno.startAdvertising('MyDevice',['12ab']); } else { bleno.stopAdvertising(); } }); // Notify the console that we've accepted a connection bleno.on('accept', function(clientAddress) { console.log("Accepted connection from address: " + clientAddress); }); // Notify the console that we have disconnected from a client bleno.on('disconnect', function(clientAddress) { console.log("Disconnected from address: " + clientAddress); }); // When we begin advertising, create a new service and characteristic bleno.on('advertisingStart', function(error) { if (error) { console.log("Advertising start error:" + error); } else { console.log("Advertising start success"); bleno.setServices([ // Define a new service new bleno.PrimaryService({ uuid : '12ab', characteristics : [ // Define a new characteristic within that service new bleno.Characteristic({ value : null, uuid : '34cd', properties : ['notify', 'read', 'write'], // If the client subscribes, we send out a message every 1 second onSubscribe : function(maxValueSize, updateValueCallback) { console.log("Device subscribed"); this.intervalId = setInterval(function() { console.log("Sending: Hi!"); updateValueCallback(new Buffer("Hi!")); }, 1000); }, // If the client unsubscribes, we stop broadcasting the message onUnsubscribe : function() { console.log("Device unsubscribed"); clearInterval(this.intervalId); }, // Send a message back to the client with the characteristic's value onReadRequest : function(offset, callback) { console.log("Read request received"); callback(this.RESULT_SUCCESS, new Buffer("Echo: " + (this.value ? this.value.toString("utf-8") : ""))); }, // Accept a new value for the characterstic's value onWriteRequest : function(data, offset, withoutResponse, callback) { this.value = data; console.log('Write request: value = ' + this.value.toString("utf-8")); callback(this.RESULT_SUCCESS); } }) ] }) ]); } });
node ble_echo.js
Then the BLE function on Edison should be activated, by the above command being issued.
So, then open up a BLE connector utility for iOS or Android, such as LightBlue Explorer, and connect to it. It should appear as "MyDevice". YOU MUST HAVE THIS APP RUNNING AT ALL TIMES TO CONNECT TO THE EDISON!
Afterwards, consider installing a "NPM Crontab utility" on your Edison, and create a "crontab-like function" within that new utility, to "connect" to your Edison, every minute or so to ensure that the device is connected and is uploading over the internet.
diabeticgonewild
@diabeticgonewild
Aug 22 2016 03:17
Anyway, this should be formally documented, but there really isn't a "formal" Edison OpenAPS install guide.
Paul Dickens
@thebookins
Aug 22 2016 03:44
@scottleibrand does the WW firmware for mmeowlink cover all of the US frequencies, or a different range. We used the WW firmware to flash our TI stick cos we are in Australia, but the pump is from the US - should we reflash with the US version?
diabeticgonewild
@diabeticgonewild
Aug 22 2016 03:49
You should reflash to US version.
Paul Dickens
@thebookins
Aug 22 2016 03:50
OK, thanks
diabeticgonewild
@diabeticgonewild
Aug 22 2016 03:51
You're welcome
diabeticgonewild
@diabeticgonewild
Aug 22 2016 11:53
I think since Ubilinux is now gone, it would possibly be a good idea now to create a "custom Debian image" for OpenAPS for Edison, with certain packages preinstalled. A guide can be found here: http://www.hackgnar.com/2016/02/building-debian-linux-for-intel-edison.html?m=1
Or this tutorial can be used INSTEAD OF recommending the (unavailable) Ubilinux
So, either way you look at it, it's beneficial...
C-Ville
@C-Ville
Aug 22 2016 11:57
I like the idea other packages could possibly be omitted, such that the whole thing gets smaller. Unfortunately I have no clue how to really get there
diabeticgonewild
@diabeticgonewild
Aug 22 2016 12:00
True
Matt Walker
@walker0
Aug 22 2016 12:03
I personally had no issues setting up my edison running yocto with everything needed based off the instructions on the mmeowlink wiki. The setup took slightly longer but skipping the annoyance of flashing ubilinux probably meant that I was pretty even time wise as I had significant issues with ubilinux not wanting to flash properly
Eric Luhrs
@eluhrs
Aug 22 2016 12:03
Another option would be to embrace yocto.
diabeticgonewild
@diabeticgonewild
Aug 22 2016 12:04
Yocto can be flaky with OpenAPS
Matt Walker
@walker0
Aug 22 2016 12:04
I personally have had no significant issues with yocto on my edisons
C-Ville
@C-Ville
Aug 22 2016 12:04
I was scared as mmeowlink wiki suggests ubi
Eric Luhrs
@eluhrs
Aug 22 2016 12:04
It works well except that the available packages are limited. So we could just build and maintain whatever packages we need.
I've had no issues either. In fact, I rather like the limited, lightweight footprint of yocto
diabeticgonewild
@diabeticgonewild
Aug 22 2016 12:06
There were issues with it in earlier versions of Yocto, to the point where OpenAPS developers had to contact Intel to get them to fix their stuff.
Ubilinux doesn't have that sort of problem. Besides the flaky flashing process, it works pretty much the same as a Raspberry Pi setup, minus the TI stick configuration and the Bluetooth pairing.
Eric Luhrs
@eluhrs
Aug 22 2016 12:07
Seems to work well now. And besides, Intel seems committed to it, which is a plus in my book
diabeticgonewild
@diabeticgonewild
Aug 22 2016 12:08
Yocto is much more proprietary than Debian setups. I don't trust it.
Plus, it is much easier to teach Ubilinux to people who are not tech-apt who are trying to configure OpenAPS, in a stepwise approach...like Raspberry Pi with CareLink to Raspberry Pi with TI stick to Intel Edison with TI stick (soldered in serial...)
Matt Walker
@walker0
Aug 22 2016 12:11
The slight difference in commands between ubilinux and yocto is certainly annoying when switching back and forth and it is more annoying to get all the permissions correct for non root users
Eric Luhrs
@eluhrs
Aug 22 2016 12:18
I agree with the point about overall parity with raspian being easier for newcomers.
C-Ville
@C-Ville
Aug 22 2016 12:21
I guess, it somehow depends which way the more savy guys are going. I, being a disaster when coming to Linux would most likely try to go with what is most used and supported by the people using OpenAPS
Eric Luhrs
@eluhrs
Aug 22 2016 13:00
At this point, that's definitely Ubi. I've always been a fan of debian-based distros. I only used Yocto because it seemed like an easier process for my first go with Edison. So far I've not been disappointed, though I supposed I should try Ubi before deciding one way or the other. :smile:
Chris Oattes
@cjo20
Aug 22 2016 13:13
diabeticgonewild: yocto is more open than ubilinux though
The lack of kernel sources makes ubi far more "proprietary" in terms of the underlying system
Chris Oattes
@cjo20
Aug 22 2016 13:36
might be time for me to buy another edison
C-Ville
@C-Ville
Aug 22 2016 13:44
did anyone build an Edison rig using Sparkfun Blocks and can recommend a housing? I am currently planning on using the Sparkfun Batterieboard, the GPIO board and the µ-SD card Board. For batteries I am contemplating a 18650 LiPo
John Sjolund
@sjolundjohn
Aug 22 2016 15:07

@daveewall going back a month to your recomendation about getting a Adafruit powerbooster, which I have done. How did you end up connecting it all to the Edison? I am thinking battery to Powerboost via JST, then replacing Powerboost USB port with a JST connector which I will then link up to Edison. Is this how you did it?

This way you can have either battery and/or Micro-USB going into the Powerboost to feed the Edison

Martin Haeberli
@mhaeberli
Aug 22 2016 18:16
This looks like an amusing future possibility as an openaps platform : https://www.kickstarter.com/projects/onion/omega2-5-iot-computer-with-wi-fi-powered-by-linux
Brandon Faloona
@bfaloona
Aug 22 2016 18:18
T1D just started a 5 day course of steroids. Not the first time, but never with an APS. Stressful seeing BG values above 300!!
Annoying (although medically appropriate) to watch OpenAPS prioritize the BG trend when emotionally I want it to take radical measures to bring BG down.
Any sage advice on how best to accommodate the temporary change in insulin and goals.
Current plan includes using multiple profiles with updated basal rates, carb ratio and insulin sensitivity. We also may need to boost max_iob.
Dana Lewis
@danamlewis
Aug 22 2016 18:19
ouch :( there was someone a few days ago mentioning they had been on steroids and were successful..hopefully they’ll chime in here.
might also consider adjusting targets, too - i.e. setting eating soon mode (i.e. a temp target of 80) during the times when you want OpenAPS to do “more” but want to avoid rage bolusing?
Brandon Faloona
@bfaloona
Aug 22 2016 18:21
I have not looked at eating soon mode yet. Sounds very useful for this situation. Thanks!
Dana Lewis
@danamlewis
Aug 22 2016 18:21
if you change max_iob, I’d probably go ahead and plop a reminder on the calendar in 5-6 days to revisit that/other ratio changes and set them back or adjust them as needed after you’ve observed.
yea. eating soon is about peaking insulin activity before a meal, but using lower targets instead of manually correction is a new strategy i’ve been trying & finding it more effective than me trying to “top off” what the loop is doing. when I do that, I’m more likely to go low; when I change the target and let the loop do it, it works a lot better.
Brandon Faloona
@bfaloona
Aug 22 2016 18:23
"rage bolusing" - that's hilarious, except when it actually happens, I guess.
Peter Miller
@ochenmiller
Aug 22 2016 18:23
Happiness is a 6.0 day with no lows. :smile:
Dana Lewis
@danamlewis
Aug 22 2016 18:23
@bfaloona exactly :)
@ochenmiller woot! :)
Peter Miller
@ochenmiller
Aug 22 2016 18:25
teenager sleeping in for last few days of vacation really helps...
Brandon Faloona
@bfaloona
Aug 22 2016 18:42
@danamlewis Eating soon mode looks too high-touch for us. Is that feature moving toward automation, or probably going to remain manual?
Dana Lewis
@danamlewis
Aug 22 2016 18:52
You could schedule it in by adjusting targets down an hour before normal meal times.
I never eat at the same time, though, so that doesn’t work for me.
C-Ville
@C-Ville
Aug 22 2016 18:56
@danamlewis do I get that right that you may for example lower Bg target to 80 from 100 and use that additional insulin for the coming meal? so at mealtime you give yourself than Bolus=[ mealbolus - (adjuasted temp*time)]?
Lynne Butts
@flutelynne_twitter
Aug 22 2016 18:56
Amen for setting eating soon mode and using activity mode. Just for a band job, I used activity mode for 6 hours. I did not go low for once! I would think that it would work well for the steroid/sickness situations, too. As Dana suggests, the eating soon mode is great for lowering those high numbers, too.
Brandon Faloona
@bfaloona
Aug 22 2016 18:57
@danamlewis yeah, you lost me at 'normal meal times'. :smile:
Dana Lewis
@danamlewis
Aug 22 2016 18:59
@C-Ville yes and no. Yes lower target (for me) to 80. but that’s done ~1 hour before meal. see: https://diyps.org/2016/07/11/picture-this-how-to-do-eating-soon-mode/
@flutelynne_twitter that’s great to hear!
@bfaloona normal is not in my vocabulary for schedules :)
but in terms of making it ‘easier’ to do, using temp targets in Nightscout makes it easier (IMO) than trying to change targets on the pump, so not sure if you’re aware that’s an option for setting thhem
Brandon Faloona
@bfaloona
Aug 22 2016 19:10
I'm not aware how to do that. Are you talking about changing BG targets in the profile editor?
I thought that nightscout profile editor settings simply allowed nightscout to display things correctly.
Dana Lewis
@danamlewis
Aug 22 2016 19:11
nope, in Care Portal, event type of “Temporary Target” gives you the options of “eating soon”, “activity”, or manual. and you can cancel it later, too.
Brandon Faloona
@bfaloona
Aug 22 2016 19:12
Ah! very cool. Thanks.
Dana Lewis
@danamlewis
Aug 22 2016 19:12
not sure if we have a write up on what you need to do to configure it to work with your loop, if not we should! but @jasoncalabrese has been rocking these, so he’s a good person to ask for clarification on this one.
:+1:
garykidd
@garykidd
Aug 22 2016 19:18
IN process of preparing edison for OpenAPS....DO I care about this.......
You are using pip version 8.0.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
??
Scott Leibrand
@scottleibrand
Aug 22 2016 19:28
don't worry about pip version
garykidd
@garykidd
Aug 22 2016 19:30
thanks, Scott
and do I care about traceback errors.....
Installed /usr/lib/python2.7/site-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(
targs, kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs,
kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(targs, *kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
root@APS01:~/mmeowlink-source#
Scott Leibrand
@scottleibrand
Aug 22 2016 19:32
you can generally ignore all but the first and last few lines of a traceback like that. and I don't think you actually pasted what command you ran that gave that...
depending on what it failed to do, that might or might not be important. definitely more likely to matter than a version warning though.
garykidd
@garykidd
Aug 22 2016 19:34
OK...I think I understand.
....and ho bout a whole slew of.......
blob
sample of pages of similar ouput after ``npm install -g json```
garykidd
@garykidd
Aug 22 2016 19:40
npm install -g json
Brandon Faloona
@bfaloona
Aug 22 2016 19:42
@jasoncalabrese Any suggestions for how to configure temporary targets in the careportal to affect openaps? I see the entry in nightscout but it's not getting used by openaps.
garykidd
@garykidd
Aug 22 2016 19:42
and same after ``npm install -g oref0``` ....
/usr/bin/oref0-pebble -> /usr/lib/node_modules/oref0/bin/oref0-pebble.js
npm WARN unmet dependency /usr/lib/node_modules/jsupm_a110x requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_ad8232 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adafruitms1438 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adafruitss requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adc121c021 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adis16448 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_ads1x15 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adxl335 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adxl345 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_adxrs610 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_am2315 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_apa102 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
npm WARN unmet dependency /usr/lib/node_modules/jsupm_apds9002 requires mraa@'>=1.0.0' but will load
npm WARN unmet dependency /usr/lib/node_modules/mraa,
npm WARN unmet dependency which is version 1.0.0-dirty
^PARTIAL LIST^
@garykidd those look pretty repetitive, and they're all version warnings, so not to concerning unless something else isn't working as a result.
Ben West
@bewest
Aug 22 2016 19:49
looks like maybe node is not installed quite optimally
mraa is one of the c++ low level bindings for node
Brandon Faloona
@bfaloona
Aug 22 2016 20:01
Thanks @scottleibrand. That link brings me back to the same question I've been asking myself for weeks. Should I build a new loop from scratch or continue working on resolving the issues I find in the current loop. I don't have a test rig, so fixing issues is incredibly slow, and often takes the loop offline while I debug.
It seems crazy to alternate between two different loops in different repos. How do others test multiple loops in 'production'?
Ben West
@bewest
Aug 22 2016 20:07
I have a dozen repos
you can backup your loop using oref0 export-loop my-backup.json
thn create a new repo using, and openaps import the backup
at that point it's the same as the old one and you can experiment without affecting your production loop
when it's ready, you can simply update the cron job and it'll point to the new one
Brandon Faloona
@bfaloona
Aug 22 2016 20:08
But that does not include my loop script, or any scripts it calls. Perhaps my loop script has too much logic in it?
Ben West
@bewest
Aug 22 2016 20:09
dunno, is it somewhere I can take a look? I'd be very interested
Brandon Faloona
@bfaloona
Aug 22 2016 20:09
And how would I experiment without it affecting the pump and nightscout?
Ben West
@bewest
Aug 22 2016 20:09
maybe it can be turned into a tool distributed with oref0
the cron job is what's driving the automation
Ben West
@bewest
Aug 22 2016 20:09
the cron job only runs exactly what you specify
so it won't know about any new openaps instances you create until you tell it
Brandon Faloona
@bfaloona
Aug 22 2016 20:11
Oh, so running the loop under test DOES impact the pump and nightscout, but it is only triggered manually. right?
Ben West
@bewest
Aug 22 2016 20:12
exactly
it only affects the pump at the moment you manually experiment with the use/report telling it to do so
then if you update the cron specification, you can switch the automation over
Brandon Faloona
@bfaloona
Aug 22 2016 20:13
My short list of issues with my loop: IOB and COB still not always correct, STDERR does not get into the logfile, and frequent failures (30% of loops?) caused by timing logic.
Ben West
@bewest
Aug 22 2016 20:13
if you run into problem because you're using stick at same time as the cron/automation, you can put a # hash mark at beginning of the cron spec to "comment it out" and cancel it for time being
2>&1 > >(logger -t do-loop-status)
the extra ( ... ) parens drop it into a new subshell with new io handles
I usually do ( ... ) 2>&1 | logger -t do-loop-status
logger takes input from it's stdin
and it's a process, not a file
dabear
@dabear
Aug 22 2016 20:15
hi there. Does anyone know if there is an example site with real data from the dev branch of nightscout? I need to debug my app against the dev branch ( https://github.com/dabear/FloatingGlucose )
Ben West
@bewest
Aug 22 2016 20:15
the | routes stdout from process into another process, logger
Brandon Faloona
@bfaloona
Aug 22 2016 20:15
When I went that route, my exit function was not able to exit the script. it only exited that subshell. My goal is to stop the loop when appropriate.
Ben West
@bewest
Aug 22 2016 20:16
with the way it is there, it'll wind up in a file called logger instead of system log
dabear
@dabear
Aug 22 2016 20:16
apparently there are differences in the data returned between the stable and dev branch
Dana Lewis
@danamlewis
Aug 22 2016 20:16
@dabear what do you mean by “real data”? You mean glucose data, or are you asking about OpenAPS-specific data?
Ben West
@bewest
Aug 22 2016 20:16
you shouldn't need the die stuff...
Brandon Faloona
@bfaloona
Aug 22 2016 20:17
STDOUT is making it to the log with my approach, fyi.
Ben West
@bewest
Aug 22 2016 20:17
if you set -EU I believe, it'll throw errors to stop
as a side effect of the extra parens I guess it might work
-e is exit on error
dabear
@dabear
Aug 22 2016 20:18
more interested in the rawbg data in the /pebble endpoint and if there are differences between the stable and dev branches @danamlewis
Scott Leibrand
@scottleibrand
Aug 22 2016 20:18
@bfaloona I would love to get another pair of eyes testing out the refresh-loops thing and fixing any bugs you find there (and transitioning it over to use newer stuff like the ns tool.
Ben West
@bewest
Aug 22 2016 20:18
-E is with trace
I'd remove the error_exit stuff
use -EU maybe turn pipefail on as well
might be worth converting some of the hardcoded things to variables and putting it in oref0-a-loop.sh
Dana Lewis
@danamlewis
Aug 22 2016 20:20
@dabear may ask in the general nightscout/public channel, then
Brandon Faloona
@bfaloona
Aug 22 2016 20:20
Well, I don't need error_exit, but I'd like to log on loop exit. How can I achieve that?
Ben West
@bewest
Aug 22 2016 20:21
with -e, it's set to exit on error
Brandon Faloona
@bfaloona
Aug 22 2016 20:21
but will that get sent to the log?
Ben West
@bewest
Aug 22 2016 20:21
where is output from the script itself going?
Brandon Faloona
@bfaloona
Aug 22 2016 20:21
syslog
Ben West
@bewest
Aug 22 2016 20:21
if you just do echo hello for example
Brandon Faloona
@bfaloona
Aug 22 2016 20:22
yes, that's making it to syslog
e.g. Aug 22 12:57:13 openaps-lp do-loop-enact: ENACT FAILED
Ben West
@bewest
Aug 22 2016 20:23
as a demo:
"normal" defaults
(  echo hello > /dev/fd/2 && fail bar; echo hi)
hello
No command 'fail' found, did you mean:
 Command 'qail' from package 'qmail' (universe)
 Command 'tail' from package 'coreutils' (main)
 Command 'fai' from package 'fai-client' (universe)
 Command 'mail' from package 'mailutils' (universe)
 Command 'fal' from package 'dnet-progs' (universe)
 Command 'sail' from package 'bsdgames' (universe)
fail: command not found
hi
Brandon Faloona
@bfaloona
Aug 22 2016 20:24
@scottleibrand I'm happy to jump on that. Can you give me or point me to a walkthrough of how it should be used?
Ben West
@bewest
Aug 22 2016 20:24
(  set -eEu ; echo hello > /dev/fd/2 ; fail bar; echo hi)
hello
No command 'fail' found, did you mean:
 Command 'mail' from package 'mailutils' (universe)
 Command 'tail' from package 'coreutils' (main)
 Command 'fal' from package 'dnet-progs' (universe)
 Command 'qail' from package 'qmail' (universe)
 Command 'fai' from package 'fai-client' (universe)
 Command 'sail' from package 'bsdgames' (universe)
fail: command not found
ns device isn't new now
Brandon Faloona
@bfaloona
Aug 22 2016 20:25
:clock1: processing :clock2:
Ben West
@bewest
Aug 22 2016 20:25
if you type nightscout ns help there's lots of help, along with some stuff here https://github.com/openaps/docs/issues/129#issuecomment-216394218
if you add -x:
bewest@bewest-MacBookPro:~/Documents/foobar$ (  set -xu ; echo hello > /dev/fd/2 ; fail bar; echo hi)
+ echo hello
hello
+ fail bar
+ '[' -x /usr/lib/command-not-found ']'
+ /usr/lib/command-not-found -- fail
No command 'fail' found, did you mean:
 Command 'sail' from package 'bsdgames' (universe)
 Command 'mail' from package 'mailutils' (universe)
 Command 'fal' from package 'dnet-progs' (universe)
 Command 'fai' from package 'fai-client' (universe)
 Command 'qail' from package 'qmail' (universe)
 Command 'tail' from package 'coreutils' (main)
fail: command not found
+ return 127
+ echo hi
hi
bewest@bewest-MacBookPro:~/Documents/foobar$ (  set -exu ; echo hello > /dev/fd/2 ; fail bar; echo hi)
+ echo hello
hello
+ fail bar
+ '[' -x /usr/lib/command-not-found ']'
+ /usr/lib/command-not-found -- fail
No command 'fail' found, did you mean:
 Command 'tail' from package 'coreutils' (main)
 Command 'fai' from package 'fai-client' (universe)
 Command 'qail' from package 'qmail' (universe)
 Command 'mail' from package 'mailutils' (universe)
 Command 'fal' from package 'dnet-progs' (universe)
 Command 'sail' from package 'bsdgames' (universe)
fail: command not found
bewest@bewest-MacBookPro:~/Documents/foobar$
notice how with -e, it stops the script... it doesn't say hi afterwards...
it also prints what went wrong, similar to how if you say echo hello, it'll show in syslog
-x adds what command is being evaluated
fail is a fictitious command I made up to cause it to fail, simulating an openaps failure of some sort
Brandon Faloona
@bfaloona
Aug 22 2016 20:28
Excellent! Thanks for taking the time to explain that. Boy do I love/hate bash.
Ben West
@bewest
Aug 22 2016 20:29
so with -e you don't need the special exit/die stuff
it'll stop as soon as it hits any error and say why
much simpler, less code
Scott Leibrand
@scottleibrand
Aug 22 2016 20:37
@bfaloona https://github.com/scottleibrand/openaps-sh/blob/json-import/setup.sh is the latest. you can use that to set up a new myopenaps directory in parallel to your existing stuff, or do it on a new rig.
Matt Walker
@walker0
Aug 22 2016 20:39
@C-Ville I have an edison setup with the GPIO block and the power block an an 18650, it works well you do need the base block or the intel mini breakout to set up the edison initially. I did up a custom little 3d printed box for it in the end
Brandon Faloona
@bfaloona
Aug 22 2016 20:42
@scottleibrand Any new dependencies, or just run that single script?
Scott Leibrand
@scottleibrand
Aug 22 2016 20:42
make sure you have the latest oref0 dev
I think it has to be in ~/src/oref0/ for now
garykidd
@garykidd
Aug 22 2016 20:52
Is 1 gig of wifi tethering sufficient for APS implementation?
per month
C-Ville
@C-Ville
Aug 22 2016 21:08
20160822_230705.jpg
@walker0 sounds cool. I got myself the communcation board for initial set up and the SD card Block, currently I am waiting for my GPIO Block. I was stupid enough to buy an Edison2PI GPIO Block from Sparks, which is huge and will not fit in any box. If you could share the drawings of your box, I would be very happy. I am tired of running around with my rig shown above
Ben West
@bewest
Aug 22 2016 21:10
@bfaloona happy to answer any ns usage questions, think most of it is documented in the output from nightscout ns help or even nightscout help
Tim Street
@tim2000s
Aug 22 2016 21:15
I'm running the Raspberry Pi3 and wondered whether anyone is using an Xdrip bridge to feed data directly via the inbuilt bluetooth connection. If so, how are you doing it?
Brandon Faloona
@bfaloona
Aug 22 2016 21:44
@bewest Thanks for the offer!
My loop STDERR is working better with your suggestions, but it's not exiting the script on error. Should I have put set -exu at the beginning of the script, or in each (...) subshell ?
John Benjamin
@Bender1061
Aug 22 2016 21:50
@bfaloona I'm on daily steroids. What works best for me. Is my max-iob is at 6 and I also have a max basil rate set at 6 Units/hour as well. Granted Everyone is going to be different, so I would highly recommend you slowly work up to that rate. your sensitivity is going to go right out the window, so don't only use Bolus to correct for a high, I repeat, don't only bolus! What will happen is you will be higher than the clouds, and you will keep on giving yourself more and more, and suddenly you are going to drop like a stone. So Bump up your basil rates, There are times of day that I have mine using more than 3+ units and hour. But again Everyone is going to be different. I've been looping since May and my A1c last week was 7.3. So that is working for me, but I spent a while working up to those rates, cause I did not want to bottom out. I would also recommend making your target at like 150 or more, so you don't bottom out. When you are trying to correct for Low BG, your data that you are using to try to adjust for the steroids is about worthless. So better to be a bit higher than you want figure out how to stabilize that and then work your way down. Once again, this is what's working for me, And we all know no Diabetic is the same as another, So be extremely careful with making these kind of changes. I've been taking care and making all decisions for my diabetes care for a long time. I see my Endo once a year for a pat on the back and prescriptions. So if you have a good relationship with your Endo, I recommend getting their feedback on making changes.
Dana Lewis
@danamlewis
Aug 22 2016 21:54
@tim2000s ah you did ask here, good :)
Brandon Faloona
@bfaloona
Aug 22 2016 21:56
@Bender1061 Thanks for sharing your experience. We are leaning heavily on basal rates, and openaps seems to be doing a good job of mitigating super highs.
Brandon Faloona
@bfaloona
Aug 22 2016 22:11
I've got a loop timing issue where sometimes I get this error:
raw-pump/pump-history-raw.json raised need more than 0 values to unpack
but when I run that report with invoke it works fine. Any suggestions for tracking that down?
Ben West
@bewest
Aug 22 2016 22:13
@bfaloona you can do it in the shebang actually
very first line
#/bin/bash -eEu
or just -eu
Brandon Faloona
@bfaloona
Aug 22 2016 22:41
Thanks ben, shebang to the rescue.
Brandon Faloona
@bfaloona
Aug 22 2016 23:10
Anyone seen bolus wizard not report insulin in nightscout?
Looks like NetIOB is correct, but 'Treatments IOB' is not.
I'll upload a few screen captures. Here's the pump-history entry.
{
    "_type": "BolusWizard", 
    "bg": 174, 
    "_description": "BolusWizard 2016-08-22T15:23:58 head[2], body[15] op[0x5b]", 
    "timestamp": "2016-08-22T15:23:58-07:00", 
    "_body": "0a50003c1e823a0042000004007882", 
    "carb_input": 10, 
    "bg_target_high": 130, 
    "sensitivity": 30, 
    "carb_ratio": 6.0, 
    "food_estimate": 1.65, 
    "unabsorbed_insulin_total": 0.1, 
    "correction_estimate": 1.45, 
    "bg_target_low": 130, 
    "_head": "5bae", 
    "bolus_estimate": 3.0, 
    "_date": "ba170f1610"
  }
The food and correction estimates are correct, but nightscout does NOT display the insulin, only the carbs.
Screen Shot 2016-08-22 at 3.49.47 PM.png
Jason Calabrese
@jasoncalabrese
Aug 22 2016 23:13
it might have uploaded before the bolus finished, I check the status to prevent that from happening
Brandon Faloona
@bfaloona
Aug 22 2016 23:14
how do you do that?
oh, pump bolusing property?
but still the pump-history should be correct the next time it runs, right?
Jason Calabrese
@jasoncalabrese
Aug 22 2016 23:15
test $(cat monitor/status.json | json bolusing) == false) see https://github.com/jasoncalabrese/indy-e1g/blob/master/openaps.ini#L3
it doesn't get corrected since it only uploads newer treatments
if you delete it and any treatments after it would get corrected
Brandon Faloona
@bfaloona
Aug 22 2016 23:19
Screen Shot 2016-08-22 at 3.49.22 PM.png
I don't get a warm feeling when NetIOB does not correspond to basal and treatment IOB. @jasoncalabrese I'm following up on your theory. Thanks.