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

14th
Feb 2017
hilarykoch
@hilarykoch
Feb 14 2017 01:21
What command do I type to see what wifi my rig is connected to?
katie disimone
@Kdisimone
Feb 14 2017 01:27
Wifi
(New feature in the updated oref0)
hilarykoch
@hilarykoch
Feb 14 2017 01:29
THANK YOU!
JustineAnne
@MicheleJustine
Feb 14 2017 02:01
I am trying to connect my raspberry Pi to wifi using a EDIMAX adapter and I'm having issues with it not working. I downloaded drivers properly and checked that the adapter was detected by Pi using the command 'lsusb' and 'ifconfig -a' and the adapter was in the output both times. The Pi isn't displaying my network and saying no network interfaces found. After rebooting a few times I got it to show my network, and typed in the password but it didn't connect. Now it's back to not showing any network interfaces 🙁
Jorge Aguilar
@jonahtaxt
Feb 14 2017 02:02
have you run sudo apt-get update and sudo apt-get upgrade
I'm installing a new pi for a whole differente purpose and it didn't work at first
but now it seems to be working
try that first and then see if the error continues
JustineAnne
@MicheleJustine
Feb 14 2017 02:03
ok I will, thanks
JustineAnne
@MicheleJustine
Feb 14 2017 02:09
I ran the update commands and they went through, then my network displayed at the top so I put in the password again but it still doesn't connect
Jorge Aguilar
@jonahtaxt
Feb 14 2017 02:25
try configuring it through ssh using wpa_supplicant.conf
what raspberry pi are you using?
what version I mean
JustineAnne
@MicheleJustine
Feb 14 2017 02:29
Raspberry Pi 2 model B
I configured through then terminal through ssh and it worked! Thanks you!
Jorge Aguilar
@jonahtaxt
Feb 14 2017 02:32
:smile:
JustineAnne
@MicheleJustine
Feb 14 2017 02:32
Thank*
Sacha M
@coolestkidsever
Feb 14 2017 04:11
Would it be possible for openaps / pi rig to read two pumps? I have the pump we use mostly, and the trial (older) pump that we are using overnight for openaps. If I could make the pi portable, and read the "day" pump to nightscout, I wouldn't need the uploader phone / mm commander? Does that sound possible? Thx
As an intermediate step before moving to openaps 24hrs
Scott Leibrand
@scottleibrand
Feb 14 2017 04:42
Yeah, that sounds reasonable. Would be easiest to do with two different rigs talking to the same NS...
Keep in mind that a rig does not consider insulin treatments from NS, just carbs.
Jorge Aguilar
@jonahtaxt
Feb 14 2017 05:44
Hi, I successfully moved from dexcom to mdt
Jason Wittmer
@jbwittmer
Feb 14 2017 05:45
@coolestkidsever For what it's worth, I tried using 2 pumps when we started out and were just looping at night. Because of the problem of accurately tracking IOB that Scott references above, it's extremely cumbersome and prone to introducing errors. We quickly abandoned that and just used the OpenAPS compatible pump full time (and for that matter fairly quickly to looping 24-h/day)
Jorge Aguilar
@jonahtaxt
Feb 14 2017 05:45
the values are being uploaded but, I'm getting an error running openaps use pump iter_pump_hours 5.0
File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 186, in decode
temp = { 0: 'absolute', 1: 'percent' }[(self.body[0] >> 3)]
should I run the setup script again? Or is this something that has to do with the information on the pump?
Scott Leibrand
@scottleibrand
Feb 14 2017 05:48
is your pump in percent basal mode instead of U/hr?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 05:48
hmmmm
nope
it's using U/hr
maybe the enlite sensor did something to the basals?
Scott Leibrand
@scottleibrand
Feb 14 2017 05:49
try openaps use pump iter_pump 10 to just get the last few records...
Jorge Aguilar
@jonahtaxt
Feb 14 2017 05:49
ok, let me check
Scott Leibrand
@scottleibrand
Feb 14 2017 05:50
often you can work around decoding errors by not asking for the old data it's barfing on, and/or filling the pump history with new temp basal records to get the old data off the first page
Jorge Aguilar
@jonahtaxt
Feb 14 2017 05:51
I get the same error :worried:
Scott Leibrand
@scottleibrand
Feb 14 2017 06:02
does killall -g openaps; echo '{ "temp": "absolute", "rate": 0, "duration": 0 }' | openaps use pump set_temp_basal - work?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 06:03
let me try
yep
it worked
Scott Leibrand
@scottleibrand
Feb 14 2017 06:04
it should cancel any running temps, and add that record to the pump. if it does work, you can do for i in $(seq 1 100); do killall -g openaps; echo '{ "temp": "absolute", "rate": 0, "duration": 0 }' | openaps use pump set_temp_basal -; done to repeat that 100 times, and then try reading the pumphistory again
or try a smaller number of repeats, and then try openaps use pump iter_pump 10 in between
Jorge Aguilar
@jonahtaxt
Feb 14 2017 06:05
ok, let me try it
Scott Leibrand
@scottleibrand
Feb 14 2017 06:05
do you have multiple pumps? has this pump worked before?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 06:05
yep
it worked before
the only difference is that instead of dexcom we are using MDT as the CGM
the transmitter died today :cry:
Scott Leibrand
@scottleibrand
Feb 14 2017 06:06
lots of people do that and it works fine, so not sure what might have happened to create a pumphistory record that decocare can't decode...
Jorge Aguilar
@jonahtaxt
Feb 14 2017 06:08
the only thing that comes to mind is that maybe the pump was suspended or something because of a low BG and that created the wrong record
but I'm running the for loop and so far so good
I'll let it finish and then try to get the pumphistory again
thanks @scottleibrand !
Scott Leibrand
@scottleibrand
Feb 14 2017 06:08
:+1: good luck!
Jorge Aguilar
@jonahtaxt
Feb 14 2017 06:14
it worked!!!! :smile: I just restarted cron, hope it completes this time
thank you so much @scottleibrand !!
Sacha M
@coolestkidsever
Feb 14 2017 06:35
@scottleibrand to setup two pumps, would we just add another serial number into the settings - or something more? (Yes using the sameNs)
@jbwittmer thanks, I appreciate the feedback. If it was up to me, I'd change tomorrow, but I need to get the significant other on board.. So I'm taking the slow and steady approach. And hoping he just doesn't notice too much, by which time I'll have it running smoothly :)
Scott Leibrand
@scottleibrand
Feb 14 2017 06:41
@coolestkidsever you might want to run oref0-setup a second time with the other serial number, and then set up your crons for each pump to run at different times of day. or just set one of them up to run in cron, and manually run the pump-loop and ns-loop on the other one to pull in pump history etc. and upload to nightscout. but regardless of what you do there, oref0 is going to have the wrong IOB when running on a pump that's been disconnected. you can try to mimic boluses etc. on the second pump to keep them in sync, but that is difficult to get right.
if you know IOB is off, you can also use temp targets to compensate.
Sacha M
@coolestkidsever
Feb 14 2017 06:52
Thanks @scottleibrand I think I'll mull it over a bit more before I do anything, but would dearly love to be rid of the mm commander/otg cable, which is the driver behind this
Scott Leibrand
@scottleibrand
Feb 14 2017 07:51
It all you're trying to do is get MDT CGM data up to NS, that seems a lot simpler...
peterfulvi
@peterfulvi
Feb 14 2017 10:51
Can someone help me ifust got my 722 up and running. I went to run stup andi noticed in the docs it doesnot have the default port for the exlporer board spideve 5.1 anymore. Im using a medtronic cgm now. My pump is also canadian. Anyways i keep gettingthiserror
serial.serialutil.SerialException: Attempting to use a port that is not open
Starting pump-loop at Tue Feb 14 05:46:03 EST 2017:
monitor/temp_basal.json  raised  Attempting to use a port that is not open
pump://JSON/read_temp_basal/monitor/temp_basal.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 62, in before_main
    self.setup_medtronic( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 161, in setup_medtronic
    self.uart.open( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 874, in open
    log.info('%s' % self.product_info( ))
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 515, in product_info
    return self.query(ProductInfo)
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 509, in query
    return self.process( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 490, in process
    raw = self.send_force_read( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 606, in send_force_read
    self.link.write(reader.format( ))
  File "/usr/local/lib/python2.7/dist-packages/decocare/link.py", line 47, in write
    r = self.serial.write( string )
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 517, in write
    raise portNotOpenError
serial.serialutil.SerialException: Attempting to use a port that is not open
Error, retrying
I think it has to do with theport configuration if someone can point me in the right direction that wouldbe great
Tim Street
@tim2000s
Feb 14 2017 11:20
When you ran setup, did you enter a port or answer Y to are you using an explorer board?
And what board are you using @peterfulvi
peterfulvi
@peterfulvi
Feb 14 2017 11:30
I reran it and got better results this is the farthest i gotnow thisis what it looks like
Starting pump-loop at Tue Feb 14 06:27:14 EST 2017:
Radio ok, Listening: .No pump comms detected from other rigs
MDT cgm data retrieved
MDT cgm data reformatted
Profile less than 60m old
glucose.json newer than temp_basal.json
Temp refreshed
{"carbs":0,"mealCOB":0,"reason":"Could not parse input data"}
{"ratio":1}
BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:16 GMT-0500 (EST)
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"reason":"BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:16 GMT-0500 (EST)"}
{"reason":"BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:16 GMT-0500 (EST)"}
Waiting for ntpd to synchronize... OK!
cat: enact/enacted.json: No such file or directory
glucose.json newer than pumphistory: Refreshed pumphistory
{"carbs":0,"boluses":0,"mealCOB":0}
{"ratio":1}
BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:42 GMT-0500 (EST)
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"reason":"BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:42 GMT-0500 (EST)"}
{"reason":"BG data is too old (it's probably this), or clock set incorrectly.  The last BG data was read at Mon Feb 13 2017 06:25:00 GMT-0500 (EST) but your system time currently is Tue Feb 14 2017 06:28:42 GMT-0500 (EST)"}
Waiting for ntpd to synchronize... OK!
cat: enact/enacted.json: No such file or directory
Settings less than 10m old
Pumphistory-24 less than 20m old
Chris Oattes
@cjo20
Feb 14 2017 11:34
That probably means that either your pump wants to be calibrated, or you've hit a known issue, which is usually solved by calibrating
or your pump has a weak signal to the CGM transmitter
peterfulvi
@peterfulvi
Feb 14 2017 12:23
I reset the time on it. I'm happy i got this far with it i'm going to walk around with it today then see were its at at the end of the day. How long does the battery last on the explorer board(Lithium Ion Battery 3.7v 2000mAh ) . Can i charge it with a battery pack or a wall charger? And what connection would i use, uart or otg? How do those wireless chargers work? Sorry for all the questions. @ceben80 I'm reading the openaps toolkit manual and trying to get familiar with the aliases and commands.
Chris Oattes
@cjo20
Feb 14 2017 12:24
2000mAh should get you 16h easily, possibly 18-20
If you connect somthing via usb cable in to UART or OTG that can deliver power, it should charge (wall socket or battery pack)
peterfulvi
@peterfulvi
Feb 14 2017 12:51
Great Thanks
Jorge Aguilar
@jonahtaxt
Feb 14 2017 13:12
Hi, I'm getting this error when running iter_pump_hours: ValueError: need more than 0 values to unpack
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 640, in main
    for rec in self.range( ):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 67, in __call__
    for record in page:
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 46, in download_page
    for record in self.find_records(page):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 157, in find_records
    decoder = history.HistoryPage(response.data, self.inst)
  File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 777, in __init__
    if lib.BangInt(crc) != computed:
  File "/usr/local/lib/python2.7/dist-packages/decocare/lib.py", line 235, in BangInt
    ( x, y ) = ints
ValueError: need more than 0 values to unpack
it runs once
but when I try to run it again, it sends that error
peterfulvi
@peterfulvi
Feb 14 2017 13:30
DSCF6759.JPG
DSCF6761.JPG
DSCF6760.JPG
This is a pleasent sight to see the temp basal command working here is my rig setup:
Matthias
@ceben80
Feb 14 2017 13:36
:clap:
Tim Street
@tim2000s
Feb 14 2017 14:00
@cjo20 - I've never got more than 18hrs from a 2000mAh battery, and more typically see 12-14.
Chris Oattes
@cjo20
Feb 14 2017 14:10
12-14 is very low, imo
@jonahtaxt does it sometimes work and sometimes give that error? Or does it work once and then always give that error afterwards?
Tim Street
@tim2000s
Feb 14 2017 14:28
Never seen 18-20!
On an 850mAh typically I get ~6-7.
Which is in line with the larger battery.
jcorbett80
@jcorbett80
Feb 14 2017 14:49
@tim2000s Hi Tim. Finally getting over both strep and flu combined and hope to start on my rig shortly. I have the edison board, the explorer boad, a minimed 722, a G5, and an android phone. I want to do a completely contained system. I am out of signal quite often and i do not want to add my reciever to the mix. So obviously not using loop for iOS bur rather OpenAps. Can I install nightscout to the edison? If yes will I beable to directly input DB without mlab? If no can I attach a usb scandisck to the explorer and install there? I know you have run simular to this but if I remember correctly you are using loop on an iPhone?
Tim Street
@tim2000s
Feb 14 2017 14:55
@jcorbett80 You need to use the xDrip install option for CGM and Bluetooth in the setup script, xDrip+ on your android phone and set the rest api in xDrip+ to point at your phone.
@colinlennon @ceben80 and I are all using this.
jcorbett80
@jcorbett80
Feb 14 2017 14:57
Does it just store the data without ns? Then upload later to ns?
@tim2000s sorry forgot to tag you in last question. Does it just store the data without ns? Then upload later to ns?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 14:59
@cjo20 I have to try and see if it does work sometimes. Right now I don't have access to the rig
@cjo20 we switched from dexcom to medtronic, and there was some weird temp basal with percentage
and I guess I'll have to wait around to allow that bad temp basal to move on
Chris Oattes
@cjo20
Feb 14 2017 15:05
@jonahtaxt If it works sometimes, the most likely cause of that error is a bad signal or some other interruption to transmission. It happens occasionally.
Scorponok
@Scorponok
Feb 14 2017 15:18
@cjo20 @tim2000s I'm in the same 12 hour boat - we have a new 2000mAh battery for our edison, and we get 12 hours but not much more. Definitely not 18-20 - I was going to look for a 3000 mAh because of that, so we could get the extra few hours to make it through the day
Tim Street
@tim2000s
Feb 14 2017 15:28
@jcorbett80 I use the mongo connection details and upload to mongo. That gives you all the data in NS.
dan lightner
@danimaniac
Feb 14 2017 15:57
@peterfulvi How do you like that case? Is the "door" secure? How much does the rig rattle around in there (the case was designed for a different battery)? I am considering a hybrid between this case and this one: https://github.com/Perceptus/explorer_board_case_2
Scorponok
@Scorponok
Feb 14 2017 16:09
@danimaniac That case works well for us - the edison and battery go in extremely snugly. There are separate compartments for both - if the battery you're using isn't almost exactly the same size, it likely won't fit (or will rattle around)
The belt clip didn't work for us, it printed a few mm too "short" so it doesn't go around the case properly
dan lightner
@danimaniac
Feb 14 2017 16:09
Easiest method of connecting two 2000mAh battery packs in parallel to our Edison/Explorer rig? I think I would prefer stacking two 2000mAh's inside a case rather than the increased length and width of a single larger capacity battery pack...opinions on the increased run time versus rig size?
Tim Street
@tim2000s
Feb 14 2017 16:20
@danimaniac be very careful with parallel lipo. If charging circuits aren't balanced you can get very nasty results.
Matthias
@ceben80
Feb 14 2017 16:22
And keep in mind the EB max charging current is 250 mA
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:23
is this the right channel to discuss decocare code?
Chris Oattes
@cjo20
Feb 14 2017 16:24
should be ok :)
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:25
:smile: good

so, ```
if temp is 'absolute':

  rate = lib.BangInt([self.body[0]&0x7, self.head[1]]) / 40.0

  status.update(rate=rate)

if temp is 'percent':

  rate = int(self.head[1])

  status.update(rate=rate)

```

I was getting an error yesterday
Chris Oattes
@cjo20
Feb 14 2017 16:25
@danimaniac You're probably better off helping look at ways to reduce power consumption than adding extra batteries. We have started working on ways of reducing the time it takes for the loop to run, so the edison can spend more time idle
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:26
it seems that the pump had a temp basal based on percentage
I thought that there wasn't a line to try and decode it, but there is, wouldn't it be ok to dismiss that reading if decocare is unable to decode that reading?
I'm trying to see if there are any consequences if that particular reading isn't decoded
Cause, what will happen if a new user usually does temp basal updates using percent instead of absolute
Chris Oattes
@cjo20
Feb 14 2017 16:28
the error will have been produced in openaps or oref0. If so, it will probably deliberately crash out because it means we can't work out what's going on
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:28
I'm pretty sure they'll bang their heads against the wall like it happened to me yesterday hehehe
It's just my two cents on the code
I really haven't worked with python but, as far as I can read, it would be an option do dismiss those "bad" readings
then again, that might cause some miscalculations while looping, but as far as I understand, it's just history data, which can't be really used for openaps or the advanced features
Chris Oattes
@cjo20
Feb 14 2017 16:31
openaps definitely uses the amount of insulin delivered to work out what is going on, that includes boluses and temporary basal rates
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:32
I understand that, but, if it's a percent temp basal it throws an error
or maybe there is something really wrong with that particular record on my pump
Chris Oattes
@cjo20
Feb 14 2017 16:32
it throws an error because percentage temporaries are unsupported
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:32
ok
could we convert it to a absolute temp basal?
I mean, we could get the basal rate for that particular time, then convert the percentage temporary using the info, and then convert it to a absolute temp
could that work?
Chris Oattes
@cjo20
Feb 14 2017 16:34
in theory, it should be possible. It's easiest to just not use percentage temporary basals :P
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:35
hahahaha, I know that to be true, but like I said before, if somebody wants to try out openaps and that someone has been using percentage temp basals, then it won't work
dan lightner
@danimaniac
Feb 14 2017 16:36
@tim2000s Understood...hence my question. I wonder what options exist for a proper setup. Anyway, I am looking to basically copy your fully offline rig setup and worry about frequent days (work related) when 12-14 hour battery life might not be long enough.
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:38
let's call it a fallback if you will, in case something out of the extraordinary happens
Matthias
@ceben80
Feb 14 2017 16:38
I need the percentage temp to pause the loop, no need to shutdown and power up the rig, if I would like to resume the loop back, I only need to switch to U/hr basal back again :wink:
Chris Oattes
@cjo20
Feb 14 2017 16:39
@ceben80 why do you need percentage temp to pause the loop?
Tim Street
@tim2000s
Feb 14 2017 16:39
@jonahtaxt If they use percentages then they just switch to u/hr after wondering why it doesn't work and reading the docs to check...
Chris Oattes
@cjo20
Feb 14 2017 16:39
@jonahtaxt What sortof "extraordinary" situation do you think will happen that means you have to switch to percentage?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:40
what I mean is, running iter_pump_hours won't work with percentage basals
or, maybe it's a really bad record on my pump
either way
whenever it tries to decode a percent temp_basal it fails
Tim Street
@tim2000s
Feb 14 2017 16:40
@danimaniac carry a spare battery or use a larger capacity is probably safest.
Chris Oattes
@cjo20
Feb 14 2017 16:41
At most, people will have to wait 24 hours for the events to leave the recent history. I imagine most people take more than 24 hours between finding the project and actually trying to run the loop with hardware. If you don't think the fact the pump needs to be set to absolute temp basal is obvious enough, feel free to submit a PR updating it
@jonahtaxt what error does it actually give?
kenstack
@kenstack
Feb 14 2017 16:41
@jonataxt @cjo20 if you are going to implement temp basal percents, be forewarned that you need to set a prior temp to zero, then set your actual temp percent - you can't jump from one temp percent to another - ben showed me that a while ago - I use percent temps in my stuff - they decode fine though as far as I know
Matthias
@ceben80
Feb 14 2017 16:42
E.g. in my dancing class, I prefer to dance without the loop due to the fact I don't want to monitor during dancing with my wife, I feel more comfortable during this 90 min @cjo20
Chris Oattes
@cjo20
Feb 14 2017 16:43
@kenstack why won't it let you switch from one to the other?
@ceben80 Maybe you could implement something that overloads nightscout temp targets. If you set a temp target with a specific name, it stops it enacting temp basals
Tim Street
@tim2000s
Feb 14 2017 16:44
@danimaniac You could perhaps look at Gustavo's case with a 3400mAh 18680 Li-Ion battery.
Matthias
@ceben80
Feb 14 2017 16:45
Sounds interesting Chris but due to poor internet at this dancing location not easy.....
Chris Oattes
@cjo20
Feb 14 2017 16:47
I've got a custom solution for disabling enacts but it doesn't work with oref0-setup. I ssh in to the rig and create a pause_enact file. If the file exists, the loop doesn't call the enact report.
Matthias
@ceben80
Feb 14 2017 16:49
@tim2000s but for 3400mAh lipo one need an external charger?! 250mA from the EB is not so much....
Chris Oattes
@cjo20
Feb 14 2017 16:49
@ceben80 current explorer boards do 500mA, 250mA is what future revisions will be
Matthias
@ceben80
Feb 14 2017 16:50
Oki thought now we have 250
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:52
@cjo20 this is the error:
```
oops
File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 186, in decode
temp = { 0: 'absolute', 1: 'percent' }[(self.body[0] >> 3)]
@kenstack yep, @scottleibrand tried helping me yesterday and asked me to insert 0 temp basals with a duration of 0 seconds
so maybe instead of ignoring the record, if an error arises regarding the temp basal decoding, then I could just use a 0 temp basal
the thing is, it isn't working for me
so either the record is really messed up in the pump
or there is something else regarding that issue
anyway, I think it's time to learn python and test
Chris Oattes
@cjo20
Feb 14 2017 16:54
@jonahtaxt That's not the full error, is it
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:54
well no, it's just the last line
but the rest of the message is just the stack trace
let me try and see if I can run it again
Chris Oattes
@cjo20
Feb 14 2017 16:55
That doesn't look like it's having a problem decoding that packet
that looks like an error you get when there is communications interferences, and it's usually intermittent
So sometimes the command will run and sometimes it won't
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:56
hmmm ok, makes sense
the thing is that, the pump was really close to the board, and everytime I ran another command like model it worked fine
and the loop tried to run like 20 times until I started running each report by hand
Chris Oattes
@cjo20
Feb 14 2017 16:57
and when you ran the pumphistory one by hand, did it complete?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:58
no, I got the error every time I tried to do it manually
Chris Oattes
@cjo20
Feb 14 2017 16:58
Can you paste the full error?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 16:58
sure, let me try to run it
give me a minute
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:06
now I don't get an error :frowning:
I guess enough time has passed
I was running the wrong report, give me a minute
dan lightner
@danimaniac
Feb 14 2017 17:08
@tim2000s @cjo20 @ceben80 Thanks all. My EB is recently purchased and still on backorder...will be 250mA capable. I have previously read all the discussion regarding battery capacity vs. rig optimization and will stick with a the 2000mAh for now.
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:11
here it is
```
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 640, in main
for rec in self.range( ):
File "/usr/local/lib/python2.7/dist-packages/decocare/models/init.py", line 67, in call
for record in page:
File "/usr/local/lib/python2.7/dist-packages/decocare/models/init.py", line 46, in download_page
for record in self.find_records(page):
File "/usr/local/lib/python2.7/dist-packages/decocare/models/init.py", line 158, in find_records
records = decoder.decode( )
File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 823, in decode
record = parse_record(self.stream, B, larger=larger, model=self.model)
File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 755, in parse_record
record.parse( head + date + body )
File "/usr/local/lib/python2.7/dist-packages/decocare/records/base.py", line 66, in parse
return self.decode( )
File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 186, in decode
temp = { 0: 'absolute', 1: 'percent' }[(self.body[0] >> 3)]
KeyError: 4
crap!!
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 640, in main
    for rec in self.range( ):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 67, in __call__
    for record in page:
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 46, in download_page
    for record in self.find_records(page):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 158, in find_records
    records = decoder.decode( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 823, in decode
    record = parse_record(self.stream, B, larger=larger, model=self.model)
  File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 755, in parse_record
    record.parse( head + date + body )
  File "/usr/local/lib/python2.7/dist-packages/decocare/records/base.py", line 66, in parse
    return self.decode( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 186, in decode
    temp = { 0: 'absolute', 1: 'percent' }[(self.body[0] >> 3)]
KeyError: 4
this happens now if I run the pumphistory-24.json report
the pumphistory.json report is running fine now
Chris Oattes
@cjo20
Feb 14 2017 17:11
Which model pump do you have?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:11
522
Chris Oattes
@cjo20
Feb 14 2017 17:12
That's saying there is an error because it's trying to look up value 4 in a list that only has 2 items, 0 and 1
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:12
so, it's definetly an error on the pump record?
or is there no option for a 4 value?
Chris Oattes
@cjo20
Feb 14 2017 17:14
What it probably means is that there is sometimes other data stored in that byte that hasn't been seen often enough to cause failures
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:14
so it's a byte decode thing
well
I'll try to figure it out, I have less than 24 hours now, before that record isn't reached by the command
thanks for all the help and knowledge @cjo20
and patience, specially patience LOL :smile:
Luis Betancourt
@betluis
Feb 14 2017 17:25
blob
blob
Jorge Aguilar
@jonahtaxt
Feb 14 2017 17:26
cool! @betluis
Luis Betancourt
@betluis
Feb 14 2017 17:27
really simple. any laser shop can do this in a snap
I'll add a sketchup desing for the laser shop guys to take the vectors from it
peterfulvi
@peterfulvi
Feb 14 2017 18:02
does the temp basal stop throughout the looping im only doing suspended glucose mode right now. It was on 1.18 all day now its on my norma lbasal rate
Chris Oattes
@cjo20
Feb 14 2017 18:03
it doesn't have to set a temporary basal rate. I can't remember if it tries to set temp basal when it requests the normal rate or not by default
Scorponok
@Scorponok
Feb 14 2017 18:04
I think it does set it, but there's an option you can set in the preferences to stop it doing that
Chris Oattes
@cjo20
Feb 14 2017 18:05
@peterfulvi if you want to work out what it's doing, look at the log
Scott Leibrand
@scottleibrand
Feb 14 2017 18:07
@jonahtaxt @cjo2 normally openaps has no problem decoding temps set in percent mode. it just can't set temps when in that mode (hence, @ceben80's "feature"). as @cjo20 mentioned, this looks like something else got set in the bits next to the temp basal mode when you switched over to CGM. I don't think anyone else has ever reported it before, so it might be worthwhile capturing the raw page for decoding. I think @sulkaharo recently figured out how to do that with mmeowlink...
Chris Oattes
@cjo20
Feb 14 2017 18:08
@jonahtaxt you're also not limited to just 24 hours, the pump stores history for longer than that. It's just that we only request that much.
Jorge Aguilar
@jonahtaxt
Feb 14 2017 18:09
@cjo20 I know I could change the time on the pumphistory-24h report, but wouldn't that affect autosens?
Chris Oattes
@cjo20
Feb 14 2017 18:10
You can run the pump history command manually (not through openaps)
As Scott mentioned, someone recently re-discovered how to dump raw data from the pump, they may be able to talk you through it
Jorge Aguilar
@jonahtaxt
Feb 14 2017 18:11
I'll ask around
by manually you mean openaps use pump iter_pump_hours?
or using oref0 directly?
Chris Oattes
@cjo20
Feb 14 2017 18:12
you can do it with iter_pump_hours, but under the hood, that's just calling another script somewhere else.
Jorge Aguilar
@jonahtaxt
Feb 14 2017 18:14
when I try running it with 21.0 hours it fails
I guess I could change that parameter and retrieve less hours
the only thing I'm worried about is autosens
peterfulvi
@peterfulvi
Feb 14 2017 18:16
@cjo20 i figured it out the edison came loose from the explorer board i fastened it and ran the logs, it going again. @danimaniac . Do you have an stl for that. case,that one doesn't fit right, and i like that belt loop.
dan lightner
@danimaniac
Feb 14 2017 18:19

@peterfulvi This one? https://github.com/Perceptus/explorer_board_case_2/blob/master/explorer_stacked_case_2.stl & https://github.com/Perceptus/explorer_board_case_2/blob/master/explorer_stacked_case_2_belt_clip.stl

I have no Sketchup / CAD abilities, but would like to use the "inner" dimensions of this case and round off all edges and corners to make it more comfortable in a pocket. I also want to add vents. I can post some hand drawn sketches of my revised "Perceptus" case later.

Scott Leibrand
@scottleibrand
Feb 14 2017 18:58
@jonahtaxt you should be fine running without autosens for a day or two until the old records age out. if your regular pumphistory run is succeeding, it should be able to loop, and just default the autosens ratio to 1.0
Jorge Aguilar
@jonahtaxt
Feb 14 2017 19:13
ok, I'll disable autosens for now then @scottleibrand
peterfulvi
@peterfulvi
Feb 14 2017 19:28
@danimaniac , have you seen tinkercad. its an online drafting website https://www.tinkercad.com/
kenstack
@kenstack
Feb 14 2017 19:31
@cjo20 if you try to set a temp percent while another one is on, it wouldn't set anything. I haven't tested the latest decocare I should - but when I set a temp percent via decocare I send 2 Comaneci regardless - first is a temp with zero duration then the actual percent and duration
peterfulvi
@peterfulvi
Feb 14 2017 19:50
image.png
@danimaniac I was just playing aroud with it on tinkercad. The vent idea
dan lightner
@danimaniac
Feb 14 2017 20:22
@peterfulvi Yes, that is closer to what I had in mind. I was considering something like this 2 dimensional sketch. The interior dimensions would be the same as the Perceptus case. The light gray is the case body, the dark gray is the case end cap, the white represents cutouts for ventilation. !https://goo.gl/photos/uqRViKKZ1HSzjuLc8
Jorge Aguilar
@jonahtaxt
Feb 14 2017 20:33
Lately I've been getting this error a lot even after doing killall -g openaps
Traceback (most recent call last):
  File "/usr/local/bin/mmeowlink-any-pump-comms.py", line 15, in <module>
    app.run(None)
  File "/usr/local/lib/python2.7/dist-packages/decocare/helpers/cli.py", line 113, in run
    self.prelude(args)
  File "/root/mmeowlink-source/mmeowlink/cli/any_pump_comms_app.py", line 28, in prelude
    super(AnyPumpCommsApp, self).prelude(args)
  File "/root/mmeowlink-source/mmeowlink/cli/base_mmeowlink_app.py", line 26, in prelude
    self.link = link = LinkBuilder().build(args.radio_type, port)
  File "/root/mmeowlink-source/mmeowlink/link_builder.py", line 16, in build
    return SubgRfspyLink(port)
  File "/root/mmeowlink-source/mmeowlink/vendors/subg_rfspy_link.py", line 55, in __init__
    self.open()
  File "/root/mmeowlink-source/mmeowlink/vendors/serial_interface.py", line 28, in open
    self.check_setup()
  File "/root/mmeowlink-source/mmeowlink/vendors/subg_rfspy_link.py", line 72, in check_setup
    self.serial_rf_spy.sync()
  File "/root/mmeowlink-source/mmeowlink/vendors/serial_rf_spy.py", line 121, in sync
    raise CommsException("Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?")
mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?
Dana Lewis
@danamlewis
Feb 14 2017 20:42
how many rigs do you have running?
Jorge Aguilar
@jonahtaxt
Feb 14 2017 20:42
only one
peterfulvi
@peterfulvi
Feb 14 2017 20:48
@danimaniac That looks good. Im going to get one printed soon. Thelid pops off pretty easily.I had the same idea about the words on the front.
Do i have to turn the loop off to run openaps, far as invoking reports, talking to the cgm and pump
andyhandy
@andyhandy
Feb 14 2017 21:38
Anyone had issues with the Pi shutting down by itself? Has happened to me several times in the last couple of days.
Luis Betancourt
@betluis
Feb 14 2017 21:44
@andyhandy I have had an issue with pi not letting me SSH after a few hours. I fixed this by installing a range extender for my wifi
now everytime i want to communicate it's allways there (so far so good)
jcorbett80
@jcorbett80
Feb 14 2017 22:14
@tim2000s Sorry had to leave after getting on this morning. thank you for the feedback!
Scott Leibrand
@scottleibrand
Feb 14 2017 22:24
@jonahtaxt if killall isn't sufficient, comment out your cron entries and reboot