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

19th
Jun 2016
Dana Lewis
@danamlewis
Jun 19 2016 00:00
@racook go wth the TI stick
Bill Stackpole
@billstackpole
Jun 19 2016 00:01
got a weird one here - Nightscout stopped updating around 9am for no apparent reason. APS loop running fine, but data not updated since around 10am today. Two things may have triggered: battery change in pump (or) move from Pi3 to Edison. Have come home and runing on pi3 now, still no updates. Checking azure, showing some errors (4-6 errors ev 2 min or so). troubleshooting ideas?
EDT btw.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 00:04
@ed-nykaza I just looked up my coorespondence to Dexcom. Email sharetechsupport@dexcom.com If you want to try they sent me 5A22-6329-5FF5 as my auth code. I’m pretty sure it’s unique to each reciever.
Bill Stackpole
@billstackpole
Jun 19 2016 00:12
K - so after a bunch of poking around & waiting for stuff to happen (with responses atypical from ns-upload, upload-recent-treatments, etc) I have restarted the azure server (via the portal) and now uploads are functioning again. Yay.
Robert Cook
@racook
Jun 19 2016 00:14
@danamlewis I just concluded that looking at the docs
I'm not getting a feel yet for the architecture on the Edison -- The carelink dongle becomes the TI stick, and I'm assuming that Edison's onboard BT becomes the link to the G4 (which I'm using). I assume this precludes Dexcom Share? Can the Dexcom receiver pair with more than one device? I assume not
Robert Cook
@racook
Jun 19 2016 00:22
Also, the TI USB stick version claims to need a 3350 mAh battery for 13 hours, whereas a 2000 mAh battery on the ERF version is claimed to last for 20 hours? Is this somehow apples to oranges in a way that's not clear to me?
Robert Cook
@racook
Jun 19 2016 00:42
I guess my biggest question is am I looking at the right place or is there other information written down in other places?
https://github.com/oskarpearson/mmeowlink/wiki/TI-USB-stick
ericmtx
@ericmtx
Jun 19 2016 00:44
@racook Edison will need internet connectivity to pull bg readings from nightscout instead of a local Dexcom. That's the usual setup. It's also possible to use a Bluetooth connection to the dex if you don't pair the dex to an iPhone and do share.
As to battery, using usb connection to Run TI stick is not as efficient as soldering it directly to the Edison's board.
Yes that's the best source of info along with the gitter channel for mmeowlink
Dex only pairs to one device
Garrett Webb
@garetis
Jun 19 2016 00:50
Is there a way to add a wifi network to the pi software without being connected to the pi? Like, to take out the sd card and access it on a computer somehow to add the wifi network?
Paul Martin
@Spazholio
Jun 19 2016 00:51
If you can write files to it safely, sure. Just edit the same files that the Pi setup says to in the way it says to.
(I use a different set of files, but I might be able to assist if needed)
Robert Cook
@racook
Jun 19 2016 00:56
@ericmtx Thanks. Has anybody considered the topology of dexcom receiver (or G5 transmitter) to Edison over bluetooth then from edison over bluetooth to an app running on an Android phone?
That would:
  • Give more reliability -- no dependency on wifi/internet/Azure for continued titration
  • Preserve battery life/reduce battery weight and bulk
  • Allow BG to be visible to user
JaysonEwer
@JaysonEwer
Jun 19 2016 00:57
If your site is suddenly down, it may have something to do with the Mlab (mongolab) maintenance happening now. http://status.mlab.com SOLUTION: Go to manage.windowsazure.com > click your web app > click deployments > then click sync at the bottom
Robert Cook
@racook
Jun 19 2016 00:57
Sorry for naive questions. I'm coming into this fairly cold
Paul Martin
@Spazholio
Jun 19 2016 00:59
Short of using openxshareble, is there a way to use an Edison in offline mode? Assuming the USB ports are inaccessible?
There isn’t, right?
Ed Nykaza
@ed-nykaza
Jun 19 2016 01:02
thanks @scottleibrand and @jlucasvt, this is just the information I needed. I called dexcom helpdesk and got the auth code, which @jlucasvt was different than the one you were given, and which I mention here, in the the case someone else has this same question. I was able to upgrade the G4 share receiver and am now able to see data from the G5 sensor. Now, I just need to finish (or start:) the openAPS set up!
Garrett Webb
@garetis
Jun 19 2016 01:09
@Spazholio I tried plugging the SD card into my computer and it said I couldn't access the file until it was formatted, and was asking if I wanted to format it. That was the extent I could do. Do I need a special program to access the SD card?
Paul Martin
@Spazholio
Jun 19 2016 01:10
You’d likely need a way to safely edit an ext4 filesystem. I wouldn’t recommend doing it this way though. Might be simpler to just wait until you can access it via HDMI/keyboard/mouse.
Garrett Webb
@garetis
Jun 19 2016 01:11
Ok, thanks
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:17
fjungman
@fjungman
Jun 19 2016 01:18
@billstackpole yes, I had to reboot the Azure server last night, also. I never had to do this before, so either Azure has changed something, or the latest Nightscout has a memory leak. I'm thinking it is the former.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:22
Yep the Azure Rolling Outage has hit the East US servers need to reset site. Boo..:(
Robert Cook
@racook
Jun 19 2016 01:26
@jlucasvt - How does that play into my question
?
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:27
If you can edit files on exfs file system you can change "
/etc/wpa_supplicant/wpa_supplicant.conf"
That file is where you setup multiple wifi connections.
Robert Cook
@racook
Jun 19 2016 01:28
I'm very confused. How does a question about bluetooth vs wifi topology involve setting up multiple wifi networks?
I see how that would be useful for changing locations, but I'm missing something in your answer
It would be super helpful if there were an architecture diagram that shows how this all connects together under different configurations. If there isn't, I'm happy to make one, but I would have to understand them first
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:32
Sorry @racook the response was for @garetis I'm having a bad day with gitter on iOS today
Robert Cook
@racook
Jun 19 2016 01:32
Ok. Got it
Paul Martin
@Spazholio
Jun 19 2016 01:32
Yeah, days that end in “y” seem to be problematic for Gitter on iOS.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:33
Hah.indeed.
Robert Cook
@racook
Jun 19 2016 01:33
In any case, I'm trying to wrap my ahead around the tradeoffs involved in any OpenAPS set up.
In a typical setup, Rpi gets dexcom data from nightscout on a server. Server goes down, wifi goes down, internet goes down and there is no data. Is this correct/
?
Paul Davis
@SirBinky
Jun 19 2016 01:35
depends
@racook depends on your hardware
Robert Cook
@racook
Jun 19 2016 01:36
OK. Can you elaborate? I'm very curious
Or are you on Gitter iOS?
Paul Davis
@SirBinky
Jun 19 2016 01:37
@racook dexcom g5 transmitter to g5 dexcom reciever usb cable to raspberry pi 3
@racook direct connect no internet
Robert Cook
@racook
Jun 19 2016 01:38
Right. And bluetooth to RPI 3 or Edison is another configuration?
Paul Davis
@SirBinky
Jun 19 2016 01:39
@racook transmitter bluetooths to dexcom reciever that you then usb cable to the raspberry pi
@racook you can also have transmitter bluetooth to an iphone have dexcom share upload to diasend to track your bg history
Robert Cook
@racook
Jun 19 2016 01:41
Right. G4 works slightly differently. That receiver transmits bluetooth to a phone normally, but it seems like it should be able to transmit to RPI/Edison. Is that just not a supported configuration?
by G4, I mean G4 share
Paul Davis
@SirBinky
Jun 19 2016 01:41
@racook you could just use an iphone as a g5 reciever upload data to internet use a nightscout setup to retrieve the data on other devises
@racook g4 share is in a vein of g5 follow
Robert Cook
@racook
Jun 19 2016 01:43
So many possibilities.
Paul Davis
@SirBinky
Jun 19 2016 01:43
@racook the g5 transmits on bluetooth
Robert Cook
@racook
Jun 19 2016 01:43
I'm trying to see if there is something that has fewer compromises for reliability, etc.
Paul Davis
@SirBinky
Jun 19 2016 01:44
@racook the dexcom receiver gets it you access it through a usb cable to raspberry pi
Robert Cook
@racook
Jun 19 2016 01:44
Yes, I know the G5 and G4 pretty well, or at least I think I do. Both have their data ultimately transmitted over BLE.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:44
Or real bleeding edge @loudnate 's Loop iOS app and a RileyLink and your all done (no Edison no RPi). @ps2 is working on getting some RileyLinks built for those that want to start working in that direction.
Robert Cook
@racook
Jun 19 2016 01:44
RileyLinks pull the raw dexcom sensor data and make sense of it?
Paul Davis
@SirBinky
Jun 19 2016 01:44
@racook i think there is a beta xdrip andriod program
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:45
RileyLinks connect a Medtronic Pump to Bluetooth
Paul Davis
@SirBinky
Jun 19 2016 01:45
@racook theory is it's bluetooth to with the right software any bluetooth device can get it, but currently the easiest way is to a dexcom receiver you cable
Robert Cook
@racook
Jun 19 2016 01:46
Ah, ok
@SirBinky - that's what I was getting at. A "man in the middle" BLE configuration where:
G5 sensor -> BLE -> Edison -> iPhone
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:47
The Loop app just does Bluetooth to everything. It's all iOS right now
Robert Cook
@racook
Jun 19 2016 01:47
Where the Edison spoofs the G5 sensor or G4 share receiver
Paul Davis
@SirBinky
Jun 19 2016 01:47
@racook g5 sensor -> iphone
Robert Cook
@racook
Jun 19 2016 01:47
Normally, but I'm suggesting that you could put the edison or RPI in between
Paul Davis
@SirBinky
Jun 19 2016 01:48
@racook normally that sort of stuff is done by g5 sensor ->iphone ->nightscout
Robert Cook
@racook
Jun 19 2016 01:48
And the edison/rpi appears to the phone as the sensor. It passes the data along, but also uses it for OpenAPS locally and, redundantly, could send it to Nightscout servers
@SirBinky -normally, but that doesn't give you the benefits of having the data locally on your OpenAPS configuration
Or is there something I'm not understanding?
Paul Davis
@SirBinky
Jun 19 2016 01:49
@racook if you want local offline data you use the g5 dexcom reciever
@racook you can duel link, transmitter to g5 receiver and iphone receiver
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 01:50
@racook if you have a G4 receiver now with Share you can run Firmware update to man it a G5
Robert Cook
@racook
Jun 19 2016 01:52
@SirBinky OK. I understand all of that.
Paul Davis
@SirBinky
Jun 19 2016 01:53
@racook there is no need to spoof it
Robert Cook
@racook
Jun 19 2016 01:53
@SirBinky If you dual link, are you saying that the G5 transmitter can connect to both the G5 receiver and iPhone receiver?
And I think that's right.
Paul Davis
@SirBinky
Jun 19 2016 01:53
yup
Robert Cook
@racook
Jun 19 2016 01:54
If so, where is the data normalization happening? In both the G5 receiver and the iPhone app or is this somehow being done inside the transmitter?
On G4, it's being done in the receiver
Paul Davis
@SirBinky
Jun 19 2016 01:54
@racook then the iphone can share and upload to diasend etc. the reciever can be cabled into a raspberry pi to provide data offline
Robert Cook
@racook
Jun 19 2016 01:55
I understand the current configuration. I'm proposing another one
Paul Davis
@SirBinky
Jun 19 2016 01:55
@racook what do you mean data normalisation?
@racook why do you want to intercept before the receiver or iphone then pass it on? sounds dangerous you could manipulate the data before it is shown to the user??
Robert Cook
@racook
Jun 19 2016 02:00
The data from the transmitter on G4 is raw. There is a pretty complex algorithm that uses the finger stick calibrations to set values. I wouldn't toy with that
I don't understand how G5 works. Either the normalization happens in both the receiver and the phone app OR it happens in the transmitter
Paul Davis
@SirBinky
Jun 19 2016 02:01
the unit conversations?
Robert Cook
@racook
Jun 19 2016 02:01
If it happens in the transmitter, that is very interesting
Not just the unit conversions. The data coming from the sensor is not in any known units. I believe there is a voltage reading coming of that wire that gets converted into a number. That number is arbitrary. That gets correlated to reality with the first double finger stick
Over time, the wire gets less sensitive so recalibrations are necessary. Related to this is why you get sudden apparent lows with pressure on the sensor
Paul Davis
@SirBinky
Jun 19 2016 02:04
@racook you access the data either from the receiver or use an iphone and then nightscout. either way the data goes through a receiver program
Robert Cook
@racook
Jun 19 2016 02:04
Anyway, my point is that the "man in the middle" idea was hopeless with the G4. As you rightly point out, it would be dangerous to reverse engineer the algorithm
I'm asking something more fundamental that might reveal another, better path to the data
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:05
Not sure where the raw to value happens but as an example I had my transmitter connected to my iPhone for the past few days. I fired up the G5 receiver and after the 2 hr startup of receiver with noncalibration the G5 receiver is now showing the same value as my iPhone
Robert Cook
@racook
Jun 19 2016 02:05
That's very interesting
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:06
Indeed.
Paul Davis
@SirBinky
Jun 19 2016 02:06
@jlucasvt if it was calibrated to your iphone the receiver should have just picked up and repeated those values
Robert Cook
@racook
Jun 19 2016 02:06
How?
Are the receiver and the iPhone on G5 paired together?
Paul Davis
@SirBinky
Jun 19 2016 02:06
we only had an iphone to start
in the uk so don't need a dexcom receiver
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:07
They were back in October when they were a G4 pair
Paul Davis
@SirBinky
Jun 19 2016 02:07
set up the iphone, bought a dexcom receiver few days later it just hooked into the system worked fine
no separate second calibration time
Robert Cook
@racook
Jun 19 2016 02:08
There are a bunch of possibilities:
Paul Davis
@SirBinky
Jun 19 2016 02:09
i think one receiver calibrates it then it bluetooth sends results out after that to whoever listens
fjungman
@fjungman
Jun 19 2016 02:09
Anyone know how to set the battery voltage to trigger the warning in NS when looping? It alerts way too early and is pretty useless.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:09
it must be some sort of messaging with BLE using the dex Teansmitter ID
Paul Martin
@Spazholio
Jun 19 2016 02:09
@fjungman What’s it alerting at now?
Paul Davis
@SirBinky
Jun 19 2016 02:10
the iphone we took a photo of the barcode with the dexcom we entered the serial no
(of the transmitter)
Paul Martin
@Spazholio
Jun 19 2016 02:10
@fjungman Regardless, you just need to set your environment variable like so: PUMP_WARN_BATT_V=“1.39"
Robert Cook
@racook
Jun 19 2016 02:10
When you configure a G5 setup, do you pair your phone with the transmitter or both the transmitter and receiver?
fjungman
@fjungman
Jun 19 2016 02:10
Thanks @Spazholio !
Paul Davis
@SirBinky
Jun 19 2016 02:11
transmitter is king
Jarred Yaw
@jyaw
Jun 19 2016 02:11

@bewest hey thanks for your help earlier, its starting to clean up how I'm retrieving data from NS... Another question...
If I do the following use command I get the results I need:

openaps use ns shell get treatments.json "find[created_at][\$gte]=`date -d \"now -6 hours\" -Iminutes`&find[carbs][\$exists]=true"

But If I invoke the following report (in my openaps.ini), it returns as empty:

[report "monitor/carbhistory.json"]
oper = get
use = shell
reporter = JSON
json_default = True
device = ns
remainder = treatments.json "find[created_at][\$gte]=`date -d \"now -6 hours\" -Iminutes`&find[carbs][\$exists]=true"

Does the report functionality not interpret the nested date command? Am I missing something? I didn't observe any errors with NIGHTSCOUT_DEBUG=1 set.

Paul Davis
@SirBinky
Jun 19 2016 02:11
you pair the iphone using the barcode and the dexcom receiver with the sn no
i thought one might kick the other off but ti doesn't
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:12
@SirBinky has it right
Robert Cook
@racook
Jun 19 2016 02:12
OK. So it sounds like the iphone app can talk to the receiver
Paul Davis
@SirBinky
Jun 19 2016 02:12
no
Robert Cook
@racook
Jun 19 2016 02:13
No?
Paul Davis
@SirBinky
Jun 19 2016 02:13
the transmitter talks to both
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:13
@SirBinky has it right
Robert Cook
@racook
Jun 19 2016 02:13
Right, I got that, but it sounds like the phone app talks to both as well. No?
Paul Davis
@SirBinky
Jun 19 2016 02:13
no
Paul Martin
@Spazholio
Jun 19 2016 02:13
@jyaw Try escaping both your [ and ] in your monitor/carbhistory.json report?
Paul Davis
@SirBinky
Jun 19 2016 02:13
transmitter sends a bluetooth signal out
Paul Martin
@Spazholio
Jun 19 2016 02:14
@jyaw I only have one direct NS call in my aliases, but the one I do, the brackets are escaped.
Paul Davis
@SirBinky
Jun 19 2016 02:14
devices set to accept and receive it see it
Robert Cook
@racook
Jun 19 2016 02:14
That I understand
Jarred Yaw
@jyaw
Jun 19 2016 02:14
@Spazholio I shall... dumb syntax
Paul Davis
@SirBinky
Jun 19 2016 02:14
set up an iphone it sees it
set up a dexcom receiver it sees it
neither talks to the other both get the same data from the transmitter
Robert Cook
@racook
Jun 19 2016 02:15
I should draw a diagram of what I understand. I have to give my son some juice. I'll draw something up and come back when my brain is less addled
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 19 2016 02:15
Transmitter broadcasts with its id all who are in range listen
Paul Davis
@SirBinky
Jun 19 2016 02:15
@jlucasvt has it right
Robert Cook
@racook
Jun 19 2016 02:15
That's true of the G4, but G5 has to be paired, no?
Paul Davis
@SirBinky
Jun 19 2016 02:15
to steal a phrase ;)
Robert Cook
@racook
Jun 19 2016 02:15
G4 is not BLE, but G5 is
Paul Martin
@Spazholio
Jun 19 2016 02:15
@jyaw Very curious if it works. Lemme know. =)
G4 is BLE.
fjungman
@fjungman
Jun 19 2016 02:15
@Spazholio the setting was such that the low battery would warn after a couple of days (like above 1.3V) but the battery is good to 1.13V before it turns off the radio to save power. So, I set it to 1.18V so I get a few hours notice.
Robert Cook
@racook
Jun 19 2016 02:16
No, G4 transmitter is not BLE. Sorry. Receiver transmits BLE to Phone
Paul Martin
@Spazholio
Jun 19 2016 02:16
@racook Sorry, I meant the receiver, not the transmitter.
My bad.
Robert Cook
@racook
Jun 19 2016 02:17
I'll make a diagram and it will be easier for us to communicate. There is a small possibility that there is an interesting optimization here
Paul Martin
@Spazholio
Jun 19 2016 02:17
@fjungman Are you using alkaline or lithium? If it’s lithium, the pump will tend to go fro full charge to low battery with nothing in between, and it does it right around 1.38v. I’ve had it happen to me overnight.
fjungman
@fjungman
Jun 19 2016 02:17
Alkaline. Yeah, lithium falls off a cliff...
Paul Martin
@Spazholio
Jun 19 2016 02:18
From what I’ve heard, alkaline tend to last maybe a day or so. Are you seeing different?
Paul Davis
@SirBinky
Jun 19 2016 02:18
@racook you know that wire responds to hydration? get too dehydrated it craps. you drink water 30mins later it sorts itself out
fjungman
@fjungman
Jun 19 2016 02:19
Yeah, using good alkalines, we are getting 5 or so days.
Paul Martin
@Spazholio
Jun 19 2016 02:19
Wow. Have you closed your loop yet? How often does it run, if so?
fjungman
@fjungman
Jun 19 2016 02:20
It runs every five minutes. All night, and for a teenager, that is 12 hours, minimum. Plus when he is in his room, at his computer, so add 12 hours for that... :)
Paul Martin
@Spazholio
Jun 19 2016 02:20
"Sorry, we can't deliver this item to the United States”. Booooo.
fjungman
@fjungman
Jun 19 2016 02:21
What is that for?
You wired that into the pump?
Paul Davis
@SirBinky
Jun 19 2016 02:21
running a rapsberry pi
our pump runs on a aaa
Jarred Yaw
@jyaw
Jun 19 2016 02:22
@Spazholio now it retrieves all my NS data... sheesh
fjungman
@fjungman
Jun 19 2016 02:22
Ah, we were talking about the pump battery.
Paul Martin
@Spazholio
Jun 19 2016 02:23
@fjungman Meaning the data that you wanted it to, right? Or ALL of your treatment data?
fjungman
@fjungman
Jun 19 2016 02:23
How long do you get off of 8,000mAhr?
Paul Davis
@SirBinky
Jun 19 2016 02:23
oh sorry. surely your only option is the aaa it has?
fjungman
@fjungman
Jun 19 2016 02:23
Right, I don't want to hobble him any more with a big battery strapped to the pump.
Paul Davis
@SirBinky
Jun 19 2016 02:24
@fjungman to run the raspberry pi3 and top up a charged dexcom g5 receiver min 4 hours
Toby Canning
@TC2013
Jun 19 2016 02:24
@loudestnoise You bet! You should come over tomorrow for some beers and we can get you going. I have tons of spare parts, including some new lipos, Edisons, and TI Sticks. So if you want we can build you a spare rig or a super small mobile rig. But yes, I do have a cc-debugger!
Paul Davis
@SirBinky
Jun 19 2016 02:25
@fjungman no idea about your pump but ours is a medrontic with only space for a aaa that lasts days
Paul Martin
@Spazholio
Jun 19 2016 02:25
@TC2013 Do you have any example of “super small mobile rigs”? I’m currently just starting to use @eluhrs’ custom 3D printed case, but I know me - I’m gonna want to build more. =)
Toby Canning
@TC2013
Jun 19 2016 02:26
Well, that's about as small as they come!
You can shave a little off that, but I don't have a nice 3D case like Eric's then
Paul Davis
@SirBinky
Jun 19 2016 02:27
bum bag hero kit?
Toby Canning
@TC2013
Jun 19 2016 02:27
I use the 2000mAh Lipo from Adafruit that's about the size of the intel breakout board and put the TI Stick sideways next to the edison/battery.
Paul Martin
@Spazholio
Jun 19 2016 02:27
If that case didn’t exist, how do people carry their Edison rigs? With all the exposed metal, I’d be terrified of using anything that didn’t isolate everything.
ddaniels1
@ddaniels1
Jun 19 2016 02:28
Does anyone have a good suggestion for a lipon in the 1000-2000mah range? Seems like there are a lot of options online. In the US.
Toby Canning
@TC2013
Jun 19 2016 02:28
Most put electrical tape or that circuit tape on them and then put them in a right-sized plastic case
Brandon Faloona
@bfaloona
Jun 19 2016 02:28
Anyone use the MoPi power board with the Pi? It allows recharging and low battery shutdown.
Toby Canning
@TC2013
Jun 19 2016 02:29
Many have found candy cases, we use a makeup case my wife had that was perfect
Paul Davis
@SirBinky
Jun 19 2016 02:29
@racook you sorted your son out?
Paul Martin
@Spazholio
Jun 19 2016 02:29
@bfaloona If I’m seeing that thing right, it looks like it takes up a good number of GPIO ports, no?
Brandon Faloona
@bfaloona
Jun 19 2016 02:30
2/3 of them.
Toby Canning
@TC2013
Jun 19 2016 02:30
@ddaniels1 We really like Adafruit's 2000mAh lipo
Brandon Faloona
@bfaloona
Jun 19 2016 02:30
But it only uses a few, I think.
Paul Davis
@SirBinky
Jun 19 2016 02:30
@bfaloona we heard you the first time i guess no one active how has maybe some comes online later might have
Toby Canning
@TC2013
Jun 19 2016 02:31
@ddaniels1 However, lipo are dangerous if punctured, so check out Eric's setup and battery too
Brandon Faloona
@bfaloona
Jun 19 2016 02:32
@Spazholio Version 4 (?) of the MoPi uses 4 pins.
Paul Martin
@Spazholio
Jun 19 2016 02:32
Curious how people handle multiple rigs. I know that there’s that wait-for-silence alias to make sure each device is taking its turn to talk to the pump, but let’s say I have a home rig and a mobile/work rig. When I’m home, wouldn’t that mean that I’m just running two separate rigs at the same time? Seems inefficient. And I can’t exactly turn off the mobile rig when I’m home, since it’s the 3D printed case, and I’d prefer not to dismantle/reassemble it a lot since I’m concerned about solder joints and wire fatigue. Is the inefficiency of running two rigs in the same location just one of those “things” that is accepted?
Toby Canning
@TC2013
Jun 19 2016 02:34
We have such good luck running 1 rig that I quit using multiple rigs
Paul Davis
@SirBinky
Jun 19 2016 02:34
@Spazholio how is that an issue. you have a mobile rig with a mobile power source when it runs low replace the power. when at home replace mobile powersource as you move around your home. at night time you can plug in a mico usb source next to your bed recharge the battery packs you use during the day
Brandon Faloona
@bfaloona
Jun 19 2016 02:35
How do people turn off their rigs? A power button? SSH / sudo halt ? Do you shutdown to switch batteries?
Toby Canning
@TC2013
Jun 19 2016 02:35
Early on rigs were less reliable and the radios were so poor (CareLink) that it took 2 rigs for most to get good coverage through the night.
Paul Davis
@SirBinky
Jun 19 2016 02:35
sudo shutdown -h now
Paul Martin
@Spazholio
Jun 19 2016 02:35
@SirBinky The mobile rig can’t be turned off/on without completely dismantling it. Something I’d like to avoid.
@TC2013 I’ve been running my Pi-in-a-camera-bag-with-a-huge-batteyr rig for a while, and it’s been working great. It’s just huge. But it’s pretty solid, so it seems a waste to stop using it entirely. =)
Toby Canning
@TC2013
Jun 19 2016 02:36
@bfaloona On the Edison you can install a package that makes the reset looking button and on/off power switch
Paul Davis
@SirBinky
Jun 19 2016 02:36
@Spazholio what? why? you have contained battery but you can shut it off with the command i just sent if you ssh into it?
Paul Martin
@Spazholio
Jun 19 2016 02:36
@SirBinky I certainly can, but can’t turn it back on. =)
Toby Canning
@TC2013
Jun 19 2016 02:36
@Spazholio You always need a backup!
Paul Martin
@Spazholio
Jun 19 2016 02:37
Not without - again - disassembling the whole thing.
Toby Canning
@TC2013
Jun 19 2016 02:37
Use your big unit to test new code and such
Paul Martin
@Spazholio
Jun 19 2016 02:38
@TC2013 Yeah, that’s what I plan on doing. I want to start helping out with code once I get more comfortable with the framework..
Paul Davis
@SirBinky
Jun 19 2016 02:38
@Spazholio no offence sounds like it's fundamentally flawed. powered from a micro usb encase the rest of the system, ssh shut ti down etc then swap battery packs on the micro usb
Paul Martin
@Spazholio
Jun 19 2016 02:39
https://www.thingiverse.com/thing:1525618 <— that’s the rig I’m using now. And why would I swap batteries? That’s not what I need to do. The LiPo will last 20 hours, and is easily chargeable.
Jarred Yaw
@jyaw
Jun 19 2016 02:40
@Spazholio @bewest I went back and got my ns-carb-meals curl command working and all seems to be functioning well again (somehow the syntax on that guy got jacked, probably some rogue edit of mine a day or so ago)... still want to get the ns device reports working, but I'm operational for the time being.
Paul Martin
@Spazholio
Jun 19 2016 02:40
@jyaw I know that feeling. “Ok, ok, I got it working again. I should really stop touching it now….” =)
Paul Davis
@SirBinky
Jun 19 2016 02:41
@Spazholio so use it all day. get home walk around. when you got obed plug it in?
*go to bed
Paul Martin
@Spazholio
Jun 19 2016 02:41
Errrrr…that’s generally what I do?
I was asking about having multiple rigs running at the same time in the same location, and just mentioning that the mobile rig can’t easily be powered off and on without some work.
Paul Davis
@SirBinky
Jun 19 2016 02:42
@Spazholio so what's the problem? sorry i think i might have missed a fundatmental start to this
@Spazholio oh ok
Paul Martin
@Spazholio
Jun 19 2016 02:42
But @TC2013 pretty much nailed what I was planning on doing anyway - the mobile rig with a TI stick is so effective, there’s really no reason to have multiple rigs if you have one of those.
Paul Davis
@SirBinky
Jun 19 2016 02:44
@Spazholio up to you. general consensus is have a second waiting in the wings. just buy the same hardware clone the micro usb card
@Spazholio how far into the rig set up are you? have you enacted to the pump anything yet?
Paul Martin
@Spazholio
Jun 19 2016 02:49
Oh, it’s done.
My loop’s been closed for weeks. I’m just moving to the Edison rather than the Pi3.
Paul Davis
@SirBinky
Jun 19 2016 02:54
How come?
Paul Martin
@Spazholio
Jun 19 2016 02:54
How come I’m moving to an Edison rig?
Paul Davis
@SirBinky
Jun 19 2016 02:58
yeah
and also how did you figure out the enact part of the rig
it's stumping me atm
Paul Martin
@Spazholio
Jun 19 2016 02:59
I moved to an Edison rig because I can keep it in my pocket instead of a camera bag I have to lug around.
Paul Davis
@SirBinky
Jun 19 2016 03:00
ah ok
Paul Martin
@Spazholio
Jun 19 2016 03:00
Honestly, I took my Pi3 rig, scp’d the entire openaps directory over to it, and it worked perfectly. If you have a working rig, have you tried that? If not, what’s the issue with enacting? What’s it not doing?
Paul Davis
@SirBinky
Jun 19 2016 03:01
i did the walkthrough guide says you need to work out how to enact it
i get i need the suggested.json report values to set basal but i don't get how to enact it
Garrett Webb
@garetis
Jun 19 2016 03:04
once I sudo bash, is there anything I need to do to exit that functionality?
Paul Martin
@Spazholio
Jun 19 2016 03:04
@garetis exit should suffice.
Paul Davis
@SirBinky
Jun 19 2016 03:04
i installed openaps then followed the guide?
Paul Martin
@Spazholio
Jun 19 2016 03:05
@SirBinky So you have the suggested.json. Do you have an enacted.json report?
Garrett Webb
@garetis
Jun 19 2016 03:05
perfect, thanks
Paul Davis
@SirBinky
Jun 19 2016 03:06
i have suggested.json in enact/suggested.json
Paul Martin
@Spazholio
Jun 19 2016 03:06
Show me in the walkthrough you are? Maybe I can either point out what you’ve missed, or something that could be cleared up. =)
Paul Davis
@SirBinky
Jun 19 2016 03:06
no enacted.json
Paul Martin
@Spazholio
Jun 19 2016 03:07
Ok, so the enacted.json is basically just what sets the pump to whatever your temp basal should be.
Right?
Paul Davis
@SirBinky
Jun 19 2016 03:07
i don't fully understand this part, i get i use the enact/suggested.json as the value for the set temp basal
ok
Paul Martin
@Spazholio
Jun 19 2016 03:08
Correct - that’s what OpenAPS thinks should be done.
Paul Davis
@SirBinky
Jun 19 2016 03:08
yup
Paul Martin
@Spazholio
Jun 19 2016 03:08
So you want to issue the set_temp_basal command to the pump device, and pass in the suggested.json report as the input.
Paul Davis
@SirBinky
Jun 19 2016 03:11
right
Scott Leibrand
@scottleibrand
Jun 19 2016 03:12
We run multiple rigs all the time. They take turns nicely.
Paul Davis
@SirBinky
Jun 19 2016 03:13
openaps report add enact/enacted.json JSON pump enact/suggested.json ?
Paul Martin
@Spazholio
Jun 19 2016 03:13
@SirBinky Very close. But you’re missing a “verb”.
You’re telling the pump device “hey, here’s the input” but you’re not telling the pump what to DO with that input.
Paul Davis
@SirBinky
Jun 19 2016 03:14
the set_temp_basal verb
Paul Martin
@Spazholio
Jun 19 2016 03:14
Boom, headshot.
Paul Davis
@SirBinky
Jun 19 2016 03:14
so
Paul Martin
@Spazholio
Jun 19 2016 03:14
Run it as a command first, then once it does what you want, you can add it as a report.
Dragan Maksimovic
@dm61
Jun 19 2016 03:15
@SirBinky before adding a report, I'd suggest you try the enact using openaps use pump command
Paul Martin
@Spazholio
Jun 19 2016 03:15
As @bewest has told me several times, "use becomes report add name JSON” when adding a report. =)
Paul Davis
@SirBinky
Jun 19 2016 03:15
openaps report add set_temp_basal enact/enacted.json JSON pump enact/suggested.json
openaps use pump set_temp_basal enact/suggested.json?
Paul Martin
@Spazholio
Jun 19 2016 03:16
Negative on that first one.
Dragan Maksimovic
@dm61
Jun 19 2016 03:17
that use is good!
Paul Martin
@Spazholio
Jun 19 2016 03:17
Try running your second command and see if it does what you think it should.
We can go from there.
Paul Davis
@SirBinky
Jun 19 2016 03:18
i think it should set the temp basal rate to the output file enact/suggested.json
Paul Martin
@Spazholio
Jun 19 2016 03:18
Sounds reasonable. Does it?
Dragan Maksimovic
@dm61
Jun 19 2016 03:18
give it a try
Paul Davis
@SirBinky
Jun 19 2016 03:18
i can't atm
i'm doing this all for my partner
Paul Martin
@Spazholio
Jun 19 2016 03:19
Ah. Well, that use command looks just fine.
Paul Davis
@SirBinky
Jun 19 2016 03:19
i've spent last few weeks buying together the hardware
Paul Martin
@Spazholio
Jun 19 2016 03:19
And if it is, then replace the word use with report add [report name] JSON. Leave everything else the same.
Paul Davis
@SirBinky
Jun 19 2016 03:19
getting it talking talking to you guy to get help
Paul Martin
@Spazholio
Jun 19 2016 03:20
In this case, [report name] would be enact/enacted.json.
But that rule holds true for pretty much ALL reports you’ll add: try them as a use statement first, then add them as a report using the substitution above.
Paul Davis
@SirBinky
Jun 19 2016 03:21
yeah
use them
see the out put
add as a report
invoke
Paul Martin
@Spazholio
Jun 19 2016 03:21
Bingo.
Dragan Maksimovic
@dm61
Jun 19 2016 03:21
:+1: took me a while to realize that
Paul Davis
@SirBinky
Jun 19 2016 03:21
then cat the output
check it matches the use
Dragan Maksimovic
@dm61
Jun 19 2016 03:22
exactly
Paul Davis
@SirBinky
Jun 19 2016 03:22
@Spazholio are you t1d?
Paul Martin
@Spazholio
Jun 19 2016 03:22
If it wasn’t entirely obvious, I’m very much avoiding just giving you the answer. I’m not trying to make this frustrating for you (so apologies if that’s how it’s coming off), but it’s really REALLY important that all steps are understood, and not just blindly followed.
~20 years, yep.
Paul Davis
@SirBinky
Jun 19 2016 03:22
oh yeah totally i get that
hence it's not written stages at the end
i cut and paste most of the commands into my build but learnt and understood them as best as i could
i saw in the cgm part it assumed that i called the cgm device cgm but i didn't i called it g5 so i changed the entry to that
thing is it's my girlfriend who is diabetic i'm trying to do all this for her, so i'm having to learn linux, python, building the hardware
then all the diabetes values etc i'm having to learn what seems right or wrong etc
Dragan Maksimovic
@dm61
Jun 19 2016 03:25
anyone knows how to read the rig's battery voltage on edison/ubilinux?
Paul Martin
@Spazholio
Jun 19 2016 03:25
That’s a helluva steep learning curve. Good on ya.
@dm61 You figure that out, and you’ll be everyone’s hero. =)
Paul Davis
@SirBinky
Jun 19 2016 03:26
also trying to show her what this all involves so she knows what is going on
i was super afraid when i ran the first open loop gather it didn't mess with her basal
Matt Walker
@walker0
Jun 19 2016 03:26
@dm61 I don't think it is built into ubilinux, on yocto it is just battery-voltage
Paul Martin
@Spazholio
Jun 19 2016 03:27
@walker0 That’s the thing that’s frustrating the hell out of me. If Yocto can do it, that means there’s code to do it. I just have no idea what it is. I think I got the right code snippet from a Yocto image, but damned if I can get it to work/compile properly under Ubilinux.
Brandon Faloona
@bfaloona
Jun 19 2016 03:27
When my openaps retrieves BG from nightscout, it lacks a glucose field. Anyone know how to add that field? Here's the data I get from ns get entries/sgv.json
  {
    "direction": "Flat", 
    "trend": 4, 
    "dateString": "2016-06-16T18:38:49.000Z", 
    "sgv": 171, 
    "device": "share2", 
    "date": 1466102329000, 
    "_id": "5762f2647741fa6c36baa99e", 
    "type": "sgv"
  }
I have sgv for the value, I just need the field added.
Paul Davis
@SirBinky
Jun 19 2016 03:28
@Spazholio always i've respected it and left her to it she's managed it for years, but when we read about this group and the artificial pancreas stuff i thought this is something i can try to do. if other ppl can i can just will take time and patience and careful steps
Paul Martin
@Spazholio
Jun 19 2016 03:28
@bfaloona It doesn’t return a glucose field on mine either. Don’t think there’s a way to make it do that (as I don’t think it’s in the DB to return to you). Why do you need glucose? Maybe there’s a workaround?
Matt Walker
@walker0
Jun 19 2016 03:29
@Spazholio I'm sure you will be able to get it going, if you already have all the code copied I'd imagine it is a issue with reading from the power management IC under ubilinux , you may well need extra drivers or similar
Brandon Faloona
@bfaloona
Jun 19 2016 03:30
(How do you filter Gitter to only show mentions? I'm trying to find some help someone gave me yesterday)
Paul Martin
@Spazholio
Jun 19 2016 03:31
@bfaloona The only way I’ve found is to search for your name, with the @ in front of it.
Not perfect, but quasi-functional.
Paul Davis
@SirBinky
Jun 19 2016 03:31
was going to say search their username or keywords they might have said
Dragan Maksimovic
@dm61
Jun 19 2016 03:31
@walker0 thanks!
Brandon Faloona
@bfaloona
Jun 19 2016 03:32

@dm61 said:

@bfaloona , openaps use ns shell format-recent-type tz entries nightscout/glucose-raw.json expects bg entry field glucose in the json file, while I think you probably have sgv instead in your glucose-raw.json

Matt Walker
@walker0
Jun 19 2016 03:32
@Spazholio honestly though, I really like yocto now that I'm used to it, It is lighter weight than ubilinux and has everything needed, possibly still needs a bit of work to get the ble stuff you were working on going
Paul Martin
@Spazholio
Jun 19 2016 03:33
@walker0 “Was” working on. Past tense. I was having too many issues with it, so went back to the usual, non-openxshareble method. I may re-flash to Yocto later on. Ubilinux feels more familiar though.
Brandon Faloona
@bfaloona
Jun 19 2016 03:34
@Spazholio So, I read @dm61 comment to mean my nightscout data format was not correct.
Paul Davis
@SirBinky
Jun 19 2016 03:35
@Spazholio $openaps report add enact/enacted.json JSON pump set_temp_basal enact/suggested.json
Paul Martin
@Spazholio
Jun 19 2016 03:35
@SirBinky That looks right to me.
Brandon Faloona
@bfaloona
Jun 19 2016 03:35
The error I'm getting is with ns shell format-recent-type.
Paul Martin
@Spazholio
Jun 19 2016 03:36
@bfaloona I have something VERY similar, and it’s reading from my monitor/glucose.json and that doesn’t have a “glucose” field. What happens when you run that command?
Brandon Faloona
@bfaloona
Jun 19 2016 03:37
I'm still trying to get data pulled down into openaps, and pushed up to nightscout. I'm about 80%.
Paul Martin
@Spazholio
Jun 19 2016 03:37
Where are you pulling from?
CGM or NS?
Brandon Faloona
@bfaloona
Jun 19 2016 03:37
NS
Paul Martin
@Spazholio
Jun 19 2016 03:37
How is nightscout/glucose-raw.json generated?
Brandon Faloona
@bfaloona
Jun 19 2016 03:38
pi@openaps-lp:~/openaps-lp-01 $ openaps report show nightscout/glucose-raw.json --ini
[report "nightscout/glucose-raw.json"]
oper = get
device = ns
use = shell
remainder = entries/sgv.json count=288
reporter = JSON
Paul Martin
@Spazholio
Jun 19 2016 03:39
Same as mine.
Paul Davis
@SirBinky
Jun 19 2016 03:39
@Spazholio so then openaps alias add enact "report invoke enact/enacted.json"
Paul Martin
@Spazholio
Jun 19 2016 03:40
HAH! Come to think of it, I don’t think my nightscout/recent-missing-entries.json works either. Which means, I must not be using it. =)
Brandon Faloona
@bfaloona
Jun 19 2016 03:40
@Spazholio You are pulling from CGM?
Paul Martin
@Spazholio
Jun 19 2016 03:40
@bfaloona Nope, from NS.
Dragan Maksimovic
@dm61
Jun 19 2016 03:40
@bfaloona , nothing wrong with glucose data from NS, except that the bg field is named sgv as opposed to glucose, which is what openaps is normally using
Paul Martin
@Spazholio
Jun 19 2016 03:41
@SirBinky That sounds right to me. Just lose the quotes.
Brandon Faloona
@bfaloona
Jun 19 2016 03:41
@dm61 What's the workaround to get openaps to use that data?
Paul Martin
@Spazholio
Jun 19 2016 03:42
@bfaloona Are you using G4/share or G5?
Dragan Maksimovic
@dm61
Jun 19 2016 03:42
need to change the name of the field, something like json -e "this.sgv = this.glucse" (not sure, need to look it up)
Brandon Faloona
@bfaloona
Jun 19 2016 03:42
G5/iPhone app
Paul Martin
@Spazholio
Jun 19 2016 03:43
@bfaloona Crap. I’m G4/share. But…I assume you’re attempting to upload anything you’ve missed? Filling gaps? I’m assuming this based on the name of the report.
Paul Davis
@SirBinky
Jun 19 2016 03:43
ok so in theory i'll test tomorrow with sabs here i have preflight checks gather working the output files. i can now enact the suggestion, make sure it's sensible and she understands why
Dragan Maksimovic
@dm61
Jun 19 2016 03:43
should not make any difference where NS data is coming from
Paul Martin
@Spazholio
Jun 19 2016 03:44
@SirBinky It sounds like you’ve got the groundwork laid just fine. Most of the heavy lifting is done.
Brandon Faloona
@bfaloona
Jun 19 2016 03:45
@dm61 Thanks for your help! Where would I look that up? I searched and searched. :)
Paul Davis
@SirBinky
Jun 19 2016 03:45
@Spazholio so we can the run it a few times see it's suggestions enact if they're right otherwise review it see why it said that and adjust
*then
Paul Martin
@Spazholio
Jun 19 2016 03:45
@SirBinky Seems reasonable.
Paul Davis
@SirBinky
Jun 19 2016 03:46
@Spazholio @scottleibrand thanks so much for your help. it is greatly greatly appreciated
Dragan Maksimovic
@dm61
Jun 19 2016 03:46
@bfaloona try this: cat nightscout/ns-glucose-raw.json | json -e \"this.glucose = this.sgv\" > monitor/glucose.json
from command line, no need for \
Paul Martin
@Spazholio
Jun 19 2016 03:48
@SirBinky You’re quite welcome! Swing on by tomorrow and let us know how it worked. =)
Paul Davis
@SirBinky
Jun 19 2016 03:54
@Spazholio will do. I read on about looping etc next phase to learn. I'm wanting to do a rejig of the walk through docs. I saw you wanted ppl to test them and i hope as a both diabetic outsider and programming wise i might be able to tweak the accessibility.
Paul Martin
@Spazholio
Jun 19 2016 03:56
Anything that makes things clearer/more accessible is always welcome. =)
Paul Davis
@SirBinky
Jun 19 2016 03:57
i totally get the need to understand the implications of the actions that are run in the docs and not make it a straight install, but also some of the order and phrasing is confusing
Brandon Faloona
@bfaloona
Jun 19 2016 03:57
@dm61 That worked on the command line.
Dragan Maksimovic
@dm61
Jun 19 2016 03:58
you may want to check the json files, make sure the sgv is replaced by glucose, then you should be good to go
Brandon Faloona
@bfaloona
Jun 19 2016 03:58
So, which part of my report should I replace with that json -e
Dragan Maksimovic
@dm61
Jun 19 2016 03:58
I've just added that command to my alias that creates glucose.json from ns data
Brandon Faloona
@bfaloona
Jun 19 2016 03:59
Ah. Great!
Dragan Maksimovic
@dm61
Jun 19 2016 03:59
There may be a more elegant way to do that same ... not sure
Paul Martin
@Spazholio
Jun 19 2016 04:00
Quick question - on my Pi3, things get installed to /usr/local/ but on the Edison/Ubilinux rig, everything’s installed to /usr/. Is that just a quirk that I need to be aware of?
Dragan Maksimovic
@dm61
Jun 19 2016 04:02
@Spazholio , interesting, I had not even noticed that. Everything seems to work just the same
Brandon Faloona
@bfaloona
Jun 19 2016 04:03
@SirBinky I agree about the order/phrasing concern with the docs. I'm stuck mid-way setting up my first rig and don't know if I should start over or keep patching problems I find.
Paul Martin
@Spazholio
Jun 19 2016 04:03
Yeah, I noticed it when I tried to do man json on my Edison rig. No go.
Paul Davis
@SirBinky
Jun 19 2016 04:03
@bfaloona i'd recommend ignoring stuff you don't get initially forging onwards
Brandon Faloona
@bfaloona
Jun 19 2016 04:04
Really good docs. Just not always clear what order to do things, or which things are core.
Paul Davis
@SirBinky
Jun 19 2016 04:04
@bfaloona the preflight doc makes no sense until you do the next building manual loop part then go back to it and it'll make sense
Paul Martin
@Spazholio
Jun 19 2016 04:05
You can submit a PR or an issue to address that.
Paul Davis
@SirBinky
Jun 19 2016 04:05
@bfaloona i know i bought a new usb keyboard and mouse for the set up, used them 5 mins then it was remote ssh log in. live and learn!
Dragan Maksimovic
@dm61
Jun 19 2016 04:05
Paul Davis
@SirBinky
Jun 19 2016 04:08
i've tended to read the docs not understood, read more gone back reviewed it made a few notes started to get the structure of it all. re read it again a few times then started to try to enact it
Garrett Webb
@garetis
Jun 19 2016 04:08
could someone tell me the filename that openaps use pump read_settings uses? I'm using a 712 and creating the file by hand.
Pump_Settings.json ?
Paul Martin
@Spazholio
Jun 19 2016 04:09
I don’t think it uses any filenames.
Paul Davis
@SirBinky
Jun 19 2016 04:09
openaps use generates a result it shows you
Paul Martin
@Spazholio
Jun 19 2016 04:09
That’s the full command.
Paul Davis
@SirBinky
Jun 19 2016 04:10
you need to add the report then invoke it
so from the walk through openaps use pump iter_pump_hours 4 generates an output
openaps report add last_four_pump_hours.json JSON pump iter_pump_hours 4
openaps report invoke last_four_pump_hours.json
Dragan Maksimovic
@dm61
Jun 19 2016 04:11
but read_settings won't work on 712?
Garrett Webb
@garetis
Jun 19 2016 04:11
I get an error when I execute that commend... so I have to activate a report and then invoke it before that command will return anything?
Paul Davis
@SirBinky
Jun 19 2016 04:11
the output of the openaps use command is printed to the last_four_hours.json file
Paul Martin
@Spazholio
Jun 19 2016 04:11
Hang on...
That's the example provided of the static files I have to create when using a 712
that's the BG_Targets.json
Paul Martin
@Spazholio
Jun 19 2016 04:12
Show me where you’re getting that? I think I know how to deal with this, just let me refresh my memory. Link?
there's a "see example" link in there
Paul Martin
@Spazholio
Jun 19 2016 04:13
Oh, so you have to create several (3, I think) files by hand. Take that example for bg_targets.json and format it for your info.
Paul Davis
@SirBinky
Jun 19 2016 04:13
you add the report then invoke it to generate a file?
Paul Martin
@Spazholio
Jun 19 2016 04:13
@SirBinky No no, he can’t.
Paul Davis
@SirBinky
Jun 19 2016 04:14
oh ok sorry
Paul Martin
@Spazholio
Jun 19 2016 04:14
712 doesn’t support that command, so he has to manually generate the file.
Paul Davis
@SirBinky
Jun 19 2016 04:14
the 712 the newer pump model?
Paul Martin
@Spazholio
Jun 19 2016 04:14
Older, I believe.
Garrett Webb
@garetis
Jun 19 2016 04:14
I'm just checking to see the exact name of the file that it needs to be... I assume it needs to be very specific
Paul Davis
@SirBinky
Jun 19 2016 04:15
my gf is within a year of getting a new pump
Paul Martin
@Spazholio
Jun 19 2016 04:15
@garetis Mine is settings/settings.json
settings/bg_targets.json
Paul Davis
@SirBinky
Jun 19 2016 04:15
bit worried the new one won't work with this set up?
Paul Martin
@Spazholio
Jun 19 2016 04:15
@SirBinky New pumps can’t be looped. =/
Dragan Maksimovic
@dm61
Jun 19 2016 04:15
there is also insulin-sensitivities.json
Paul Martin
@Spazholio
Jun 19 2016 04:15
settings/insulin_sensitivities.json
Dragan Maksimovic
@dm61
Jun 19 2016 04:15
yes
Paul Martin
@Spazholio
Jun 19 2016 04:15
But honestly, you can name then whatever you want.
Garrett Webb
@garetis
Jun 19 2016 04:16
Great, thank you @Spazholio
I've asked that before, but I'm creating another instance of openaps because I was having issues with my first one
Paul Martin
@Spazholio
Jun 19 2016 04:16
You just have to remember what you named them when going through the docs and calling the reports it asks for. I think the filenames I gave you are the generally accepted filenames.
Paul Davis
@SirBinky
Jun 19 2016 04:16
@Spazholio ah great was worried so. the pump is pretty ok, just the caseing starting to go a bit, the twist lock in of the insulin capsule and battery top
Dragan Maksimovic
@dm61
Jun 19 2016 04:16
yes, but need to have these 3 setting files with expected contents
Garrett Webb
@garetis
Jun 19 2016 04:18
That link that had the examples, it only had example for 2 of the 3 files. What format does the insulin sensitivities need to be in? Or, where could I find that out?
Dragan Maksimovic
@dm61
Jun 19 2016 04:20
Here is my example
{
  "units": "mg/dL", 
  "user_preferred_units": "mg/dL", 
  "sensitivities": [
    {
      "i": 0, 
      "start": "00:00:00", 
      "sensitivity": 40, 
      "x": 0, 
      "offset": 0
    }, 
    {
      "i": 24, 
      "start": "12:00:00", 
      "sensitivity": 50, 
      "x": 1, 
      "offset": 720
    }
  ], 
  "first": 1
}
Garrett Webb
@garetis
Jun 19 2016 04:21
Thank you. Also, I added that file, and am getting this error. Does anyone have an idea why?
pi@raspberrypi:~/openaps2 $ cat settings/settings.json
{
  "low_reservoir_warn_point": 5,
  "keypad_lock_status": 0,
  "maxBasal": 2,
  "temp_basal": {
    "percent": 100,
    "type": "Units/hour"
  },
  "low_reservoir_warn_type": 0,
  "insulinConcentration": 100,
  "audio_bolus_enable": false,
  "variable_bolus_enable": true,
  "alarm": {
    "volume": -1,
    "mode": 1
  },
  "rf_enable": false,
  "auto_off_duration_hrs": 0,
  "block_enable": false,
  "timeformat": 1,
  "insulin_action_curve": 5,
  "audio_bolus_size": 0,
  "selected_pattern": 0,
  "patterns_enabled": true,
  "maxBolus": 3.0,
  "paradigm_enabled": 1
}
pi@raspberrypi:~/openaps2 $ openaps use pump read_settings
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 333, in main
    return getattr(self.pump.model, name)(**self.get_params(args))
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/models/__init__.py", line 25, in __call__
    self.response = inst.session.query(self.msg, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/session.py", line 101, in query
    self.execute(command)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/session.py", line 98, in execute
    return super(type(self), self).execute(command)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/session.py", line 39, in execute
    self.download( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/session.py", line 54, in download
    self.command.respond(data)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/commands.py", line 61, in respond
    self.getData( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.29-py2.7.egg/decocare/commands.py", line 1268, in getData
    audio_bolus_enable = data[2] == 1
IndexError: bytearray index out of range
I don't have any errors when I run openaps use pump model, so I don't think it's a connectivity issue
Dragan Maksimovic
@dm61
Jun 19 2016 04:23
once you create your settings files manually, you do not need to run any commands to generate those files.
my understanding is that those commands do not work on 712
Garrett Webb
@garetis
Jun 19 2016 04:24
Ok, even when you create those static files?
Dragan Maksimovic
@dm61
Jun 19 2016 04:24
you create static files manually instead of having them created by running those commands; then you move on and make use of those static files
Garrett Webb
@garetis
Jun 19 2016 04:25
So when I run a report that uses read_settings I shouldn't have any issues, even thought I can't use read_settings ?
Dragan Maksimovic
@dm61
Jun 19 2016 04:26
you should not run a report that uses read_settings at all
Garrett Webb
@garetis
Jun 19 2016 04:26
Ok, so any examples of aliases that have read_settings, I should not include the read_settings part?
Let me look and see if I can find a specific example
Dragan Maksimovic
@dm61
Jun 19 2016 04:27
No you should not
Skip any reports that invoke those settings-reading commands
Paul Davis
@SirBinky
Jun 19 2016 04:27
the iob generate stuff uses those files but you don't run anything to generate them as they are static and can't be updated atm?
Dragan Maksimovic
@dm61
Jun 19 2016 04:28
exactly
Garrett Webb
@garetis
Jun 19 2016 04:28
Ok. So when it states to set up openaps device add get-profile process --require "settings bg_targets insulin_sensitivities basal_profile preferences" oref0 get-profile, I should exclude the "settings" part, because it relies on read_settings?
Paul Davis
@SirBinky
Jun 19 2016 04:29
i could be totally wrong but i think you keep that you just don't invoke it
Dragan Maksimovic
@dm61
Jun 19 2016 04:29
no, keep everything, but do not run the report to generate settings, or bg_targets, or insulin_sensitivities
Garrett Webb
@garetis
Jun 19 2016 04:29
really, I would exclude everything but the basal_profile preferences ?
Dragan Maksimovic
@dm61
Jun 19 2016 04:29
no, no, do not exclude anything, just do not run the reports to generate those files - you already have them
Garrett Webb
@garetis
Jun 19 2016 04:30
Ok, that makes sense
Dragan Maksimovic
@dm61
Jun 19 2016 04:30
:+1:
Paul Davis
@SirBinky
Jun 19 2016 04:30
you don't invoke them but you do use them in processes
@dm61 that right?
Dragan Maksimovic
@dm61
Jun 19 2016 04:31
correct
Garrett Webb
@garetis
Jun 19 2016 04:31
so invoking reports that involve those commands will error, as well?
Dragan Maksimovic
@dm61
Jun 19 2016 04:32
invoking reports that involve generating settings-related files will error
Paul Davis
@SirBinky
Jun 19 2016 04:32
invoking them won't work, but you manually made them so when you do further commands that require values from those files they have them to work.?
Dragan Maksimovic
@dm61
Jun 19 2016 04:33
@SirBinky that is correct
Paul Davis
@SirBinky
Jun 19 2016 04:35
@dm61 cool think i'm slowly getting to grips with aspects of this
Dragan Maksimovic
@dm61
Jun 19 2016 04:35
I have to say I am no expert, I've struggled a lot....
Paul Davis
@SirBinky
Jun 19 2016 04:36
@dm61 “I have not failed. I've just found 10,000 ways that won't work.”
― Thomas A. Edison
Dragan Maksimovic
@dm61
Jun 19 2016 04:37
:clap:
Paul Davis
@SirBinky
Jun 19 2016 04:37
@dm61 if it works straight away you learn nothing, everytime you fail struggle and succeed you learn . the more you fail the smarter you are
Garrett Webb
@garetis
Jun 19 2016 05:01
So, just to double check, when they break down the get-profile process (https://github.com/openaps/docs/blob/master/docs/docs/walkthrough/phase-2/Using-oref0-tools.md#the-get-profile-process), I need the settings/settings.json report, but I don't ever need to invoke it?
Dragan Maksimovic
@dm61
Jun 19 2016 05:04
you just need to have the settings/settings.json file, to be used later
you should be able to setup and invoke openaps report add settings/profile.json text get-profile shell...
without errors
Garrett Webb
@garetis
Jun 19 2016 05:11
I guess I'm not quite getting what the "processes" do, but I'll skip the settings reports that use the static files I created
Dragan Maksimovic
@dm61
Jun 19 2016 05:13
I'd suggest you try to generate that settings/profile.json report. This report will be necessary as you move forward, and generating it without errors will (I think) verify that your static files have correct format
Garrett Webb
@garetis
Jun 19 2016 05:15
Ok, thanks
ddaniels1
@ddaniels1
Jun 19 2016 05:18
@scottleibrand or others, 3 hours after a meal on AMA branch COB is still reading 30 Grams. On log output for loop see CI and ACI Duration. How is this correct:
oref0-determine-basal://text/shell/enact/suggested.json
{"carbs":31,"boluses":5,"mealCOB":29}
{"netbasalinsulin":-0.2,"activity":-0.0025,"basaliob":0.1,"time":"2016-06-18T22:10:31.000Z","hightempinsulin":0.2,"bolussnooze":0,"iob":0.1}
{"delta":7,"glucose":115,"avgdelta":4}
{"duration":22,"rate":1.1,"temp":"absolute"}
{"max_iob":2,"type":"current","dia":3,"skip_neutral_temps":false,"current_basal":0.4,"max_daily_basal":0.4,"max_basal":2.5,"min_bg":110,"max_bg":110,"sens":100,"carb_ratio":5.9}
Carb Impact: 3 mg/dL per 5m; CI Duration: 27.3 hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: 8.2 hours
Garrett Webb
@garetis
Jun 19 2016 05:27
What about openaps use pump read_basal_profile_std, I'm getting an error with that command. For the 712 do I have to create a static basal profile JSON also?
Dragan Maksimovic
@dm61
Jun 19 2016 05:32
If the command fails, I'd guess reading basal profile is not available on 712, but I do not really know
Garrett Webb
@garetis
Jun 19 2016 05:48
does anyone know where the preferences.json file is kept?
GeoffWyche
@GeoffWyche
Jun 19 2016 05:50
@garetis try this: sudo updatedb; locate preferences.json
dunno if it will work, but works on most linux
if it gives an error, post it.
Garrett Webb
@garetis
Jun 19 2016 05:51
```
pi@raspberrypi:~/openaps2 $ sudo updatedb; locate preferences.json
sudo: updatedb: command not found
-bash: locate: command not found
find or grep didn't find anything, but I didn't use sudo
GeoffWyche
@GeoffWyche
Jun 19 2016 05:55
hrm... one sec
Dragan Maksimovic
@dm61
Jun 19 2016 05:55
preferences.json is a file you create (just as the static settings files you've created). You can put it anywhere you like, just make sure you know where it is. I have it in the openaps directory itself
Garrett Webb
@garetis
Jun 19 2016 05:56
I used oref0-mint-max-iob
GeoffWyche
@GeoffWyche
Jun 19 2016 05:56
Might try "sudo apt-get install mlocate", or if that fails "sudo apt-get locate"
Dragan Maksimovic
@dm61
Jun 19 2016 05:57
then it should be in the directory where you ran the oref0-mint-max-iob
GeoffWyche
@GeoffWyche
Jun 19 2016 05:57
Once those are installed, "sudo updatedb" creates a database of where all your files are, and "locate <filename>" finds it in the database.
Garrett Webb
@garetis
Jun 19 2016 06:01
pi@raspberrypi:~ $ pwd
/home/pi
pi@raspberrypi:~ $ ls
Desktop  Documents  Downloads  log_160608.txt  log_160609.txt  log_160611  Music  openaps1  openaps2  Pictures  programs  Public  python_games  setuptools-22.0.5.zip  Templates  Videos
pi@raspberrypi:~ $ cd openaps2
pi@raspberrypi:~/openaps2 $ openaps oref0-mint-max-iob --help
[Errno 2] No such file or directory
openaps: 'oref0-mint-max-iob' is not an openaps command. See 'openaps --help'.

pi@raspberrypi:~/openaps2 $ openaps oref0-mint-max-iob -h
[Errno 2] No such file or directory
openaps: 'oref0-mint-max-iob' is not an openaps command. See 'openaps --help'.

pi@raspberrypi:~/openaps2 $ oref0-mint-max-iob -h
Usage:
oref0-mint-max-iob <max_iob> [preferences.json]

oref0-mint-max-iob help - this message
Print a perfect preferences.json.


Examples:
$ oref0-mint-max-iob 2
{
  "max_iob": 2
}

$ oref0-mint-max-iob 2 foo.json
max_iob 2 saved in foo.json


pi@raspberrypi:~/openaps2 $ oref0-mint-max-iob 3
{
  "max_iob": 3
}
Dragan Maksimovic
@dm61
Jun 19 2016 06:02
add preferences.json after 3 and you'll get the file
oref0-mint-max-iob 3 preferences.json
Garrett Webb
@garetis
Jun 19 2016 06:03
Excellent. I think I just realized that looking at the bottom. Thanks! And it doesn't matter where the file is located?
Dragan Maksimovic
@dm61
Jun 19 2016 06:04
no, just know how to point to it. If you keep it in the openaps directory, then you refer to it just by preferences.json
Garrett Webb
@garetis
Jun 19 2016 06:05
Ok
Garrett Webb
@garetis
Jun 19 2016 06:30
I'm getting this error. Does anyone have any insight?
pi@raspberrypi:~/openaps2 $ openaps report invoke settings/profile.json
get-profile://text/shell/settings/profile.json

/usr/local/lib/node_modules/oref0/lib/profile/basal.js:10
    var basalRate = basalprofile_data[basalprofile_data.length-1].rate
                                                                 ^
TypeError: Cannot read property 'rate' of undefined
    at Object.basalLookup (/usr/local/lib/node_modules/oref0/lib/profile/basal.js:10:66)
    at generate (/usr/local/lib/node_modules/oref0/lib/profile/index.js:32:33)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js:104:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
reporting settings/profile.json
pi@raspberrypi:~/openaps2 $ ls
calculate-iob.ini  cgm.ini  determine-basal.ini  enact  get-profile.ini  monitor  openaps.ini  oref0.ini  preferences.json  pump.ini  pump-session.json  settings
pi@raspberrypi:~/openaps2 $ cd settings
pi@raspberrypi:~/openaps2/settings $ ls
basal_profile.json  bg_targets_raw.json  insulin_sensitivities_raw.json  profile.json  settings.json
pi@raspberrypi:~/openaps2/settings $ cat basal_profile.json
{
  "i": 0,
  "start": "00:00:00",
  "rate": 0.7,
  "minutes": 0
}
Dragan Maksimovic
@dm61
Jun 19 2016 06:38
not sure; you may try to add [ before { and ] after } in your basal_profile.json
Garrett Webb
@garetis
Jun 19 2016 07:07
This seems more reasonable. Is this the proper output?
pi@raspberrypi:~/openaps2 $ openaps report invoke settings/profile.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
I made your suggested changes =)
Dragan Maksimovic
@dm61
Jun 19 2016 07:08
looks good; can you cat your settings/profile.json
Garrett Webb
@garetis
Jun 19 2016 07:09
Indeed! Thank you.
Dragan Maksimovic
@dm61
Jun 19 2016 07:10
great! so, how does your profile.json look like?
Garrett Webb
@garetis
Jun 19 2016 07:11
pi@raspberrypi:~/openaps2 $ cat settings/profile.json
{"max_iob":3,"type":"current","dia":5,"skip_neutral_temps":false,"current_basal":0.7,"max_daily_basal":0.7,"max_basal":2,"min_bg":125,"max_bg":130,"sens":40}
Dragan Maksimovic
@dm61
Jun 19 2016 07:12
looks good to me; I think you can move on to the next step. btw, I'll be gone now; have a good night or whatever part of the day is where you are :smile:
Garrett Webb
@garetis
Jun 19 2016 07:13
It's late for me... I'm in Dallas. But thanks, I'm calling it a night shortly as well
Scott Leibrand
@scottleibrand
Jun 19 2016 07:36
@ddaniels1 it looks like you're not currently seeing any carb absorption. Probably because it has pretty much ended. How many hours of glucose and pumphistory are you passing to oref0-meal? Sounds like it may not be getting the full picture, so it can't account for past carb absorption.
Andy P
@NowhereMan_81_twitter
Jun 19 2016 12:08
has anyone seen this before?
edison@EdisonAPS:~/openaps$ openaps monitor-cgm curl://text/shell/monitor/glucose.json reporting monitor/glucose.json Traceback (most recent call last): File "/usr/local/bin/openaps-report", line 4, in <module> __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-report') File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 719, in run_script File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 1504, in run_script File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 52, in __call__ self.epilog( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 69, in epilog super(ReportToolApp, self).epilog( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 75, in epilog self.create_git_commit( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 89, in create_git_commit self.repo.git.add([diff.b_path], write_extension_data=False) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 457, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 923, in _call_process return self.execute(make_call(), **_kwargs) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 707, in execute raise GitCommandError(command, status, stderr_value) git.exc.GitCommandError: 'git add nightscout/recent-treatments.json' returned with exit code 128 stderr: 'error: insufficient permission for adding an object to repository database .git/objects error: nightscout/recent-treatments.json: failed to insert into database error: unable to index file nightscout/recent-treatments.json fatal: updating files failed'
Andy P
@NowhereMan_81_twitter
Jun 19 2016 12:13
@bewest ... odd, I don't know what happened, but my rig just stopped working a few hours ago! this is the error I see in the log... and when I try running openaps monitor-cgm
edison@EdisonAPS:~/openaps$ openaps monitor-cgm curl://text/shell/monitor/glucose.json reporting monitor/glucose.json Traceback (most recent call last): File "/usr/local/bin/openaps-report", line 4, in <module> __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-report') File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 719, in run_script File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 1504, in run_script File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 52, in __call__ self.epilog( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 69, in epilog super(ReportToolApp, self).epilog( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 75, in epilog self.create_git_commit( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 89, in create_git_commit self.repo.git.add([diff.b_path], write_extension_data=False) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 457, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 923, in _call_process return self.execute(make_call(), **_kwargs) File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.5-py2.7.egg/git/cmd.py", line 707, in execute raise GitCommandError(command, status, stderr_value) git.exc.GitCommandError: 'git add nightscout/recent-treatments.json' returned with exit code 128 stderr: 'error: insufficient permission for adding an object to repository database .git/objects error: nightscout/recent-treatments.json: failed to insert into database error: unable to index file nightscout/recent-treatments.json fatal: updating files failed'
any ideas?
Matt Pazoles
@Pazoles
Jun 19 2016 13:54
After changing a pump battery yesterday morning, we noticed a separate battery status pill popped up on NS that has since disappeared. Looking through the docs - was this the "uploader" battery pill? was under the clock in the upper left hand corner with the other APS pills.
Paul Martin
@Spazholio
Jun 19 2016 14:12
@scottleibrand You seem very good at decoding what the system is doing over time. I spent most of last night betwen 150-170, despite going to bed at 2am with a reading of 79. If I PM you my reports link, when you have a moment, would you mind breaking it down for me a bit and telling me why it didn’t bring me down to within my range?
fjungman
@fjungman
Jun 19 2016 15:21
@Pazoles yes, I have that pill, below the clock and next to the last upload time pill.
Paul Martin
@Spazholio
Jun 19 2016 16:15
So, is the range on the TI stick significantly reduced when using it via serial rather than USB? I took a car ride, and my loop broke for the entire 2 hours I was out (with no way to notify me) because it kept erroring out on various pump retrieval features.
I mean, it was still only 2 feet away from me at any given time, but still. This is bad.
Andrew Dodd
@Entropy512
Jun 19 2016 16:47
How is the stick powered when you're using serial?
Could it have lost power?
Paul Martin
@Spazholio
Jun 19 2016 16:47
No, it’s working. It’s soldered in. It’s just getting crap pump comms.
Which is odd as when I had it in my Pi, via USB, I could cover my entire house.
xxReaper
@xxReaper
Jun 19 2016 16:56
Good evening, i am starting to work on a rig, just started doing some reading and following the guide
i would like to setup the system so it reads from the nightsocut directly
however i think that i am missing something on the step https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/visualization.html Then use the ns-status device to add the monitor/upload-status.json report, which you may do as follows:
when i execute the command i dont see the report monitor/upload-status.json in the list
*of openaps report show
xxReaper
@xxReaper
Jun 19 2016 17:02
it is written that "If you have not generated any of these required reports, you should set them up and make sure they all work."
I cant find where and how to set them
Garrett Webb
@garetis
Jun 19 2016 17:19
If you're just starting out I'd suggest skipping that part for now
@xxReaper what pump, cgm are you using?
xxReaper
@xxReaper
Jun 19 2016 17:22
hi pump Medtronic minimed
Garrett Webb
@garetis
Jun 19 2016 17:22
Sorry, meant which model
722/723?
and are you using medtronic cgm or dexcom?
xxReaper
@xxReaper
Jun 19 2016 17:23
754
Its the dexcom, however i dont have it around right now
Garrett Webb
@garetis
Jun 19 2016 17:24
Ok. Did you already set up your nightscout acct?
xxReaper
@xxReaper
Jun 19 2016 17:25
i have not added the dexvom device, instead used the "curl" for nightscout
Garrett Webb
@garetis
Jun 19 2016 17:25
does azure mean anything to you?
xxReaper
@xxReaper
Jun 19 2016 17:25
well nightscout is up, i used heroku
Garrett Webb
@garetis
Jun 19 2016 17:25
ok
xxReaper
@xxReaper
Jun 19 2016 17:26
i used the dev version as required
however i am turning around the reports, the way they are setuped are understandable
Garrett Webb
@garetis
Jun 19 2016 17:27
what happens when you openaps report invoke monitor/upload-status.json?
xxReaper
@xxReaper
Jun 19 2016 17:27
but this command, i dont really understand: $ openaps report add monitor/upload-status.json JSON ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
That visualization part skips ahead a little but
*bit
it'll go through setting up and invoking reports, and then that part in visualization will make more sense
xxReaper
@xxReaper
Jun 19 2016 17:29
when i invoke the report of upload status the system complains that they does not exist
for example Could not require: /home/pi/vladys-openaps/monitor/iob.json { [Error: Cannot find module '/home/pi/vladys-openaps/monitor/iob.json'] code: 'MODULE_NOT_FOUND' }
jaylagorio
@jaylagorio
Jun 19 2016 17:29
I'm in the middle of an initial setup. Does anyone know of a fix for the following error using a G4 with Share receiver and openxshareble? @jasoncalabrese @bewest ?
paired? 0                                                                                                                      
pairing...                                                                                                                     
paired                                                                                                                         
[UUID('00001800-0000-1000-8000-00805f9b34fb'), UUID('00001801-0000-1000-8000-00805f9b34fb'), UUID('00001804-0000-1000-8000-0080
5f9b34fb'), UUID('0000180a-0000-1000-8000-00805f9b34fb'), UUID('f0aca0b1-ebfa-f96f-28da-076c35a521db')]                        
finding service                                                                                                                
SERVICE None                                                                                                                   
sending auth code SM5340xxxx                                                                                                   
Traceback (most recent call last):                                                                                             
  File "/usr/local/bin/openaps-use", line 4, in <module>                                                                       
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')                                                    
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script                                       
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script                                      
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>     
    app( )                                                                                                                     
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__          
    self.run(self.args)                                                                                                        
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run          
    output = app(args, self)                                                                                                   
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__         
    return self.method.selected(args)(args, app)                                                                               
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__         
    return self.method(args, app)                                                                                              
  File "/home/pi/Adafruit_Python_BluefruitLE/openxshareble/openxshareble/__init__.py", line 89, in __call__                    
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)                                                                
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main      
    self._return_code = target()                                                                                               
  File "/home/pi/Adafruit_Python_BluefruitLE/openxshareble/openxshareble/__init__.py", line 85, in run                         
    output = self.main(args, app)                                                                                              
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/dexcom.py", line 402, in main           
    iter_glucose = self.get_glucose_data(params, args)
xxReaper
@xxReaper
Jun 19 2016 17:29
Which is pretty normal i have not created them
jaylagorio
@jaylagorio
Jun 19 2016 17:30
Continued:
    iter_glucose = self.get_glucose_data(params, args)                                                                         
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/dexcom.py", line 381, in get_glucose_dat
a                                                                                                                              
    return itertools.takewhile(self.comparison, self.dexcom.iter_records('EGV_DATA'))                                          
AttributeError: 'NoneType' object has no attribute 'iter_records'
Paul Martin
@Spazholio
Jun 19 2016 17:30
@jaylagorio What device are you using?
With my Pi3, I needed to use a separate dongle. Onboard BT wasn’t working for some bizarre reason.
Garrett Webb
@garetis
Jun 19 2016 17:31
if creating or invoking reports sounds funny, I'd really just start on Phase 2. That's what was suggested to me, and that's what I did. I pretty much wrapped all that and am now going back and looking at the visualization part that you are talking about and it's pretty clear
jaylagorio
@jaylagorio
Jun 19 2016 17:31
Pi2, offboard dongle
THis appears to be a problem with something in dexcom.py after the BLE stuff has gone through
xxReaper
@xxReaper
Jun 19 2016 17:36
@garetis ok, will do that
@garetis last quick question, can i test the system without adding dexcom device and only by using nightscout ?
Garrett Webb
@garetis
Jun 19 2016 17:38
That might be a little out of my scope -- I only just ordered my dexcom, I've been using medtronic cgm since forever, and have android to NS for me is not easy to deal with
Since I don't have glucose.json data from dexcom I haven't been able to test anything yet
I also have a 712, so I can't upload my cgm data with that
I will say, if you have data in your NS, you can upload that data to the loop
jaylagorio
@jaylagorio
Jun 19 2016 17:42
@Spazholio Any idea why (using USB now) using openaps use cgm oref0_glucose --hours 2.0 and openaps use cgm iter_glucose_hours 2 both return [] but iter_glucose 24 returns the last 24 entries (for the last two hours)?
Paul Martin
@Spazholio
Jun 19 2016 17:43
IIRC, iter_glucose_hours doesn’t work. You want to use iter_glucose.
No idea why the oref0_glucose command isn’t working though.
jaylagorio
@jaylagorio
Jun 19 2016 17:44
That command uses iter_glucose_hours under the hood I think...
With --hours
I'm just curious as to why the count-based command returns data just fine but using the time-based commands don't
Paul Martin
@Spazholio
Jun 19 2016 17:49
Is there a way to have NS pull more than the last entry from share? I’ve got gaps here (everything’s fine on my iPhone and reeciver, but it never made it into NS for whatever reason) and I’d rather not plug in my receiver just to run a gaps script...
Scott Leibrand
@scottleibrand
Jun 19 2016 17:53
@Spazholio sure
(Happy to look at your overnight.)
@NowhereMan_81_twitter you need to be running oref0-reset-git in cron to fix git corruption. That should be in the docs.
xxReaper
@xxReaper
Jun 19 2016 17:57

is suppose in this commande settings outputs a JSON file containing the pump settings:

i need to replace the pump by my name of the pump ?

$ openaps report add settings/settings.json JSON pump read_settings
Scott Leibrand
@scottleibrand
Jun 19 2016 18:05
That adds the report. You still need to invoke it.
And yes, if you didn't call your pump "pump" you need to change that.
xxReaper
@xxReaper
Jun 19 2016 18:08
thanks, can i use 'curl' instead of cfm here ?
openaps report add monitor/glucose.json JSON <my_cgm_name> iter_glucose 5
cgm*
opeans complaining : openaps report add monitor/glucose.json JSON curl iter_glucose 5
usage: openaps-report add report {base,text,stdout,JSON} curl [-h] USAGE ...
openaps-report add report {base,text,stdout,JSON} curl: error: argument USAGE: invalid choice: 'iter_glucose' (choose from 'shell')
Scott Leibrand
@scottleibrand
Jun 19 2016 18:32
No there is a different command if you want to download CGM data from NS instead of pulling from the CGM over USB. There is a section in the docs for that.
xxReaper
@xxReaper
Jun 19 2016 18:33
ok thanks
Garrett Webb
@garetis
Jun 19 2016 18:35
I'm using a 712, so I had to create some static JSON files that are trying to be invoked by openaps gather-profile. Just wondering if this is a problem for me
pi@raspberrypi:~/openaps2 $ openaps gather-profile
usage: openaps-report invoke [-h]
                             {enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,monitor/upload-status.json,settings/profile.json}
                             [{enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,monitor/upload-status.json,settings/profile.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'settings/settings.json' (choose from u'enact/suggested.json', u'monitor/clock-zoned.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory.json', u'monitor/temp_basal.json', u'monitor/upload-status.json', u'settings/profile.json')
Scott Leibrand
@scottleibrand
Jun 19 2016 18:39
If a report doesn't exist you don't want to try to invoke it.
So you'll need to update gather-profile to not invoke stuff your pump doesn't support.
Garrett Webb
@garetis
Jun 19 2016 18:40
Ok, thanks. Do I just delete the alias, then recreate it?
jaylagorio
@jaylagorio
Jun 19 2016 18:40
Anyone know what the units:// device is supposed to do and/or how to get it?
Garrett Webb
@garetis
Jun 19 2016 18:41
I think that converts mmol to mg/dl?
jaylagorio
@jaylagorio
Jun 19 2016 18:41
Any idea where I'm supposed to get that plugin? I'm going through the walk-through and it hasn't been mentioned once yet.
Garrett Webb
@garetis
Jun 19 2016 18:42
I could be wrong, but is this what you're referring to?
right below that it talks about adding $ openaps device add units units
Scott Leibrand
@scottleibrand
Jun 19 2016 18:43
@garetis or you can overwrite aliases without deleting them. Some things like devices have to be deleted first.
jaylagorio
@jaylagorio
Jun 19 2016 18:43
That fixed it. Yeah, that's super out of order, I'm still in the middle of phase 1.
Garrett Webb
@garetis
Jun 19 2016 18:44
@scottleibrand would info on overwriting aliases be in openaps alias -h?
Well, let me say this, would I change the gather-profile.ini file, is that how I could overwrite it?
I mean change the alias in the openaps.ini file
Didie
@elodaille01_twitter
Jun 19 2016 20:25
hello
blob
Must enter commands on the pi ?
someone can help me, please ?
LadyViktoria
@LadyViktoria
Jun 19 2016 20:28
is anyone using humaninsulin with openaps?
mshafa
@mshafa
Jun 19 2016 20:31
Hello. I returned after a while to continue the step of Configuring openaps. I added the pump and CGM, but cat openaps.ini does not show anything. Is there an issue with my openaps init?
Didie
@elodaille01_twitter
Jun 19 2016 20:38
someone can help me ?
Paul Martin
@Spazholio
Jun 19 2016 22:24
@scottleibrand In your most recent AMA setup.sh, whenever I run my loop, sometimes I get mmtune: "916.756", 5, -74 PREFLIGHT OK and sometimes I get mmtune: "916.756", 5, -74 PREFLIGHT FAIL. Why is that? They seem to be identical.
Also, that output is way less than what I‘m used to. Thought maybe I had done something wrong. =)
Scott Leibrand
@scottleibrand
Jun 19 2016 22:40
That is two different things. Mmtune is fine, and preflight sometimes succeeds and sometimes doesn't.
It just doesn't append a new line between them. :-)
@LadyViktoria not that I know of. What kind of DIA do you have to use? Is that the same as NPH?
LadyViktoria
@LadyViktoria
Jun 19 2016 22:45
i set it to 5h
no its not nph
normal humaninsulin
very flat lines <3
Paul Martin
@Spazholio
Jun 19 2016 22:46
And silly question, but since the output of your loop is so abbreviated now, it IS running everything right? I had to replace my sensor again (2 times in as many days) so I’m in the middle of the 2 hours.
LadyViktoria
@LadyViktoria
Jun 19 2016 22:46
blob
Scott Leibrand
@scottleibrand
Jun 19 2016 23:01
Ah, NPH is the much longer acting one so this is
LadyViktoria
@LadyViktoria
Jun 19 2016 23:01
yes ;)
Scott Leibrand
@scottleibrand
Jun 19 2016 23:01
So this is a DIA of like 5-6h?
LadyViktoria
@LadyViktoria
Jun 19 2016 23:01
i set it to 5 hours
Scott Leibrand
@scottleibrand
Jun 19 2016 23:01
Ah, ya, you said 5.
I blame the mobile app. :-)
LadyViktoria
@LadyViktoria
Jun 19 2016 23:07
but i am still in testing phase using it since friday. only thing i have done is changing DIA nothing else
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:15
I am totally new to the Medtronic pump I just hooked to my body today, using saline, man they make those hard to fill with anything but insulin, I don't understand how to know if the carelink and the pump know each other?
Garrett Webb
@garetis
Jun 19 2016 23:16
With the medtronic reservoirs, if you pump in air before you pull out insulin, it is much easier
Haha, never mind -- "anything but insulin"
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:19
Oh, I figured on insulin, I just had to steel a needle from an older medtronic reservoir, attach it to the saline and inject into the reservoir, that blue thing was in the way
Garrett Webb
@garetis
Jun 19 2016 23:23
I'm looking to set up the enact alias. Should it be set up to display suggested.json before it is enacted upon? I'm not sure how I would go about implementing that.
Paul Martin
@Spazholio
Jun 19 2016 23:33
@scottleibrand I’m using your setup.sh because frankly, I’m sick of trying to Frankenstein some of my stuff, and yours is set up way more sanely. However, I gave myself a small bolus about 30 mins ago, and it’s not showing up in NS. Nothing’s erroring out though. In that script, does it utilize all the reports that it sets up?
I’m showing the bolus in quite a few files, so it’s at least being seen. It’s just not making it up to NS.
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:38
Anybody know how to check if my Carelink sees my pump?
Garrett Webb
@garetis
Jun 19 2016 23:39
openaps use pump model will return the pump model if they are communicating
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:40
so I have to add the device before it can tell me that?
Garrett Webb
@garetis
Jun 19 2016 23:40
yeah, you'd have to add the pump as a device
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:41
I was following directions today, hoping to do so, but when I did the change of the profile, my command line changed colors
"change of the profile" ?
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:44
pi@artificialpancreas:~ $ source /etc/profile
Garrett Webb
@garetis
Jun 19 2016 23:45
Oh, yeah. It looks weird. It didn't seem to change anything to me, but I have closed it out and logged back in to fix it because it bothers me too
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:45
ok, I know just enough to break things, thanks
Paul Martin
@Spazholio
Jun 19 2016 23:48
Grrrr. My IOB pill doesn’t show the insulin I actually have on board. I’m not a fan of this, as I think that’s sorta important. Uncertain why it’s not showing though.
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:50
Does this look right then @garetis pi@artificialpancreas:~ $ openaps device show
process://ns-status/ns-status/
process://ns/nightscout/ns https://nightscout1131983.azurewebsites.net XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
medtronic://my512
dexcom://g4nonshare
Garrett Webb
@garetis
Jun 19 2016 23:51
what happens when you do openaps use my512 model?
Scott Leibrand
@scottleibrand
Jun 19 2016 23:51
@Spazholio my scrips are still using the old style environment variables for NS upload. Do you have those set?
Paul Martin
@Spazholio
Jun 19 2016 23:52
I’ll check...
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:52
my command line is now prefaced with "512"
Paul Martin
@Spazholio
Jun 19 2016 23:52
They’re in crontab.
Garrett Webb
@garetis
Jun 19 2016 23:53
So, looks like you're communicating with your pump
Ben West
@bewest
Jun 19 2016 23:54
try openaps use my512 test_oref0_compat_menu
should turn on the backlight and scroll through the menu
Sarah Hodson Grady
@shgrady
Jun 19 2016 23:57
Oh cool
Paul Martin
@Spazholio
Jun 19 2016 23:58
@scottleibrand Do the variables need to be set anywhere else? There’s no errors in the logs, so it looks like everything is working.