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

19th
May 2016
William Fallon
@inform880
May 19 2016 00:00
Yes. Sorry for not being clear. I think it's something to do with not being in raspian, as that's really the only difference.
I'm currently using the one on the mmeowlink setup page
Paul Martin
@Spazholio
May 19 2016 00:00
No worries. I suppose you could manually create the symlink, but I’m pretty curious why udev isn’t doing it for you.
William Fallon
@inform880
May 19 2016 00:01
Yeah, I've been banging my head for a couple hours now about it.
Paul Martin
@Spazholio
May 19 2016 00:02
Is there anything in /var/log/syslog (or wherever Debian logs syslog messages?
Or maybe try dmesg | grep udev to see what it says. Mine just has initialization messages, but if you have errors or something else there, that’d give you a place to start.
Here’s a really silly question - ps -ef | grep udev does show that the daemon’s running, right?
Scott Leibrand
@scottleibrand
May 19 2016 00:06
the device permissions problem is usually solved with the dialout group thing. may need to do the equivalent
William Fallon
@inform880
May 19 2016 00:10
My sys logs are empty? That's weird.
My daemon is running, and I don't
See any errors in dmesg
@scottleibrand dialout group?
Paul Martin
@Spazholio
May 19 2016 00:13
I’m seeing mention of a dialout group here: https://gist.github.com/oskarpearson/b5b24a725a04e4932c33. Not entirely sure what it does, but I maybe Debian locks down some things in the /dev/ directory from direct access unless you’re part of that group?
I know that gist is Edison-specific, but...
William Fallon
@inform880
May 19 2016 00:15
Ok thanks I'll take a look. Also, manually making a symlink results in a permission denied.
Paul Martin
@Spazholio
May 19 2016 00:16
Even with sudo?
William Fallon
@inform880
May 19 2016 00:19
Oops, that works, but then trying to actually use openaps use pump model results in permission denied. Using sudo with that results in this: mmeowlink.exceptions.CommsException: No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?
There's no reason that should happen
Paul Martin
@Spazholio
May 19 2016 00:21
Possibly obvious, but have you run mmtune to make sure the pump’s talking? I get that error periodically when my pump is 2 feet away from my TI stick for no real reason.
William Fallon
@inform880
May 19 2016 00:24
I tried to run that, but it gave a trace back error with a no such file or directory error
That's frustrating
Another vote for the dialout thing. Since Ubuntu is a Debian derivative, I’d say this is definitely something you should try.
Don’t forget to log out/in or reboot after adding yourself to the group.
William Fallon
@inform880
May 19 2016 00:33
Tried adding myself to dialout, did not make a difference to anything it seems like
Paul Martin
@Spazholio
May 19 2016 00:33
Did you reboot after adding yourself?
William Fallon
@inform880
May 19 2016 00:34
Yeah.
Paul Martin
@Spazholio
May 19 2016 00:34
Damn. I was sorta hoping you hadn’t. =/
Does /etc/udev/rules.d/90-mmeowlink.rules exist? If so, what’s in it?
William Fallon
@inform880
May 19 2016 00:37
Yeah,
# symlink for TI Dongle flashed with subg_rfspy firmware
ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="8001", MODE="0664", GROUP="plugdev", SYMLINK+="mmeowlink"
Paul Martin
@Spazholio
May 19 2016 00:38
Ugh.
William Fallon
@inform880
May 19 2016 00:38
I wonder if this could be a lower level problem
Paul Martin
@Spazholio
May 19 2016 00:39
Damn you, you’re making me want to spin up a debian install in a VM really quickly. =)
William Fallon
@inform880
May 19 2016 01:05
Alright, I'm gonna give up for now and try again tomorrow after school. @Spazholio Thanks for the help
Paul Martin
@Spazholio
May 19 2016 01:07
No problem. Good luck, man. Hit me up again, and we can try tomorrow if you’d like.
Matt Pressnall
@logichammer
May 19 2016 02:31
@scottleibrand , documenting AMA and want to ask about these purple prediction lines:
!(http://content.screencast.com/users/loki_mdog/folders/Snagit/media/8baf1f80-bce9-4d5d-b2c6-646cf00d790f/05.18.2016-19.29.png)
Anything you can tell me about them? Three possible outcomes based on xxxx? Is Ella about to go to 0? I doubt it but want to understand so I can talk about it.
Scott Leibrand
@scottleibrand
May 19 2016 02:32
Usually the middle one is the most likely, except right after doing carbs, when the highest one is more likely.
Paul Martin
@Spazholio
May 19 2016 02:33
…I only have 1 purple line! I feel cheated!
Scott Leibrand
@scottleibrand
May 19 2016 02:33
One is based on insulin only, one assumes 10 mg/dL/5m carb absorption, and one is based on current carb absorption.
Matt Pressnall
@logichammer
May 19 2016 02:33
And anything about the lowest? Least likely?
Scott Leibrand
@scottleibrand
May 19 2016 02:33
Lowest is if carbs aren't really there at all.
Matt Pressnall
@logichammer
May 19 2016 02:34
OK...anyway to tell the difference of which is which
ooohhh....good stuff
Dana Lewis
@danamlewis
May 19 2016 02:34
@Spazholio you probably don't have any carb activity happening then
Scott Leibrand
@scottleibrand
May 19 2016 02:34
So as long as you know she ate, ignore that one.
Matt Pressnall
@logichammer
May 19 2016 02:34
Perfect...this is good stuff! Glad I asked
Paul Martin
@Spazholio
May 19 2016 02:34
I do have carb activity though. =/
Scott Leibrand
@scottleibrand
May 19 2016 02:34
Only way to tell diff is by looking at their shape.
Dana Lewis
@danamlewis
May 19 2016 02:34
Yay for documenting :)
Matt Pressnall
@logichammer
May 19 2016 02:34
Anything else?
Scott Leibrand
@scottleibrand
May 19 2016 02:34
@Spazholio what does the OpenAPS pill say for COB? Zero?
Dana Lewis
@danamlewis
May 19 2016 02:35
Have you refreshed @Spazholio ?
Matt Pressnall
@logichammer
May 19 2016 02:35
Anyway to answer @Spazholio issue? I think I have briefly seen one line, too...
Want to address if I can in the docs...
Scott Leibrand
@scottleibrand
May 19 2016 02:35
also scrub back closer to the carbs. Still zero?
if so, check meal.json.
Paul Martin
@Spazholio
May 19 2016 02:35
Ok, I currently don’t have carb activity. But I have never had more than one line, and I’ve looked right after a meal.
Dana Lewis
@danamlewis
May 19 2016 02:35
@logichammer yes worth mentioning that will be one line if no carbs. Three if carb activity, and wha they mean
Matt Pressnall
@logichammer
May 19 2016 02:36
Perfecto! Yes!
Dana Lewis
@danamlewis
May 19 2016 02:36
@Spazholio phone or browser or? I always have to hit refresh in the NS app to see them
Scott Leibrand
@scottleibrand
May 19 2016 02:36
@Spazholio sounds like you're not getting carbs into oref0
Paul Martin
@Spazholio
May 19 2016 02:37
Browser. And I refresh often. And…hmm. The COB pill just had carbs in it a few hours ago due to dinner and all.
Scott Leibrand
@scottleibrand
May 19 2016 02:37
Scroll back to that timeframe and check the purple lines?
Paul Martin
@Spazholio
May 19 2016 02:37
@scottleibrand Do you know which report that is? The “getting carbs into oref0” one?
Will do.
One line
Scott Leibrand
@scottleibrand
May 19 2016 02:38
Should be meal.json
Dana Lewis
@danamlewis
May 19 2016 02:38
@logichammer really glad you're documenting "correct" behavior so we can help spot when someone's successfully finished setup!
Paul Martin
@Spazholio
May 19 2016 02:38
...
My meal.json is empty.
Which makes sense, now that I think about it.
Matt Pressnall
@logichammer
May 19 2016 02:40
Ha! We'll see how the first pass looks but it should help answer questions for folks!
Paul Martin
@Spazholio
May 19 2016 02:40
Alright, I just ate 5g of carbs and entered it into the pump. I’ll check meal.json in a second.
Matt Pressnall
@logichammer
May 19 2016 02:40
I am heading out on GS Campout Friday around noon so I'm planning on doing a PR before then so you guys can check it out.
Scott Leibrand
@scottleibrand
May 19 2016 02:40
For science!
Matt Pressnall
@logichammer
May 19 2016 02:41
Science!
Dana Lewis
@danamlewis
May 19 2016 02:42
:)
Paul Martin
@Spazholio
May 19 2016 02:42
Alright, 5g showing in the COB pill and nothing in meal.json. That report is generated by openaps use meal shell monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json
Which clearly isn’t oref0.
Scott Leibrand
@scottleibrand
May 19 2016 02:43
That's the right device, oref0-meal
probably need more arguments for AMA though.
Check the -h
or setup.sh
Paul Martin
@Spazholio
May 19 2016 02:44
For oref0-meal you mean?
Scott Leibrand
@scottleibrand
May 19 2016 02:44
Ya
Paul Martin
@Spazholio
May 19 2016 02:45
Ah!
usage: [ 'node', '/usr/local/bin/oref0-meal' ] <pumphistory.json> <profile.json> <clock.json> [carbhistory.json] [glucose.json] [basalprofile.json] <— I have everything but carbhistory.json
Scott Leibrand
@scottleibrand
May 19 2016 02:46
I think you can provide an empty / nonexistent carbhistory.json if all your carbs are in pumphistory.
John Benjamin
@Bender1061
May 19 2016 02:47
has anyone else had an issue with getting the MM enlite sensors to work with the 722? I 've tried all the tricks I can think of, and now I'm wondering if my old pump's radio itself is bad (get lost sensor after only a couple minutes), I'm ready to close the loop, I've actually been running it for the past couple days using my 530G and then just having the enact being sent to my 722. So yes should be able to make this work, but I was really hoping not to have to carry around two pumps (one as the CGM the other as the pump) don't want to buy another old pump if I have too.
Paul Martin
@Spazholio
May 19 2016 02:48
Worth a shot.
Dana Lewis
@danamlewis
May 19 2016 02:50
This message was deleted
Paul Martin
@Spazholio
May 19 2016 02:50
That should be created at some point though. It’s generated via ns-meal-carbs. Which doens’t work. Can anyone provide their ns-meal-carbs alias that functions?
Dana Lewis
@danamlewis
May 19 2016 02:50
Is there a Sensor menu on the pump?
Never mind. It does have sensor on it.
@tghoward or someone else using Medtronic sensor may have some insight
John Benjamin
@Bender1061
May 19 2016 02:52
from what I could see online, the sensors will work with all the pumps, backwards compatible (or forwards however you look at it) It's just not approved by the FDA, and yes it does have a sensor in the menu, it's what I used to use with the soft-sensors back in 2008 or so
Scott Leibrand
@scottleibrand
May 19 2016 02:53
I thought x22s couldn't do CGM. Dunno though.
Don't worry about ns-meal-carbs unless you want to enter them that way.
Dana Lewis
@danamlewis
May 19 2016 02:54
There's a sensor menu on my x22. Throw back to the harpoons
John Benjamin
@Bender1061
May 19 2016 02:54
yeah at the time, I had Aetna insurance and they were the first ones to approve of CGM, so I felt like a king at the time, cause I had the CGM with my 722 and no one else did
Paul Martin
@Spazholio
May 19 2016 02:54
@scottleibrand The only reference to carbhistory.jsonin my openaps.ini is in ns-meal-carbs. And that’s how I see it’s generated here as well: https://github.com/scottleibrand/openaps-sh/blob/advanced-meal-assist/setup.sh. Is there another way to get that?
Dana Lewis
@danamlewis
May 19 2016 02:55
:)
Scott Leibrand
@scottleibrand
May 19 2016 02:55
Just touch an empty one. :-)
Paul Martin
@Spazholio
May 19 2016 02:56
Way ahead of you. =)
Just feels….dirty.
Matt Pressnall
@logichammer
May 19 2016 02:56
Meal Assist / WTF was never documented was it? In terms of reports to set up?
Dana Lewis
@danamlewis
May 19 2016 02:56
Not in English. That's also on the wish list :)
dougtakeuti
@dougtakeuti
May 19 2016 02:56
@Bender1061 I have a 722 working with Enlites. Is the minilink new?
Scott Leibrand
@scottleibrand
May 19 2016 02:56
There's an open PR.
Please work off that.
Matt Pressnall
@logichammer
May 19 2016 02:57
Nice...can you send me into it?
John Benjamin
@Bender1061
May 19 2016 02:58
@dougtakeuti what do you mean by the minilink? the Transmiter? It's more than a year old, but it works just fine when I have it connected to my 530G
Scott Leibrand
@scottleibrand
May 19 2016 02:58
Nope, taking off. :-)
Matt Pressnall
@logichammer
May 19 2016 02:59
No worries, I'll see if I can find it
dougtakeuti
@dougtakeuti
May 19 2016 02:59
@Bender1061 Yes, the minilink is the transmitter. Medtronic says that it is only good for one year because of the battery life.
Matt Pressnall
@logichammer
May 19 2016 03:00
If you know who submitted it, that could help but you might be gone already...if so, hello / goodbye!
Paul Martin
@Spazholio
May 19 2016 03:00
Ok, report generated successfully via command line, and I’ve changed my meal.ini and openaps.ini. Now we play the waiting game.
dougtakeuti
@dougtakeuti
May 19 2016 03:01
It tends to loose the sensor when transmitter battery is low. Did you recharge it with a new(less than one month) battery?
Dana Lewis
@danamlewis
May 19 2016 03:01
It's ddaniels1 who was working on it @logichammer . But also just go look at the open PRs , there's only a few and it's one of most recent
Matt Pressnall
@logichammer
May 19 2016 03:02
Got it! Was glad there were only 5 to go through...
John Benjamin
@Bender1061
May 19 2016 03:02
I did charge it, before hand, and that battery is probably about a month old, so I'll give that a shot.
dougtakeuti
@dougtakeuti
May 19 2016 03:03
@Bender1061 I think the newer pumps have improved comms. and that´s why the 530G can pick it up and the 722 can't.
John Benjamin
@Bender1061
May 19 2016 03:04
Another question, has anyone tried to see if they could get two pumps to connect to the same minilink? does the minilink have any comms coming back from the pump or is it just a broadcast device?
dougtakeuti
@dougtakeuti
May 19 2016 03:05
@Bender1061 It just broadcasts to the universe....
John Benjamin
@Bender1061
May 19 2016 03:05
so in theory, I should be able to connect to it with both pumps at once
dougtakeuti
@dougtakeuti
May 19 2016 03:06
I guess...
John Benjamin
@Bender1061
May 19 2016 03:06
no that I have a need for that, as of yet, but just wondering
dougtakeuti
@dougtakeuti
May 19 2016 03:07
That is why it is possible to upload to nightscout using an mmcommander without the pump. we do that at the beach.
Scott Leibrand
@scottleibrand
May 19 2016 03:10
@logichammer want me to just merge that PR?
you willing to make the fixes I suggested in yours?
(got gogo) :-)
John Benjamin
@Bender1061
May 19 2016 03:12
strange, I just went through the two hour process, and I can get it to connect long enough to request a Calibration, but so in the 30 seconds or so, it shows the battery on the transmitter as good, but no ISIG data.
dougtakeuti
@dougtakeuti
May 19 2016 03:16
If you phone Medtronic they will walk you through a few procedures to check it.
John Benjamin
@Bender1061
May 19 2016 03:18
yeah I'll have to give that a shot tomorrow, It's getting to be a long day. Thanks for your help everyone.
ddaniels1
@ddaniels1
May 19 2016 03:20
OK can anyone help with setting up the intel edison? have been all over the web searching for help, tried both linux (via pi) and windows set up, understand mac osx can't use to flash at this time. No luck, can't get on serial, think I probably bricked it
Dana Lewis
@danamlewis
May 19 2016 03:23
@ddaniels1 you've seen the mmeowlink wiki, right? https://github.com/oskarpearson/mmeowlink/wiki
ddaniels1
@ddaniels1
May 19 2016 03:23
Yup. Not working with the pi, have Windows via parallels but that didn't work either when I tried via https://learn.sparkfun.com/tutorials/loading-debian-ubilinux-on-the-edison#install-ubilinux
According to multiple sources mac osx yosemite won't work to flash
Dana Lewis
@danamlewis
May 19 2016 03:24
K. The oskarpearson/mmeowlink would be a good channel to ask in
ddaniels1
@ddaniels1
May 19 2016 03:24
ok will try there thank
s
Dana Lewis
@danamlewis
May 19 2016 03:25
:+1:
Paul Martin
@Spazholio
May 19 2016 03:25
I’ve got purple lines! Wooo!
They are…somewhat difficult to distinguish what they are. =)
Dana Lewis
@danamlewis
May 19 2016 03:26
:)
Scott Leibrand
@scottleibrand
May 19 2016 03:27
Just merged openaps/docs#166
Can I get a volunteer to fix the issues outstanding in that PR?
Paul Martin
@Spazholio
May 19 2016 03:32
The 5 open ones?
(just making sure I’m looking at what you’re referring to)
Dana Lewis
@danamlewis
May 19 2016 03:34
No. Just the comments from 166 as a single pr
Paul Martin
@Spazholio
May 19 2016 03:34
Oh. Good, because I had no clue about the other stuff...
Dana Lewis
@danamlewis
May 19 2016 03:35
:)
Brian Bonner
@itsn0tm3
May 19 2016 03:40
if nobody gets around to it, I can do it tomorrow night. My 2 edisons should arrive then I'll finally have a dev rig to work on instead of mucking around on my production rigs and then freaking out ha
Scott Leibrand
@scottleibrand
May 19 2016 04:00
I just fixed most of them. y'all can do the rest. :)
would be good to get rid of the "make your ini look like this" sections and replace them with actual openaps commands to run. you can crib from my setup.sh
also would be good to get all the report names consistent with what's elsewhere in the docs
Paul Martin
@Spazholio
May 19 2016 04:05
I was actually re-writing some of that doc. Drat. Re-forking now. =)
Scott Leibrand
@scottleibrand
May 19 2016 04:05
no need to re-fork
if you have changes you want to preserve, and they're not directly conflicting, just merge in the latest dev
speaking of, I should fix the master to dev merge conflicts
Paul Martin
@Spazholio
May 19 2016 04:11
I’m a bit git ignorant. I’m working directly on github and really don’t know how to merge the two docs. I’ve got all my changes saved on my local fork. Do I go back to the root of the repo and click “compare”?
Scott Leibrand
@scottleibrand
May 19 2016 04:12
done. also added some notes to make it clearer people need to target dev
you can create a pull request back from openaps/docs dev to your fork dev
if it merges cleanly, you can do so with the green button. if not, it'll give you directions to fix the merge conflicts on the command line
and if it turns out your changes aren't worth merging and you want to start over, that is also fine.
Paul Martin
@Spazholio
May 19 2016 04:58
Alright, PR submitted. I think I’mma go to bed now...
Scott Leibrand
@scottleibrand
May 19 2016 05:01
Looks good, thanks. Merged.
John Sjolund
@sjolundjohn
May 19 2016 07:30
currently stuck with permissions on log folders, which I assume is effecting crontab also
Trying to use chown, before that mkdir, but keep getting:
pi@raspberrypi:~ $ chown -R pi /var/log/openaps
chown: cannot access '/var/log/openaps': No such file or directory
You have new mail in /var/mail/pi
pi@raspberrypi:~ $ mkdir var/log/openaps
mkdir: cannot create directory 'var/log/openaps': No such file or directory
Can anybody spot what I am doing wrong?
Ben West
@bewest
May 19 2016 08:07
personally, I recommend using syslog for logging
instead of > /var/log/openaps you can do | logger -t openaps-loop
if you do that, you can skip creating that directory
if you really want to do it, you can probably do sudo chown -R pi /var/log/openaps
John Sjolund
@sjolundjohn
May 19 2016 08:43
Thanks @bewest I will change it up
pi@raspberrypi:~/openaps-dev $ openaps report invoke monitor/pumphistory.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
monitor/pumphistory.json  raised  CRC does not match page data
Traceback (most recent call last):
Crc does not match Traceback?
John Sjolund
@sjolundjohn
May 19 2016 09:54
restart of pi solved it
John Sjolund
@sjolundjohn
May 19 2016 10:18

@bewest now have a funtioning open look, can send data to Nightscout, tweaking cron.

I can get all info up to Nightscout and it gets refreshed, except blood glucose which has never seemed to work.

Any tips on where to look for how to resolve? I have gone through all setup scripts, gitter etc and can't figure out what problem is

John Benjamin
@Bender1061
May 19 2016 10:51
Well I just spent my first night with the Loop Closed, I still have some work on adjustments, but It went very well, and it did stop me from going low at about 4 this morning, so Yeah This works!
John Sjolund
@sjolundjohn
May 19 2016 10:52
@Bender1061 Nice one!
Matthias
@ceben80
May 19 2016 10:55
:+1:
JaysonEwer
@JaysonEwer
May 19 2016 10:55
👍
John Sjolund
@sjolundjohn
May 19 2016 11:29
I keep having issues with getting cron running now, seems that it is a issue with git reset
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NIGHTSCOUT_HOST=https://XXX
API_SECRET=XXX
* * * * * killall -g --older-than 10m openaps
* * * * * cd /usr/local/bin && oref0-reset-git
* * * * * cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
for reset-git I have also used cd to openaps-dev
JaysonEwer
@JaysonEwer
May 19 2016 11:40
How frequently are you running your cron job?
Matthias
@ceben80
May 19 2016 11:41

@sjolundjohn

*/5 * * * * cd /home/pi/myopenaps && oref0-reset-git 2>&1 | logger -t openaps-loop

I am running oref0-reset-git as shown here without problems every 5 min.

JaysonEwer
@JaysonEwer
May 19 2016 11:43

John Sjolund
@sjolundjohn
May 19 2016 11:43
@ceben80 will test this
JaysonEwer
@JaysonEwer
May 19 2016 11:44
im struggling on my mobile. I have the same, but rather than /5, I have /3
For every 3 min.
John Sjolund
@sjolundjohn
May 19 2016 11:47
Where is output from syslog logger located?
Matthias
@ceben80
May 19 2016 11:47
var/log/messages
John Sjolund
@sjolundjohn
May 19 2016 11:48
No such file or directory - I don't think my look is getting there
Matthias
@ceben80
May 19 2016 11:48
for monitoring try tail -f /var/log/messages | grep openaps-loop
John Sjolund
@sjolundjohn
May 19 2016 11:48

When I look in /var/mail/pi

The last line is:

To: pi@raspberrypi
Subject: Cron <pi@raspberrypi> killall -g --older-than 10m openaps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin>
X-Cron-Env: <NIGHTSCOUT_HOST=https://XXX>
X-Cron-Env: <API_SECRET=XXX>
X-Cron-Env: <HOME=/home/pi>
X-Cron-Env: <LOGNAME=pi>
Message-Id: <E1b3MPt-0003J6-VJ@raspberrypi>
Date: Thu, 19 May 2016 13:47:01 +0200

openaps: no process found
JaysonEwer
@JaysonEwer
May 19 2016 11:52
is your loop running? I wouldn't expect to find an OpenAPS process of your loop isn't running.
In other words, I'm pretty sure that message is fine.
when you run your loop manually time how long it takes, then use that time or slightly more to the frequency you run your loop.
Does that make sense?
John Sjolund
@sjolundjohn
May 19 2016 11:55
@JaysonEwer yes makes sense - I guess I am struggling to confirm if it is running properly. WHen it is open it runs just fine
JaysonEwer
@JaysonEwer
May 19 2016 11:57
Are you using the tail command to monitor your syslog?
The command @ceben80 mentioned above, that is.
John Sjolund
@sjolundjohn
May 19 2016 12:00
yes
Keep getting this:
pi@raspberrypi:~/openaps-dev $ cd /var/log/messages
-bash: cd: /var/log/messages: Not a directory
You have new mail in /var/mail/pi
JaysonEwer
@JaysonEwer
May 19 2016 12:02
You don't need to be in that directory, just issue the command and see if that works.
John Sjolund
@sjolundjohn
May 19 2016 12:08
tried 'grep openaps-loop' and pi has gotten stuck, waiting for it to load
JaysonEwer
@JaysonEwer
May 19 2016 12:09
Try entering the following: tail -f /var/log/messages | grep openaps-loop
John Sjolund
@sjolundjohn
May 19 2016 12:11
Same, still loading, I will wait a while and see what happens
JaysonEwer
@JaysonEwer
May 19 2016 12:12
ps -aux |grep openaps
John Sjolund
@sjolundjohn
May 19 2016 12:14
That did it
 OpenAPS already running || openaps upload ) 2>&1 | tail -f /var/log/messages | grep openaps-loop
pi        2394  0.0  0.1   4276  1816 ?        S    14:02   0:00 grep openaps-loop
pi        2620  0.0  0.2   4608  2372 ?        Ss   14:03   0:00 /bin/bash -c cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | tail -f /var/log/messages | grep openaps-loop
pi        2625  0.0  0.2   4276  1908 ?        S    14:03   0:00 grep openaps-loop
pi        2970  0.0  0.1   4252  1680 pts/0    S+   14:14   0:00 grep --color=auto openaps
Each line starts with OPENAPS already running
JaysonEwer
@JaysonEwer
May 19 2016 12:19
Yes, I think you had your loop running too frequently which is why I asked that earlier. I would go into your crontab and comment out your loop, then monitor ps --aux |grep openaps to ensure all OpenAPS processes are no longer running. Once you see that, then in comment your loop in your cron and save to restart the loop and have it run every 5 min. Then monitor with the `
Tail command.
You could also try the killall command after stopping your loop, but make sure they have all stopped running.
Before restarting it.
John Sjolund
@sjolundjohn
May 19 2016 12:24
@JaysonEwer many thanks - will test and see how it goes
I can't figure why I can't get tail command to work, it just hangs
Rob Kresha
@rkresha
May 19 2016 12:27
tail -f is to follow... will appear to hang
if you just want to to blast the last 10 lines do just tail
Matthias
@ceben80
May 19 2016 12:27
@sjolundjohn or try it run every 2 min....my loop runs every 2 min. One loop cylce last 1:30 min
Rob Kresha
@rkresha
May 19 2016 12:28
@sjolundjohn or maybe I need more context
John Sjolund
@sjolundjohn
May 19 2016 12:28
tail /var/log/messages | grep openaps-loop

@rkresha trying to troubleshoot why cron isn't working. Going to test what @JaysonEwer suggested above. But have not been able to see anything in openaps-loop so far.

My thought is that loop isn't setup right and therefore not even getting to stage of creating data here

Matthias
@ceben80
May 19 2016 12:30
Here a few lines as an example from my loop
pi@openapspi3:~ $ tail -f /var/log/messages | grep openaps-loop
May 19 14:29:10 openapspi3 openaps-loop: Version: subg_rfspy 0.8
May 19 14:29:10 openapspi3 openaps-loop: reporting settings/insulin_sensitivities.json
May 19 14:29:10 openapspi3 openaps-loop: pump://JSON/read_selected_basal_profile/settings/basal_profile.json
May 19 14:29:10 openapspi3 openaps-loop: subg_rfspy status: OK
May 19 14:29:10 openapspi3 openaps-loop: Version: subg_rfspy 0.8
May 19 14:29:10 openapspi3 openaps-loop: reporting settings/basal_profile.json
May 19 14:29:10 openapspi3 openaps-loop: get-profile://JSON/shell/settings/profile.json
May 19 14:29:10 openapspi3 openaps-loop: reporting settings/profile.json
May 19 14:29:12 openapspi3 openaps-loop: curl://text/shell/monitor/glucose.json
May 19 14:29:12 openapspi3 openaps-loop: reporting monitor/glucose.json
May 19 14:29:31 openapspi3 openaps-loop: pump://JSON/read_clock/monitor/clock.json
May 19 14:29:31 openapspi3 openaps-loop: subg_rfspy status: OK
May 19 14:29:31 openapspi3 openaps-loop: Version: subg_rfspy 0.8
May 19 14:29:31 openapspi3 openaps-loop: reporting monitor/clock.json
May 19 14:29:31 openapspi3 openaps-loop: pump://JSON/read_temp_basal/monitor/temp_basal.json
John Sjolund
@sjolundjohn
May 19 2016 12:31
This message was deleted
Rob Kresha
@rkresha
May 19 2016 12:34
@sjolundjohn cron is not great with setting up environments, I'm not to that point yet, but typically I have to source the profile in... this this case source $HOME/.bashrc
cron isn't like an interactive shell, it runs bare bones
John Sjolund
@sjolundjohn
May 19 2016 12:35
where do you place that?
Rob Kresha
@rkresha
May 19 2016 12:35
in front of the reset of your crontab entry
give me a sec
`cd /home/pi/openaps-dev && source .bashrc && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
JaysonEwer
@JaysonEwer
May 19 2016 12:37
@sjolundjohn when you run openaps loop or whatever you called your loop alias, manually, you said it runs fine, right?
Rob Kresha
@rkresha
May 19 2016 12:37
actually source more for a script try just
cd /home/pi/openaps-dev && . .bashrc && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
John Sjolund
@sjolundjohn
May 19 2016 12:38
@JaysonEwer yes it runs fine (minus that I am not getting glucose up to Nightscout but will handle that seperately)
Rob Kresha
@rkresha
May 19 2016 12:39
I'm giving you bad info, give me a sec to clear my comments
John Sjolund
@sjolundjohn
May 19 2016 12:39
# m h  dom mon dow   command
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NIGHTSCOUT_HOST=https://XXX
API_SECRET=XXXX
* * * * * killall -g --older-than 10m openaps
#*/3 * * * cd /home/pi/openaps-dev && oref0-reset-git 2>&1 | tail -f /var/log/messages | grep openaps-loop
*/3 * * * * cd /home/pi/openaps-dev && . .bashrc && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
JaysonEwer
@JaysonEwer
May 19 2016 12:39
Are you using the new Nightscout upload features that Ben just enabled? I haven't played with those commands yet.
John Sjolund
@sjolundjohn
May 19 2016 12:40
@JaysonEwer not sure - have modeled it on the nightscout setup script
Rob Kresha
@rkresha
May 19 2016 12:43
@sjolundjohn I think it would be cleaner to build it into a script file and run it that way. The source and . .profile spawns a new shell which will negate the rest of the line
JaysonEwer
@JaysonEwer
May 19 2016 12:44
/3 * cd /home/pi/Documents/openaps && (openaps loop 2>&1 | logger -t$
-t openaps )
Rob Kresha
@rkresha
May 19 2016 12:45
script would look like this
#!/bin/bash
export NIGHTSCOUT_HOST=https://XXX
export API_SECRET=XXXX
cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
John Sjolund
@sjolundjohn
May 19 2016 12:46
@Rob you want me to replace and test that? Also remove SHELL and PATH I suppose
Matthias
@ceben80
May 19 2016 12:46
That's my loop
*/2 * * * * cd /home/pi/myopenaps && openaps do-loop 2>&1 | logger -t openaps-loop
Rob Kresha
@rkresha
May 19 2016 12:47
@ceben80 he is doing monitoring on the loop
JaysonEwer
@JaysonEwer
May 19 2016 12:47
That is my cron loop, very simple.
Rob Kresha
@rkresha
May 19 2016 12:48
do not disagree, just trying to help facilitate what he is trying to do
Matthias
@ceben80
May 19 2016 12:49
@rkresha only mentioned :wink:
JaysonEwer
@JaysonEwer
May 19 2016 12:50
Just to be clear, there is no need to add monitoring to the loop. You just start the loop and then to keep an eye on it you monitor your syslog with the tail command.
Rob Kresha
@rkresha
May 19 2016 12:50
@sjolundjohn I don't want to take you in the wrong direction, especially if you aren't comfortable with all of the things inside of rpi
Matthias
@ceben80
May 19 2016 12:51
@JaysonEwer yes - thanks
John Sjolund
@sjolundjohn
May 19 2016 12:51
Yup - so far I have not been able to get tail command working, I guess because loop isn't running?
JaysonEwer
@JaysonEwer
May 19 2016 12:52
You can tail any file, tail has nothing to do with loop. :-)
John Sjolund
@sjolundjohn
May 19 2016 12:53
Am I doing something silly?
pi@raspberrypi:~/openaps-dev $ tail -f /var/log/messages | grep openaps-loop
Just hangs
Rob Kresha
@rkresha
May 19 2016 12:53
tail -f hangs onto the and waits for updates
the file*
so ideally you do */2 * * * * cd /home/pi/myopenaps && openaps do-loop 2>&1 | logger -t openaps-loop in cron
John Sjolund
@sjolundjohn
May 19 2016 12:54
@rkresha I did your simple x3 line cron should it should start immediately I believe
Rob Kresha
@rkresha
May 19 2016 12:54
and then at the command prompt to keep an eye on it, to make sure it is actually running, run tail -f /var/log/messages | grep openaps-loop
JaysonEwer
@JaysonEwer
May 19 2016 12:55
It will start in approximately 3 min.
2rather
Rob Kresha
@rkresha
May 19 2016 12:55
@sjolundjohn forget every I said before 3 min ago
everything*... it's too early my head hurts and my fingers aren't working... sorry for the typos and missing words
John Sjolund
@sjolundjohn
May 19 2016 12:57
pi@raspberrypi:~/openaps-dev $ tail -f /var/log/messages | grep openaps-loop
May 19 14:56:01 raspberrypi openaps-loop: /bin/sh: 1: openaps: not found
Rob Kresha
@rkresha
May 19 2016 12:57
now you see what tail -f waits for updates
John Sjolund
@sjolundjohn
May 19 2016 12:57
As a reminder I took away SHELL= and PATH=
Rob Kresha
@rkresha
May 19 2016 12:58
can you show again what you have in your current crontab
John Sjolund
@sjolundjohn
May 19 2016 12:59
#SHELL=/bin/bash
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NIGHTSCOUT_HOST=XXX
API_SECRET=XXX
#* * * * * killall -g --older-than 10m openaps
#*/3 * * * cd /home/pi/openaps-dev && oref0-reset-git 2>&1 | tail -f /var/log/messages | grep openaps-loop
#*/3 * * * * cd /home/pi/openaps-dev && . .bashrc && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
*/2 * * * * cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' && echo OpenAPS already running || openaps upload ) 2>&1 | logger -t openaps-loop
JaysonEwer
@JaysonEwer
May 19 2016 12:59
I have PATH, but no SHELL in my cron.
Rob Kresha
@rkresha
May 19 2016 13:00
PATH is absolutely required... it shows you where to look for 'executables'
JaysonEwer
@JaysonEwer
May 19 2016 13:00
Yep
Rob Kresha
@rkresha
May 19 2016 13:00
in this case openaps is in /usr/local/bin
sorry I have to run, gotta go make money to support my broken pancreas issue
JaysonEwer
@JaysonEwer
May 19 2016 13:01
@sjolundjohn your loop string looks way too complicated to me. @ceben80 and I have quite simple loops in our cron. I'm sure others have more complex loops, but you might want to start with something simple.
John Sjolund
@sjolundjohn
May 19 2016 13:04

Yup I just want super simple - I have commented out as I am testing, I would be happy to just get 'openaps loop' running.

Please feel free to suggestion changes!

Paul Martin
@Spazholio
May 19 2016 13:05
Once you uncommented the PATH, did it work then?
John Sjolund
@sjolundjohn
May 19 2016 13:06
No, still not finding openaps
Could one of you perhaps paste your PATH= line so I can copy it?
Paul Martin
@Spazholio
May 19 2016 13:07
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This message was deleted
And here's the entirety of my loop: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * cd /home/pi/openaps/ && ( ps aux | grep -v grep | grep -q 'openaps loop' || openaps loop ) 2>&1 | tee -a /var/log/openaps/loop.log
Matthias
@ceben80
May 19 2016 13:09
@JaysonEwer yes Jayson and it works since end of February :star2:
JaysonEwer
@JaysonEwer
May 19 2016 13:10
Same here @ceben80 , but mine started mid Jan. :-).
Matthias
@ceben80
May 19 2016 13:11
Okay, you're the winner :smile:
JaysonEwer
@JaysonEwer
May 19 2016 13:11
:-P
Matthias
@ceben80
May 19 2016 13:12
The next challenge will be, one APS for each day of the week :wink:
JaysonEwer
@JaysonEwer
May 19 2016 13:13
:-)
I broke something along the way, but I just recently "fixed" some stuff with my loop. My a1c went from 6.8 in Feb to 7.6 in May, but it's my fault, not OpenAPS's fault.
John Sjolund
@sjolundjohn
May 19 2016 13:15
Still testing and making progress. Many thanks @JaysonEwer @ceben80 @rkresha for hanging out and helping
Dana Lewis
@danamlewis
May 19 2016 13:16
;) @ceben80
@JaysonEwer it’s the immune system’s fault, not yours.
JaysonEwer
@JaysonEwer
May 19 2016 13:17
well, there is something wrong with me. :-/. Besides my pancrease not working. 😀
John Sjolund
@sjolundjohn
May 19 2016 13:17
Sweeet got it running, I removed SHELL= and then added @ceben80 loop. Now I can at least start understanding what is happening and try to optimize
JaysonEwer
@JaysonEwer
May 19 2016 13:18
I'm hopeful though, just wish I felt better. 😏
Sweet @sjolundjohn
Paul Martin
@Spazholio
May 19 2016 13:19
@JaysonEwer Yeah, it's all that negative energy. You should go vegan every other day, paleo on Sundays, and wear lots of magnets. Have you considered trepanation?
JaysonEwer
@JaysonEwer
May 19 2016 13:20
I attribute the way I feel to being rear ended in a car accident.
Dana Lewis
@danamlewis
May 19 2016 13:20
:/
Paul Martin
@Spazholio
May 19 2016 13:20
(my comment was made 100% in jest, by the way)
A car accident? Of all the things I would have thought it could be attributed it to, that was pretty low on my list. Huh.
Matthias
@ceben80
May 19 2016 13:21
my wife is going to be completely crazy....said that stuff is working, what do you want :smile:
as said, one APS for each day of the week :smile: :smile: :smile:
Dana Lewis
@danamlewis
May 19 2016 13:21
hehe
JaysonEwer
@JaysonEwer
May 19 2016 13:21
Yeah, I haven't been right in almost 2 years. @Spazholio I know. :-). I'm on to you...you had me laughing out loud last night/this morning. 😀
Yeah, I'm pumped after getting mealAssist and auto-sens setup the other day.
Nathan Morse
@morsen
May 19 2016 13:23
Hi wonderful peeps. I’m trying hard to finally get this working for my son. I’m stuck right now on gather-profile. Here’s my console output. Might anyone please shed some light? :)
pi@raspberrypi:~/clive-openaps-1 $ cat settings/profile.json 
[{"msg":"Carb ratio data should have an array called schedule with a start and ratio fields.","file":"max_iob.json","data":{"max_iob":2}},{"msg":"Carb ratio should have units field set to 'grams'.","file":"max_iob.json","data":{"max_iob":2}}]
pi@raspberrypi:~/clive-openaps-1 $ cat settings/carb_ratios.json 
{
  "units": "grams", 
  "raw": "0x01 0x00 0x0f 0x13 0x11 0x20 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00", 
  "first": 1, 
  "schedule": [
    {
      "start": "00:00:00", 
      "r": 15, 
      "ratio": 15, 
      "offset": 0, 
      "i": 0, 
      "x": 0
    }, 
    {
      "start": "09:30:00", 
      "r": 17, 
      "ratio": 17, 
      "offset": 570, 
      "i": 19, 
      "x": 1
    }, 
    {
      "start": "16:00:00", 
      "r": 16, 
      "ratio": 16, 
      "offset": 960, 
      "i": 32, 
      "x": 2
    }
  ]
}
Matthias
@ceben80
May 19 2016 13:25
pick up my son from school...cheers, have a nice day :wink:
Nathan Morse
@morsen
May 19 2016 13:27
I’m just confused why it’s expecting those things in max_iob.json.
[report "settings/profile.json"]
use = shell
bg_targets = settings/bg_targets.json
settings = settings/settings.json
basal_profile = settings/basal_profile.json
reporter = text
json_default = True
max_iob = max_iob.json
device = get-profile
remainder = 
insulin_sensitivities = settings/insulin_sensitivities.json
carb_ratios = settings/carb_ratios.json
John Sjolund
@sjolundjohn
May 19 2016 13:33
Where is my logic off when created a nested alias?
openaps alias add nightscout "(openaps status-upload && openaps upload-recent-treatments)"
Nathan Morse
@morsen
May 19 2016 13:50
@sjolundjohn Do you need to add shell stuff to it? ‘! bash -c””'?
John Sjolund
@sjolundjohn
May 19 2016 14:09
Just trying to combine x2 other alias
On cron, it doesn't seem this process ever starts:
*/3 * * * cd /home/pi/openaps-dev && oref0-reset-git 2>&1 | tail -f /var/log/messages | grep openaps-loop
Paul Martin
@Spazholio
May 19 2016 14:23
Add another *
You've only got 4 entries, and you need 5.
John Sjolund
@sjolundjohn
May 19 2016 14:38
thanks
Matthias
@ceben80
May 19 2016 14:54
@bewest Just changing my rig from hotspot to wifi connection, my loop was throwing errors....empty pump.ini
Fortunately retrieving the pump.ini entries from my backp - now the loop is working again.
Scott Leibrand
@scottleibrand
May 19 2016 14:55
@morsen looks like your argument order is wrong: it's getting max_iob.json where it's expecting carb_ratios.json
check your device config
Nathan Morse
@morsen
May 19 2016 14:55
ok i will. thanks
Scott Leibrand
@scottleibrand
May 19 2016 14:58
@Spazholio: 0,5,10,15,20,25,30,35,40,45,50,55 is the same as */5 FYI
Paul Martin
@Spazholio
May 19 2016 14:59
Are you sure? I checked with a linux friend, and he said that there was a slight difference. My way says "do it at :05. :10, etc" whereas */5 says "do it every 5 minutes" but doesn't specify when it starts.
Paul Martin
@Spazholio
May 19 2016 15:03
...huh. TIL. Thanks.
Jarred Yaw
@jyaw
May 19 2016 15:04
hey is there a IFTTT means of generating NS care portal entries?
Scott Leibrand
@scottleibrand
May 19 2016 15:07
I couldn't figure out a way to do that, at least with a NS instance that's properly secured and requires the API secret
the IFTTT maker channel can do GETs, but I can't see a way to provide an API secret
Jarred Yaw
@jyaw
May 19 2016 15:09
Ok, thought that would be the case
Scott Leibrand
@scottleibrand
May 19 2016 15:13
I might've missed something, though, and would love to be proven wrong. :)
Jarred Yaw
@jyaw
May 19 2016 15:22
sure, would be a nice workaround to not having some kind of web/phone/pebble to create these entries
Scott Leibrand
@scottleibrand
May 19 2016 15:23
how would you want to authenticate yourself?
Nathan Morse
@morsen
May 19 2016 15:23
This message was deleted
Scott Leibrand
@scottleibrand
May 19 2016 15:24
I could imagine maybe creating an API endpoint in NS that includes some sort of API key in the URL itself, so you don't have to pass it as a header, but still have to know it...
Jarred Yaw
@jyaw
May 19 2016 15:25
I mean you have to authenticate only once on any device I've used... does that device then know the API_SECRET? Or are you just white-listing the device? If that's the case, it seems you could authenticate IFTTT?
Nathan Morse
@morsen
May 19 2016 15:25

@scottleibrand sorry, I’ve been up all night working on this… :)

Here’s the device:

[device "get-profile"]
fields = settings bg_targets insulin_sensitivities carb_ratios basal_profile max_iob
cmd = oref0
args = get-profile

and here, again, is the report:

[report "settings/profile.json"]
use = shell
bg_targets = settings/bg_targets.json
settings = settings/settings.json
basal_profile = settings/basal_profile.json
reporter = text
json_default = True
max_iob = max_iob.json
device = get-profile
remainder = 
insulin_sensitivities = settings/insulin_sensitivities.json
carb_ratios = settings/carb_ratios.json

Where else is an order defined? Because it seems like the report is setting the right filenames to the right fields.

Scott Leibrand
@scottleibrand
May 19 2016 15:25
@jyaw it gets a cookie that it passes on subsequent requests
@morsen the order in fields = is what matters
check that against oref0-get-profile -h
Jarred Yaw
@jyaw
May 19 2016 15:26
I'm pretty shallow on my interweb dev stuff... can I just get a cookie to the IFTTT recipe?
Scott Leibrand
@scottleibrand
May 19 2016 15:27
@morsen also, check that all the files actually exist when it's being called. some may be missing, causing the arguments to all be shifted left
@jyaw that's what I don't think is possible within IFTTT maker. worth some more research, though. and if you really want to dive in, you could poke around in the NS code and figure out how to make a new API endpoint that lets you do the cookie in the URL instead. :)
Jarred Yaw
@jyaw
May 19 2016 15:30
Interesting, will look into it. I did a quick google and saw some implementations like that floating around - you're talking about where you would shove the Maker channel API_SECRET in the URL itself? Thats def possible...
Scott Leibrand
@scottleibrand
May 19 2016 15:31
Yeah. Would have to make NS understand that kind of request.
Jarred Yaw
@jyaw
May 19 2016 15:32
understood, I might find some time today at lunch and see if there's a way.
Scott Leibrand
@scottleibrand
May 19 2016 15:36
:+1:
Paul Martin
@Spazholio
May 19 2016 15:37
@morsen The only difference I see is that my settings/profile.json has a [] for the remainder entry. What happens when you just invoke the settings/profile.json report?
Nathan Morse
@morsen
May 19 2016 15:40

@scottleibrand Yes, they do all exist. I tried recreating the device and report with a different order and I get the same result.

@Spazholio -

pi@raspberrypi:~/clive-openaps-1 $ openaps report invoke settings/profile.json
get-profile://text/shell/settings/profile.json
Carb ratio data should have an array called schedule with a start and ratio fields.
Carb ratio should have units field set to 'grams'.
reporting settings/profile.json

And settings/profile.json contains:

[{"msg":"Carb ratio data should have an array called schedule with a start and ratio fields.","file":"max_iob.json","data":{"max_iob":2}},{"msg":"Carb ratio should have units field set to 'grams'.","file":"max_iob.json","data":{"max_iob":2}}]
fyi, I updated to 0.10.0 just a little while ago with quick-packages.sh
Nathan Morse
@morsen
May 19 2016 15:48
I changed my settings/profile.json report in openaps.ini so that ‘remainder = []’, and I still see the same behavior.
Paul Martin
@Spazholio
May 19 2016 15:52
What's weird is that I can't find the string "Carb ratio should have units field set" anywhere in the codebase I'm currently running.
Nathan Morse
@morsen
May 19 2016 15:55
maybe it’s a programmatically generated message. again, i’m on a really recent 0.10.0 installation, and if i remove the carb_ratios item altogether, invoking the report gives me this:
{"error":{"errno":34,"code":"ENOENT","path":"[]","syscall":"open"},"msg":"Could not parse carbratio_data. Feature Meal Assist enabled but cannot find required carb_ratios.","file":"[]”}
So, maybe I can disable meal assist, but I don’t know how. :)
Chris Oattes
@cjo20
May 19 2016 15:56
Spazholio: try searching for "should have units" instead?
Scott Leibrand
@scottleibrand
May 19 2016 16:06
remainder = [] is not something you want.
Nathan Morse
@morsen
May 19 2016 16:08
ok
Paul Martin
@Spazholio
May 19 2016 16:10
@cjo20 Good call, I should have thought of that. Stupid day job getting in the way...
@scottleibrand Does it cause problems? I ask because it's in mine and doesn't seem to have caused issues.
Nathan Morse
@morsen
May 19 2016 16:13
So, code, yay. Looking at the code I could see that it expects them in a certain order. Thanks everyone.
Scott Leibrand
@scottleibrand
May 19 2016 16:13
@Spazholio not necessarily. it can cause issues in some corner cases, but it's usually ok.
Paul Martin
@Spazholio
May 19 2016 16:14
I'm not even certain why it's even there. So...I shall remove it.
Dana Lewis
@danamlewis
May 19 2016 16:20
@morsen glad you're making progress. Congrats :)
Nathan Morse
@morsen
May 19 2016 16:30
Thanks!
Hristina Dimova
@xpucuto
May 19 2016 16:36
@scottleibrand I have successfully made my Pi3 as hotpot following these instructions https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/ . I can connect to the new network with my phone but when i try to ssh to 172.24.1.1 with Prompt the server rejects me :(
Do you have any idea what have i done wrong?
Paul Martin
@Spazholio
May 19 2016 16:54
So...I was attempting to submit a PR, but instead of beautiful greeen button, I get something that says "View #135". Does that mean openaps/docs#135 needs to be merged before I can submit my PR? I was just making some tweaks to the "Configuring Automatic Sensitivity and Meal Assist Mode" doc. I re-forked the repo to make sure it was clean after @scottleibrand merged last night, so I can't really go back and just edit.
Dana Lewis
@danamlewis
May 19 2016 17:04
Are you targeting openaps dev docs? Or your fork by accident @Spazholio ?
(Try swapping your forks and see if magic green button appears)
Paul Martin
@Spazholio
May 19 2016 17:08
So, I'm just going to leave my comment up as a testament to my inability to read the docs I helped clean up. Specifically the SECTION I helped clean up. twitch
Dana Lewis
@danamlewis
May 19 2016 17:09
Hey look! A pr! Nice work :)
Paul Martin
@Spazholio
May 19 2016 17:11
facepalm
Ok, so I swear several people told me that looping causes the battery in the pump to drain insanely quickly. Like they last around a week. Does that sound right? Or is that just if you have multiple rigs running or something?
Dana Lewis
@danamlewis
May 19 2016 17:14
It's even in the docs somewhere ;)
Lithiums last around a week. Standard lasts 2-3 days.
Paul Martin
@Spazholio
May 19 2016 17:18
I know, I read, I promise! =) I only ask because my lithium's been in my pump for 5-6 days, and I still have 4 "bars" on the icon. Wasn't sure if the bars don't really change until the battery keels over or what. The pill on NS is showing 1.37v (I have my warning env variable set to 1.39) so...do lithiums die differently than regular alkalines?
Andrew Baugh
@baughaw
May 19 2016 17:19
My lithium batteries in my 522 show full bars until they die suddenly
Dana Lewis
@danamlewis
May 19 2016 17:19
Yea. When they go, they go fast. So the NS alarms are important. The docs have details on recommending the level for the alerts )I don't remember top of my head)
It'll trigger to 3 bars and alert, then look later and goes "back" to 4 bars, and then a few hours later poof, low battery mode and no looping for you til you change battery
Paul Martin
@Spazholio
May 19 2016 17:21
I set the 1.39 in there due to something I read on the NS site. =) Ok, so as long as I respond quickly to the first low battery mode, I should be fine. I always have an extra battery or two on hand anyway.
Dana Lewis
@danamlewis
May 19 2016 17:24
(Probably double check the openaps docs, not sure the NS docs would be talking about lithium). But yes: good rule of thumb is just don't go to sleep without changing battery once you get a battery alert
Paul Martin
@Spazholio
May 19 2016 17:24
Sounds like a plan, thanks.
Dana Lewis
@danamlewis
May 19 2016 17:25
:+1:
Jarred Yaw
@jyaw
May 19 2016 18:48
I was just able to send a labelled email to myself and Maker created a BG entry on my NS site
Scott Leibrand
@scottleibrand
May 19 2016 18:51
nice. what did you have to change to make that work?
Andrew Baugh
@baughaw
May 19 2016 18:52
Jarred, away way you could document the steps to set that up?
Jarred Yaw
@jyaw
May 19 2016 18:52
ummmmm... kinda funny. nothing, just followed the api definitions for treatments in the body json. Did a POST web request in the Maker Channel
Scott Leibrand
@scottleibrand
May 19 2016 18:53
hmm, do you not have API secret turned on?
Jarred Yaw
@jyaw
May 19 2016 18:53
not really sure why it worked honestly, I guess it doesnt check for authentication when you do a POST?
what would I check to see that?
Jarred Yaw
@jyaw
May 19 2016 18:58
doh... I had it in the connection strings section but not in app settings
fixed and re-trying... hopes are low now haha
Ben West
@bewest
May 19 2016 19:00
interesting
Jarred Yaw
@jyaw
May 19 2016 19:01
well still worked
I did add MAKER_KEY and the corresponding Maker Channel key to my azure website app settings
before i tried the first time
Scott Leibrand
@scottleibrand
May 19 2016 19:05
hmm, you added the maker channel key to nightscout? I wonder how that works
Jarred Yaw
@jyaw
May 19 2016 19:05
I guess I could always take it out and see if it still works then...
so it appears that the MAKER_KEY is unnecessary
that last test was successful
in my test I'm passing the following body in the Maker POST:
'''
{ "created_at" : "2016-05-19T16:00:22.559Z", "glucose" : "200", "glucostType" : "Finger" }
'''
Jarred Yaw
@jyaw
May 19 2016 19:12
{ "created_at" : "2016-05-19T16:00:22.559Z", "glucose" : "200", "glucostType" : "Finger" }
I just shifted it around by an hour each test to see if the new guy showed up. The unique additions show up in the treatments.json as well
Scott Leibrand
@scottleibrand
May 19 2016 19:13
hmm, that is concerning
perhaps @jasoncalabrese or someone else more familiar with NS can speak to what should be required to POST entries and treatments, and why that might not be getting enforced in this case
William Fallon
@inform880
May 19 2016 19:56
So I'm back from yesterday, still trying to get openaps to run on regular debian. I'm basically stuck at trying to get it to use the TI stick, it doesn't seem to want to. I can see it using lsusb, and I have everything installed, just udev doesn't want to assign it a symlink, and when I override that, it never has communicated with my pump due to it saying it has no communication, or a write timeout error

Here's the error:

raise CommsException("No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?")
mmeowlink.exceptions.CommsException: No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?

But I know it isn't, as it was just working on my current rig 5 minutes ago.

Andrew Baugh
@baughaw
May 19 2016 20:08

@bewest I was setting up a new pi using the template approach. Seems like everything was going well until it ran this report ("settings/selected-basal-profile.json)

All the other reports seem to be working up until this point under the do-everything alias.

I am using a medtronic 522

No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 48, in main
    reporters.Reporter(report, device, task)(output)
  File "/home/pi/src/openaps/openaps/reports/reporters/__init__.py", line 27, in __call__
    self.blob = self.serialize(data)
  File "/home/pi/src/openaps/openaps/reports/reporters/__init__.py", line 25, in serialize
    return self.method.serialize(render(data), self)
  File "/home/pi/src/openaps/openaps/vendors/process.py", line 56, in prerender_json
    return json.loads(data)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
Andrew Baugh
@baughaw
May 19 2016 20:27
The Settings/Setting.json report also fails. Am I missing something with the " copy-fresher"?
Lukasz Kaniowski
@lukasz-kaniowski
May 19 2016 20:48
Hi guys, did anyone use openaps on pi to upload glucose data into nightscout?
dougtakeuti
@dougtakeuti
May 19 2016 21:00
@lukasz-kaniowski I do it in a kind of crude way, using Medtronic Enlite.
prepare_nsglucose = !bash -c "rm -f upload/*; openaps report invoke upload/cgm-ns-raw.json && mm-format-ns-glucose upload/cgm-ns-raw.json upload/cgm-ns.json"
up_glucose_to_ns = ns-upload-entries upload/cgm-ns.json upload/cgm-nsdone.json

[report "upload/cgm-ns-raw.json"]
device = pump
hours = 0.5
use = iter_glucose_hours
reporter = JSON
@lukasz-kaniowski and then include the up_glucose_to_ns alias in my loop.
Lukasz Kaniowski
@lukasz-kaniowski
May 19 2016 21:06
cool, thanks @dougtakeuti. quick google return this https://openaps.readthedocs.io/en/dev/reference/ns/ns-upload-entries.html Do I need to pass ns api key somewhere?
ok, I found it https://github.com/openaps/oref0/blob/master/bin/ns-upload-entries.sh , it just env variables, time to try it out
dougtakeuti
@dougtakeuti
May 19 2016 21:11
I define it in cron and in .profile. When testing manually you need to export it
In cron:
NIGHTSCOUT_HOST=http.....
API_SECRET=hashcode
export NIGHTSCOUT_HOST="http.....keepthequotes"
export API_SECRET="hashcodewithquotes"
William Fallon
@inform880
May 19 2016 21:45
Anybody know what this error means? libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented I get it when I run lsusb
Ben West
@bewest
May 19 2016 22:48
@baughaw the names of reports from template might not match the docs per se..... requires some translation and some PRs into the docs :-(
the templates reflect some of my newer suggestions that haven't made it into the docs yet
Stephan
@MosiGitHub
May 19 2016 22:51
@danamlewis , @scottleibrand @bewest @jasoncalabrese @jmatheson and all the others: great representation of Openaps at the symposium :clap: I really like what you are doing and I can feel especially what you are saying @jasoncalabrese concerning the nights as a father. By the way it is already close to 1 am in Germany ;-P
Scott Leibrand
@scottleibrand
May 19 2016 22:52
:-)
Dana Lewis
@danamlewis
May 19 2016 22:54
@MosiGitHub :)
Stephan
@MosiGitHub
May 19 2016 22:58
what was the thing about having the choice - at least :-D
taking a look at Nightscout now...Great ... Loop is working :+1:
Dana Lewis
@danamlewis
May 19 2016 22:59
;) :)
Stephan
@MosiGitHub
May 19 2016 22:59
so I can stay in my cellar room for the next hour ;-)
Andrew Baugh
@baughaw
May 19 2016 23:38
@bewest Thanks Ben, seems like it doesn't like the copy-fresher command. I just removed it for now and everything seems good to go. The templates seem to make this a whole lot faster to get up and running.
Stephan
@MosiGitHub
May 19 2016 23:43
@scottleibrand : did my first temp target stuff right now. ....and the loop was reacting :+1:
Scott Leibrand
@scottleibrand
May 19 2016 23:43
:-D
amoskane
@amoskane
May 19 2016 23:51
hey guys, I’m looking for more info on the “nightscout latest-openaps-treatment $NIGHTSCOUT_HOST” command needed to get your latest treatments up to nightscout.
it ran successfully yesterday at noon, but when i run it now it still thinks that’s the latest treatment.
i had to reclone my repo this morning, but I can’t figure out what could have changed that’s not in the repo— the repo has all my stuff from yesterday.