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

7th
Sep 2016
garykidd
@garykidd
Sep 07 2016 00:49
Can someone provide a little more direction with how to add battery to NS? What i've tried didnt work.
Paul Martin
@Spazholio
Sep 07 2016 00:54
@garykidd What’d you try?
(he says, stalling as he looks up what he did to make it work)
garykidd
@garykidd
Sep 07 2016 01:04
well I added "battery" under APP SETTINGS under ENABLE on my azure site for one....that alone seemed to mess up my NS site. Then I also tried to update to latest version of NS site.
my current version is .....Nightscout
version 0.9.0-dev
head 1fb349c4160f1fbcf41f29d13455e2d8f6014671
Paul Martin
@Spazholio
Sep 07 2016 01:12
Ok, what are you using as a rig? Edison?
garykidd
@garykidd
Sep 07 2016 01:15
rp3
trying to get that squared away a bit before moving to edison...though I believe I have all the required pieces for edison rig....itching to start that too.
Paul Martin
@Spazholio
Sep 07 2016 01:16
Ah. Then unless I’ve missed something, I don’t think you CAN get battery readings on your NS site from a Pi3.
garykidd
@garykidd
Sep 07 2016 01:18
nope, I'm looking to show pump battery pill
Paul Martin
@Spazholio
Sep 07 2016 01:19
OH! Duh.
Sorry ‘bout that.
Let me check my setup...
Do you have a monitor/battery.json report?
Eric Jensen
@elnjensen
Sep 07 2016 01:29
@garykidd Are you sending loop status information in general to NS?
For example, do you have the OpenAPS status pill displayed there? For my setup, I upload the pump info along with general OpenAPS status, following from this part of the docs.
Eric Jensen
@elnjensen
Sep 07 2016 01:35
On NS under "plugins", do you see "pump"? That's the one to enable see pump info (reservoir, battery voltage, pump status).
OK, just looked at my Azure settings. Under ENABLE, add "pump" (not "battery"). Then add a new variable (if you don't already have it) called PUMP_FIELDS and put reservoir battery clock status.
garykidd
@garykidd
Sep 07 2016 01:41
I do.
sorry @Spazholio I do have that report yes..
Eric Jensen
@elnjensen
Sep 07 2016 01:42
Docs on the "pump" plugin are here (though that anchor like doesn't go to quite the right place on the page - search for "pump".)
Looks like reservoir battery are the defaults, so you probably just need to enable pump.
Assuming you're sending device status to NS.
Paul Martin
@Spazholio
Sep 07 2016 01:44
I think mine’s getting uploaded when I run the 'format-ns-status' alias. Do you have that?
garykidd
@garykidd
Sep 07 2016 01:45
yeah..pretty sure , yes,. site is redeploying I think. brb
Paul Martin
@Spazholio
Sep 07 2016 01:45
I have data in the upload/ns-status.json file, which is what gets uploaded to NS.
Eric Jensen
@elnjensen
Sep 07 2016 01:45
And you need DEVICESTATUS_ADVANCED set to true in Azure for the pump plugin to work.
Paul Martin
@Spazholio
Sep 07 2016 01:45
Maybe search for the word “battery” in the upload/ns-status.json (or whatever your equivalent is).
I can’t help much with the Azure stuff since I self-host, but it seems as though @elnjensen is pretty thoroughly versed. =)
Eric Jensen
@elnjensen
Sep 07 2016 01:46
I'm just good at following other people's directions! :wink:
garykidd
@garykidd
Sep 07 2016 01:47
so under ENABLE on azure I should have........careportal rawbg iob maker cob bwp cage basal pushover bridge openaps pump PUMP_FIELDS ?
Eric Jensen
@elnjensen
Sep 07 2016 01:47
No, you just need pump there.
garykidd
@garykidd
Sep 07 2016 01:48
OK, had that.
Eric Jensen
@elnjensen
Sep 07 2016 01:48
Then if you want to have pump fields displayed that are other than the default reservoir and battery, you need a separate line with PUMP_FIELDS.
Do you have a separate line with DEVICESTATUS_ADVANCED?
garykidd
@garykidd
Sep 07 2016 01:49
I have DEVICESTATUS_ADVANCED...yes true
Eric Jensen
@elnjensen
Sep 07 2016 01:49
OK, good.
garykidd
@garykidd
Sep 07 2016 01:49
for PUMP_FIELDS line ...what is the field?
Eric Jensen
@elnjensen
Sep 07 2016 01:49
In the NS site itself, do you see 'pump' listed under plugins?
garykidd
@garykidd
Sep 07 2016 01:50
Yeah I have all the other relevant information just not battery
Eric Jensen
@elnjensen
Sep 07 2016 01:50
I have PUMP_FIELDS set to reservoir battery clock status.
Paul Martin
@Spazholio
Sep 07 2016 01:51
Wait...
garykidd
@garykidd
Sep 07 2016 01:51
ahhh..PUMP_FIELDS is the key so to speak...
Eric Jensen
@elnjensen
Sep 07 2016 01:51
Are you saying that you see a pump pill on NS?
Paul Martin
@Spazholio
Sep 07 2016 01:51
Do you have the “OpenAPS” or “Pump” pills enabled in the NS Settings?
Like, if you go to your site, and click “Settings” - are those checked?
garykidd
@garykidd
Sep 07 2016 01:55
blob
Thanks, guys. @Spazholio @elnjensen
Eric Jensen
@elnjensen
Sep 07 2016 01:55
Woohoo! 1.25V
Paul Martin
@Spazholio
Sep 07 2016 01:55
Woooooo!
Eric Jensen
@elnjensen
Sep 07 2016 01:55
You're very welcome. I've benefitted from so much help from other people, glad to help out a little bit.
Paul Martin
@Spazholio
Sep 07 2016 01:56
Also, can we please spare a moment of silence for what’s apparently about to happen to @garykidd’s battery?
Eric Jensen
@elnjensen
Sep 07 2016 01:56
Ha!
garykidd
@garykidd
Sep 07 2016 01:56
and what does the 'normal' refer to....I know it isnt referring to anything about me (so let's just take care of that for one)
Paul Martin
@Spazholio
Sep 07 2016 01:57
I don’t know. Oddly enough, mine doesn’t say that.
Eric Jensen
@elnjensen
Sep 07 2016 01:57
It's the pump status somehow, but I don't know what the other options are. Presumably normal is better than other things it might be...
Not normal? :wink:
garykidd
@garykidd
Sep 07 2016 01:58
exactly!
Eric Jensen
@elnjensen
Sep 07 2016 01:58
blob
Paul Martin
@Spazholio
Sep 07 2016 01:58
I think that battery status belongs to someone else. Abby someone.
Eric Jensen
@elnjensen
Sep 07 2016 01:59
Just thought I'd throw that in there so you can worry about my battery, too, Paul!
garykidd
@garykidd
Sep 07 2016 01:59
so on to another question if I may....
Eric Jensen
@elnjensen
Sep 07 2016 01:59
You may, but I need to go to bed soon, so no guarantees...
garykidd
@garykidd
Sep 07 2016 01:59
is this all you need to do enable cron to start loop?
oref0 cron-5-minute-helper do-everything
Paul Martin
@Spazholio
Sep 07 2016 02:00
It…sounds right? But I’ve never used that method. What happens if you run it? What gets entered in your crontab -e?
garykidd
@garykidd
Sep 07 2016 02:02
I'm thinking this an alternative to crontab -e altogether.
pi@raspberrypi:~/APS301 $ oref0 cron-5-minute-helper do-everything
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

*/5 * * * * (cd /home/pi/APS301 && time do-everything ) 2>&1 | logger -t openaps-loop
Paul Martin
@Spazholio
Sep 07 2016 02:04
Oh, it is. But crontab -e will show what’s been entered. crontab -l works for that.
And it looks right to me.
Eric Jensen
@elnjensen
Sep 07 2016 02:05
So that is sending output to the screen only, I think. But you can pipe the output into your cron file. But be careful that you don't overwrite something you want to keep.
Does crontab -l show anything right now @garykidd ?
If it doesn't, you can create a new crontab, with the output you showed above, by running the command I'm about to type. But I won't type it yet because I want to wait and make sure you won't be wiping something you'll regret...
garykidd
@garykidd
Sep 07 2016 02:08
Nah, I dont think so...wait..maybe I'm missing something. The data my rig isprocessing thus far is full of tests and not reallybeing used fro anything critical...at thispoint...if that's what you're getting at?
crontab -l show nothing actually.
Eric Jensen
@elnjensen
Sep 07 2016 02:09
OK, great.
So if you type oref0 cron-5-minute-helper do-everything it just prints info to the screen, but we want to get that text into your crontab file instead.
So instead, type oref0 cron-5-minute-helper do-everything | crontab -
Giving the 'minus' argument to crontab causes it to read its input from whatever command is listed before it, sending its output.
That 'pipe' (|) sends output from one command into another.
Eric Jensen
@elnjensen
Sep 07 2016 02:14
OK, I need to go make my kids' lunches for school tomorrow and then head to bed. Hopefully this will get you going. Keep in mind that once you put that command into cron, your machine will be running it every five minutes. That's what the */5 means. If you want it to stop, then do crontab -e to edit the file, and either delete the line or put a # in front of it to comment it out. You can also add multiple lines to cron, of commands you want to run at different times. For example, I have two slightly different loop setups that I run in day vs. overnight.
garykidd
@garykidd
Sep 07 2016 02:16
@elnjensen awesome. thanks.
Paul Martin
@Spazholio
Sep 07 2016 02:16
I highly recommend using a # instead of deleting. Just to make life easier in the future.
garykidd
@garykidd
Sep 07 2016 02:17
@Spazholio yup...I love it. reminds me of multiplying a complex excel formula by 0 so you can remove the *0 part to revert back...kind of
Hmmmm...do I maybe need to insert an openaps into oref0 cron-5-minute-helper do-everything ...to make it oref0 cron-5-minute-helper openaps do-everything ?
Paul Martin
@Spazholio
Sep 07 2016 02:20
What does crontab -l show now?
garykidd
@garykidd
Sep 07 2016 02:21
pi@raspberrypi:~/APS301 $ crontab -l
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

*/5 * * * * (cd /home/pi/APS301 && time do-everything ) 2>&1 | logger -t openaps-loop
Paul Martin
@Spazholio
Sep 07 2016 02:22
Yeah, I think adding an openaps in there might be prudent. I don’t believe do-everything is a command.
garykidd
@garykidd
Sep 07 2016 02:23
ok...so just double checking here.....
oref0 cron-5-minute-helper openaps do-everything | crontab -
Paul Martin
@Spazholio
Sep 07 2016 02:24
I don’t know what the oref0 command would be, but if it outputs */5 * * * * (cd /home/pi/APS301 && time openaps do-everything ) 2>&1 | logger -t openaps-loop then that might be right. Worth a shot.
Also, I don’t know if you need to have your NIGHTSCOUT_HOST and API_SECRET variables set in your crontab anymore, but you might.
garykidd
@garykidd
Sep 07 2016 02:25
pi@raspberrypi:~/APS301 $ crontab -l
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

*/5 * * * * (cd /home/pi/APS301 && time openaps do-everything) 2>&1 | logger -t openaps-loop
I'm pretty sure its working
garykidd
@garykidd
Sep 07 2016 02:30
besides looking at NS, what reports are you watching to see what's working..... oref-predict/oref0.json ?
definitely working now.
@Spazholio @elnjensen Thanks very much!
Paul Martin
@Spazholio
Sep 07 2016 02:32
Glad to hear it!
garykidd
@garykidd
Sep 07 2016 02:33
Pulling BGs from dex receiver...but I think I should probably change to pull from NS
Paul Martin
@Spazholio
Sep 07 2016 02:38
It’s fairly trivial to switch that. Let me know if you need assistance with that.
garykidd
@garykidd
Sep 07 2016 02:48
I'm thinking that I just use openaps use ns shell get entries.json to populate my raw-cgm/cgm-raw.json maybe?
garykidd
@garykidd
Sep 07 2016 03:02
@Spazholio gonna pack it in for tonight. thanks again for your help. thanks @elnjensen as well for tonight. rest easy gents.
Paul Martin
@Spazholio
Sep 07 2016 03:02
Sorry for the delay. Hit me up tomorrow if you want to give it a shot.
garykidd
@garykidd
Sep 07 2016 03:03
@Spazholio thanks...will liklely do that....
and how do I kill the crontab process?
Paul Martin
@Spazholio
Sep 07 2016 03:11
You don’t. You comment out the line in your crontab to make it stop running.
andyhandy
@andyhandy
Sep 07 2016 11:19
hi all - anyone able to help me trouble shoot this? '''openaps report invoke enact/suggested.json
determine-basal://text/shell/enact/suggested.json
BG data is too old, or clock set incorrectly Mon Sep 05 2016 22:01:47 GMT+1000 (AEST) vs Wed Sep 07 2016 21:15:20 GMT+1000 (AEST)'''
Chris Oattes
@cjo20
Sep 07 2016 11:22
andyhandy: It means that it hasn't had any CGM data in the last 45 mintues
andyhandy
@andyhandy
Sep 07 2016 11:55
@cjo20 thanks
Scott Leibrand
@scottleibrand
Sep 07 2016 11:55
Or is it the other way around? Check date vs. the dates in glucose.json.
Newer versions of oref0 say which time is which.
andyhandy
@andyhandy
Sep 07 2016 11:58
pi@raspberrypi:~/myopenaps $ cat monitor/glucose.json
[
{
"trend_arrow": "FLAT",
"system_time": "2016-09-08T06:38:43",
"display_time": "2016-09-07T21:41:41",
"glucose": 119
},
{
"trend_arrow": "45_DOWN",
"system_time": "2016-09-08T06:33:44",
"display_time": "2016-09-07T21:36:42",
"glucose": 122
},
{
"trend_arrow": "FLAT",
"system_time": "2016-09-08T06:13:36",
"display_time": "2016-09-07T21:16:34",
"glucose": 142
},
{
"trend_arrow": "FLAT",
"system_time": "2016-09-08T06:08:37",
"display_time": "2016-09-07T21:11:35",
"glucose": 142
},
{
"trend_arrow": "FLAT",
"system_time": "2016-09-08T06:03:35",
"display_time": "2016-09-07T21:06:33",
"glucose": 142
}
]pi@raspberrypi:~/myopenaps $ date
Wednesday 7 September 21:58:07 AEST 2016
what is "system time" vs "display time"?
R. Dennis Steed
@rdsteed
Sep 07 2016 13:03
AEST should be 10 hours ahead of UTC (system time). It looks like the "system times" in the glucose.json file are wrong, since they are still in the future.
Scott Leibrand
@scottleibrand
Sep 07 2016 13:07
Don't worry about the CGM system time. It can't be changed, and isn't used for anything.
Looks like your glucose data is old, or your CGM time is off.
Check the time on the CGM display, and if that is correct, make sure your loop alias is properly refreshing the CGM data each loop.
Eric
@ecc1
Sep 07 2016 15:16
With both normal and icicle basal rendering, my NS display puts text labels for every temp basal start and stop underneath the main bg graph. That makes it very cluttered when looping; is there a way to disable it?
Dana Lewis
@danamlewis
Sep 07 2016 15:17
That's not usual, sounds like something else got enabled?
Eric
@ecc1
Sep 07 2016 15:37
It's my own client, not oref0, uploading the info, so I'm probably not doing something quite the way NS expects.
Dana Lewis
@danamlewis
Sep 07 2016 15:44
hm, probably, adding data to a field it’s not expecting
garykidd
@garykidd
Sep 07 2016 15:50
It'd be great to be able to mouse-over basal to see actual level like you can on BG.
Eric Jensen
@elnjensen
Sep 07 2016 15:50
So I figured out something useful today which may not be news to anyone else, but I'll mention it in case it helps. I've had wpa_supplicant configured to connect to my home wifi, work wifi, and phone wifi tethering - and all of those were working OK, but it sometimes could take a long time for the RPi to notice that a new network was available. Like I'd leave home and go to work, and sometimes it would take 10 minutes for it to connect to that wifi, but sometimes it wouldn't do it at all. I discovered that if I run wpa_cli scan from the command line, that makes it notice right away if a network is available, and connect to it if it's configured in my wpa_supplicant.conf. So I put that line in my crontab to run every few minutes, and now things are great - it jumps on the available network (including phone tethering if I turn it on) quickly. Is it worth putting this tip in the startup docs? Or have other people not had this issue?
eyim
@eyim
Sep 07 2016 15:57
@elnjensen Great hint Eric - really helpful. I ran into that problem a lot.
garykidd
@garykidd
Sep 07 2016 16:04
@elnjensen I think it's definitely worth including.
so if you're away from internet access but able to operate obtain BG from dex receiver. How do you monitor what's going on...or do you just trust it?
Eric
@ecc1
Sep 07 2016 16:24

I think I fatally damaged one of my Edison modules by using a sketchy LiPo battery. It had been working fine, but one morning I found it had shut down, and when I plugged in USB power, which normally recharges the battery, the Edison became burning hot and shut itself down again. Since then I haven't been able to get it to boot past the "waiting to receive application" stage, and I haven't been able to flash it, even with the recovery tools.

In the future I'll stick to Adafruit batteries, and use a separate charger board as a "cutout" instead of the onboard mini-breakout charger.

Scott Leibrand
@scottleibrand
Sep 07 2016 16:25
@elnjensen I'll have to give that a try. definitely sounds like something that should be in the docs
or even made part of the cron helper. :)
Brandon Faloona
@bfaloona
Sep 07 2016 16:57
I'm following the mmeowlink prepare-the-edison-for-openaps wiki page...
I flashed the edison! :sparkles:
What does this setup step do?
sed -i '/^deb http...ubilinux.*$/d' /etc/apt/sources.list
Eric Jensen
@elnjensen
Sep 07 2016 17:27
@bfaloona Briefly, that command reads the file specified, finds lines that match the specified pattern, and deletes them. I can unpack it more for you if you want (or you can google for more info on sed), but that's the short version. sed (and its friends, awk and perl) are super useful for being able to do quick manipulations of files without having to open them in a text editor.
Brandon Faloona
@bfaloona
Sep 07 2016 17:31
Thanks @elnjensen . I had expected the opposite behavior, so I was struggling with that. :)
Makes sense
In general, how sensitive is the edison to touch while it's on? For example, if I hold the edison by a connected GPIO breakout board (thus touching the connections), do I risk shorting anything? I can't tell if I'm being too careful or too careless.
Eric
@ecc1
Sep 07 2016 17:36
Shouldn't be a problem unless your hands are wet, but better to hold it by the edges of the board.
Brandon Faloona
@bfaloona
Sep 07 2016 17:46
Great, thanks @ecc1
garykidd
@garykidd
Sep 07 2016 17:51
Anyone have an estimate for what it might cost per month for pay as you go on azure for typical openaps setup?
Brandon Faloona
@bfaloona
Sep 07 2016 17:57
Thank you @oskarpearson for the great instructions https://github.com/oskarpearson/mmeowlink/wiki/Prepare-the-Edison-for-OpenAPS
It was a fantastic guide but I noticed several confusing phrases where I did not know which computer to run the command on. I'm hesitant to edit the page because my experience with the edison is zero.
Brandon Faloona
@bfaloona
Sep 07 2016 18:12
@garykidd I use heroku for nightscout and noticed just now that i'm still on the free plan. I have not noticed any problems with this, but the free plan is not 24x7. I plan to move to the $7/month Hobby plan.
The free plan gives you 1500 hours each month.
https://devcenter.heroku.com/articles/free-dyno-hour-faq#how-many-free-dyno-hours-will-i-receive
garykidd
@garykidd
Sep 07 2016 18:12
and is mongo in free category as well?
Brandon Faloona
@bfaloona
Sep 07 2016 18:14
Yes, I think mongo / mLab is free for nightscout type usage.
Brandon Faloona
@bfaloona
Sep 07 2016 18:20
I just reviewed Heroku's new (June 1st) policy for Free accounts. Sounds like if you only host one or two sites on a free account, it CAN run 24x7. You don't get the other benefits of a Hobby account, but your app won't get put to sleep for 6 hours a day like they were doing pre-June 1st.
I've never used Azure hosting, but I'm a HUGE fan of Heroku. They are great!
garykidd
@garykidd
Sep 07 2016 18:21
Do you get the sense that more loopers are using Heroku?
Brandon Faloona
@bfaloona
Sep 07 2016 18:21
I think most folks use Azure to :loop: . I suspect that is because Heroku used to turn off your free sites for 6 hours a day.
:loop: == loop :)
Scott Leibrand
@scottleibrand
Sep 07 2016 18:34
most people don't use free sites to loop. if you're relying on nightscout to visualize the dosing of a life-critical hormone, you wan to pay the few bucks a months to make sure it works.
Eric Jensen
@elnjensen
Sep 07 2016 18:59
@scottleibrand Could you clarify? There's a pay-as-you-go plan in Azure, so whether it is free or not depends on data volume, so not clear to me how using more data (= not free) makes it more reliable than using less data (= free).
Jason Calabrese
@jasoncalabrese
Sep 07 2016 19:08
I wouldn't trust the free version of mongolab either, you will hit the limits, only a matter of time
Scott Leibrand
@scottleibrand
Sep 07 2016 19:12
@elnjensen almost everyone using NS with openaps blows through the free limits on the PAYG plan, so there it's just a matter of not expecting it to be free, and comparing to the appropriate non-free heroku (or self-hosting) plan
garykidd
@garykidd
Sep 07 2016 19:15
So any idea how much it may cost for azure per month then--seems like quality is good. And sounds like I shouldn't be using free version of ML...
Scott Leibrand
@scottleibrand
Sep 07 2016 19:16
Not sure. I self-host on DigitalOcean
garykidd
@garykidd
Sep 07 2016 19:17
does that address both database and hosting needs?
Scott Leibrand
@scottleibrand
Sep 07 2016 19:18
yes, but you have to know how to play sysadmin on a full linux server
if you don't do that already for work or other projects, azure/heroku/mongolab are better
eyim
@eyim
Sep 07 2016 19:18
I found Azure to be confusing. There wasn't any sort of tier pricing that I could find (although it has been a while since I looked). I think that first month it was like $50 for me but I think I over provisioned my instance. I eventually went with heroku for $7 per month. I found heroku easier to use as well
Jason Calabrese
@jasoncalabrese
Sep 07 2016 19:20
there's also the option of running NS on heroku and mongo at digitalocean, a little less sysadmin work
mongo mostly just works
Scott Leibrand
@scottleibrand
Sep 07 2016 19:20
still have to secure your server etc.
garykidd
@garykidd
Sep 07 2016 19:21
@eyim thanks!
garykidd
@garykidd
Sep 07 2016 19:26
is this then a better plan than the free tier on mongo....would you recommend it?
Russell Gardner
@RussGG
Sep 07 2016 19:26
I just checked on Azure and if you up from free to $9.67 you don't get any more storage. You need to go to $55 to get 10g.
garykidd
@garykidd
Sep 07 2016 19:26
blob
this relating to my prior question....
@eyim has the heroku plan for $7/month been adequate for full-time openaps implementation?
eyim
@eyim
Sep 07 2016 19:32
Yes for me it has. But one caveat is that we aren't always 24/7/365 usage. We usually give my son a day or so rest between sensor changes to allow his skin to heal. But it hasn't ever been a problem for us at $7 per month
Brandon Faloona
@bfaloona
Sep 07 2016 19:37
I'm installing openaps on the edison (THE CROWD GOES WILD) but I'm confused about oref0 / node / npm
Scott Leibrand
@scottleibrand
Sep 07 2016 19:38
oref0 is written in js, which is executed by node, and managed by the node package manager
Brandon Faloona
@bfaloona
Sep 07 2016 19:39

Looks like the setup instructions had me remove nodejs, but I'm not sure what should replace it. ??

Later, I'm unable to install with npm

edison@openaps-lp-edison:~/src/openaps$ sudo npm install -g git://github.com/openaps/oref0.git#dev
sudo: npm: command not found
sudo apt-get install node ??
Scott Leibrand
@scottleibrand
Sep 07 2016 19:40
so node is weird. there was once upon a time a totally unrelated linux binary called node, so the node stuff got called nodejs
but some people thought that was stupid, so they made the node js thing be called node
now there are several conflicting packages that install node js as either node or nodejs. one of them is called nodejs-legacy if I recall correctly
Brandon Faloona
@bfaloona
Sep 07 2016 19:41
This line from the instructions is confusing me: dpkg -P nodejs nodejs-dev Does that remove nodejs? I tried rerunning it and it complained it can't remove a package that is not installed.
Scott Leibrand
@scottleibrand
Sep 07 2016 19:41
you might be able to just sudo apt-get install npm
is -P the "purge" command in dpkg?
Brandon Faloona
@bfaloona
Sep 07 2016 19:44
Ok, installed npm and now oref0. Yay.
If you install openaps release, does it include oref0 ? If so.... When I install openaps dev, does it install a version of oref0 ??
Jason Calabrese
@jasoncalabrese
Sep 07 2016 19:47
no
they're separate installs
the openaps toolkit can be used without oref0
Brandon Faloona
@bfaloona
Sep 07 2016 20:01
Ok, thanks!
jwedding
@jwedding
Sep 07 2016 20:16
Since hosting has popped back up, we DO have essentially an open account with MS Azure. We could stand up a cluster of Linux boxes, and essentially create an mLab just for this community...and hand out VMs for folks that need to run Nightscout, etc. The Foundation has agreement with MS to essentially give us these resources to try and help with research, and a common db framework might make some of the aggregation a hella lot easier.
I've got the resources, I just need some of you folks that are smarter with the back end pieces to take them and run...
Brandon Faloona
@bfaloona
Sep 07 2016 20:19
If I want to remove/upgrade the battery attached to this board:
http://www.mcmelectronics.com/product/SPARKFUN-DEV-13037-/83-16815
What kind of battery should I buy? Any links that might point me to an example of someone else doing this?
Jason Calabrese
@jasoncalabrese
Sep 07 2016 21:01
@jwedding can't run a hosting service with volunteers, would need real admins if we were going to run something at azure, and would need to pay them
since the foundation said hosting must be free there is no Nightscout.net
Jason Calabrese
@jasoncalabrese
Sep 07 2016 21:07
I still think hosting was the reason for the foundation to exist, and charging a fair price for it would have funded the foundation
Tim Street
@tim2000s
Sep 07 2016 21:10
As I'm running out of ideas, anyone have any idea why my Pi3 might not be connecting to a network?
Paul Martin
@Spazholio
Sep 07 2016 21:23
@tim2000s What’s going on? Give some details, I’ll see if I can help.
Mitchell Slep
@moomoobloo
Sep 07 2016 21:25

A few hours ago every openaps command started failing with a git error:

openaps report invoke monitor/clock.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
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 52, in __call__
    self.epilog( )
  File "/home/pi/src/openaps/bin/openaps-report", line 69, in epilog
    super(ReportToolApp, self).epilog( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 75, in epilog
    self.create_git_commit( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 98, in create_git_commit
    self.repo.index.commit(msg)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/index/base.py", line 945, in commit
    author_date=author_date, commit_date=commit_date)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/objects/commit.py", line 315, in create_from_tree
    parent_commits = [repo.head.commit]
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/refs/symbolic.py", line 183, in _get_commit
    obj = self._get_object()
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/refs/symbolic.py", line 176, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/refs/symbolic.py", line 125, in dereference_recursive
    hexsha, ref_path = cls._get_ref_info(repo, ref_path)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.2-py2.7.egg/git/refs/symbolic.py", line 143, in _get_ref_info
    assert(len(tokens) != 0)
AssertionError

The report is created successfully, but the command still fails and causes the loop to die. oref0-fix-git-corruption says there is no git corruption, and I've tried git reset --hard. Any ideas what else could be causing the failure?

Also, is there a quick way to disable the git tracking in openaps while I figure out the error?
Tim Street
@tim2000s
Sep 07 2016 21:35
@Spazholio precisely nothing. I've tried
ifconfig wlan0 down
ifconfig wlan0 up
and it doesn't seem to find the router
Paul Martin
@Spazholio
Sep 07 2016 21:35
Ok, well it wouldn’t. All that’s doing is turning the interface off and on, respectively.
Give me a moment to check my Pi3 setup.
What does your /etc/network/interfaces file look like?
Tim Street
@tim2000s
Sep 07 2016 21:37
Sure - my /etc/network/interfaces looks like:
auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
Scott Leibrand
@scottleibrand
Sep 07 2016 21:38
@moomoobloo you should be using oref0-reset-git, not oref0-fix-git-corruption.
Paul Martin
@Spazholio
Sep 07 2016 21:38
Ok, it looks like you’ve got the iface wlan0 inet dhcp in there twice. Should be able to remove the bottom one, no sweat.
Now what’s in your /etc/wpa_supplicant/wpa_supplicant.conf file? Strip out the passwords, please.
Mitchell Slep
@moomoobloo
Sep 07 2016 21:39
@scottleibrand tried that as well, same result
Paul Martin
@Spazholio
Sep 07 2016 21:39
Also, have you followed the directions on this page? https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-0/rpi.html
Just so I know how far down the rabbit hole you’ve gone so far. =)
Scott Leibrand
@scottleibrand
Sep 07 2016 21:40
@moomoobloo does git status fail?
Mitchell Slep
@moomoobloo
Sep 07 2016 21:40
git status works, and i can make manual commits to the repo
Tim Street
@tim2000s
Sep 07 2016 21:41
Will remove that line.
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="MiPhone"
    #psk=""
    psk=
}
network={
    ssid="BTHub4-MZQN"
    #psk=""
    psk=
}
network={
    ssid="shelley44"
    #psk=""
    psk=
}
The system was set up according to the walkthrough and has worked successfully on the BTHub4 conneciton whilst away. On getting home, shelley44 is the one that won't connect.
I haven't tried MiPhone
Scott Leibrand
@scottleibrand
Sep 07 2016 21:44
How about git diff?
If that fails, you need the version in dev: https://github.com/openaps/oref0/blob/dev/bin/oref0-reset-git.sh#L52
If git diff succeeds, then you've found a new corner case.
Tim Street
@tim2000s
Sep 07 2016 21:45
Okay - MiPhone works - the issue is with the shelley44 network.
I know it's showing on channel 6 (I understand the RPi3 may have issues with channels 12 and 13)
And I don't have MAC address filtering set up on the router.
Paul Martin
@Spazholio
Sep 07 2016 21:52
I would also change your country line if you’re in the US.
Here’s what my home network wpa_supplicant.conf file looks like:
network={
        ssid=“MySSID"
        psk=“MyPassword"
        key_mgmt=WPA-PSK
}
Tim Street
@tim2000s
Sep 07 2016 21:54
Hmmm. Interesting.
Country line is correct as I'm in the UK
Paul Martin
@Spazholio
Sep 07 2016 22:00
Ok. I know my Pi3 had “GB” as the default, so I assumed it might be the same with yours.
Tim Street
@tim2000s
Sep 07 2016 22:01
WOnder if the difference is that this router is using WPA2-Personal
Paul Martin
@Spazholio
Sep 07 2016 22:03
WPA-PSK would cover that. Couldn’t hurt to try. =)
Tim Street
@tim2000s
Sep 07 2016 22:03
Hmmm - Made no difference.
All very odd.
Paul Martin
@Spazholio
Sep 07 2016 22:07
What does this get you? sudo dhclient -v wlan0
Tim Street
@tim2000s
Sep 07 2016 22:07
Listening on LPF/wlan0/b8:27:eb:b4:84:fe
Sending on   LPF/wlan0/b8:27:eb:b4:84:fe
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
Brandon Faloona
@bfaloona
Sep 07 2016 22:08
@ecc1 Thanks for the battery heads up (and I'm sorry to hear about your bricked edison). Can you suggest adafruit batteries that might work as a replacement for the 400mAh 3.7v battery attached to the Sparkfun edison battery board? I'm hoping to remove that battery and run a wire to a larger one.
Paul Martin
@Spazholio
Sep 07 2016 22:09
Yeah, seems like you’re not paired with the AP for some reason.
Tim Street
@tim2000s
Sep 07 2016 22:10
No. That's the odd bit, and I've no idea why. Maybe simply restart the router and start again.
Paul Martin
@Spazholio
Sep 07 2016 22:10
Try running sudo wpa_cli. Then run scan and wait for that to complete (should only take a second or so) and then run list_networks. See if the AP shows up there?
Brandon Faloona
@bfaloona
Sep 07 2016 22:11
@Spazholio @tim2000s Could the suggestion above about running wpa_cli scan prove helpful for you?
(I've never tried it)
Tim Street
@tim2000s
Sep 07 2016 22:12
Having issues with wpa_supplicant ....
wpa_cli v2.3
Copyright (c) 2004-2014, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

Could not connect to wpa_supplicant: (null) - re-trying
Paul Martin
@Spazholio
Sep 07 2016 22:12
Yeah, running sudo wpa_cli scan followed up with sudo wpa_cli list_networks would do the same thing, I think.
Jason Calabrese
@jasoncalabrese
Sep 07 2016 22:12
that could be a typo in your config file
Paul Martin
@Spazholio
Sep 07 2016 22:13
Yeah, mine shows this:
wpa_cli v2.3
Copyright (c) 2004-2014, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Selected interface 'wlan0'

Interactive mode
Tim Street
@tim2000s
Sep 07 2016 22:13
It is
Paul Martin
@Spazholio
Sep 07 2016 22:13
Notice how it found the interface on mine but not yours?
Tim Street
@tim2000s
Sep 07 2016 22:13
Yes. Which is all rathe rstrange
Paul Martin
@Spazholio
Sep 07 2016 22:14
You could always back up your current wpa_supplicant.conf file, then try the method in the docs from the beginning. Just to eliminate any typos or other oddities.
Tim Street
@tim2000s
Sep 07 2016 22:14
I'll give that a quick run through
Paul Martin
@Spazholio
Sep 07 2016 22:16
And the file is /etc/wpa_supplicant/wpa_supplicant.conf and NOT /etc/wpa_supplicant.conf right? I can’t recall where, but I’ve seen the latter before in docs, but it should be the former.
Tim Street
@tim2000s
Sep 07 2016 22:16
Yes, it's the former
Paul Martin
@Spazholio
Sep 07 2016 22:16
Ok, good.
Eric
@ecc1
Sep 07 2016 22:22
@bfaloona Sorry, no personal experience with the Sparkfun battery block. But I know others on here have used it with larger batteries.
Tim Street
@tim2000s
Sep 07 2016 22:28
@Spazholio Thanks for your help. It's not working so I'll have to go to bed and look at it tomorrow.
Meagan Pavey
@Tetheredexpat_twitter
Sep 07 2016 22:38
Hoping to connect with one or more OpenAPS users in southern Ontario to help me get my rig going. Can reciprocate with wine.
lmaguire
@lmaguire
Sep 07 2016 22:58
Hi there, would anybody be willing to help me try and figure this one out? openaps report invoke nightscout/uploadedns://JSON/shell/nightscout/uploaded.json
Nothing to upload.
No JSON object could be decoded
Lynne Butts
@flutelynne_twitter
Sep 07 2016 23:08
@garykidd When my NS site isn't viewable for OpenAPS, only Dexcom readings...using the receiver connected to the Pi, I just glance at my pump to see the circle, then the ESC key on the pump to see what it is doing. At that point, I could pull out a portable hotspot device and connect that way, but it takes a while... not convenient. As long as I am in range and can occasionally check the pump, I am fine for the hours I am gone. It does populate the site once home, though.
lmaguire
@lmaguire
Sep 07 2016 23:09
Also this problem? openaps report invoke nightscout/recent-treatments.json ns://JSON/shell/nightscout/recent-treatments.json json: error: could not read "model.json": Error: ENOENT, no such file or directory 'model.json' reporting nightscout/recent-treatments.json
Mitchell Slep
@moomoobloo
Sep 07 2016 23:47
@scottleibrand git diff was succeding too. I deleted the .git directory like oref0-reset-git.sh was doing in dev, and that fixed it. I noticed that git diff was showing a pending deletion of a file with a bad path. It was trying to delete myopenaps/monitor/glucose.json, which never existed, instead of monitor/glucose.json, even after git reset. Not sure how it got into that state.
Eric Jensen
@elnjensen
Sep 07 2016 23:50
@lmaguire Sounds like your Nightscout reports either don't exist or are empty. For your second error, it's complaining that you don't have the model.json file, which you would need to create from the pump: openaps use pump model would give it to you interactively, but you'd want to create a report to create model.json
You can create a report to create model.json, then make sure that gets invoked when you grab pump info, e.g. battery, model, status, etc.
Related to the paid / free hosting discussion earlier, after reading that I looked at the limits on the Azure free service, and I'm having a hard time seeing where I'm going to exceed those (though I'm quite likely to be proved wrong as I'm new at this!).
Looks like 5 GB / month of IO (limited to 165 MB/day), and total storage of 1 GB. That is a lot of text files - data stream from OpenAPS (even at once every 5 minutes) seems pretty lightweight. What am I overlooking?