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

16th
Feb 2016
Aaron Michelson
@Aaybob
Feb 16 2016 00:01
although the first time I ran upload-recent-treatments it showed
$ openaps upload-recent-treatments
[{"_type":"CalBGForPH","_description":"CalBGForPH 2016-02-15T11:03:15 head2, body[0] op[0x0a]","timestamp":"2016-02-15T11:03:15-08:0,"glucoseType":"Finger","notes":"Pump received finger stick.","medtronic":"mm://openaps/mm-format-ns-treatments/CalBGForPH","created_an":{"_type":"TempBasalDuration","_description":"TempBasalDuration 2016-02-15T13:45:34 head2, body[0] op[0x16]","timestamp":"2016-02-":"2016-02-15T13:45:34-08:00","absolute":1.1,"rate":1.1,"raw_rate":{"_type":"TempBasal","temp":"absolute","_description":"TempBasal 20,"_head":"332c","rate":1.1,"_date":"22ad0d4f10"},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal"square":{"_type":"Bolus","_description":"Bolus 2016-02-15T11:03:34 head[4], body[0] op[0x01]","timestamp":"2016-02-15T11:03:34-08:00"unknown head[5], body[0] op[0x5c]","_body":"","_head":"5c05a86014","data":[{"amount":4.2,"age":352}],"_date":""}],"programmed":4.3,"du6-02-15T11:03:34-08:00","created_at":"2016-02-15T11:03:34-08:00","carbs":57,"ratio":"13","bg":"109","glucose":109,"glucoseType":"Bolus0]":0,"_description":"BolusWizard 2016-02-15T11:03:34 head2, body[13] op[0x5b]","timestamp":"2016-02-15T11:03:34-08:00","_body":"3953,"unabsorbed_insulin_total":0,"correction_estimate":0,"carb_input":57,"_head":"5b6d","unabsorbed_insulin_count":"??","_byte[7]":0,"bo,"notes":"Square wave bolus for 30 minutes\nProgrammed square 4.3\nDelivered square 4.3\nSuccess: 100%\nFood estimate 4.3\nCorrection5\nGlucose was: 109","medtronic":"mm://openaps/mm-format-ns-treatments/Meal Bolus","enteredBy":"openaps://medtronic/522"}]pi@raspberry
p
Jim Matheson
@jmatheson
Feb 16 2016 00:04
it will only upload recent treatments if you have had a treatment since last time you uploaded. has there been a recenty treatment entered into the pump in the last couple of hours (either manually or via a loop)?
Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:04
If the timezone or something is of that could prevent uploads
Jim Matheson
@jmatheson
Feb 16 2016 00:05
yea, just read what you said again. sounds like you have a more recent change.
i had an issue earlier today related to timezone and my blue line not working :) per jason, run date and make sure it is set to your current time/zone
Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:07
What does openaps latest-ns-treatment-time show
Aaron Michelson
@Aaybob
Feb 16 2016 00:08
yes date is correct but latest-ns-treatment-time is off
$ date
Mon 15 Feb 16:06:40 PST 2016
pi@raspberrypi:~/pancreas/First-commit $ openaps latest-ns-treatment-time
2016-02-15T13:45:34-08:00
p
Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:10
So that is from before and isn't filtering, do the new temps show in your zoned history file?
Aaron Michelson
@Aaybob
Feb 16 2016 00:13
No, nothing recent in there.
Jim Matheson
@jmatheson
Feb 16 2016 00:13
check the date stamp on pump-history-zoned.json file. how long ago was it created?
Aaron Michelson
@Aaybob
Feb 16 2016 00:14
15:01 but time is 14:13
or 4:13......16:13
Jim Matheson
@jmatheson
Feb 16 2016 00:14
so 75 minutes ago-ish?
Aaron Michelson
@Aaybob
Feb 16 2016 00:15
yes, that's when I was first creating the tz file
Jim Matheson
@jmatheson
Feb 16 2016 00:15
it sounds like your pump-history-zoned is either not running before your try to upload your treatments, or when it tries to run it crashes out.
find where it gets created and run that alias to see what happens
since you’ve had so many issues with “ization”, you might want to also run grep ization *.ini and make sure ization does not still live anywhere in any of your ini files.
Aaron Michelson
@Aaybob
Feb 16 2016 00:19
nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json
is my only reference to "pumphistory-zoned"
Jim Matheson
@jmatheson
Feb 16 2016 00:19
do you a file called visualize/pumphistory-zoned.json ?
Aaron Michelson
@Aaybob
Feb 16 2016 00:20
I don't think I ever call that file
Jim Matheson
@jmatheson
Feb 16 2016 00:20
make sure the file names match
maybe it is called pump-history-zoned in once place but pumphistory-zoned in another
Jason Curry
@mccgm
Feb 16 2016 00:22
What folder is your pumphistoryzoned saved in?
Aaron Michelson
@Aaybob
Feb 16 2016 00:25
the "nightscout" program uses "pumphistory-zoned.json" and "model.json" but the "pumphistory-zoned.json" file is not invoked anywhere else....Is "nightscout" supposed to do that.....The documentation does not show ever invoking the file "pumphistory-zoned.json"
docs show to add these three aliases
latest-ns-treatment-time = ! bash -c "nightscout latest-openaps-treatment $https://greenscreen.azurewebsites.net | json created_at"
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json $(openaps latest-ns-treatment-time) > visualize/latest-treatments$
upload-recent-treatments = ! bash -c "openaps format-latest-nightscout-treatments && test $(json -f visualize/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload $NIGHTSCOUT_H$
Jim Matheson
@jmatheson
Feb 16 2016 00:28
do you have a history alias?
if so, what is it
Aaron Michelson
@Aaybob
Feb 16 2016 00:30
I don't have a "history" alias
Jim Matheson
@jmatheson
Feb 16 2016 00:30
that’s probalby why you did not have the model.json either when you asked about it before
Aaron Michelson
@Aaybob
Feb 16 2016 00:31
satus-upload, gather-profile, last_four_hours, monitor-pump, monitor-cgm, preflight, loop, gather, enact, lastest-ns-treatment-time, format-latest-nightscout-treatments, upload-recent-treatments
Jason Curry
@mccgm
Feb 16 2016 00:31
What are the contents of your visualize folder?
Aaron Michelson
@Aaybob
Feb 16 2016 00:31
$ ls visualize
clock-zoned.json latest-treatments.json pumphistory-zoned.json read_battery_status.json read_status.json reservoir.json
p
should I look up docs to find a "history" alias?
Jason Curry
@mccgm
Feb 16 2016 00:33
I dont have one
what is the timestamp in your pumphistoryzoned?
Aaron Michelson
@Aaybob
Feb 16 2016 00:34
I'm pretty sure I didn't skip a portion of docs
Jim Matheson
@jmatheson
Feb 16 2016 00:34
where are you in the docs?
Aaron Michelson
@Aaybob
Feb 16 2016 00:35
Phase 3: visualis and monotr
Jim Matheson
@jmatheson
Feb 16 2016 00:36
This message was deleted
Aaron Michelson
@Aaybob
Feb 16 2016 00:37
pumphistory-zoned.json only gets called in this command : nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json
Is that sufficient or am I missing a refernce to pumphistory-zoned.json in an alias
Jason Curry
@mccgm
Feb 16 2016 00:37
If you cat vizualize/pumphistory-zoned.json, what's in there?
Jim Matheson
@jmatheson
Feb 16 2016 00:37
if you look back at the visualization page
it says...Note that a pumphistory-zoned.json report is required, which can be generated from pumphistory.json using tz, following the approach described above for clock-zoned.json.
Aaron Michelson
@Aaybob
Feb 16 2016 00:38
"pumphistory-zoned.json" is a two hour old file
Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:38
It's created using the tz device
Jim Matheson
@jmatheson
Feb 16 2016 00:38
so you need to set that up
Aaron Michelson
@Aaybob
Feb 16 2016 00:39
I"ve worked on that, let me ask some questions about how that is done.
Jim Matheson
@jmatheson
Feb 16 2016 00:39
hey, @jasoncalabrese that’s kind of cheating :)
but i always look for the answers in the back too
Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:40
It didn't completely work, but good to pull parts from
The full script
Aaron Michelson
@Aaybob
Feb 16 2016 00:41
I executed that command from the command line once....does it need to be executed more than once......all previous add report commands were executed once......they are all now in the opneaps.ini file
$ ls visualize
clock-zoned.json latest-treatments.json pumphistory-zoned.json read_battery_status.json read_status.json reservoir.json
pi

See in the section below that I did not create a new vendor as I did for timezones. Is there a command similar to what I did for timezones that uses "openapscontrib.xxxxxxxx"?
[vendor "openapscontrib.timezones"]
path = .
module = openapscontrib.timezones

[device "tz"]
vendor = openapscontrib.timezones
extra = tz.ini

[device "NS_UpLoad"]
vendor = openaps.vendors.process
extra = NS_UpLoad.ini

[report "visualize/clock-zoned.json"]
use = clock
reporter = JSON
astimezone = False
date = None
adjust = missing
input = monitor/clock.json
device = tz
timezone = PST

[report "visualize/read_status.json"]
device = pumpbuilding
use = read_status
reporter = JSON

[report "visualize/reservoir.json"]
device = pumpbuilding
use = reservoir
reporter = JSON

[report "visualize/read_battery_status.json"]
device = pumpbuilding
use = read_battery_status
reporter = JSON

[report "visualize/pumphistory-zoned.json"]
use = rezone
reporter = JSON
astimezone = False
date = timestamp dateString start_at end_at created_at
adjust = missing
input = monitor/pumphistory.json
device = tz
timezone = PST

Jim Matheson
@jmatheson
Feb 16 2016 00:45
so let’s go back again and see if you can run the report. not sure that happened in the flurry of messages. openaps report invoke visualize/pumphistory-zoned.json or whatever you have the path set up as
Aaron Michelson
@Aaybob
Feb 16 2016 00:48

yes I can run it manually. I'm trying to find out if it needs to be run in a loop. The documentation refered back to these lines of code
$ openaps vendor add openapscontrib.timezones
$ openaps device add tz timezones
$ git add tz.ini
$ openaps report add monitor/clock-zoned.json JSON tz clock monitor/clock.json

adnd said to do that again
the only part I could do again was the last line
I could not find a similar openaps vendor add openapspcontrib.xxxxxxx
so I skipped doing the first three command lines

Jason Calabrese
@jasoncalabrese
Feb 16 2016 00:48
I think you had an
issue with adding the tz device earlier
Jim Matheson
@jmatheson
Feb 16 2016 00:50
Yes, it needs to be in your loop because each time we need to zone the history file for NS.
Aaron Michelson
@Aaybob
Feb 16 2016 00:50
Documentation never shows it being called.
Jim Matheson
@jmatheson
Feb 16 2016 00:50
OK jason is proably right, run openaps report add monitor/pumphistory-zoned.json JSON tz rezone monitor/pumphistory.json || die "Can't add pumphistory-zoned.json” again.
Ben West
@bewest
Feb 16 2016 00:52
if the docs don't have it in the loop, consider a bug in the docs ;-)
Jason Curry
@mccgm
Feb 16 2016 00:53
I started out really confused if I should put the aliases in a separate cron job or in my main loop. I ended up putting it in my main loop and it works great.
Jim Matheson
@jmatheson
Feb 16 2016 00:55
then, it needs to go into the loop process. i have an alias called history history = report invoke monitor/model.json monitor/pump-history.json monitor/clock-zoned.json monitor/pumphistory-zoned.json which runs those few items
i also pull the clock, but i do that in preflight
Aaron Michelson
@Aaybob
Feb 16 2016 00:56
I'm going to add the invoke pumphistory-zoned.json to the main loop
Jim Matheson
@jmatheson
Feb 16 2016 00:56
that works, just make sure it is after you run pump-history.json
so you pull the pump history and then do the zoned formatting needed for ns
Jim Matheson
@jmatheson
Feb 16 2016 01:02
also, double check that clock-zoned is also in the loop as well. not sure if that made the documentation either.
Lack of documentation seems to be around this step https://github.com/openaps/oref0/blob/dev/bin/ns-uploader-setup.sh#L101
Jim Matheson
@jmatheson
Feb 16 2016 01:07
specifically adding the last zoned reports.
Aaron Michelson
@Aaybob
Feb 16 2016 01:12
I believe my loop is running now. In the documentation for the second of the last three aliases we could change the documentation....I'd do it myself but havent yet figured out how....change to:
format-latest-nightscout-treatments = ! bash -c "openaps report invoke visualize/pumphistory-zoned.json && nightscout cull-latest-openaps-treatments visualize/pumphistory-zoned.json model.json $(opena$
I invoke the report....and that's from doing just what's called for in the documentations
Jim Matheson
@jmatheson
Feb 16 2016 01:13
in the visualization doc it says "At this point, you may want to update your monitor-pump alias to make sure that it produces all the required reports, so that uploading status to Nightscount can be automated."
Aaron Michelson
@Aaybob
Feb 16 2016 01:14
so the aliases may have worked for testers because they had not followed the documentation
Jim Matheson
@jmatheson
Feb 16 2016 01:14
not a ton of direction but a nod to what needs to be done
Aaron Michelson
@Aaybob
Feb 16 2016 01:16
And in the final section it refers to that paragraph and says do a similar treatment to what you did there. Would that be like winking instead of waving to someone 100 yards away?
Jim Matheson
@jmatheson
Feb 16 2016 01:17
you should have seen how much documentation there was a month ago :)
it’s come a long way
Aaron Michelson
@Aaybob
Feb 16 2016 01:17
Yea, I started a month ago.
And the visualization page is there now, except for the last little part....and its so dificult to be so close
I'm hoping to spare the next gal/guy the dissapointment/expectation cycle
Jim Matheson
@jmatheson
Feb 16 2016 01:21
sounds like it is time for you to do your first PR :)
Aaron Michelson
@Aaybob
Feb 16 2016 01:22
walk me through calling in Git.....I've been waiting for a chance to ask someone.....they keep saying "use the gui".....I can't intuitively opereate the gui.
Jim Matheson
@jmatheson
Feb 16 2016 01:23
as long as you realize i am using this exercise with you as practice for me who is not really that far ahead of you
Aaron Michelson
@Aaybob
Feb 16 2016 01:24
yup sounds good
clicked open git-hub
double clickd on docs
Jim Matheson
@jmatheson
Feb 16 2016 01:26
The general idea is you want to make a copy of the dev branch of the documentation. Then make edits to it that you think should happen. Double check that they look good to you on your copy. Then make a few notes for what you did. Then do a pull request, which is to ask the pros to pull your changes back into the dev branch of the main repository. At which time they will do a quick review and merge your changes in. Conceptually make sense?
Aaron Michelson
@Aaybob
Feb 16 2016 01:26
yup got it so far
Jim Matheson
@jmatheson
Feb 16 2016 01:27
So you can go to https://github.com/openaps/docs and hit Fork in the upper right to make your own copy
then it will take you to your copy
in the branch drop down on the left change it from master to dev, because you are going to update that branch.
then click down to the file you want to fix, and make your changes
and save them
making a quick note to what you changed and why
Aaron Michelson
@Aaybob
Feb 16 2016 01:31
Okay,, heres how it went so far...click on https://github.com/openaps/docs. Forked my own copy
changed branch to dev
now I need some help because the click to file I want to fix....the file is not there
Oh no I see it now
Jim Matheson
@jmatheson
Feb 16 2016 01:32
ok
Aaron Michelson
@Aaybob
Feb 16 2016 01:32
how would I edit it?
Jim Matheson
@jmatheson
Feb 16 2016 01:33
there is a little pencil icon in the uppe rright
next to the trash can
Aaron Michelson
@Aaybob
Feb 16 2016 01:34
blob
Jim Matheson
@jmatheson
Feb 16 2016 01:35
you need to scroll down, and find the link to the doc you want to edit.
go to the actual page you want to change
Ben West
@bewest
Feb 16 2016 01:35
that's like windows explorer
Aaron Michelson
@Aaybob
Feb 16 2016 01:36
Now i see the pencil icon
great pencil icon puts me in an editor....so what's next?
Jim Matheson
@jmatheson
Feb 16 2016 01:38
fix whatever you think is going to make it a breeze for the next person who uses this doc.
Aaron Michelson
@Aaybob
Feb 16 2016 01:38
great! what then?
Oh I see at the bottom is "commit changes" is that the place and is that all?
Jim Matheson
@jmatheson
Feb 16 2016 01:42
not quite.
put in a note to what you edited and why. then commit it, yes. Then review what you edited.
make sure it looks like you thought it should, you did not make any typos, etc.
then the last step is to make the actual pull request
remember, you just made these edits on your own version in your own sandbox.
the last thing you will do is go back to https://github.com/openaps/docs , then choose the dev branch from the dropdown on the left (again like you did before you edited)
then press the Pull request button
Jim Matheson
@jmatheson
Feb 16 2016 01:47
when you do this you are telling the admins of https://github.com/openaps/docs hey, i made some changes over on my dev branch. i am requesting that you pull them over here and use them.
Once you are on the PR page you will want to make sure the two branches at the top are correct.
The easiest way of thinking about the branch range is this:
the base branch is where you think changes should be applied, the head branch is what you would like to be applied.
Jim Matheson
@jmatheson
Feb 16 2016 01:54
so the base branch is going to be openaps/docs and then dev. and the head is going to be youraccount/docs and then dev. Once you select those it should show the list of changes you made below. if not, you did something wrong. if so, just put a note in there to what the overarching reason for the changes are (in your case you only made one, but you could have made a bunch). and then create it.
then you are done :)
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:08
weird, I'm get this fatal: Unable to create '/home/indy/indy/.git/packed-refs.lock': No space left on device, there seems to be plenty of space
$ df -h
Filesystem       Size  Used Avail Use% Mounted on
/dev/root        1.4G  1.1G  206M  85% /
devtmpfs         480M     0  480M   0% /dev
tmpfs             97M  324K   96M   1% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            193M     0  193M   0% /run/shm
tmpfs            481M     0  481M   0% /tmp
/dev/mmcblk0p7    32M  5.3M   27M  17% /boot
/dev/mmcblk0p10  1.3G  505M  787M  40% /home
Pete Schwamb
@ps2
Feb 16 2016 02:09
df -i
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:09
/dev/mmcblk0p10  87120 87119      1  100% /home
inodes?
Pete Schwamb
@ps2
Feb 16 2016 02:09
Yeah. You’re out of inodes.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:10
time for a new git repo
Pete Schwamb
@ps2
Feb 16 2016 02:10
Have to remove some files.
Number of inodes is an option at FS creation time. Not sure if you have control over that in your setup process.
If you do, you can bump it up to avoid this in the future.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:12
I pulled from a different repo yesterday by mistake, saw it right after I hit enter
sure that was the issue
Pete Schwamb
@ps2
Feb 16 2016 02:13
Would love it they would focus on making it secure from attackers and not secure from users, but I doubt that distinction is being made.
marius a. eriksen
@mariusae
Feb 16 2016 02:16
Yeah ... honestly I wished they'd just all use BLE and allow bonding from non-official apps.
And better yet:
define a standard BLE service for insulin pumps.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:23
I don't care as much about a standard as making whatever they have open, standard would be limited and introduce their own issues, at least at first
thats better /dev/mmcblk0p10 87120 5220 81900 6% /home
Jason Calabrese
@jasoncalabrese
Feb 16 2016 02:28
need to find a service to monitor all these little servers, I used server density, but pricing doesn't seem in line
Jim Matheson
@jmatheson
Feb 16 2016 02:31
PR for PR basics -> openaps/docs#88
dougtakeuti
@dougtakeuti
Feb 16 2016 02:40
At the moment I'm connecting to the edison through the pi, using screen. Now that I've configured the wifi, can't I just ssh straight to the edison using putty, just like I do to the pi?
Jim Matheson
@jmatheson
Feb 16 2016 02:41
yes
assuming you rebooted
dougtakeuti
@dougtakeuti
Feb 16 2016 02:43
ok, but what info do I need to input into putty? I defined a hostname, but how do I know the port?
Jim Matheson
@jmatheson
Feb 16 2016 02:50
you should be able to just use edison@yourdevicename.local
where the device is whatever you chose during Initial setup here https://github.com/oskarpearson/mmeowlink/wiki/Prepare-the-Edison-for-OpenAPS
dougtakeuti
@dougtakeuti
Feb 16 2016 02:53
ok, done, thanks @jmatheson !
how do you usually power you edison?
Jim Matheson
@jmatheson
Feb 16 2016 02:55
are you on sparkfun or intel board?
dougtakeuti
@dougtakeuti
Feb 16 2016 02:55
intel
Jim Matheson
@jmatheson
Feb 16 2016 02:58
install sudo apt-get install -y acpid
then you can use the power button. i assume the white button on the top of the board is it. (i dont have my intel board working yet)
oh, i misread your question
do you mean battery wise
dougtakeuti
@dougtakeuti
Feb 16 2016 03:00
yes
i think people are using different batteries, lots of old discussion in the mmeowlink gitter room
dougtakeuti
@dougtakeuti
Feb 16 2016 03:02
I see, those are not available here in Brazil, so I'll have to go for a trial-and-error approach
in the meantime, is it ok to just use a cel phone charger as power supply?
Jim Matheson
@jmatheson
Feb 16 2016 03:03
yes
dougtakeuti
@dougtakeuti
Feb 16 2016 03:04
ok, thanks!
Aaron Michelson
@Aaybob
Feb 16 2016 04:22
@jmatheson and all did my PR go through on the documents?
Jim Matheson
@jmatheson
Feb 16 2016 04:38
Aaron Michelson
@Aaybob
Feb 16 2016 04:41
what about now....i pressed a few more buttons...
should I "close pull request"?
a button at the bottom of page.....
blob
Its such a mad tangle of pulldown menus and buttons.....I can't do it
Aaron Michelson
@Aaybob
Feb 16 2016 04:48
Yes, no? how do I know if its published or whatever its next stage is> How can I tell. because I've tried to contribute before only to have no one ever see my work. And this time I'm ready to scream
Jim Matheson
@jmatheson
Feb 16 2016 05:13
yes, it’s there now
it looks like you closed and repopened it, but that’s ok. normally you just create it and it lands on the list of open pull requests waiting to be reivewed iand processed.
when you sent that screenshot you were good to go
I know @danamlewis is on vacation this week, so it may take a bit of extra time before they get processed.
nice work on your first contrib!
Ben West
@bewest
Feb 16 2016 07:10
@Aaybob congrats on your pr openaps/docs#89
you can use that link to track progress
anytime anyone comments on you'll be updated
here's an example
I just commented, I believe it sends you an email
if you become curious on status, you can ping others in the comments same way as here using the a@ sign and their nickname
that will send them an email too
Samuel
@mayaalinder
Feb 16 2016 07:52
@bewest . Any chance you can have a look at my pull request for G5 EU users?
Aaron Michelson
@Aaybob
Feb 16 2016 08:06
that's a great way to start a mini vacation...hiking to mount laguna tomorrow
Stephan
@MosiGitHub
Feb 16 2016 09:30
@jmatheson : I took a look at the changes you made for the mmtune part. the 'openaps use pump mmtune' it was not working for me. If I use 'mmtune.py /dev/ttyACM0 serial WW' it works fine. where do I have to put the WW to the openaps use? or maybe to the pump.ini?
test
Stephan
@MosiGitHub
Feb 16 2016 10:03
wrong room :-1:
Stephan
@MosiGitHub
Feb 16 2016 11:32
but to finish this: I had to change it in mmtune.py then your command was working nicely
Matthias
@ceben80
Feb 16 2016 13:50

I would like to define NIGHTSCOUT_HOST and API_SECRET in crontab - get an error

ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
cat: entries.json: No such file or directory

But to be honest....I don't know - any help about the definition syntax in crontab would be great :+1:

Toby Canning
@TC2013
Feb 16 2016 14:44
@ceben80 I'm not sure I understand your issue exactly. Using crontab-e you have the following?
NIGHTSCOUT_HOST=****.azurewebsites.net
API_SECRET=*******
Matthias
@ceben80
Feb 16 2016 15:24
I try with an export in crontab, but not as you have been posted....will try
Jason Calabrese
@jasoncalabrese
Feb 16 2016 15:28
Screenshot 2016-02-16 07.20.17.png
what is the Sara6E event, think @bewest mentioned it before
Matthias
@ceben80
Feb 16 2016 15:33
@TC2013 great works fine....so easy :smile: - Thank you!
Jason Calabrese
@jasoncalabrese
Feb 16 2016 15:34
I'm going to filter the Sara6E event unless we here some reason why it's useful
Jason Calabrese
@jasoncalabrese
Feb 16 2016 15:41
any other spam treatments? I have a PR where I'm getting rid of some of them already https://github.com/openaps/oref0/pull/73/files#diff-868cd2ade333e007e9aee1b6387a4399R14
Matthias
@ceben80
Feb 16 2016 15:47
a.JPG
It's awesome....my APS is running scheduled by crontab
Jason Calabrese
@jasoncalabrese
Feb 16 2016 15:48
:+1:
joannestevens
@joannestevens
Feb 16 2016 16:07
Can someone please tell me when I am going from wifi to a hotspot on the Pi, is it always necessary to put in the password? Thanks Jo
Toby Canning
@TC2013
Feb 16 2016 16:09
Should not be necessary if you have specified in your /etc/network/interfaces or wpa_supplicant file
Jim Matheson
@jmatheson
Feb 16 2016 16:10
what he said
@MosiGitHub you update to the latest dev of oref0? If so, you should be able to use that command. I guess we could consider adding that to the wiki.
joannestevens
@joannestevens
Feb 16 2016 16:14
Sorry in English ...
Jim Matheson
@jmatheson
Feb 16 2016 16:19
@joannestevens if you set up interfaces as described here https://github.com/oskarpearson/mmeowlink/wiki/Prepare-the-Edison-for-OpenAPS#user-content-initial-setup and set up your wifi and hotspot there then you should not need to enter a password. Or you can use wpa_supplicant which is a different way to do the same thing as described here https://github.com/openaps/docs/blob/master/docs/getting-started/rpi.md#user-content-configure-wifi-settings
joannestevens
@joannestevens
Feb 16 2016 16:20

I've put in the passwords but it doesn't seem to be retaining them when I go from one to the other. I didn't go through this section:

Once you connect to the Pi, you'll want to set up your wifi network(s). It is recommended to add both your home wifi network and your phone's hotspot network if you want to use OpenAPS on the go.

To configure wifi:

Type sudo bash and hit enter

Input wpa_passphrase "<my_SSID_hotspot>" "<my_hotspot_password>" >> /etc/wpa_supplicant/wpa_supplicant.conf and hit enter (where <my_SSID_hotspot> is the name of your phone's hotspot and <my_hotspot_password> is the password).

(It should look like: wpa_passphrase "OpenAPS hotspot" "123loveOpenAPS4ever" >> /etc/wpa_supplicant/wpa_supplicant.conf )

Input your home wifi next: wpa_passphrase "<my_SSID_home>" "<my_home_network_password>" >> /etc/wpa_supplicant/wpa_supplicant.conf (and hit enter)

I am not using an edison
I just entered the passwords in the top right hand corner .....
Jim Matheson
@jmatheson
Feb 16 2016 16:22
if you cat /etc/wpa_supplicant/wpa_supplicant.conf does it have one section in there with your username and pass?
joannestevens
@joannestevens
Feb 16 2016 16:25
Is say permission denied?
Jim Matheson
@jmatheson
Feb 16 2016 16:25
put sudo in front of cat. if you see permission deined it usually means you need to run it as sudo
sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
I have my passphrase hashed - does everyone else have it hashed as well? if so the docs need to be updated
joannestevens
@joannestevens
Feb 16 2016 16:28
@jmatheson Thanks, yes they are both in there both the hotspot and wifi
Jim Matheson
@jmatheson
Feb 16 2016 16:35
Did you restart your pi and see if it gets online automatically?
joannestevens
@joannestevens
Feb 16 2016 16:39
Thanks, yes it has
Jim Matheson
@jmatheson
Feb 16 2016 16:39
nice
Toby Canning
@TC2013
Feb 16 2016 16:53
@joannestevens I have had a lot of trouble with getting my system to automatically switch between hotspot and home. For example, when I'm at home, I want the Pi or Edison to use the home network when its available. What I have in this repo is working okay for me: https://github.com/TC2013/edison_wifi
My instructions assume quite a bit of linux knowledge, but if using the repo is helpful to you, I will try to answer any questions you have.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 16:59
I stopped using the switch to home wifi, wasn't reliable, but I think it's because I have 2 home wifi networks
joannestevens
@joannestevens
Feb 16 2016 16:59
Thanks @TC2013 , I will come back to you when I've got a little further ... I do not have any Linux knowledge ....
What do you do instead @jasoncalabrese ?
Jim Matheson
@jmatheson
Feb 16 2016 17:00
I am still having issues with ssh just dropping. trying to figure out if it is wifi dropping or what. happened in the middle of the night last two nights and having a heck of a time getting back online during reboots after the drop
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:01
I got reverse ssh tunnels going, but if not done right could be dangerous and requires a linux server
Jim Matheson
@jmatheson
Feb 16 2016 17:02
yea
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:02
the other wifi.sh script in that repo that restarts wifi if needed has been reliable
Jim Matheson
@jmatheson
Feb 16 2016 17:02
i cant figure out if that is doing anything
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:03
I had 1 case on Saturday where it wasn't able to bring wlan0 back up, and needed a reboot
Jim Matheson
@jmatheson
Feb 16 2016 17:04
i have that in my loop and tested it last night by hand and seemed to run, but the messages had me wonder if it was actually working.
Toby Canning
@TC2013
Feb 16 2016 17:04
@jasoncalabrese I'm glad you said that because it is not reliable for me either. I thought it was something about my network because it works sometimes.
Jim Matheson
@jmatheson
Feb 16 2016 17:04
feels like i lose connect just as often as i always did before
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:04
I have it in a root cron, not in the loop
needs root to bring wlan down/up
Toby Canning
@TC2013
Feb 16 2016 17:05
However, the reconnect script works awesome for our hotspot
which loses connection every so often and the pi/edison fails to reconnect for whatever reason... That script makes it run perfectly
Jim Matheson
@jmatheson
Feb 16 2016 17:06
hm maybe that is why
@TC2013 is that what you have too? we should put that in the install doc.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:07
the other thing I'm testing is killing autossh (for the tunnel) before doing taking wlan0 down in the wifi.sh
Toby Canning
@TC2013
Feb 16 2016 17:08
@jmatheson Will you test it out and make sure the instructions are adequate? I will add a couple of notes now
Jim Matheson
@jmatheson
Feb 16 2016 17:09
i ran through them again last night (second edison setup) and they seemed fine except i ran into issues with needing sudo
i was not sure if i needed it jsut for running by hand or in the cron as well. i thought it was not needed in cron. but the concept of root cron is not used elsewhere in any docs related to this project. so hopefully that is just the one change.
with that said i am pretty sure i’ve never actually been up and running on either script :)
Jim Matheson
@jmatheson
Feb 16 2016 17:31
do I need to preface the .sh call with a sudo when running from the root cron? i am seeing errors that wpa_cla does not exist in my logs
Also, when i run sudo /home/edison/src/edison_wifi/wifi.sh manually i see at the bottom “Current settings:” but then nothing
Jim Matheson
@jmatheson
Feb 16 2016 17:37
seems like i am losing conenction with this error "wlan0: CTRL-EVENT-TERMINATING - signal 15 received” and from a quick search it seems like a solution like what you’ve put together should help. once i get it running.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 17:44
should need a sudo from the root cron
maybe the path isn't set in the cron
Jim Matheson
@jmatheson
Feb 16 2016 17:46
i think it is working now. did not change anything. maybe was an error from my user cron before i pulled this out
Jim Matheson
@jmatheson
Feb 16 2016 18:05
actually, that script seems to always think the network is down
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:09
think you're missing a param with the host to ping
could be your NS site, google, etc
wifi.sh SITE_TO_PING
Jim Matheson
@jmatheson
Feb 16 2016 18:11
yea, i am
Jim Matheson
@jmatheson
Feb 16 2016 18:22
added site to ping and also added sudo in the root cron. finally seems to be working.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:27
@TC2013 would this work for charging the 2500 mAh lipo? https://www.adafruit.com/products/2465
Jim Matheson
@jmatheson
Feb 16 2016 18:34
@TC2013 so the thing i seemed to have to do is put sudo before my wifi.sh in cron and also before every place wpa_cli is called in the wifi switcher. If i do not have the sudo then it simply balks that it does not know what wpa_cli is
not sure if you guys had to do that or if it needs to be in the docs. or maybe i have something else set up differently in my env
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:36
you shouldn't need that in the root cron
you're using sudo crontab -e?
Jim Matheson
@jmatheson
Feb 16 2016 18:38
yessir
i have no idea why i had to do it, it does not make sense.
neither of the two entries worked without it
i don’t quite understand why wpa_cli requires sudo for me in general.
Jim Matheson
@jmatheson
Feb 16 2016 18:47
if i run wpa_cli as myself i just get command not found (not a permission error)
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:47
I get that too
but I checked the root cron and no sudo
you have the PATH env set there?
SHELL=/bin/bash
PATH=/home/edison/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Jim Matheson
@jmatheson
Feb 16 2016 18:48
here is my path for my user
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
and then for sudo it's
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
not sure how to check for root or if that is actually different than sudo
guess i need to su to root
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:50
you have the PATH set in the root cron?
Jim Matheson
@jmatheson
Feb 16 2016 18:50
ok yep it is the same as running as sudo so that makes sense
probably not, let me check
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:51
I have both of those lines at the top of my root cron
Jim Matheson
@jmatheson
Feb 16 2016 18:51
i see
i guess i forgot to add it when setting up my root cron
thx for the help
Jason Calabrese
@jasoncalabrese
Feb 16 2016 18:57
np, that fixed it?
Jim Matheson
@jmatheson
Feb 16 2016 18:58
well it was already working with sudo. but i cleaned it up and it still works now.
joannestevens
@joannestevens
Feb 16 2016 21:28

I'm just sorting the SSH access out (without password) .. I have my key ...

Docs say:
and copy your public SSH key into your RPi2 by entering

ssh-copy-id pi@raspberrypi.local

In that string, where do I put my key, it's not clear in the docs?

Thanks Jo

Jim Matheson
@jmatheson
Feb 16 2016 21:42
you don’t need it. ssh-copy-id grabs the key and copies it to your pi in the background.
joannestevens
@joannestevens
Feb 16 2016 21:52
I still need to put the password into Putty everytime

Using username "pi".
pi@raspberrypi.local's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 16 17:08:31 2016 from fe80::786c:a9a2:812b:40d7%wlan0
pi@raspberrypi ~ $ ssh-copy-id pi@raspberrypi.local
/usr/bin/ssh-copy-id: ERROR: No identities found
pi@raspberrypi ~ $ 99:5f:16:d5:86:4c:2b:5d:ab:11:0d:4c:42:cd:81:be
-bash: 99:5f:16:d5:86:4c:2b:5d:ab:11:0d:4c:42:cd:81:be: command not found
pi@raspberrypi ~ $ ssh-copy-id pi@raspberrypi.local
/usr/bin/ssh-copy-id: ERROR: No identities found
pi@raspberrypi ~ $
pi@raspberrypi ~ $
pi@raspberrypi ~ $ ssh-99:5f:16:d5:86:4c:2b:5d:ab:11:0d:4c:42:cd:81:be pi@raspberrypi.local
-bash: ssh-99:5f:16:d5:86:4c:2b:5d:ab:11:0d:4c:42:cd:81:be: command not found
pi@raspberrypi ~ $ cd
pi@raspberrypi ~ $ openaps init myopenaps
Initialized empty Git repository in /home/pi/myopenaps/.git/

* Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for jo_stevens@live.co.uk) not allowed
pi@raspberrypi ~ $ git config --global user.email "jo_stevens@live.co.uk"
pi@raspberrypi ~ $ git config --global user.name "joannestevens"
pi@raspberrypi ~ $ ssh-copy-id pi@raspberrypi.local
/usr/bin/ssh-copy-id: ERROR: No identities found
pi@raspberrypi ~ $

Jim Matheson
@jmatheson
Feb 16 2016 21:56
i don’t have a PC, but for the Mac instructions (which you can see below) when it asked me for a password i pressed enter without setting one. you don’t need to enter your pi password on that step.
joannestevens
@joannestevens
Feb 16 2016 22:00
Have you forgotten to attach?
Jim Matheson
@jmatheson
Feb 16 2016 22:02
i meant below the instructions on the documentation you are looking at
during step 3 did you enter a password or leave it blank so there is no password.
(you want to leave it blank so you dont have to type in a password when you connect)
joannestevens
@joannestevens
Feb 16 2016 22:05
Yes and I've had one emailed to me
Jim Matheson
@jmatheson
Feb 16 2016 22:05
you dont want one
it sounds like when you ssh you want it to connect without a password.
joannestevens
@joannestevens
Feb 16 2016 22:05
Thanks, I'll try again in the morning, brain a little fried now
Jim Matheson
@jmatheson
Feb 16 2016 22:05
so that step 3 should be left blank.
joannestevens
@joannestevens
Feb 16 2016 22:05
Lovely thanks
Jim Matheson
@jmatheson
Feb 16 2016 22:06
no problem.
Jim Matheson
@jmatheson
Feb 16 2016 23:47
@jasoncalabrese @TC2013 it looks like the hotspot switching back to home wifi worked like a champ. still struggling a bit to get it to switch to the hotspot once i leave home though. have to toggle the hot spot off and on a few times to get it to work.
Jason Calabrese
@jasoncalabrese
Feb 16 2016 23:57
I haven't had a problem switching to the hotspot, maybe looking at logs from during the time it's not switching would give you some ideas of whats going on