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

10th
Mar 2017
dmdfreak
@dmdfreak
Mar 10 2017 00:00
Ah OK. I'll try doing that tonight
Dana Lewis
@danamlewis
Mar 10 2017 00:00
http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/update-your-rig.html#optional-to-get-on-dev-branch-to-test-even-more-recently-added-new-stuff for updating to dev if you so choose, and then please comment on openaps/oref0#414 in the next day if you do that and let us know if you see anything weird, otherwise that +1 will be what we need for this patch release. (ditto for anyone else who’s been testing dev)
dmdfreak
@dmdfreak
Mar 10 2017 00:02
I have one other thing that seems weird too. Sometimes openAPS says my data is old and that the last BG was March 7th.
Pete Schwamb
@ps2
Mar 10 2017 04:31
Is it true that this is still an open issue? openaps/oref0#129
I was looking for some details on how openaps handles suspends, particularly how it uploads to NS, and came across that.
Does anyone know if openaps uploads suspends to NS, and if so, what an example looks like?
Dana Lewis
@danamlewis
Mar 10 2017 04:45
Correct, still open. I think they'll display as a pump event (gray dot) on the graph when uploaded from pump history, though
dmdfreak
@dmdfreak
Mar 10 2017 04:46
@danamlewis switched to dev as you said, but now its not connecting to my pump. where can
I check my serial number was entered correctly?
Dana Lewis
@danamlewis
Mar 10 2017 04:46
Cat pump.ini
dmdfreak
@dmdfreak
Mar 10 2017 04:46
ty
Dana Lewis
@danamlewis
Mar 10 2017 04:47
And it may take 10-15 minutes for it to pull be first big history
dmdfreak
@dmdfreak
Mar 10 2017 04:48
oh ok. was getting worried. Where do I run that command?
nvm
Dana Lewis
@danamlewis
Mar 10 2017 04:50
Watching the logs will give you a clue if it's just needing the history to finish up or if there's something else
dmdfreak
@dmdfreak
Mar 10 2017 04:52

keep seeing this line

Old pumphistory:
Error, retrying

Dana Lewis
@danamlewis
Mar 10 2017 04:53
Yea - it's waiting for/working on the first big history pull
Pete Schwamb
@ps2
Mar 10 2017 04:54
So if someone was suspended for a while, they could in reality have negative IOB, but openaps would think they have more. I guess that’s an error in a conservative direction. The worse case is if you were high temped when suspending, since at that point openaps can’t adjust basals, and so it would continue to assume that you were high temped?
dmdfreak
@dmdfreak
Mar 10 2017 04:54
ok. so longer to start this time the first run because it has sdomething to look at from before now.
Pete Schwamb
@ps2
Mar 10 2017 04:55
Sorry for not being clear about asking what it ‘looks like’. I meant an example of the JSON.
I know that NS isn’t displaying suspends on the temp basal graph either.
Dana Lewis
@danamlewis
Mar 10 2017 04:55
@ps2 correct. So current practice for accurate iob tracking when showering etc is currently to cancel any running temp, set a zero temp, and then suspend.
Ah, k
@dmdfreak that's because you've been stuffing your pump full of temp basals ;)
dmdfreak
@dmdfreak
Mar 10 2017 04:57
true story bro!
Pete Schwamb
@ps2
Mar 10 2017 04:57
@danamlewis ah, that makes sense. Thanks.
dmdfreak
@dmdfreak
Mar 10 2017 04:57
eventually, when it starts, I'll be able to breath again LOL
Dana Lewis
@danamlewis
Mar 10 2017 04:57
@ps2 like this? {
_id: "58c1b88b424529c720fc3a9d",
_type: "PumpSuspend",
_description: "PumpSuspend 2017-03-09T12:17:28 head2, body[0] op[0x1e]",
timestamp: "2017-03-09T12:17:28-08:00",
_body: "",
_head: "1e00",
_date: "1cd10c0911",
medtronic: "mm://openaps/mm-format-ns-treatments/PumpSuspend",
created_at: "2017-03-09T12:17:28-08:00",
enteredBy: "openaps://medtronic/522",
eventType: "Note",
notes: "PumpSuspend 522 ",
carbs: null,
insulin: null
},
Pete Schwamb
@ps2
Mar 10 2017 04:58
Yes, thanks. And the unsuspend?
Dana Lewis
@danamlewis
Mar 10 2017 04:58
{
_id: "58c0eb62424529c720fc37a2",
_type: "PumpResume",
_description: "PumpResume 2017-03-08T21:40:06 head2, body[0] op[0x1f]",
timestamp: "2017-03-08T21:40:06-08:00",
_body: "",
_head: "1f00",
_date: "06e8150811",
medtronic: "mm://openaps/mm-format-ns-treatments/PumpResume",
created_at: "2017-03-08T21:40:06-08:00",
enteredBy: "openaps://medtronic/522",
eventType: "Note",
notes: "PumpResume 522 ",
carbs: null,
insulin: null
},
Pete Schwamb
@ps2
Mar 10 2017 05:01
I should’ve asked this before I added suspend event upload in MinimedKit. I searched NS, and saw that there was no code for dealing with suspends, so I just created my own new type. Just a while ago had the realization that Ben’s code probably did upload those, since it was a simple transform from the decocare dump history format.
dmdfreak
@dmdfreak
Mar 10 2017 05:03

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 50, in main
repo.git.add([report.name], write_extension_data=False)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 425, in <lambda >
return lambda args, **kwargs: self._call_process(name, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 877, in _call_p rocess
return self.execute(call,
exec_kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 688, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git add monitor/mmtune.json
stderr: 'fatal: Unable to create '/root/myopenaps/.git/index.lock': File exist s.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.'

this is at the begining
dmdfreak
@dmdfreak
Mar 10 2017 05:18
@danamlewis still no go and the above seemed wrong as well. It was early in the log
Dana Lewis
@danamlewis
Mar 10 2017 05:21
Are you still getting lock errors, or what is log saying now?
dmdfreak
@dmdfreak
Mar 10 2017 05:22

mostly this over and over

Listening: .No pump comms detected from other rigs
mmtune: pump://JSON/mmtune/monitor/mmtune.json
reporting monitor/mmtune.json
"916.636", 0, -99 Starting pump-loop at Thu Mar 9 23:19:49 CST 2017:
Radio ok, Listening: .No pump comms detected from other rigs
Old pumphistory:
Error, retrying
Starting pump-loop at Thu Mar 9 23:20:56 CST 2017:
Radio ok, Listening: .No pump comms detected from other rigs
Old pumphistory:
Error, retrying

or only that. the above stuff was at the beginging of the log
Dana Lewis
@danamlewis
Mar 10 2017 05:23
Where's your pump in relation to rig?
dmdfreak
@dmdfreak
Mar 10 2017 05:23
right next to each other
Dana Lewis
@danamlewis
Mar 10 2017 05:25
Is your pump ww or North America?
dmdfreak
@dmdfreak
Mar 10 2017 05:25
this isnt something I have to be serially connect for right?
north america
I hit enter when it asked. this time and the first time
Dana Lewis
@danamlewis
Mar 10 2017 05:27
K. And pump SN is correct?
dmdfreak
@dmdfreak
Mar 10 2017 05:27
yes ma'am
Dana Lewis
@danamlewis
Mar 10 2017 05:28
Pump is not in rewind or prime mode?
dmdfreak
@dmdfreak
Mar 10 2017 05:28
nope.
Scott Leibrand
@scottleibrand
Mar 10 2017 05:29
try running a manual mmtune: cd ~/myopenaps; killall -g openaps; openaps mmtune
dmdfreak
@dmdfreak
Mar 10 2017 05:31
root@timsedison:~/myopenaps# cd ~/myopenaps; killall -g openaps; openaps mmtune
mmtune: pump://JSON/mmtune/monitor/mmtune.json
reporting monitor/mmtune.json
"916.636", 0, -99 root@timsedison:~/myopenaps#
oh still going....
Scott Leibrand
@scottleibrand
Mar 10 2017 05:32
your pump isn't responding to the rig for some reason. battery dead?
dmdfreak
@dmdfreak
Mar 10 2017 05:32
just put a new one in the afternoon. way before i started this
Scott Leibrand
@scottleibrand
Mar 10 2017 05:33
have you ever successfully communicated with this pump with an OpenAPS rig?
dmdfreak
@dmdfreak
Mar 10 2017 05:33
yeah. over 24hrs worth
Scott Leibrand
@scottleibrand
Mar 10 2017 05:33
and was that with the same hardware setup as now?
dmdfreak
@dmdfreak
Mar 10 2017 05:33
working right up until I switched to dev
I didnt do bluetooth this time because my phone doesnt bluetooth tether I found out.
I didnt realize yall swithced out lol
Scott Leibrand
@scottleibrand
Mar 10 2017 05:35
:-)
check again for serial number typos
Dana Lewis
@danamlewis
Mar 10 2017 05:35
:D I'm on my phone and he's on a laptop so it's easier at some point for the laptop used to type out stuff ;)
Scott Leibrand
@scottleibrand
Mar 10 2017 05:36
and make sure the Edison is properly seated on the Explorer board
maybe try a full power down of the rig and power it back on
dmdfreak
@dmdfreak
Mar 10 2017 05:36
for F sake. I put 722608 it was 772608.... Im so mad at myself. I even checked it first thing and didnt see it ...
SOOOOOOOOOO sorry
Scott Leibrand
@scottleibrand
Mar 10 2017 05:36
lol, I thought so! :)
Dana Lewis
@danamlewis
Mar 10 2017 05:37
Hahaha
dmdfreak
@dmdfreak
Mar 10 2017 05:37
I even ask you how and LOOKED first thing LMAO
Dana Lewis
@danamlewis
Mar 10 2017 05:37
Third time check usually gets it ;)
Yep! But glad it was an easy fix :smile:
dmdfreak
@dmdfreak
Mar 10 2017 05:37
wasted your time so much lol
Im sorry guys
Dana Lewis
@danamlewis
Mar 10 2017 05:37
No worries. thanks for switching to dev and giving any notes needed or otherwise letting us know if it looks good
Scott Leibrand
@scottleibrand
Mar 10 2017 05:37
I'm glad it was an error that actually made sense, at least. :)
Dana Lewis
@danamlewis
Mar 10 2017 05:37
Then we can patch release
dmdfreak
@dmdfreak
Mar 10 2017 05:38
guessing I can nano into pump.ini and change it?
Scott Leibrand
@scottleibrand
Mar 10 2017 05:38
yeah
but, you might want to edit oref0-runagain.sh and re-run that
or at least edit it, in case you decide to run it later
so it doesn't change it back to the typo'd version
dmdfreak
@dmdfreak
Mar 10 2017 05:39
ok will do. You two are the best. really.
Dana Lewis
@danamlewis
Mar 10 2017 05:39
:smile:
dmdfreak
@dmdfreak
Mar 10 2017 05:40
I think tomorrow Im going to go all day without trying to change something on here so I feel like I have it right for a little while LOL
Dana Lewis
@danamlewis
Mar 10 2017 05:40
:+1: :smile:
You're looping, you definitely have it right :smile:
dmdfreak
@dmdfreak
Mar 10 2017 05:41
now that everthing is changed Im guessing a reboot is needed?
Dana Lewis
@danamlewis
Mar 10 2017 05:43
Shouldn't need a reboot, watch the logs again
dmdfreak
@dmdfreak
Mar 10 2017 05:43
ok ty again and 12 more times for the future trouble I'll cause :D
Dana Lewis
@danamlewis
Mar 10 2017 05:44
Lol. No trouble, it's all a learning experience :smile: and doing it here is good because others are also lurking and learning alongside us.
Tim Street
@tim2000s
Mar 10 2017 06:24
@andyhandy I use a pimoroni 2000mAh battery. Had no issues with battery wires.
Martin Haeberli
@mhaeberli
Mar 10 2017 07:45
Question re Dexcom. G4 Our t1teen replaced sensor , moved transmitter over, didn't restart sensor. We got crazy values! Like 30 mg / dl changes every 6 minute sample. We just restarted sensor now; data dark for restart window. Any comments on why data so weird. Besides : "don't do it that way!"?
Dana Lewis
@danamlewis
Mar 10 2017 07:45
That's why they have the two hour startup usually. Normal getting started getting soaked sensor noise.
Also why sensors can be so jumpy on first day or so even after 2 hour start and calibration
Martin Haeberli
@mhaeberli
Mar 10 2017 07:48
K thx. So in future, plan changes in advance, somehow before sensor falls out, soak for two hours with no TX, or maybe have two TX and switch between?
Btw , do you EVER sleep? Appreciate fast answers even so late at night...
And lol - I'm a west coast night owl ;) (you won't find me online much in the mornings!)
Martin Haeberli
@mhaeberli
Mar 10 2017 07:50
K thx
Dana Lewis
@danamlewis
Mar 10 2017 07:52
:+1:
Matthias
@ceben80
Mar 10 2017 07:59
@danamlewis I did this since several months, never ever noisy sensors from the activation on
Diabetic_Dude
@diabetic_dude_twitter
Mar 10 2017 14:01
I have been having a difficult time setting up IFTTT to work with temp basils. I have set it up a few times 4 applets and none of them seemed to work. I watched the logs using the tail -F /var/log/openaps/pump-loop.log and saw no changes, also looked on my nightscout site and confirmed that the settings were not going through. So I gave up for the night.... I still planned to go to the gym so I went to my nightscout site., clicked on settings, clicked on profile editor, and scrolled down to the bottom and set a temp range of 180-200 I also set it to start at 5:30 PM I clicked save and got the success confirmation. I checked my OpenAPS Pill at 5:45 PM and my "default" basil was still running... Any ideas on why this would be happening??? I cant seem to get temp basils to stick no matter how I input them.
Scott Leibrand
@scottleibrand
Mar 10 2017 18:02
One other thing regarding sensor swaps without a restart: you can do that with one of your two receivers if you want, if you soak the new sensor on an dead transmitter first, and know what to expect when you swap the live transmitter, and restart the other receiver to make sure you have good data after two hours. The receiver you don't restart will immediately go to ??? and raw data will show a really high BG value (like 300s) that immediately starts dropping precipitously until it flattens out at something reasonable. That takes about an hour, at which point the receiver will usually come back with a BG value and you can immediately calibrate it. You'll want to calibrate both receivers again once the other one finishes its 2-hour warmup, as a new sensor often needs to be calibrated differently than the old one was.
@diabetic_dude_twitter settings are only refreshed by the rig every 20-30m, so you can't expect manual changes there to show up in pump-loop.log immediately.
Matt Pressnall
@logichammer
Mar 10 2017 18:42
@Kdisimone, @danamlewis tells me that you have already written all the Papertrail documentation up! Thanks! I wanted to share it with @ELUTE as they are on OpenAPS and she was looking into logging issues. I went crawling through your OpenAPS docs on github and found a bunch of screenshots related to it but couldn't find the documentation that pulls in those screenshots. Is there a URL where folks can check it out until it gets pulled? Thanks!
Mike
@libxmike
Mar 10 2017 18:44
@scottleibrand is there any difference in installing or after installing oref0 on Explorer Board than on Edison and Mini Breakout Board ?
Scott Leibrand
@scottleibrand
Mar 10 2017 18:45
Yes, you need to be root. The oref0-setup script will handle libmraa etc.
Mike
@libxmike
Mar 10 2017 18:45
besides selecting explorer board during installation
katie disimone
@Kdisimone
Mar 10 2017 18:45

@logichammer yup...dana got the pr approved already.

http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/papertrail.html

Matt Pressnall
@logichammer
Mar 10 2017 18:46
Dah! Thanks...I should have known better!
Nice looking...many thanks!
Scott Leibrand
@scottleibrand
Mar 10 2017 18:47
@libxmike if you missed that part in the docs, I would re-read. You probably missed other stuff too.
Mike
@libxmike
Mar 10 2017 18:47
@scottleibrand is dev still better as master? for someone who is looping for 6 months
I'm aware of root for explorer board, just try to find other diff
Stephen Chandler
@stephenc95
Mar 10 2017 18:49
Does the signal range between edison and medtronic pump drop if the pump battery gets low? I got a low battery last night, and waited to change it until this morning. The pump was still on, but nightscout shows that openaps wasnt running for most of the night.
Scott Leibrand
@scottleibrand
Mar 10 2017 18:50
@libxmike at the moment, oref0 dev just has a few bug fixes we're planning to release to master within the next week if no blockers come up in testing. So if you're comfortable, feel free to install and test dev.
Dana Lewis
@danamlewis
Mar 10 2017 18:51
@stephenc95 yes, if battery is low the pump turns off RF. So you'll want to set up battery alerts and plan to change battery when pump hits that stage
Mike
@libxmike
Mar 10 2017 18:52
I already setup another one on Rpi3 last week with dev branch which is my main rig
@scottleibrand just I dont see any difference in docs for explorer board so was just wondering
and as I remember I never used master, always dev
bit confused here , which one up to date?
Dana Lewis
@danamlewis
Mar 10 2017 19:10
The latter is the source for the former's display. Can you screenshot on the RTD where you see a typo?
Kate Farnsworth
@ELUTE
Mar 10 2017 19:11
@danamlewis @scottleibrand is there any way for us to add a wifi that has both a username and a password?
Mike
@libxmike
Mar 10 2017 19:12
Screenshot 2017-03-10 20.11.27.png
looks like orefo but it is oref0
Dana Lewis
@danamlewis
Mar 10 2017 19:12
@libxmike well, I meant a screenshot of an example typo :smile: so I could try to find it
Ah
Mike
@libxmike
Mar 10 2017 19:12
soo its not typo as I see now, its font settings
Dana Lewis
@danamlewis
Mar 10 2017 19:13
That may be just the font in RTD
Mike
@libxmike
Mar 10 2017 19:14
this is confusing as 0 looks like o , I dont care as I know but for new ppl may be
Dana Lewis
@danamlewis
Mar 10 2017 19:15
In the grey text for copy and paste code, though, it's clear 0s there
Scott Leibrand
@scottleibrand
Mar 10 2017 19:16
@ELUTE maybe, but I've never done it. you'll need to figure out what type of authentication method it uses, and then Google how to add such a network with wpa_supplicant
Dana Lewis
@danamlewis
Mar 10 2017 19:16
So don't think the font in the header is a big deal in the grand scheme of things, but good flag!
Scott Leibrand
@scottleibrand
Mar 10 2017 19:16
@ELUTE it might be easiest to do it interactively with wpa_cli or similar, but it's not going to be as straightforward as following the docs
@libxmike we've been telling people in Gitter for awhile now to never type things in manually from the docs, but always copy and paste. if you can figure out a better way to communicate that, perhaps somewhere (else?) in the docs itself, that might be a useful PR
Mike
@libxmike
Mar 10 2017 19:20
@scottleibrand this wont be easy w/o editing the html/CSS on the site
This message was deleted
Kate Farnsworth
@ELUTE
Mar 10 2017 19:22
ok thanks Scott. we are having a terrible time at school. big school with concrete means terrible cell service
Scott Leibrand
@scottleibrand
Mar 10 2017 19:24
in that case you might ask the school's IT folks what type of authentication their wifi uses: they should know that at least, even if they don't know how to configure it on Linux
RedCyclist1
@RedCyclist1
Mar 10 2017 19:24
We are having problems getting bluetooth to work. We set it up but when I leave the house it isn't working. What steps should we take to troubleshoot this?
Scott Leibrand
@scottleibrand
Mar 10 2017 19:25
there are some troubleshooting steps in the docs I'd start with
Dana Lewis
@danamlewis
Mar 10 2017 19:25
@RedCyclist1 in addition to the doc steps - make sure hotspot is turned on and left on, but back out before anything connects.
Scott Leibrand
@scottleibrand
Mar 10 2017 19:26
those troubleshooting steps should allow you to troubleshoot basic BT connectivity without leaving the house, so you can leave a serial console session open and see what's going on as you do it
Diabetic_Dude
@diabetic_dude_twitter
Mar 10 2017 19:30
what would be good steps to troubleshoot IFTTT applet commands not working. I have looked at the logs using tail -F /var/log/openaps/pump-loop.log along with my site, and nothing seems to hit
Dana Lewis
@danamlewis
Mar 10 2017 19:33
@diabetic_dude_twitter I'd quadruple check the NS info you're putting in - very easy to typo
Mike
@libxmike
Mar 10 2017 19:40
@scottleibrand where do you install oref0 on explorer board (as root) in /home/root or /home/edison ?
Scott Leibrand
@scottleibrand
Mar 10 2017 19:41
~
Or ~/src/ really
Mike
@libxmike
Mar 10 2017 19:42
sure in ~, then in /home/root
Matthias
@ceben80
Mar 10 2017 20:07
@libxmike have u got a EB w/o customs issues?
RedCyclist1
@RedCyclist1
Mar 10 2017 20:08
Looks like its working, Thanks!
Mike
@libxmike
Mar 10 2017 20:08
@ceben80 no, just helping someone
@ceben80 I may give up on EB
Matthias
@ceben80
Mar 10 2017 20:09
waiting for Sandra :wink:
Mike
@libxmike
Mar 10 2017 20:09
or I may switch to Dana R
when the new RS is out
PieterGit
@PieterGit
Mar 10 2017 20:21
found an potential error with a fresh dev install on rpi3
$ openaps alias show mmtune
mmtune ! bash -c "reset_spi_serial.py 2>/dev/null; find monitor/ -size +5c | grep -q mmtune && cp monitor/mmtune.json mmtune_old.json; echo {} > monitor/mmtune.json; echo -n \"mmtune: \" && openaps report invoke monitor/mmtune.json; grep -v setFreq monitor/mmtune.json | grep -A2 $(json -a setFreq -f monitor/mmtune.json) | while read line; do echo -n \"$line \"; done"
i assume the reset_spi_serial should only be there for explorer boards or when you use /dev/spidev5.1 as pump device. Am I right
?
$ reset_spi_serial.py
bash: reset_spi_serial.py: command not found
because of the redirection to /dev/null it doesn't harm, but i think it's not nice code
Sandra Keßler
@SandraK82
Mar 10 2017 20:25
@ceben80 @libxmike we are busy ironing out the last details of blueReader production. After that we will discuss eb production. Possible even the lower cost variant for pi zero w
Mike
@libxmike
Mar 10 2017 20:28
@PieterGit 2>/dev/null redirects stderr (fd 2) to file
PieterGit
@PieterGit
Mar 10 2017 20:34
@libxmike : yeah, but the problem I found is caused by this line https://github.com/openaps/oref0/blob/4b01147136573aa94765a9b2cdeb1b5785f276c0/lib/oref0-setup/alias.json#L13 . There is no need for reset_spi_serial.py if you don't have a spi-device (e.g. if your using a TI USB or Carelink). The default mmtune alias has this for ALL pump devices. It would be better to split up the mmtune aliases (for readability / maintainability and improved modularisation). for example something like an alias
init-pump-device (which calls reset_spi_serial or initalises ww pumps)
Mike
@libxmike
Mar 10 2017 20:35
@PieterGit yeah I noticed it also months ago but just ignore it or maybe I forgot about it and removed it from script
Matthias
@ceben80
Mar 10 2017 20:37
Great @SandraK82 :+1:
PieterGit
@PieterGit
Mar 10 2017 20:39
@libxmike I'm trying to follow up on @scottleibrand 's advice to not change mmtune alias with sed in openaps.ini, but redefine the alias for ww pumps users to call subg_ww init scripts. still figuring out what is the best way.
PieterGit
@PieterGit
Mar 10 2017 20:44
something (pseudo) code in oref0-setup like
IF ww_pump AND device_spi THEN
  change init-pump alias to  "reset_spi_serial ;  oref0-subg-ww-radio-parameters.sh"
ELSE IF  (NOT ww_pump) AND device_spi THEN
 change init-pump alias to "reset_spi_serial"
ELSE IF  ( ww_pump) AND NOT device_spi THEN
 change init-pump alias to "oref0-subg-ww-radio-parameters.sh"
ELSE
skip, don't change init-pump alias
Paul Dickens
@thebookins
Mar 10 2017 20:45
Is anyone looping offline with G5 and iPhone? School's cell service is patchy so I'm thinking of running a modified version of Loop that does nothing but post the glucose to the Edison xdrip microservice. Does that sound crazy? Is there a simpler solution I missed?
Dana Lewis
@danamlewis
Mar 10 2017 20:46
(@thebookins been hoping someone would port the g5 sniffer code over to linux to make this more seamless/easy to do for g5 offline)
PieterGit
@PieterGit
Mar 10 2017 20:47
@scottleibrand : would this make any sense? perhaps init-pump-comms is a good alias name. How can implement a alias like init-pump-comms that is called before the rest of the mmtune alias?
i don't want this code to break if something changes to the rest of the mmtune logic
Paul Dickens
@thebookins
Mar 10 2017 20:54
Yeah @danamlewis I'd love to run the G5 code on the Edison, but for a quick interim solution thought I'd use Loop to take the cloud out of the loop.
Scott Leibrand
@scottleibrand
Mar 10 2017 21:01
@PieterGit I specifically didn't add the complexity of "do we need to run reset_spi_serial.py" code since running it when not present with 2>/dev/null is a total no-op if the command doesn't exist
PieterGit
@PieterGit
Mar 10 2017 21:02
but i need something similar for the subg_ww init, but that's only for ww pump users
i would assume we don't want to run code / no-op's if it's not needed for that users (call reset_spi if there is no spee, init ww pump if the user has no ww pump)
Scott Leibrand
@scottleibrand
Mar 10 2017 21:03
maybe create init-pump-comms as a bash script and have it run your if/elif/else stuff above?
and then replace the call to reset_spi_serial.py with a call to that bash script?
PieterGit
@PieterGit
Mar 10 2017 21:04
you mean create the init-pump-comms.sh with oref0-setup and call that in the openaps aliases?
Scott Leibrand
@scottleibrand
Mar 10 2017 21:05
no, create an oref0-init-pump-comms, and install it in the package.json
no need to make it an alias
PieterGit
@PieterGit
Mar 10 2017 21:06
ok no alias, but that would append a no-op shell script oref0-init-pump-comms for users that don't use ww pump OR spi device (which aren't that many people i supose)
Scott Leibrand
@scottleibrand
Mar 10 2017 21:06
yeah, the oref0-init-pump-comms script could check for that case and do nothing: that seems like a cleaner solution than what we have now
PieterGit
@PieterGit
Mar 10 2017 21:09
you mean use a standard oref--init-pump-comms script with this logic for all use cases (that can be appended to package.json), or create a openaps instance specific shell script that is created on oref0-setup.sh time, and is configured for each use case
Scott Leibrand
@scottleibrand
Mar 10 2017 21:09
the former
I don't like the idea of creating scripts at config time if we can avoid it
PieterGit
@PieterGit
Mar 10 2017 21:10
but how does such a script derive the openaps dir? (assume that it's current directory is ugly as well)
Scott Leibrand
@scottleibrand
Mar 10 2017 21:10
we have lots of scripts that assume current directory. just have to make sure that anything calling it does the proper cd first
any openaps command requires you to cd first as well, so that's a reasonable expectation
PieterGit
@PieterGit
Mar 10 2017 21:11
but it's a bit ugly :smile:
Scott Leibrand
@scottleibrand
Mar 10 2017 21:12
not really. it makes it so you can run the command from whichever openaps directory you want it to use, and it will just work. that's rather elegant IMO
PieterGit
@PieterGit
Mar 10 2017 21:12
objections of creating a oref0-init-pump-comms.py instead of a oref0-init-pump-comms.sh
Scott Leibrand
@scottleibrand
Mar 10 2017 21:12
nope, as long as you install it as oref0-init-pump-comms or similar (without extension) in package.json
the underlying script can be .sh or .py or .js or whatever
PieterGit
@PieterGit
Mar 10 2017 21:13
ok, i can reuse quite a lot of the subg ww py script for that and it's only called when you mmtune, and not in each loop afaict
Scott Leibrand
@scottleibrand
Mar 10 2017 21:14
yeah, we only call reset_spi_serial right before an mmtune, because it makes the cc1110 forget all its tuning parameters
Mike
@libxmike
Mar 10 2017 21:24

I just noticed error on two new setup rigs with dev branch

subg-ww-radio-parameters:running /usr/local/bin/oref0-subg-ww-radio-parameters for max 30 seconds
Your TI-stick is located at Could not find TI stick, USB device idVendor=1d50, idProduct=8001 Bus 001 Device 004: ID 1d50:8001 OpenMoko, Inc.
+ cd /home/pi/src/subg_rfspy/tools
/usr/local/bin/oref0-subg-ww-radio-parameters: line 22: cd: /home/pi/src/subg_rfspy/tools: No such file or directory
Starting pump-loop at Fri Mar 10 22:21:18 CET 2017:
Radio ok, Listening: ......No pump comms detected from other rigs

any idea ?

Scott Leibrand
@scottleibrand
Mar 10 2017 21:27
you might want to try @PieterGit's branch instead
he's actively fixing all that
openaps/oref0#357 is the PR
currently planning to merge that to dev for further testing after we do a patch release of current dev to master. if it'd make it easier to test if I merge it to a feature branch under openaps/oref0, happy to do that too
Mike
@libxmike
Mar 10 2017 21:30
@scottleibrand the error happens on both, Ti stick and Explorer Board
dan lightner
@danimaniac
Mar 10 2017 21:30
x22/x23 series pumps use rf to communicate with Medtronic sensors, OneTouch Link meters, and Medtronic remotes. The pumps have a corresponding "feature" that can be turned on / off. Which of these features can be turned off and still allow our OpenAPS rig to communicate with the pump? I would like to turn off the sensor feature if possible.
Mike
@libxmike
Mar 10 2017 21:31
@danimaniac you can turn the sensor off
I have on both 522 and 754 off
dan lightner
@danimaniac
Mar 10 2017 21:34
@libxmike done. thanks.
PieterGit
@PieterGit
Mar 10 2017 21:41
@libxmike i just thought of a rather nice solution for changing the mmtune alias with @scottleibrand . will try to fix that on my devww branch
Mike
@libxmike
Mar 10 2017 21:42
@PieterGit thx, will wait , but for now loop works just did not dig in to this problem as does not affect looping
PieterGit
@PieterGit
Mar 10 2017 21:43
mmtune alias does not always work, and can cause miscommunication between pump and ti chip
Mike
@libxmike
Mar 10 2017 21:46
ok ,I see. On Edison w/ Intel mini breakout board never saw this error running on 2-3 months old dev branch and Ti over serial
PieterGit
@PieterGit
Mar 10 2017 21:58
did you install the subg_ww scripts by hand?
Mike
@libxmike
Mar 10 2017 22:00
no, used the oref0-setup
you mean on my old edison?
Diabetic_Dude
@diabetic_dude_twitter
Mar 10 2017 22:43
what is the DoButton App for IFTTT?
dont bother answering still reading
Diabetic_Dude
@diabetic_dude_twitter
Mar 10 2017 22:51
I have set up and run tested my IFTTT buttons, I finally got all of them working when I test, is there an easy way for me to use them with my Iphone now? I see the section in the instructions that talks about setting up buttons to use in the today widget on your iphone but not sure how to set up the dobutton, I am not able to find that on the ifttt site
Dana Lewis
@danamlewis
Mar 10 2017 22:52
it’s just the IFTTT Today Widget
go to your Today screen, scroll to the bottom, and pick the IFTTT widget
Diabetic_Dude
@diabetic_dude_twitter
Mar 10 2017 22:53
I see that
and did that but not seeing how to add the buttons
all I see is get widgets and my applets are not a selection
PieterGit
@PieterGit
Mar 10 2017 22:58
@libxmike i mean: i doubt your 2-3 month old dev running Edison worked "out of the box" with oref0-setup.sh. I assume you manually installed the subg_ww scripts from to make the WW pump work. Is that right?
PieterGit
@PieterGit
Mar 10 2017 23:04
commited my code for the devww branch for tonight. @libxmike @scottleibrand : will try to test this and install it on all my rigs this weekend
Scott Leibrand
@scottleibrand
Mar 10 2017 23:07
:+1:
PieterGit
@PieterGit
Mar 10 2017 23:16

And I dropped the devnul stuff from the mmtune alias. Let's implement a bit of python zen:

  • Errors should never pass silently.
  • Unless explicitly silenced.

Proudly presenting:

 $ oref0_init_pump_comms.py -h
usage: oref0_init_pump_comms.py [-h] [-v] [--version] [-d DIR] [-t TIMEOUT]
                                [-w WAIT] [--pump_ini PUMP_INI]
                                [--ww_ti_usb_reset WW_TI_USB_RESET]
                                [--rfsypy_rtscts RFSYPY_RTSCTS]

Initializes the connection between the openaps environment and the insulin
pump. It can reset_spi_serial and it will initalize the connetion to the World
Wide pumps if necessary

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity
  --version             show program's version number and exit
  -d DIR, --dir DIR     openaps dir
  -t TIMEOUT, --timeout TIMEOUT
                        timeout value for script
  -w WAIT, --wait WAIT  wait time after command
  --pump_ini PUMP_INI   filename for pump config file
  --ww_ti_usb_reset WW_TI_USB_RESET
                        call oref0_reset_usb command or not. Use 'yes' only
                        for TI USB and WW-pump. Default: no
  --rfsypy_rtscts RFSYPY_RTSCTS
                        sets the RFSPY_RTSCTS environment variable (set to 0
                        for ERF and TI USB)
Scott Leibrand
@scottleibrand
Mar 10 2017 23:17
the main reason for the 2>/dev/null was to eliminate page-long tracebacks. :) does/can your script capture those and return a one-line readable error message instead?
PieterGit
@PieterGit
Mar 10 2017 23:19
Current behaviour is similar/better to openaps. Errors are shown, but everything else is minimized by default. Adding a -v will turn DEBUG logging on
Scott Leibrand
@scottleibrand
Mar 10 2017 23:19
including when an underlying component does a traceback?
openaps just passes those through, which is annoying when they're just radio comms errors or something like that
PieterGit
@PieterGit
Mar 10 2017 23:21
i rather have page-long tracebacks than grep line not found stuff in my logs and having to remove the /dev/null parts to see the error. I need to look into the error handling a bit more, but it can be improved. it's too late to start testing now. it seems to install fine now, but i'll stop for tonight
Scott Leibrand
@scottleibrand
Mar 10 2017 23:26
yeah, most developers are fine with tracebacks, but they're kryptonite to most end users, so I want to avoid putting them into end-user logs. :)
Eric
@ecc1
Mar 10 2017 23:31
@danimaniac But it's actually useful to enable either a meter or a remote on the pump (ID can be fake, like all 1s), because that makes the pump listen more frequently for the RF, so it will wakeup more reliably.
PieterGit
@PieterGit
Mar 10 2017 23:31
i would not put end-users logs in /var/log :smile: i agree that normal use cases (including lost connections, not being able to reach a pump, etc) should not fill up diskspace with pagelong exception traces. On the other hand I think the error logging/exception handling can be improved on various places. I'll start with the reset-spi and ww-initialization stuff
David
@dakago
Mar 10 2017 23:44
hello all... how can I see what version of oref0 I'm running?
Scott Leibrand
@scottleibrand
Mar 10 2017 23:48
npm list -g oref0
David
@dakago
Mar 10 2017 23:49
thanks
gregtcm
@gregtcm
Mar 10 2017 23:49
@scottleibrand can you also determine if your are on the master or dev branch?
David
@dakago
Mar 10 2017 23:49
it says
also git branch works
gregtcm
@gregtcm
Mar 10 2017 23:50
is says or git branch ?
sorry it says
it says = it command not found
David
@dakago
Mar 10 2017 23:51
sorry I should talk in complete sentences.... npm list -g oref0 says the branch you are on
gregtcm
@gregtcm
Mar 10 2017 23:52
Oh, mine didn't:
└── oref0@0.4.1
David
@dakago
Mar 10 2017 23:52
ah
cd ~/src/oref0 and then type git branch
maybe it just means you are on master
mine has -dev at the end
gregtcm
@gregtcm
Mar 10 2017 23:53
ok, that worked ... I am in dev using git branch
Thanks!
David
@dakago
Mar 10 2017 23:54
np
Scott Leibrand
@scottleibrand
Mar 10 2017 23:56
the git branch output in ~/src/oref0 is a different thing from which version of oref0 you have installed globally with npm
David
@dakago
Mar 10 2017 23:59
ah ok.. thought it said that was how to determine in docs