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

27th
Sep 2016
Eric Jensen
@elnjensen
Sep 27 2016 00:48 UTC
If you want quotes inside quotes, you need to either use different kinds of quotes, or escape the quotation marks. Easiest in your case would be to replace your outer quotes with single quotes, like so:
bash -c 'grep -i "missing required input fields" /home/pi/openaps/oref0-enacted/enacted-temp-basal.json'
Otherwise it matches the open quote before grep with the close quote before missing.
The other approach is escaping with backslashes, e.g.
bash -c "grep -i \"missing required input fields\" /home/pi/openaps/oref0-enacted/enacted-temp-basal.json"
but it can get unreadable quickly. If you just need two different kinds, just use " and '.
Just keep in mind that if you want to have environment variables like $HOME interpreted inside quotes, they need to be double ("), not single (').
Dana Lewis
@danamlewis
Sep 27 2016 00:55 UTC
@itsn0tm3 I think someone else had that, but I don’t remember if the resolution was a fix on their end or a fix to the script. Which hardware are you using? @scottleibrand
Brian Bonner
@itsn0tm3
Sep 27 2016 01:24 UTC
@danamlewis @scottleibrand Was using it on Ubilinux Edison, let me try my Pi again and see if it has the same problem.
Brian Bonner
@itsn0tm3
Sep 27 2016 01:39 UTC
could it be that I was using my hashed API secret instead of the actual API secret itself?
I know the old way was to use the hashed one but maybe the script during setup requires the unhashed one? (Now I have a hankering for hash browns.. hmm.. )
waiting for the old upload from my other rig to expire to see if the script rig updates NS
dougtakeuti
@dougtakeuti
Sep 27 2016 01:45 UTC
@itsn0tm3 I have the same problem right now with the Pi. At the moment I am trying to figure out why my upload/latest-treatments.json file is empty.
Brian Bonner
@itsn0tm3
Sep 27 2016 01:55 UTC
@dougtakeuti Ooh I just realized mine is empty too
one other amusing thing is that line "Glucose.json newer than PumpHistory" is always newer, even though the 5 minute delay for Glucose hasn't passed by yet for some reason
My latest-treatments is full now
guess it just needed to run for another loop
and now it's empty again
what the heck
I just saw it full, now it's empty hmm
I wonder if something is deleting it before uploading it
Brian Bonner
@itsn0tm3
Sep 27 2016 02:00 UTC
my pi seems to be working slightly better than the edison, I see the basals updating
just did a 0.1 bolus to see what shows up
just to record it here I saw:
-rw-r--r-- 1 pi pi   902 Sep 26 21:56 latest-treatments.json
-rw-r--r-- 1 pi pi  1272 Sep 26 21:56 ns-status.json
-rw-r--r-- 1 pi pi 31338 Sep 26 21:56 pumphistory-entries.json
then I saw
-rw-r--r-- 1 pi pi     3 Sep 26 21:58 latest-treatments.json
-rw-r--r-- 1 pi pi  1231 Sep 26 21:58 ns-status.json
-rw-r--r-- 1 pi pi 31335 Sep 26 21:58 pumphistory-entries.json
David
@davidkeddydb
Sep 27 2016 02:03 UTC
@danamlewis Is there a write up of your latest really small rig that you built somewhere? Apologize if already asked and you have already answered
Brian Bonner
@itsn0tm3
Sep 27 2016 02:05 UTC
hmm now I see:
-rw-r--r-- 1 pi pi   761 Sep 26 22:04 latest-treatments.json
-rw-r--r-- 1 pi pi  1299 Sep 26 22:05 ns-status.json
-rw-r--r-- 1 pi pi 31741 Sep 26 22:05 pumphistory-entries.json
the pump loop is running now
ah hmm
now it looks like
-rw-r--r-- 1 pi pi     3 Sep 26 22:05 latest-treatments.json
-rw-r--r-- 1 pi pi  1299 Sep 26 22:05 ns-status.json
-rw-r--r-- 1 pi pi 31741 Sep 26 22:05 pumphistory-entries.json
looks like something is working but then something else is deleting the data
well the 0.1 bolus just showed up on NS
so looks like something is working
guess something is fishy on my edison
but now my pebble isn't updating
blah
brb scarfing down a quick dinner before I hit the sack, I unfortunately have a nice early AM flight out tmw morning
Brian Bonner
@itsn0tm3
Sep 27 2016 02:19 UTC
well oddly my Pi seems to be doing OK
the meal bolus is showing up
but my dexcom decided to join in on the fun by doing a nice Signal Loss on me
Scott Leibrand
@scottleibrand
Sep 27 2016 02:25 UTC
@itsn0tm3 are you using an oref0-setup loop or a custom one?
Brian Bonner
@itsn0tm3
Sep 27 2016 02:28 UTC
@scottleibrand Your new oref0-setup
Scott Leibrand
@scottleibrand
Sep 27 2016 02:29 UTC
Are you passing it the plain API secret?
Brian Bonner
@itsn0tm3
Sep 27 2016 02:29 UTC
I passed it the hashed one
The Pi seems to be doing OK, the edison is not-so-OK
I set both up the same way interestingly
Scott Leibrand
@scottleibrand
Sep 27 2016 02:30 UTC
It's supposed to require the plain secret.
Brian Bonner
@itsn0tm3
Sep 27 2016 02:30 UTC
Oh.
Let me try the setup again
Scott Leibrand
@scottleibrand
Sep 27 2016 02:36 UTC
It says that in the usage, but probably need to figure out a way to test it during setup and explicitly warn if it's wrong...
garykidd
@garykidd
Sep 27 2016 02:36 UTC
How quickly do lithium batteries go...say once they reach 1.26v.....should I change tonight or wait til tomorrow AM?
Brian Bonner
@itsn0tm3
Sep 27 2016 02:37 UTC
@scottleibrand interesting thing for you, it seems to have recognized it was hashed because the ns.ini is exactly the same between the two different setups
actually my bad
it's different
yea that was probably it
let me try changing the edison to that
garykidd
@garykidd
Sep 27 2016 02:39 UTC
sorry AAA pump battery ^^
Brian Bonner
@itsn0tm3
Sep 27 2016 02:44 UTC
@garykidd I don't remember but I think someone said once it hits 1.13 you should replace it
I think its somewhere on the openaps site
garykidd
@garykidd
Sep 27 2016 02:45 UTC
has anyone explored possibility of downgrading firmware with medtronic pumps...or maybe this is impossible?
Brian Bonner
@itsn0tm3
Sep 27 2016 02:46 UTC
good link about the batties
sorry about the spam, hopefully the collapse I just did works on everone
@garykidd I wouldn't go on what I said, I really don't use lithiums so I don't know
and yes I think someone tried to get medtronic to do a downgrade and I don't think they were willing
Brian Bonner
@itsn0tm3
Sep 27 2016 02:53 UTC
@scottleibrand one feedback I would have about your oref0-setup loop would be to be more specific about the error somewhere
for example I see this: Listening: ....................................................................................................Error, retrying
on my edison loops (for some reason my TI stick is being really fussy on the edison) and it's hard to see if it's that or something else based on it going "Error" :)
my custom loop was a bit more vocal about what was killing it off
Scott Leibrand
@scottleibrand
Sep 27 2016 03:00 UTC
Yeah, I am halfway through creating a preflight that will check the stick first before starting with Listening.
@garykidd it won't last until morning.
Or at least there's a good chance it won't. I replace them before bed if they hit 1.35 or so.
@itsn0tm3 but I'm leaning towards doing that in the setup script, not in the loop itself
I just added an openaps mmtune in oref0-setup (before the cron step) to try to catch obvious misconfigurations
but not sure if that's verbose enough on errors
Brian Bonner
@itsn0tm3
Sep 27 2016 03:04 UTC
I see the mmtune kick in sporadically
but on the edison I never really see it kick in much
Scott Leibrand
@scottleibrand
Sep 27 2016 03:04 UTC
I don't want every single comms failure printing a traceback, that's for sure
Brian Bonner
@itsn0tm3
Sep 27 2016 03:05 UTC
heh agreed
Scott Leibrand
@scottleibrand
Sep 27 2016 03:06 UTC
fwiw, Listening: ....................................................................................................Error, retrying means that openaps wait-for-silence never returned "No comms detected" after 100 tries
Dana Lewis
@danamlewis
Sep 27 2016 03:06 UTC
@davidkeddydb no worries, here’s the writeup on the tiny explorer board rig: https://diyps.org/2016/09/15/openaps-rigs-are-shrinking-in-size/ (still no updates on exact time, other than waiting to hear back from spark fun and we’re still making some tweaks to improve the boards, too!)
Brian Bonner
@itsn0tm3
Sep 27 2016 03:08 UTC
@scottleibrand interesting, what happens if mmtune errors out, will it just give an error for that too
I just ran mmtune manually and it's asking me if I'm using the right port and all that
I've noticed with the edison I have to do that a few times hten it'll just hum along just fine
with me changing nothing
Scott Leibrand
@scottleibrand
Sep 27 2016 03:09 UTC
no, the openaps mmtune alias does openaps report invoke monitor/mmtune.json 2>/dev/null >/dev/null
so it will hide the traceback
if yours is producing errors we could experiment with maybe something like openaps report invoke monitor/mmtune.json 2>&1 | tail -1 or something
Brian Bonner
@itsn0tm3
Sep 27 2016 03:11 UTC
I'd love to but I need to crash, getting on a plane in 7 hours :(
Scott Leibrand
@scottleibrand
Sep 27 2016 03:11 UTC
k, have a good night
Brian Bonner
@itsn0tm3
Sep 27 2016 03:11 UTC
Will use the Pi, can play with it more tmw night at the hotel
thanks! night
Tim Mecklem
@tmecklem
Sep 27 2016 03:55 UTC
Newest member of the tiny computer pancreas club.jpg
Round 2 of edison + SRF. Getting smaller and hoping for Explorer Board soon :)
The first board is in use looping with a 722 and enlite, but having some trouble with the cgm upload to nighscout. I think there’s some weird data that the loop can handle but the recent-missing-entries.json can’t handle properly. If I move the mm-format-ns-glucose.json file into the recent-missing-entries.json location and run the uploaded entries report directly, it pushes cgm data to nightscout. It’s just the recent-missing-entries part that’s broken.
Tim Mecklem
@tmecklem
Sep 27 2016 04:01 UTC
Anyway, not here to troubleshoot, but rather to post another successful rig build. It’s talking to my wife’s pump just fine from mostly across our small house.
Scott Leibrand
@scottleibrand
Sep 27 2016 04:03 UTC
nice. if you (or anyone else here) wants to volunteer to take an oref0-setup loop dir and switch it over to using the ns device for upload, that's one of the next things we need
Tim Mecklem
@tmecklem
Sep 27 2016 04:04 UTC
I’ve been watching the oref0-setup work from a distance so far. I haven’t had time to use it personally yet.
I need to set up another couple of Edisons for backups, so I could try it out when I get to those.
Maybe another week or so til I get to them.
Matthias
@ceben80
Sep 27 2016 05:47 UTC
@scottleibrand Q: I'm reading 288 BGs, but meal.json shows this...
{ "carbs": 0, "reason": "not enough glucose data to calculate carb absorption" }
Tim Street
@tim2000s
Sep 27 2016 05:48 UTC
Are they consecutive @ceben80 ? I found if there were gaps that meal.json threw the same error.
Matthias
@ceben80
Sep 27 2016 05:50 UTC
gaps in BG readings?...don't know just had a quick look into this json file
didn't have any missed BG readings
only want a quick validation wheter AMA is working....
John Sjolund
@sjolundjohn
Sep 27 2016 07:56 UTC

@scottleibrand @danamlewis Back in the office and allowed my Pi 3 w/ Carelink rig to run vai Crontab, after the setup script issues yesterday.

I can confirm that it was "npm run global-install" that solved the issue.

I was upgrading an old (app April 2015) rig with the script. I doubt this will happen for others, but may be worth trying to automate in the script.

hope it helps

John Sjolund
@sjolundjohn
Sep 27 2016 08:12 UTC

I am having some issues with my Edison rig stopping in the middle of the night.

a) It is powered on and I can connect via SSH in the morning
2) After a reboot it seems to work fine
3) oref0 is not corrupt
4) Looking at tail I cannot immediately see anything

Any suggestions how / where to dig in to try to determine what has happened? IE are there better logs on the edison or openaps that I should checkout?

Chris Oattes
@cjo20
Sep 27 2016 09:11 UTC
What exactly do you mean by 'stopping'?
John Sjolund
@sjolundjohn
Sep 27 2016 12:05 UTC
@cjo20 I wake up and the loop has not run in hours. The Edison is still powered up, I can access - no reason why it should not have connection with pump etc.

Further, it doesn't happen consistently - just something that causes the automation to stop.

What I did not test this morning, which I should have, is if I could run it manually before rebooting

Tim Street
@tim2000s
Sep 27 2016 12:08 UTC
I was seeing that as an issue, but the logs were showing that it was a USB HID error on my sgv data collection device that caused the issue. Are your logs empty? Both /var/log/open-aps/pump-loop and the good old /var/log/messages?
John Sjolund
@sjolundjohn
Sep 27 2016 12:15 UTC
I need to dig through logs which I will do
Chris Oattes
@cjo20
Sep 27 2016 13:19 UTC
I'd guess the pump is too far away / buried under you
garykidd
@garykidd
Sep 27 2016 13:29 UTC
How do you create a sensor age pill on NS?
Russell Gardner
@RussGG
Sep 27 2016 13:43 UTC
@sjolundjohn Thanks John. It might be a few days before I can put some more time in on this. One issue is getting good uploads to NS when my son is at his mom’s. two days ago he reset the time on his phone to fool one of his video games and that killed dexcom. Ughhhhhh.
John Sjolund
@sjolundjohn
Sep 27 2016 13:44 UTC
@RussGG indeed - with a DYI solution you do get challenges like this sometimes. Though the benefits are tremendous.
Gina
@gclyon
Sep 27 2016 13:56 UTC
@C-Ville I have installed the local instance of NS w MongoDB to pi3... Where do I edit the my.env file? I've done a search for where this might be, but nothing. Do I create this file?
Lynne Butts
@flutelynne_twitter
Sep 27 2016 14:44 UTC
@garykidd put "sage" without the quotes, in your Enable part of nightscout settings.
Colin Lennon
@colinlennon
Sep 27 2016 15:53 UTC
@C-Ville sorry for the delay in replying. Yeah, could be a Cyanogen-specific issue I guess. I haven't had a chance to try installing Nightscout locally on Yocto yet, but when I have time, I might give it a try. My loop already runs offline but I'm still reliant on an internet connection for entering temp targets on NS to trigger Eating Soon mode and Activity Mode.
@C-Ville Your setup sounds great now though! I'm really looking forward to the Explorer and RiledUp boards being available to see how much smaller we can go :smile:
@sjolundjohn The logs should give more information on what the issue is. I had an issue a while back because of the way I had implemented retries in my loop. If I was far away from the rig when it did a preflight, it'd fail to tune and use the default frequency, then go into a continual retry where it tried to execute the main part of the loop but never succeeded because it was tuned to a frequency where it'd never be able to talk to the pump. I got it fixed, but I'm sure the new setup scripts will help other people from making the same mistake I had made.
If your issue was something similar to mine, you'd be able to see in your logs that it constantly spits out errors about being unable to communicate with the pump.
Gina
@gclyon
Sep 27 2016 16:02 UTC
Need help understanding why my loop often recommends "1.18" temp basal. I think this always happens when my bg is in target range.
cat enact/suggested.json
{"temp":"absolute","bg":121,"tick":"+6","eventualBG":158,"snoozeBG":158,"mealAssist":"Off: Carbs: undefined Boluses: undefined ISF: 30, Target: 145 Deviation: 12 BGI: 1.16","reason":"158-158 in range: no temp required, temp 1.175 ~ req 1.2U/hr"}
my regular rate is 1.2/hr
Chris Oattes
@cjo20
Sep 27 2016 16:04 UTC
I guess that means the last basal it set was 1.175u/hr. 1.175u/hr is close enough to 1.2 that it doesn't bother setting a new rate
Gina
@gclyon
Sep 27 2016 16:04 UTC
ahh ok
David
@davidkeddydb
Sep 27 2016 16:05 UTC
So I have an Edison on the way along with a TI stick, spark fun block, battery, etc. What are most of you using for a case or are most using the elastic band method?
Gina
@gclyon
Sep 27 2016 16:05 UTC
for awhile i started thinking it kept using an old file or something
Chris Oattes
@cjo20
Sep 27 2016 16:05 UTC
@gclyon I think the margin is set to 10%
Dana Lewis
@danamlewis
Sep 27 2016 16:33 UTC
@gclyon there’s a feature (you can turn off if y ou want) also where it will keep setting the same temp that’s your regular basal if you don’t need any adjustments, aka a “neutral temp’, and it will do the closest it can do in a half hour, so that 1.175 rounds to 1.18 which is the closest it can do to what you’d get in a half hour from a 1.2
@davidkeddydb several people use a 3D printed case; I use a soft tallygear case with a clear window so I can see lights & easily charge; some people rubber band/hair band ;) YDMV so your case usage will also likely vary ;)
depends a lot on whether it’s getting shoved in pockets (and if you have guy-sized pockets) or thrown in a bag or more gently used.
garykidd
@garykidd
Sep 27 2016 16:36 UTC
Do SAGE alarm settings work same as CAGE, ALert, Warn, etc.?
@flutelynne_twitter thanks.....
Lynne Butts
@flutelynne_twitter
Sep 27 2016 16:42 UTC
I never set mine up for an alarm, but the number in the sage pill will turn read, as do the iage and cage.
I just had to turn down an invitation to participate in a trial of a new faster-acting insulin from Novo because I wouldn't have been able to loop for the 6-month study period. :-(
Dana Lewis
@danamlewis
Sep 27 2016 16:44 UTC
oooh that’s tough @ecc1 :/
Chris Oattes
@cjo20
Sep 27 2016 16:44 UTC
how fast is faster-acting?
My first question too; all they'd tell me is that's what the study is trying to quantify, but they believe quicker onset with comparable total bg-lowering effect.
Dana Lewis
@danamlewis
Sep 27 2016 16:46 UTC
We’ve looked into it - I think it’s similar tail but faster peak
David
@davidkeddydb
Sep 27 2016 16:46 UTC
@danamlewis Thanks. Let me see if I can get it flashed once it arrives and I will figure it. Many thanks
Dana Lewis
@danamlewis
Sep 27 2016 16:47 UTC
:+1:
Chris Oattes
@cjo20
Sep 27 2016 16:48 UTC
they need a shorter tail too
if they could, say, halve the DIA, it'd be really interesting
Lynne Butts
@flutelynne_twitter
Sep 27 2016 16:51 UTC
@garykidd You’re welcome. There is more information in the readme part for “grilled cheese” on the CGM in the Cloud FB page.
C-Ville
@C-Ville
Sep 27 2016 17:24 UTC
@gclyon the my.env needs to be in your NS directory. @SandraK82 has a nice skript for installation set up where you could steal a my.env :-)
Sandra Keßler
@SandraK82
Sep 27 2016 17:27 UTC
my.env can be anywhere, just needs to be configured in the loadscript or in the start command
C-Ville
@C-Ville
Sep 27 2016 17:27 UTC
@colinlennon how did you set up your offline loop? my problem was to get the calibrated CGM values into my loop.
They are trialling faster as part in the U.K. Shortly and recruiting participants but CGM isn't allowed.
Also need an Hba1C of 7-9% ahead of the trial.
That's for you @cjo20
The only thing that is anywhere near what you want is Afrezza.
Scott Leibrand
@scottleibrand
Sep 27 2016 18:07 UTC
@sjolundjohn how is your TI stick connected? I've seen issues like that with my usb-connected TI stick. I added in some checks to automatically reboot if detected. I think this is the most important one: */5 * * * * lsusb | grep OpenMoko || sudo reboot
Gina
@gclyon
Sep 27 2016 18:54 UTC
@C-Ville and @SandraK82, since this is local, I shouldn't need to add in bridge info in my.env, correct?
(I have a g5 receiver plugged in on pi)
Gina
@gclyon
Sep 27 2016 19:00 UTC
@SandraK82 , and now for the dumbest question... how do i view this local nightscout?
Sandra Keßler
@SandraK82
Sep 27 2016 19:01 UTC
@gclyon i dont know what you mean with bridge info
@gclyon viewing is via [ip of your raspi/edison]:1337
garykidd
@garykidd
Sep 27 2016 19:17 UTC
Do people place ti stick inside pi case? as opposed to external usb....looks like there is enough room to fit it.
C-Ville
@C-Ville
Sep 27 2016 19:21 UTC
I would assume you could depending on your pi case. I did not do it on my pi three, because I would then need to disable BT and map the UART port accordingly, plus I would need to ask someone to reflash the firmware I guess
garykidd
@garykidd
Sep 27 2016 19:25 UTC
why would you need to disable BT, necessarily?
C-Ville
@C-Ville
Sep 27 2016 19:26 UTC
as far as I know BT is mapped to the UART that you will need to connect the TI to
Scott Leibrand
@scottleibrand
Sep 27 2016 19:35 UTC
@C-Ville is describing connecting the TI stick via serial cables, which requires switching the Pi's serial console over to talk to the TI stick instead, the same way you'd do for a Slice of Radio: https://github.com/oskarpearson/mmeowlink/wiki/Pi-With-Slice-of-Radio
@garykidd were you thinking about connecting the TI stick that way, or via USB?
in any event, trying to optimize the size of a full-size Pi rig seems less optimal than going with one of the smaller Edison or Pi Zero rigs.
fiberfan
@fiberfan
Sep 27 2016 19:58 UTC
From looking at http://openaps.readthedocs.io/en/master/_images/Can_I_close_the_loop_with_this_pump_May_20_2016.jpg I am almost positive a 722 with firmware 2.40 and no PC Connect on the Utilities menu will work for OpenAPS. Just wanted to post here in case I am missing the obvious. Today seems to be back to 'normal' behavior after 5 days of needing significantly less insulin from mid morning to late evening so OpenAPS is looking better and better!
Dana Lewis
@danamlewis
Sep 27 2016 20:00 UTC
correct, it should work; see the 522/722 on the second row of model numbers on left under Medtronic?
John Sjolund
@sjolundjohn
Sep 27 2016 20:26 UTC

@scottleibrand I think you are on to something. I have the TI stick connected via USB OTG in the Breakout board. Since I use the Sparkfun Powerboost, on J21, it works. I have however noted that when I reboot it does not power the TI stick up properly and I have to plug/unplug. When I boot from fresh it works fine.

I think that I may need to live with this until the new board is done since alternative is to solder.

Scott Leibrand
@scottleibrand
Sep 27 2016 20:27 UTC
@sjolundjohn is it consistent every boot? I find that sometimes it doesn't power up on reboot, and sometimes it does. and sometimes it loses track of the stick after it's been working fine
John Sjolund
@sjolundjohn
Sep 27 2016 20:28 UTC
@scottleibrand I believe it is, but I haven't tried to reboot many times in a row to test. Going to do it right now
Scott Leibrand
@scottleibrand
Sep 27 2016 20:29 UTC
I wonder if there's a way to power-cycle the USB bus without a full reboot like there is on the Pi
John Sjolund
@sjolundjohn
Sep 27 2016 20:52 UTC

@scottleibrand so just learned something interesting. If you reboot when the TI stick is powered up before reboot. It does not get enough power to start.

If you reboot when the stick is dead, then it starts up.

So with my logic the script above should work

Will test
Scott Leibrand
@scottleibrand
Sep 27 2016 20:59 UTC
:+1:
Sandra Keßler
@SandraK82
Sep 27 2016 21:31 UTC
at the eleventh hour... #wearenotwaiting #diabetes #bluereader #fundraising
http://unendlichkeit.net/wordpress/?p=236&lang=en
fiberfan
@fiberfan
Sep 27 2016 21:32 UTC
@danamlewis I saw it on the list, thus the almost sure. Thanks!
garykidd
@garykidd
Sep 27 2016 22:06 UTC
do these look to be OK..or do they not work this way...
blob
garykidd
@garykidd
Sep 27 2016 22:36 UTC
@scottleibrand was just curious in general about creating a better form factor for current Rp3 rig. I will establish an edison one eventually...have ll parts I need ...well absent a pump/ti stick that will work reliably enough. Still stuck withthis damn rf issue
garykidd
@garykidd
Sep 27 2016 22:45 UTC
was thinking of ti stick via usb but somehow within Rp3 case if possible/ideally.
Scott Leibrand
@scottleibrand
Sep 27 2016 22:49 UTC
you'd either need to still have the USB cable sticking out and wrapping around to the inside somehow, or you'd have to do some soldering to make the USB ports point inward (not worth it IMO)
@garykidd have you not been able to use the TI stick because of the mmtune issue? have you tried bypassing tuning and just setting a good default?
garykidd
@garykidd
Sep 27 2016 22:54 UTC
@scottleibrand I have tried setting default frequency the other night via the default frequency parameter specified in mmtune.py.....for some reason when I ran it though...it defaulted to initial standard default freq...and not the one I had specified in mmtune.py was thinking maybe some of the work you had helped with earlier may have impacted what I was trying to do. SO..yeah, still stuck unfortunately. Was trying to see if I can get hands on a third pump maybe.
garykidd
@garykidd
Sep 27 2016 23:05 UTC
hoping someone can maybe walk me through creating a hex file with better default freq so that I can flash that to TI stick. Turns out is probably wasn't the button being pushied in as much as it was button being touched which presumably changed the reception of the pump.
maybe I'llhang out in oskarpearson/mmeowlink for some help hopefully.
Scott Leibrand
@scottleibrand
Sep 27 2016 23:10 UTC
ah, interesting. were you able to repro successful mmtune while touching but not pressing buttons?
garykidd
@garykidd
Sep 27 2016 23:10 UTC
if I manage to chang ethat hex file then maybe I can find a way to avoiding running mmtune inadvertently and having that subsequently fail.
Scott Leibrand
@scottleibrand
Sep 27 2016 23:10 UTC
I'm curious why you weren't able to just change the mmtune default freq that it picks if mmtune fails
garykidd
@garykidd
Sep 27 2016 23:15 UTC
so tried to nano home/pi/mmeowlink-source/mmeowlink/mmtune.py
Scott Leibrand
@scottleibrand
Sep 27 2016 23:16 UTC
what exactly did you change? did you commit it to github or anything?
garykidd
@garykidd
Sep 27 2016 23:16 UTC
hmmm...no I just control x and overwrote the file....
Scott Leibrand
@scottleibrand
Sep 27 2016 23:17 UTC
what exactly did you change?
if the change is still there, you can see it with git diff
garykidd
@garykidd
Sep 27 2016 23:20 UTC
changed this in mmtune.py
class MMTune:
  FREQ_RANGES = {
    'US': { 'start': 916.300, 'end': 916.900, 'default': 916.708 },
changed the 916.636 to 916.708...
Scott Leibrand
@scottleibrand
Sep 27 2016 23:21 UTC
and when you ran mmtune, did it report that it was setting 916.708 with usedDefault: true?
garykidd
@garykidd
Sep 27 2016 23:23 UTC
no, but I dont know what I ran incorrectly....when I ran mmtune again.... got...
], 
  "setFreq": 916.63, 
  "usedDefault": true
Scott Leibrand
@scottleibrand
Sep 27 2016 23:23 UTC
so you probably never installed your change
garykidd
@garykidd
Sep 27 2016 23:23 UTC
after it showed 99's across the board
that sounds right...how do I install it?
git push?
Scott Leibrand
@scottleibrand
Sep 27 2016 23:24 UTC
sudo pip install -e . in your mmeowlink directory. similar to https://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink#setup
but instead of checking out oscar's master branch, you're installing your own modified version
garykidd
@garykidd
Sep 27 2016 23:32 UTC
so would that be in this directory actually.... /home/pi/mmeowlink-source/bin/
that's where my mmtune.py is
Scott Leibrand
@scottleibrand
Sep 27 2016 23:32 UTC
no, up one directory (no /bin/)
garykidd
@garykidd
Sep 27 2016 23:32 UTC
ok.
hmmmm...still didnt work......
916.63 was picked as 'default'
pi@raspberrypi:~/mmeowlink-source $ sudo pip install -e .
Obtaining file:///home/pi/mmeowlink-source
  Running setup.py (path:/home/pi/mmeowlink-source/setup.py) egg_info for package from file:///home/pi/mmeowlink-source

Requirement already satisfied (use --upgrade to upgrade): argcomplete in /usr/local/lib/python2.7/dist-packages/argcomplete-1.4.1-py2.7.egg (from mmeowlink==0.8.5)
Requirement already satisfied (use --upgrade to upgrade): decocare in /home/pi/src/decocare (from mmeowlink==0.8.5)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg (from mmeowlink==0.8.5)
Requirement already satisfied (use --upgrade to upgrade): pyserial in /usr/local/lib/python2.7/dist-packages (from mmeowlink==0.8.5)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python2.7/dist-packages/six-1.10.0-py2.7.egg (from python-dateutil->mmeowlink==0.8.5)
Installing collected packages: mmeowlink
  Running setup.py develop for mmeowlink

    Creating /usr/local/lib/python2.7/dist-packages/mmeowlink.egg-link (link to .)
    mmeowlink 0.8.5 is already the active version in easy-install.pth
    Installing mmeowlink-bolus.py script to /usr/local/bin
    Installing mmeowlink-any-pump-comms.py script to /usr/local/bin
    Installing mmeowlink-rf-dump.py script to /usr/local/bin
    Installing mmeowlink-send.py script to /usr/local/bin
    Installing mmtune.py script to /usr/local/bin

    Installed /home/pi/mmeowlink-source
Successfully installed mmeowlink
Cleaning up...
and then
garykidd
@garykidd
Sep 27 2016 23:37 UTC
pi@raspberrypi:~/APS301 $ openaps use pump mmtune
{
  "scanDetails": [
    [
      "916.300", 
      0, 
      -99
    ], 
    [
      "916.324", 
      0, 
      -99.......................................and same across the board......



 [
      "916.876", 
      0, 
      -99
    ]
  ], 
  "setFreq": 916.63, 
  "usedDefault": true
anything obvious?
Scott Leibrand
@scottleibrand
Sep 27 2016 23:42 UTC
try which mmtune.py and then look at the contents of the resulting file
probably /usr/local/bin/mmtune.py or similar
see if your change is in there
garykidd
@garykidd
Sep 27 2016 23:43 UTC
pi@raspberrypi:~/APS301 $ which mmtune
pi@raspberrypi:~/APS301 $
wait....wtf?
Scott Leibrand
@scottleibrand
Sep 27 2016 23:44 UTC
that's different
I said which mmtune.py
there is no command just called mmtune
garykidd
@garykidd
Sep 27 2016 23:44 UTC
I'm laughing that I didnt see that
got it.
(for the moment anyway)
and , yes, correct /usr/local/bin/mmtune.py
Scott Leibrand
@scottleibrand
Sep 27 2016 23:46 UTC
try just mmtune.py
garykidd
@garykidd
Sep 27 2016 23:51 UTC
hmmmm...tried from APS301 (my instance directory) 99s and 96.63 (not the one I was hoping for.....so I navigated to /usr/local/bin/ and ran mmtune.py (thinking that's probably right)....but nada...same exact result
Scott Leibrand
@scottleibrand
Sep 27 2016 23:55 UTC
running mmtune.py doesn't depend on which directory you're in
garykidd
@garykidd
Sep 27 2016 23:56 UTC
Got it.
ANy idea why it isnt working?
Scott Leibrand
@scottleibrand
Sep 27 2016 23:56 UTC
let me test it later on my own rig and confirm that does what I expect.
at work right now
garykidd
@garykidd
Sep 27 2016 23:57 UTC
@scottleibrand Thanks man.