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

30th
Sep 2015
diabeticgonewild
@diabeticgonewild
Sep 30 2015 00:10 UTC
So had an idea. Knewton adaptive learning platform, which had been used for all sorts of courses and hundreds of millions of dollars have been poured into the technology, has just been made open source. I was forced to take calculus readiness exams when being admitted to Arizona state university which I obviously aced. Anyways it's awesome. It knows when you are trying really hard and it encourages you before you give up and it gives you extra momentum. Anyone in favor of making the docs more educational and making it into a tutorial via Knewton.com ?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 00:19 UTC
Like you can either create an assessment or an instructional material.
Obviously instructional would be the way to go...
Setting it up right now. Looks pretty awesome overall. http://i.imgur.com/xLcpuU1.jpg
Scott Leibrand
@scottleibrand
Sep 30 2015 00:22 UTC
at this point I think we need more developers, not students.
diabeticgonewild
@diabeticgonewild
Sep 30 2015 00:45 UTC
It not just an educational material. It's interactive and we can teach people how to be developers too with much less effort.
It's like mini lessons, and interactive troubleshooting can be easily created in this platform
And we can gather statistics of where people encounter problems, so we can make better improvements.
diabeticgonewild
@diabeticgonewild
Sep 30 2015 00:52 UTC
We can personalize the install process, which is critical to developing OpenAPS, as it is a personalized device, hence #WeAreNotWaiting and we are using our devices in ways that aren't used typically
I mean, that's what it's about.
I can see this working for OpenAPS because I have used it. It is much more engaging, efficient, and of course, personalized.
@scottleibrand adaptive learning is used in the tech industry a lot more than you would think. It's not just a student thing.
Scott Leibrand
@scottleibrand
Sep 30 2015 01:02 UTC
Perhaps. But I am reluctant to try to make this stuff easy. People who can demonstrate a certain level of proficiency required to get up and running are far more likely to make useful contributions. As long as the system is as in-flux as it is, you have to be able to figure out how to reverse engineer poorly documented systems to some degree. Maybe that will change over time, but we're quite a ways from stability and something that would be user-friendly enough to do training courses on.
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:06 UTC
A training course would honestly be too much work, at least for me, especially considering I'm on disability with a ton of medical problems and trying to go back to school. I was thinking about making openaps/docs more efficient and personalized (after I put in some pull requests to update it). There are plenty of capable people that can do this. We just have to make it appealing so they can do the plunge.
And personally, I'm not in a rush to get OpenAPS going. I intend on collecting some decent data before starting in particular.
I wouldn't have significant problems getting it running, I just don't put diabetes control as high as a priority as other things, which is understandable as I have 1,000,000 medical problems.
Chris Oattes
@cjo20
Sep 30 2015 01:09 UTC
you can't teach people to be developers
not like that
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:13 UTC
Yeah but you can develop people to be capable eventually
Chris Oattes
@cjo20
Sep 30 2015 01:13 UTC
in terms of actually programming things? an artificial pancreas isn't really a "hello world"
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:14 UTC
Maybe not literally teach, but you can show them the way
Chris Oattes
@cjo20
Sep 30 2015 01:16 UTC
how long do you think it would take to teach someone with no programming experience how to use python / node / bash?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:17 UTC
It really depends. I learned most of this in a single course over a semester—ECE 1331
Yes it was a freshman class and it was hard as hell.
Chris Oattes
@cjo20
Sep 30 2015 01:19 UTC
and that was how many hours of teaching?
and how many hours of sitting at a computer with a tutor to help
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:20 UTC
3 hours per week over 15 weeks or so.
Chris Oattes
@cjo20
Sep 30 2015 01:20 UTC
and how many hours of practicing programming since?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:21 UTC
But there was other stuff in there too like binary and he and decimal and converting back and forth and programming flow charts
7 years experience
But I wouldn't take the teaching seriously in engineering. They certainly tell you how to do it, but not teach you how to do it. I was in a traditional engineering program and it was very sink or swim. Lots of weed out courses and not many people made it to the higher level courses. It seemed like mission impossible at times.
Especially with my medical problems, but I got past my weed out courses.
Chris Oattes
@cjo20
Sep 30 2015 01:23 UTC
if it were possible to design a simple web course that could teach people how to be developers where they could just sit, do the course and then manage to write code for a medical device, I don't think they'd bother running computer science degrees
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:31 UTC
That's the problem with the current state of technology. You realize that right?
Chris Oattes
@cjo20
Sep 30 2015 01:31 UTC
what?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:32 UTC
That the technology is not advanced or intuitive enough to maximize efficiency or efficacy of learning to maximize the users potential, particularly with respect to STEM material.
Chris Oattes
@cjo20
Sep 30 2015 01:35 UTC
so I should be developing a way of a computer understanding what a layperson wants and managing to do that so that anyone can come and work on openaps?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:36 UTC
No. The closest thing to that would be to create a script that could be run on the rPi2 that would install everything including the loop.
Chris Oattes
@cjo20
Sep 30 2015 01:37 UTC
that doesn't teach anyone anything
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:38 UTC
True. But I didn't realize what you were implying.
I think even being a developer you have to have at least some willingness to learn, and that should be encouraged among everyone.
diabeticgonewild
@diabeticgonewild
Sep 30 2015 01:51 UTC
At best Knewton is just a future potential option. At this point of time it's only in development stages and adding content is limited. But it's an extremely powerful engine that is definitely worth taking a look at for making things better.
diabeticgonewild
@diabeticgonewild
Sep 30 2015 02:05 UTC
Oh @cjo20 in engineering I typically have 2 regular exams per semester plus a final exit exam that is comprehensive per course. For each regular exam, it takes me like 80-120 hours of work/studying per exam to get to a point where I can make an A on an exam. Because the final exams typically have new material in addition to old material, it takes me about 20-35 hours to study for a final exam and get an A on it. Finals week can be hell due to that.
Just to give you a full idea on the work load...
80-105 hours is more realistic for a regular exam but if it's super hard and you feel like you're "on the shadow of the valley of death" it definitely starts getting closer to 120 hours of studying/work
diabeticgonewild
@diabeticgonewild
Sep 30 2015 03:43 UTC
Did you guys see the improvement to the G5 receiver screen? I found this on a Dexcom website.
Dexcom_Image.jpg
Apparently the receiver is included with the system...
diabeticgonewild
@diabeticgonewild
Sep 30 2015 04:00 UTC
Apparently I am out of the loop...
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:22 UTC
By the way, this is the install script that I have so far for creating an Access Point for the Edimax Adapter. I haven't tested it yet and it still is not complete. It's very much a line-by-line thing so I'm not nervous about just typing out code. https://gist.github.com/diabeticgonewild/83fe970155ab3e7c5043
I would say I am 1/3 done with writing the script...given I haven't done any testing on it.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:47 UTC
how do you install the openapscontrib.plugins? clone and do something with setup.py?
Ben West
@bewest
Sep 30 2015 05:47 UTC
python setup.py develop
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:49 UTC
That should be eventually documented, even if it's not "official openaps stuff
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:49 UTC
how do test that the package is installed? before trying to use it
Ben West
@bewest
Sep 30 2015 05:49 UTC
pydoc openapscontrib
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:49 UTC
But it should be linked...
Wait, I guess it is
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:49 UTC
nice
Ben West
@bewest
Sep 30 2015 05:49 UTC
pydoc openapscontrib.mmhistorytools I think
that's for dev install
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:50 UTC
pydoc openapscontrib does sometime
Ben West
@bewest
Sep 30 2015 05:50 UTC
I think what's documented is easy_install openapscontrib-mmhistorytools , not sure
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:50 UTC
thats for cleaning/normalizing the pump history right?
Ben West
@bewest
Sep 30 2015 05:51 UTC
yeah, nate and chris did some nice work on slicing/dicing the medtronic history
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:51 UTC
I mostly want to get the dev environment setup now
make sure everything works
had the cron running and pushing to my repo for 24 hours or so
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:52 UTC
@jasoncalabrese are you going to access the visual plugins via VNC (and have it configured on the Raspberry Pi to do so?)? Cause I need to know if people are going to be VNCing into their Pis cause it's different across Windows/Mac/Linux/iOS/Android/etc
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:52 UTC
already 500+ commits in
Ben West
@bewest
Sep 30 2015 05:52 UTC
lol
yeah, I've got two running
need to put a fake author in there
don't want several k spurious commits
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:53 UTC
But do people VNC in to access the visual plugins for mmhistorytools?
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:53 UTC
trying to get Andrew to pick a good name for it
Ben West
@bewest
Sep 30 2015 05:53 UTC
I recommend ssh/putty
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:53 UTC
talk about it like its a bot/person
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:54 UTC
Obviously SSH is the way to go for controlling it overall.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:54 UTC
talk to it, ask questions
Ben West
@bewest
Sep 30 2015 05:54 UTC
yeah
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:54 UTC
But, for the visualization tools, do people use VNC?
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:54 UTC
have a build bot at the old job
Ben West
@bewest
Sep 30 2015 05:54 UTC
no, for visualization, we post to Nightscout and will display it there
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:54 UTC
give it command with chat
Ben West
@bewest
Sep 30 2015 05:54 UTC
think sam named his jarvis
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:55 UTC
You can use both at the same time. I am pretty sure of that.
Cause technically, you could make the visualization completely offline using VNC on your mobile phone. That would be very smart.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:55 UTC
going to be a pretty nice system
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:55 UTC
Even an offline version of NS using OpenAPS would be brilliant
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:55 UTC
starting to be able to picture it
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:56 UTC
Technically, that can be created.
Ben West
@bewest
Sep 30 2015 05:56 UTC
right, that's similar to what nate's web monitor is
it's actually fairly easy
but you don't need VNC either
you still just use your browser
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:56 UTC
Yeah, and nate's stuff can be done offline.
Ben West
@bewest
Sep 30 2015 05:56 UTC
no, his web monitor
it's a web server that runs on the pi
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:57 UTC
If it's offline you will need to VNC into the Pi using the access point
Ben West
@bewest
Sep 30 2015 05:57 UTC
serves up the data
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:57 UTC
So nate's stuff can't be used offline?
Ben West
@bewest
Sep 30 2015 05:57 UTC
no, you can assoc to AP can browse to pi's ip address
Jason Calabrese
@jasoncalabrese
Sep 30 2015 05:57 UTC
pi is just an other server
Ben West
@bewest
Sep 30 2015 05:57 UTC
no need for VNC
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:57 UTC
oh got it
nevermind
Ben West
@bewest
Sep 30 2015 05:58 UTC
I've completely uninstalled all of X, all of gnome, etc, all the gui stuff from my pi
diabeticgonewild
@diabeticgonewild
Sep 30 2015 05:58 UTC
I'm not strong on networking, even though I understand a lot of it.
I can do basic troubleshooting.
Yeah, GUIs in general make things more inefficient
diabeticgonewild
@diabeticgonewild
Sep 30 2015 06:11 UTC
But hostapd and Raspberry Pi Access Point setup is very involved, and there's just better ways of cutting out the hassle like install scripts. I mean, what happened in the install script will have to be explained in openaps/docs in case of errors occurring but given nothing goes wrong it's the way to go.
There should also be something in docs saying to check for errors every time after you press enter on the command line--entering in commands. Along with "passwords are never displayed in Linux. Therefore the cursor will not move at all when you type in your password". I always forget to add those things....I have such a long list of things to add to docs :P
Jason Calabrese
@jasoncalabrese
Sep 30 2015 06:21 UTC
everyone is installing the openaps-js globally from the clone?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 06:28 UTC
I think so. Obviously there are reports that need to be preconfigured and a cron job needs to be made. About cron jobs, make sure to have @reboot in your script so if the Pi is restarted for any reason, OpenAPS starts running and taking action immediately.
I do intend on eventually commenting openaps-js in particular and maybe even @bewest 's stuff so that people can read through it and evaluate it for what it is. Also it will help keep it maintained and it will make the project look better and might get more attention.
But that is...eventually
Jason Calabrese
@jasoncalabrese
Sep 30 2015 06:31 UTC
got the cron going with basic report adding a ton more now
Ben West
@bewest
Sep 30 2015 06:31 UTC
npm install $giturl
npm install ${url}.git#$branch works with npm
diabeticgonewild
@diabeticgonewild
Sep 30 2015 06:33 UTC
I do intend on making an install script for a Raspberry Pi from scratch for the whole OpenAPS install including tools. I may sound like a jerk but no, I am not going to share that with anyone, even if you beg and plead. It's pretty clear that this project wasn't intended for things like that. I just want something that I can use for a clean install in order to save time. Backing up images is good, but it's not completely clean....
Making cron jobs needs to be documented in openaps/docs too. Having to write your own will differentiate you from just plugging in commands and finding errors and stuff with your install, versus being an actual developer in this project, or so I think.
But it may be a long shot and far away, but I think we can train some people to be developers that don't have experience with very technical things, but are otherwise capable. Perhaps not teach them though.
Obviously a true sample cron job for OpenAPS is not going to be available. But, somehow, cron jobs needs to be properly documented so a relative n00b can understand what they need to do and how it needs to be done, but without giving specific examples that can be "cut and paste"
Jason Calabrese
@jasoncalabrese
Sep 30 2015 06:56 UTC
wanted to install from a local clone
got all the reports working
diabeticgonewild
@diabeticgonewild
Sep 30 2015 06:57 UTC
Oh, sorry for crazy ramble...
Awesome!
Jason Calabrese
@jasoncalabrese
Sep 30 2015 06:58 UTC
going to add the rest, then start on the fun stuff
reporting 02.diyps/diyps.json
{
  "temp": "absolute",
  "bg": 160,
  "tick": -7,
  "eventualBG": 143,
  "snoozeBG": 143,
  "reason": "Eventual BG 143>100 but Delta -7 < BGI 0 / 2; no temp to cancel"
}
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:07 UTC
need to start feeding it treatments from NS
so the iob will match up
waiting for an uptick, should start high temping since it doesn't know about the iob
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:17 UTC
need to stop this polling and let new data trigger the loop
Ben West
@bewest
Sep 30 2015 07:18 UTC
it's only 5 minutes ;-)
next one is in two minutes
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:19 UTC
next one is there
and I have to wait 3 mins to see it use it
feels like forever
boom
{
  "bg": 156, 
  "temp": "absolute", 
  "snoozeBG": 156, 
  "recieved": true, 
  "rate": 1.5, 
  "reason": "Eventual BG 156>120, temp 1.25<1.5U/hr", 
  "eventualBG": 156, 
  "timestamp": "2015-09-30T07:22:46.460283", 
  "duration": 30, 
  "tick": "+1"
}
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:25 UTC
oh it didn't temp
Ben West
@bewest
Sep 30 2015 07:25 UTC
no?
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:26 UTC
think it did, but I cleared it trying to view it on the pump
Ben West
@bewest
Sep 30 2015 07:27 UTC
just esc
open circle means something is happening
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:28 UTC
but still temp-basal-status.json is show 0.0 for 0
oh it did set it them there was a drop and it was canceled
yeah need to start reporting to NS
Ben West
@bewest
Sep 30 2015 07:31 UTC
really need to see what it's doing
yeah
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:44 UTC
{
  "bg": 157, 
  "temp": "absolute", 
  "snoozeBG": 171, 
  "recieved": true, 
  "rate": 1.5, 
  "reason": "Eventual BG 171>120, no temp, setting 1.5U/hr", 
  "eventualBG": 171, 
  "timestamp": "2015-09-30T07:41:08.080556", 
  "duration": 30, 
  "tick": "+2"
}
2015-09-30 00.43.04.jpg
not really sure where eventualBG is coming from
might be a bug
or expecting data I don't have
{"iob":-0.09856726604888891,"activity":-0.0001762962962962963,"bolusiob":0}
Jason Calabrese
@jasoncalabrese
Sep 30 2015 07:50 UTC
var eventualBG = Math.round( bgnow - ( iob * isf ) );
{"carbs_hr":28,"max_iob":2,"dia":3,"type":"current","current_basal":0.5,"max_daily_basal":0.5,"max_basal":1.5,"max_bg":120,"min_bg":100,"carbratio":16,"sens":90}
157 - (-0.09856726604888891 * 90)
don't know where there negative iob is coming from
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:43 UTC
OK I found an amazing tutorial, irrespective of the subject, just overall for networking configurations on the Raspberry Pi 2. The tutorial is for making a WiFi access point with an Edimax USB adapter using a 3G mobile connection stick that is supported on Raspbian. Overall filled with useful information. I was searching for info for making my install script for an access point and I came across it. At least worth skimming through. http://www.php-faq.eu/raspberrypi-als-3g-wifi-gateway/
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:43 UTC
still can't figure out where that negative basal is coming from, maybe it's looking old data, something not getting filtered
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:43 UTC
The site has a bunch of Raspberry Pi tutorials here.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:44 UTC
seem more of the data these calculation prepare should be written to files to be able to inspect
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:44 UTC
Can you do a PR to get at least someone else to look at it or get better documentation?
@jasoncalabrese like intermediate steps taken in the math equations/problems? I could do that....even in JS. But yeah, going to (eventually) comment the openaps-js code
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:45 UTC
can't do a PR without a diff
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:45 UTC
Oh
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:46 UTC
thought there were tests in openaps-js, maybe they didn't get merged?
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:47 UTC
I think Scott wrote some....I really do.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:47 UTC
yup, not merged openaps/openaps-js#30
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:47 UTC
just searched the repo...no tests yet
I think on OpenAPS.org they mentioned recently that they want people to audit the info brought on from the tests....
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:48 UTC
any tests are better than no tests
looks like that PR is a lot more than tests
guess that's the issue
I'm not using loop.sh or an sh scripts at all
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:50 UTC
true. But this stuff needs to be audited. If the tests could be put on the Pebble, even if a nuisance, would be good to get more things ironed out. We really need some people who can do those things, so performance will be consistent for people.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:50 UTC
doing to like @bewest's example
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:50 UTC
Yeah Scott is doing a bunch of work...
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:50 UTC
like the functional style
input/output/commit
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:50 UTC
What example, specifically? (I want to know so I can get an idea for making myself an install script)
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:51 UTC
think this will change a ton
not ready for install scripts
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:51 UTC
I mean, I will share "what I did" (the steps) but not the actual script
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:51 UTC
don't think I want a cron at all
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:51 UTC
What are you going to use instead?
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:51 UTC
thinking a node app
make it more event based
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:52 UTC
Oh.
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:52 UTC
but do like the openaps tool, seems we could call that from node
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:54 UTC
@mmuday gave me the idea to make a "cheat sheet" for the algorithms (yes, they are algorithms) for the Sugar Surfing book. If I can make a good one, that can be used for caregivers/school/parents/other family members etc., but that's not directly applicable to OpenAPS. But it would be extremely beneficial for the #T1D community. I think after reading and processing the book, it would take around 120-150 hours to make a top notch cheat sheet. I do have plenty of experience making awesome ones. Engineering exams allow them and it's a skill.
What do you mean "openaps tool" specifically? Also, I am kind of clueless with respect to object oriented programming, although I know how to use it, but not how to apply it dynamically, so I can't brainstorm things like that yet. Don't have the experience :P
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:57 UTC
was thinking tool/toolkit = openaps/openaps
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:57 UTC
Oh, cool!
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:57 UTC
so I'd still want to invoke reports
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:57 UTC
indeed
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:58 UTC
just not at some fix interval
should run when theres new data
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:58 UTC
Conditionals?
Jason Calabrese
@jasoncalabrese
Sep 30 2015 08:58 UTC
instantly
push
like we have with NS now
diabeticgonewild
@diabeticgonewild
Sep 30 2015 08:59 UTC
That would be awesome!
Yeah, so I'm at the part of the access point install script where it becomes more difficult and tedious :/ :P
diabeticgonewild
@diabeticgonewild
Sep 30 2015 09:04 UTC
So I'm about to call it quits for the night. But that tutorial I found was amazing. Whenever I get back to doing Roman Hovorka work, I am going to have to use a 3G network stick to SSH from remote places back and forth from a computer running MATLAB in the cloud (MATLAB can SSH back and forth...crazy!), so that tutorial will be extremely useful. But it is partially useful for what I am doing now, too...
Oh, crap! I also have to set up my install script to connect to actual WiFi connection WHEN internet is available otherwise, create and use hotspot....forgot about that. I provided some code from a site to .@scottleibrand and he made it applicable to OpenAPS so I am likely going to have to ask him how he did it, cause he has experience...
diabeticgonewild
@diabeticgonewild
Sep 30 2015 09:10 UTC
Yeah, my post on openaps-dev about what I wrote to Scott is here (last post)... https://groups.google.com/forum/#!topic/openaps-dev/gNOG-Ub9GLw
diabeticgonewild
@diabeticgonewild
Sep 30 2015 09:18 UTC

So yeah on this site. Has a script to switch to access point mode when WiFi internet connection is not available but doesn't have script to connect back to WiFi mode..here's the key to connecting back and forth from access point to WiFi connection. I was thinking of a less efficient way.

http://sirlagz.net/2013/01/22/script-starting-hostapd-when-wifi-goes-down/

I was working on this back when I wrote this post, and I believe I had it working? I don’t quite remember.

You can probably find out if there’s clients connected, and if there’s not, turn off hostapd, and rescan for any familiar Access Points.

Let me get another RaspAP set up and I’ll do a post on this sort of setup.

The thing is, he's partially wrong. Not only do you have to turn off hostapd to get WiFi and find internet access points, if there is no WiFi access point for your Pi to connect to you need to enable the Raspberry Pi 2 access point. This all has to be done using bash shell scripts and using a cron job. Putting all of this into an install script is not intuitive.

But I am glad that I found the info!
diabeticgonewild
@diabeticgonewild
Sep 30 2015 10:09 UTC

@danamlewis , @scottleibrand , what do you think of this?

I found an easier and more reliable solution for the switching between "access point" and "WiFi" mode. Use 2 Edimax adapters, plugged in to the Raspberry Pi. One for the WiFi, one for the access point. The Edimax adapters cost less than $10. Configuration settings can be found here: http://raspberrypi.stackexchange.com/questions/12276/how-to-make-pi-an-ap-with-2-wifi-adapters

Or you can use a chipset that supports dual AP and WiFi mode, but the dongle might be bigger...
It will take up too much time to make a reliable script that switches reliably every time without heavy testing on one Edimax adapter (or a bunch of errors).
The only running risk is power consumption. I just read a post saying that people got errors running 2 adapters due to power issues, so I don't know what is better. I may go to Fry's this morning, but going to just keep it at one USB adapter only.
Scott Leibrand
@scottleibrand
Sep 30 2015 14:49 UTC
@jasoncalabrese all the tests are still in dev. I would recommend using that if you aren't already looping live with master.
You don't have to use loop.sh. In fact we plan to pull that out of the mix as we start to incorporate ways to validate the data with
the core openaps toolset.
Chris Oattes
@cjo20
Sep 30 2015 14:59 UTC
@scottleibrand have you had issues with .got becoming corrupted with openaps
Err .git
Scott Leibrand
@scottleibrand
Sep 30 2015 15:00 UTC
Yes. Look in loop.sh. There's code to blow away .git and re-init.
Chris Oattes
@cjo20
Sep 30 2015 15:01 UTC
Any idea what causes it?
Scott Leibrand
@scottleibrand
Sep 30 2015 15:03 UTC
Not really. Probably SD card write issues. Maybe due to power fluctuations?
Pi's don't get along with their SD cards well, as a rule.
Chris Oattes
@cjo20
Sep 30 2015 15:05 UTC
:/
Jason Calabrese
@jasoncalabrese
Sep 30 2015 15:07 UTC
I was using wip/bewest/separate-concernsdidn't really look into the changes between the branches yet
first step was to get a basic test loop going
Chris Oattes
@cjo20
Sep 30 2015 15:08 UTC
I think that might be a branch from dev
I could be wrong though
Dana Lewis
@danamlewis
Sep 30 2015 15:19 UTC
@cjo20 I just fried my second Pi in a week, I think. Bleh.
Chris Oattes
@cjo20
Sep 30 2015 15:30 UTC
@danamlewis how'd you manage that?
Dana Lewis
@danamlewis
Sep 30 2015 15:42 UTC
@cjo20 I thought it was because o had switched to a battery that could be charged while powering, so the cycles of power had fried it. But this weekend I didn't charge while powering and it still seems fried. So need to try another battery to see if they still go bad as quickly.
also exhibit #72 for why multiple pis ;)
(Mostly because I usually fry on the go when I won't have time to fix until end of day usually)
Chris Oattes
@cjo20
Sep 30 2015 16:51 UTC
@danamlewis are they overheating?
Dana Lewis
@danamlewis
Sep 30 2015 16:56 UTC
I don't think so..but not sure how I would tell. They're not melting ;)
Chris Hannemann
@channemann
Sep 30 2015 17:40 UTC
@danamlewis haven't had a fried pi issue yet on mine with the TeckNet 9000 mAh battery, FYI
I believe you are running the same?
Dana Lewis
@danamlewis
Sep 30 2015 17:50 UTC
Yea. I have two tecknets and the 9000 is what I think might be contributing, but don't have a way to know for sure.
Once I am back from traveling after the 8th, I should be home for a few weeks and able to reliably test each battery, but until then it's hit or miss
Jason Calabrese
@jasoncalabrese
Sep 30 2015 18:14 UTC
only been running mine for a couple but have been charging the battery on and off from my laptop with pi running
using a big old ankler battery
Ben West
@bewest
Sep 30 2015 20:16 UTC
I've got mine wired into the wall
through a nice powered hub
Chris Oattes
@cjo20
Sep 30 2015 21:37 UTC
@scottleibrand https://github.com/openaps/openaps/compare/master...cjo20:configfile that branch might help with some of the truncation issues you've been having, as well as put pump serial numbers in a seperate file from the rest of the config
Scott Leibrand
@scottleibrand
Sep 30 2015 21:44 UTC
Cool. I'll have to play with that. Does it put the expires: thing in a separate file? Or just the serials?
Chris Oattes
@cjo20
Sep 30 2015 21:44 UTC
just the serials
Scott Leibrand
@scottleibrand
Sep 30 2015 21:45 UTC
that probably won't help much with truncation then
Chris Oattes
@cjo20
Sep 30 2015 21:46 UTC
why not?
Scott Leibrand
@scottleibrand
Sep 30 2015 21:46 UTC
would make it easier to share openaps.ini though
the problem is it truncates the file as it starts to write it, and then if it doesn't complete, you're left with a truncated file
Chris Oattes
@cjo20
Sep 30 2015 21:46 UTC
one of the changes that branches makes is it creates a "do_save" function
Scott Leibrand
@scottleibrand
Sep 30 2015 21:46 UTC
so eliminating the need to constantly re-write openaps.ini in favor of just updating a separate file with the expires info would help...
Scott Leibrand
@scottleibrand
Sep 30 2015 21:47 UTC
looking
Chris Oattes
@cjo20
Sep 30 2015 21:47 UTC
which writes to filename + "_tmp"
and then removes the old config, which you don't care aobut at that point, then does a rename
Scott Leibrand
@scottleibrand
Sep 30 2015 21:47 UTC
ah, perfect
that should definitely help
Ben West
@bewest
Sep 30 2015 21:48 UTC
yeah, two things, would be nice to add --ini foo.ini as well as --ini-ignore to influence which INI gets used for "extra" config
which would include both serial and expires as "extra" config
devices should all have "extra" config which consistently gets saved to different file
second, I'm in favor of using tmp file, then moving it into place
that's the right/atomic way of doing it
those switches should be added to the device add command
Chris Oattes
@cjo20
Sep 30 2015 21:54 UTC
why have a custom file?
Ben West
@bewest
Sep 30 2015 21:54 UTC
because secret.ini is actually a custom file with extra config
I'd rather do this in such a way it will work for all devices permanently
rather than do it for serial
then do it for expires
etc
Chris Oattes
@cjo20
Sep 30 2015 21:55 UTC
yes, I'm going to write it so that anything that a coder wants to keep private would get added to secret.ini
Ben West
@bewest
Sep 30 2015 21:55 UTC
but why secret.ini?
it's just an extra config with extra params
Chris Oattes
@cjo20
Sep 30 2015 21:56 UTC
why openapi.ini?
it's a name, it doesn't really matter what the name is
Ben West
@bewest
Sep 30 2015 21:56 UTC
same reason for .git/config
secret.ini is some sort of including mechanism to require extra config
Chris Oattes
@cjo20
Sep 30 2015 21:57 UTC
but that doesn't mean that you need more than 2 config files, a public one and a private one
Ben West
@bewest
Sep 30 2015 21:58 UTC
no
you can specify same --ini secret.ini for all of them
so you just have 2
my problem is making that the default... seems like odd special casing that makes things harder in future
would rather avoid special casing single thing that isn't configurable
Chris Oattes
@cjo20
Sep 30 2015 21:59 UTC
what would it prevent you doing if the filename isn't configurable?
Ben West
@bewest
Sep 30 2015 21:59 UTC
eg, why not store it in --ini ../outside/of/git/my.ini
and avoid git altogether
the design behind devices was that all devices can have "extra config"
the design where it all goes into openaps.ini was a bit of a hack, I prefer the extra config to be defined separately
and if someone wants to include it in a particular file they can
Chris Oattes
@cjo20
Sep 30 2015 22:04 UTC
specifying different files for each device seems like it would add a lot of complexity. What if, for example, you wanted to create a report at some point in the future that involved two devices, in which case you'd need a way of tracking which settings for which device came from which file etc.
Ben West
@bewest
Sep 30 2015 22:05 UTC
right, what I'm saying is that be default, the ini section for device would simply record the name and the location of the extra config
it could very well be the same file for all devices
this is only for devices config
the extra config for device is always separate
much more consistent than picking random fields
Chris Oattes
@cjo20
Sep 30 2015 22:07 UTC
like I showed you last time we discussed this, you can have the person that implements the device code set a flag which says which fields need to be kept private
Ben West
@bewest
Sep 30 2015 22:07 UTC
right, that's too tricky
much simpler to say "all extra config"
because it's very likely true that any extra config needed for device is secret
Chris Oattes
@cjo20
Sep 30 2015 22:08 UTC
why is it too tricky?
Ben West
@bewest
Sep 30 2015 22:08 UTC
because it's developer's problem to get it right and remember to do something different "if..."
much harder than always separating what is separate anyway
any "extra config" for a device is secret and shouldn't be in openaps.ini
openaps.ini was intended to remain fairly static... putting expires in there was a hack
went back and forth on that quite a bit
and ran out of time
I prefer putting it somewhere else, same as secret
Oskar Pearson
@oskarpearson
Sep 30 2015 22:13 UTC
+1 for moving expires somewhere else other than the ini file. It means I can manage the file via git better
I'm off to bed all
Enjoy hacking!
Ben West
@bewest
Sep 30 2015 22:14 UTC
in my mind, it's just "extra config"
shouldn't be in openaps.ini