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

3rd
Jun 2016
Nathan Racklyeft
@loudnate
Jun 03 2016 00:00
@fjungman yep, I think @oskarpearson and @eszcloud are still actively using it.
Paul Martin
@Spazholio
Jun 03 2016 00:00
@eluhrs Curious if you have any pics of how you have everything put together in that case (thanks for that again, btw). I’d love to see how you have everything connected so that it can be pieced together, etc.
Nathan Racklyeft
@loudnate
Jun 03 2016 00:01
It doesn't traverse subdirectories, but that would be a simple change.
Ben West
@bewest
Jun 03 2016 00:03
:| means repeat in music, when you go for the repeat, you are essentially the computer executing a loop
Sarah Hodson Grady
@shgrady
Jun 03 2016 00:16
So, I used @flutelynne_twitter 's trick of the IP to SSH into the Pi, but neither the suggested or the trick is allowing me to ssh-copy-id my github ssh key, confused by logging out first, exactly which terminal does that go into? I get ERROR: No identities found either way
Paul Martin
@Spazholio
Jun 03 2016 00:21
@bewest I’m coming up on a sensor change session. Did you want me to get some info from the Dexcom at that time? Using oref0-raw or something like that?
Ben West
@bewest
Jun 03 2016 00:22
the new stuff has dexcom calibrations that can be fed into oref0-raw along with output from oref0_glucose
iter_calibrations 5 or similar seems to work well
Paul Martin
@Spazholio
Jun 03 2016 00:24
Is oref0_glucose a standalone command I should have?
Ben West
@bewest
Jun 03 2016 00:25
it's part of the dexcom stuff
so openaps use cgm -h
should be in there
Paul Martin
@Spazholio
Jun 03 2016 00:25
Oh! It’s not a standalone. Got it.
Ben West
@bewest
Jun 03 2016 00:25
openaps use cgm oref0_glucose :-)
it also has it's own openaps use cgm oref0_glucose -h
Paul Martin
@Spazholio
Jun 03 2016 00:26
What about the cal.json file it needs?
Ben West
@bewest
Jun 03 2016 00:26
openaps use cgm iter_calibrations 5
Paul Martin
@Spazholio
Jun 03 2016 00:27
Got it. Then I can just lsgaps that into my regular monitor/glucose.json?
Ben West
@bewest
Jun 03 2016 00:27
for calibrations, it's just for oref0 raw
so it'll be openaps use oref0 shell raw monitor/glucose.json monitor/calibrations.json
and iter_calibrations is used to create monitor/calibrations.json
and monitor/glucose.json is generated from oref0_glucose
oref0-raw requires raw sensor readings in the incoming glucose data, which is included by oref0_glucose
or from iter_sensor and friends
Paul Martin
@Spazholio
Jun 03 2016 00:31
Well, my monitor/glucose.json is coming from merging my raw-ns/ns-glucose-zoned.json and raw-cgm/glucose-zoned.json (remember the fun of setting that up?) - so is that not usable? Do I have to use a different file for oref0-raw?
Maybe I should just point it at raw-cgm/glucose-zoned.json instead?
Ben West
@bewest
Jun 03 2016 00:32
one of those needs to be from oref0_glucose
Paul Martin
@Spazholio
Jun 03 2016 00:32
Checking...
Ben West
@bewest
Jun 03 2016 00:32
the ns data won't have the sensor readings if it's from share
Paul Martin
@Spazholio
Jun 03 2016 00:32
Yep, that file is pulled via oref0_glucose.
Ben West
@bewest
Jun 03 2016 00:33
so the end result should mostly work
I haven't set this up yet either ;-)
just been testing thing out
Paul Martin
@Spazholio
Jun 03 2016 00:33
Yeah, well there’s only a 2 hour window every week that it can be done, unless you have a testing rig set up, so I can see how it’d be slow going. =)
Do you want any of the raw data? Or want me to run some things so you can get some data from it?
fjungman
@fjungman
Jun 03 2016 00:34
@loudnate Thanks! I'll try setting it up...
Paul Martin
@Spazholio
Jun 03 2016 00:36
I wonder if there’s a way to modify the loop to detect when it’s in calibration mode and use the raw data instead of the usual NS + CGM data...
Actually, if I’m using the lsgaps method to merge the two raw files (which I’m not yet) and create monitor/glucose.json, then I should be able to just merge the data pulled in via oref0_raw into that file and the upload should go as usual…right?
fjungman
@fjungman
Jun 03 2016 00:48
@Spazholio I think @bewest is passed out at his keyboard now, after that tutorial session. I know I'm exhausted reading it... :)
Sarah Hodson Grady
@shgrady
Jun 03 2016 00:48
errors in crontab file, can't install when trying to "add an entry to check the connection every minute and reconnect if necessary -
          • /home/pi/bin/check-and-connect-bt-pan.sh"
Paul Martin
@Spazholio
Jun 03 2016 00:49
@fjungman I know I certainly would be. =)
@shgrady What’s the error?
Sarah Hodson Grady
@shgrady
Jun 03 2016 00:52

"/tmp/crontab.gClhxz/crontab":23: bad command
errors in crontab file, can't install.
Do you want to retry the same edit? (y/n)
before, also says this: pi@raspberrypi:/etc/systemd/system $ crontab -e
no crontab for pi - using an empty one

Select an editor. To change later, run 'select-editor'.

  1. /bin/ed
  2. /bin/nano <---- easiest
  3. /usr/bin/vim.tiny

Choose 1-3 [2]: 2
crontab: installing new crontab

Paul Martin
@Spazholio
Jun 03 2016 00:53
Ok, so when you type crontab -e now, do you see the command you want in there?
Sarah Hodson Grady
@shgrady
Jun 03 2016 00:55
no, the bit I cut and pasted is not there, though I thought I exited with Ctrl-X and Y
Paul Martin
@Spazholio
Jun 03 2016 00:55
Ok, so scroll to the bottom, and paste the following: * /home/pi/bin/check-and-connect-bt-pan.sh
Then save.
GRRRRR
That’s 5 asterisks.
With a space in between each one.
Sarah Hodson Grady
@shgrady
Jun 03 2016 00:57
ah, spaces....its the little things that get me
while I have your attention...can you possibly help me with the SSH key copy?
Paul Martin
@Spazholio
Jun 03 2016 00:59
Sure thing. Fill me in?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:00
so I was not able to SSH in following the standard directions, instead I had to do pi@in.se.rt.ip.here
so then, when I went to ssh-copy-id I tried both ways, in both terminals, and always got ERROR: No identities found
Paul Martin
@Spazholio
Jun 03 2016 01:01
What do the “standard directions” say?
Oh!
You don’t have an identity. That’s all. =)
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:01
is what standard directions say
Paul Martin
@Spazholio
Jun 03 2016 01:01
Or…do you? Paste the output of ls ~/.ssh/ please?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:02
there is no output
Paul Martin
@Spazholio
Jun 03 2016 01:02
Ok, so you don’t have an SSH identity set up yet.
Follow the part that says “Generating a new SSH key” here: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:03
so, I do have an output on my machine's terminal.....github_rsa
github_rsa.pub
just not on the Pi's
Paul Martin
@Spazholio
Jun 03 2016 01:05
That’s fine. This is the machine that you’re going to be SSH’ing into the Pi from, correct?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:06
yep
Paul Martin
@Spazholio
Jun 03 2016 01:06
@bewest So…is there a way to dedupe entries in NS? I seem to have…made a mistake. =)
@shgrady Good. Now run the ssh-copy-id command like you did before.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:08
in my machines terminal I get: $ ssh-copy-id pi@raspb
errypi.local
/usr/bin/ssh-copy-id: ERROR: No identities found
Paul Martin
@Spazholio
Jun 03 2016 01:08
Paste the output of ls ~/.ssh/ again please?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:09
$ ls ~/.ssh/
github_rsa
github_rsa.pub
Paul Martin
@Spazholio
Jun 03 2016 01:11
What happens when you type ssh-add?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:12
In the Putty, Could not open a connection to your authentication agent.
Paul Martin
@Spazholio
Jun 03 2016 01:12
Ok, cool. Type this then: eval ssh-agent
Hmmm. That’s going to be eval backtick ssh-agent backtick.
eval `ssh-agent`
There we go. use that.
Then do the ssh-add command again.
There’s another way to do this, if this gives you problems.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:15
Ok, I got my agent number back...
Paul Martin
@Spazholio
Jun 03 2016 01:15
Ok, now run ssh-add
Then run the ssh-copy-id line.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:15
nothing after ssh-add, ok?
Paul Martin
@Spazholio
Jun 03 2016 01:17
Alright, heck with this. Try this instead (sorry for the confusion): ssh-copy-id -i github_rsa.pub pi@your.ip.address.here.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:17
with pi@ip or pi@raspberry?
ah, ok, got it
ok, maybe not

Sarah@SURFACE MINGW64 ~
$ eval ssh-agent
Agent pid 9852

Sarah@SURFACE MINGW64 ~
$ ssh-add

Sarah@SURFACE MINGW64 ~
$ ssh-copy-id -i github_rsa.pu
b pi@10.0.0.33

/usr/bin/ssh-copy-id: ERROR: failed to open ID file 'github_rsa.pub': No such file or directory

Paul Martin
@Spazholio
Jun 03 2016 01:19
Oh, let’s use absolute paths: ssh-copy-id -i ~/.ssh/github_rsa.pub pi@your.ip.address.here
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:21
BAMN, Number of key(s) added:1
Paul Martin
@Spazholio
Jun 03 2016 01:21
Excellent! Should have used that method first. Sorry about that.
Now you should be able to SSH in without a password.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:21
Thats ok, it makes sense, I just don't have enough experience to guess those things
Paul Martin
@Spazholio
Jun 03 2016 01:24
No worries. Glad it’s working now. =)
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:24
Yes, thank you so much. Do you guys have a coffee fund?
Paul Martin
@Spazholio
Jun 03 2016 01:26
I don’t think so, but if one ever gets set up, I know I’ll be donating. I’ve gotten way more assistance than I’ve given, so I’m right there with you.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:27
Thanks again, now if I can just figure out why the Pi drops the network on restart I can call it a day.
Paul Martin
@Spazholio
Jun 03 2016 01:28
Drops it entirely, or…? Are you wired or wireless?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:29
I would like to be wireless, and have connected, but I am currently wired and still am not connected
online, wicd was suggested
Paul Martin
@Spazholio
Jun 03 2016 01:30
wicd is a good one. Have you tried using it?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:30
and I authenticated to my router once,
Paul Martin
@Spazholio
Jun 03 2016 01:30
I’m not 100% familiar with it, as I have to use another method due to my work network.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:30
yeah, I have it now, but it says "no wireless networks found"
Paul Martin
@Spazholio
Jun 03 2016 01:31
Which model of Pi do you have?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:31
ha ha, yeah I bet, I had to have a hole poked in my firewall at work just to get Nightscout to run
3
Paul Martin
@Spazholio
Jun 03 2016 01:32
If you type in iwconfig do you see a wlan0 interface?
Here’s what mine looks like:
wlan0     IEEE 802.11bgn  ESSID:”My Wireless Network name”  
          Mode:Managed  Frequency:2.427 GHz  Access Point: 2C:30:33:F4:64:8C   
          Bit Rate=72.2 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:5  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:34
i get some info, but then ESSID:off/any
Mode:Managed Access Poiunt:Not-Associated
*Point
sry, since not connected, typing as I look at my HDMI projector
Paul Martin
@Spazholio
Jun 03 2016 01:36
Ok, I don’t know the “recommended” way to do it, but here’s one way that’s pretty simple. Can you paste the contents of your /etc/network/interfaces file? Please strip out any passwords that you might see in there.
Oh boy, you’d have to type that all out. Nevermind. Hang on...
Open that file, and tell me if you see something that looks like:
auto wlan0
iface wlan0 inet dhcp
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:39
there is no file there at /etc/network/interfaces.d
Paul Martin
@Spazholio
Jun 03 2016 01:40
Hmm. Ok, on the HDMI projector screen, you’re in the GUI, right? Not just text? You can move your mouse and such?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:41
I do notice, when opening the Raspberry Pi Configuration >interfaces
there you used to be more than just SSH enabled, I just cannot remember what they other was......yeah GUI
Paul Martin
@Spazholio
Jun 03 2016 01:42
Ok, my setup's a little different so please bear with me - going from memory. =) You should see an icon of two computers in the upper right. A few icons to the left of the clock?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:44
yeah, what's weird, after I did the updates, I have two like that, the leftmost says Not Connected, the rightmost says eth0:STOPPED wlan0:Not associated
Paul Martin
@Spazholio
Jun 03 2016 01:45
Ok, on the rightmost one, click it. You should (I hope I hope I hope) see some wireless networks in there?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:45
Nope, "No Wireless Interfaces Found"
Paul Martin
@Spazholio
Jun 03 2016 01:49
What about the leftmost one?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:50
oh, turns out that is the wicd window, I was opening it from the menu....the wicd network manager says wired network, but is "not connected and no wireless networks found.
GeoffWyche
@GeoffWyche
Jun 03 2016 01:51
@shgrady in a terminal window, does rfkill list all show anything?
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:52
0: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
Paul Martin
@Spazholio
Jun 03 2016 01:53
Hey, that’s a new command. Thank you, @GeoffWyche.
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:53
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
GeoffWyche
@GeoffWyche
Jun 03 2016 01:53
@shgrady only the wireless stuff matters, in this case I think
Yeah, I learned about rfkill the hard way :(
Paul Martin
@Spazholio
Jun 03 2016 01:54
How odd. On my Pi3, I don’t even have the rfkill command...
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:54
so, I need to do something about the Softblock?
GeoffWyche
@GeoffWyche
Jun 03 2016 01:54
Not sure... digging.
maybe: rfkill unblock wifi?
(or rfkill unblock 0)
Sarah Hodson Grady
@shgrady
Jun 03 2016 01:58
Can't open RFKILL control device: Permission denied
GeoffWyche
@GeoffWyche
Jun 03 2016 01:58
sudo rfkill unblock wifi
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:00
that did remove it...someday I will get the hang of not "Run as Administrator" but sudo....unfortunately, still no wireless networks found
Paul Martin
@Spazholio
Jun 03 2016 02:00
I’m curious if it gets re-blocked when you reboot...
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:01
might as well, just a sec
GeoffWyche
@GeoffWyche
Jun 03 2016 02:02
To help remember sudo: it is a contraction of "Do as Super-User" so means about the same.
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:03
nope....remains not soft-blocked
David Cintron
@loudestnoise
Jun 03 2016 02:03
another fun trick is if you type a command and you get a message you can’t do it
type !! and it will retry it with sudo in front
or I’m sorry you type sudo !!
(pi @ raspberrypi): ~/openaps
⇢  apt-get moo
                 (__) 
                 (oo) 
           /------\/ 
          / |    ||   
         *  /\---/\ 
            ~~   ~~   
..."Have you mooed today?"...
(pi @ raspberrypi): ~/openaps
⇢  sudo !!
sudo apt-get moo
                 (__) 
                 (oo) 
           /------\/ 
          / |    ||   
         *  /\---/\ 
            ~~   ~~   
..."Have you mooed today?"...
Dan Piessens
@dpiessens
Jun 03 2016 02:08
@Spazholio did you setup bluetooth wifi on the Edison?
GeoffWyche
@GeoffWyche
Jun 03 2016 02:09
A single ! will recall a previous command by just the first few letters. Handy for re-running commands that are "somewhere" in your command history.
Paul Martin
@Spazholio
Jun 03 2016 02:09
@dpiessens BT tethering?
GeoffWyche
@GeoffWyche
Jun 03 2016 02:09
!serv will recall the last command that started with service for instance.
Dan Piessens
@dpiessens
Jun 03 2016 02:10
@loudestnoise That's hilarious!
@Spazholio bluetooth tethering to your phone
David Cintron
@loudestnoise
Jun 03 2016 02:10
:cow:
Paul Martin
@Spazholio
Jun 03 2016 02:10
I did. Once. It…wasn’t pleasant or fun, and I don’t intend to do it anymore. =)
I’m just using WiFi tethering at this point.
Dan Piessens
@dpiessens
Jun 03 2016 02:11
OK, just curious :)
David Cintron
@loudestnoise
Jun 03 2016 02:11
@dpiessens I tried to get it working on my Pi, pain in the butt
sometimes it randomly works though. I’ll look at my iPhone and see it connected automatically to the Pi via BT
most times not
Dan Piessens
@dpiessens
Jun 03 2016 02:11
yeah I've been trying a few guides keep running into missing tools
Paul Martin
@Spazholio
Jun 03 2016 02:12
And now that I have a Slice of Radio, I no longer have access to BT, so it’s a moot point. =/
Dan Piessens
@dpiessens
Jun 03 2016 02:13
ah ok
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:15
and now I am connected to the wired network again....but still no wireless found....
Eric Luhrs
@eluhrs
Jun 03 2016 02:33
@Spazholio will send pics in a minute.
GeoffWyche
@GeoffWyche
Jun 03 2016 02:37
@shgrady I haven't worked with a Pi in almost a year, so I'm a bit rusty on the topic. Linux was undergoing major changes in wifi handling when the RPi came out -- that part of the problem here.
can you tell me the output of uname -a?
Paul Martin
@Spazholio
Jun 03 2016 02:38
This is definitely peculiar though. Stab in the dark - have you updated your firmware?
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:39
Linux raspberrypi 4.4.11-v7+ #891 SMP Tue May 31 12:30:26 BST 2016 armv71 GNU/Linux
Thanks for trying
Dan Piessens
@dpiessens
Jun 03 2016 02:40
@shgrady have you tried sudo wpa_cli
if you get in and run scan, it will show you what it was doing recently
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:42
Could not connect to wpa_supplicant: (null) - retrying
Dan Piessens
@dpiessens
Jun 03 2016 02:43
do you have an /etc/wpa_supplicant/wpa_supplicant.conf file?
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:44
yes, though, I had gone in through the interface to see if the commands to add my home wifi and my phone hotspot were there and I did not have permission to view
Eric Luhrs
@eluhrs
Jun 03 2016 02:44
IMG_1938.JPG
IMG_1939.JPG
IMG_1940.JPG
Brett
@burgertime14
Jun 03 2016 02:45
@shgrady 'sudo cat /etc/wpa_supplicant/wpa_supplicant.conf'
Eric Luhrs
@eluhrs
Jun 03 2016 02:45
IMG_1941.JPG
IMG_1942.JPG
@Spazholio ^^^
I plan to put together some better photos instructions once I complete my migration from pi to edison.
Speaking of which, how did you solve the time drift problem you posted about earlier? I think that's the last thing I have to work though.
I am still getting the data too old/clock mismatch error.
Paul Martin
@Spazholio
Jun 03 2016 02:47
With the CGM? I think it had to do with other reports failing, and throwing that error. Because everything I could find indicated that the times were correct.
That being said, I do have a fixTime.sh file that I run hourly:
sudo /etc/init.d/ntp stop                                                                                                                                                                                                                                                                                             
sudo ntpd -q -g
sudo /etc/init.d/ntp start
Just in case.
And for some odd reason, I thought you were using a TI stick in that case. My mistake. ERF seems like it would work better for me anyway.
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:49
Ok @burgertime14 hoping this is the problem, but you would think I would "see" networks....
Eric Luhrs
@eluhrs
Jun 03 2016 02:50
The photos on thingiverse show a TI stick, but I've been experimenting with ERF. Either will work, but the ERF just won't be as snug.
I will eventually either shrink the tray/cover a little for ERF rigs or try to fit xdrip hardware into the current size.
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:51

pi@raspberrypi:~ $ sudo cat /etc/wpa_supplicant/wpa_suppcant.conf
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="@Hsbbs04@"

}
Passphrase must be 8..63 characters
network={
ssid="¨Hsbbs04¨"

}

Paul Martin
@Spazholio
Jun 03 2016 02:54
xDrip hardware? Thought that was a software thing?
Brett
@burgertime14
Jun 03 2016 02:55
@shgrady you shouldn't post your psk, others could use it to connect to your wireless, but it looks ok. Here is an easy to understand post discussing the wpa_supplicant.conf : http://ubuntuforums.org/showthread.php?t=263136
Paul Martin
@Spazholio
Jun 03 2016 02:55
Is it just me, or does that wpa_supplicant.conf file look…wrong?
GeoffWyche
@GeoffWyche
Jun 03 2016 02:56
It looks to me like there are multiple entries for the same network, somehow.
Dana Lewis
@danamlewis
Jun 03 2016 02:56
Finally catching up to you awesome group of new loopers. Did I say 70? The official new count is...
!
:fire: :chart_with_upwards_trend: :sparkles:
Brett
@burgertime14
Jun 03 2016 02:57

@shgrady here is mine: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
ssid="205SA-K24"
psk="XXXXXXXXXXXX"
key_mgmt=WPA-PSK
priority=10
}

network={
ssid="205sa-24"
psk="XXXXXXXXXXXXX"
key_mgmt=WPA-PSK
priority=10
}

network={
ssid="ITL Lab"
psk="XXXXXXXX"
key_mgmt=WPA-PSK
priority=3
}

network={
ssid="BH"
psk="XXXXXXXXXXXX"
key_mgmt=WPA-PSK
priority=1
}

Sarah Hodson Grady
@shgrady
Jun 03 2016 02:57
anyone who comes to podunk Indiana welcome to my wireless, but yes, I was trying to add my home, but the original keyboard and projector combo I had going made it hard for me to see that the " were not correct.
David Cintron
@loudestnoise
Jun 03 2016 02:57
:+1: :+1: :+1: :+1:
Sarah Hodson Grady
@shgrady
Jun 03 2016 02:59
also, I did not give it any key management when I did the commands to set up, can I edit this file in the editor? It seems like I could do it in the interface if I could just "find" them again.
Paul Martin
@Spazholio
Jun 03 2016 03:00
So I’d say you could remove one of those entries, and then just copy/paste @burgertime14’s format into your file, replacing the values with your own.
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:00
since I do not have permission to edit the file directly, can I do so from within the terminal?
GeoffWyche
@GeoffWyche
Jun 03 2016 03:01
I feel sad that Linux's wireless networking is still such a nightmare.
@shgrady yes. sudo nano <file>
Brett
@burgertime14
Jun 03 2016 03:01
use 'sudo vi /etc/wpa_supplicant/wpa_supplicant.conf'
Paul Martin
@Spazholio
Jun 03 2016 03:01
Learn to love sudo. =)
GeoffWyche
@GeoffWyche
Jun 03 2016 03:01
May I suggest nano instead of vi?
Paul Martin
@Spazholio
Jun 03 2016 03:02
Oh god, yes. I’m a vi jockey, but I wouldn’t wish that on someone who’s never used it before.
GeoffWyche
@GeoffWyche
Jun 03 2016 03:02
:wink:
Brett
@burgertime14
Jun 03 2016 03:02
I was going to say use which ever editor you wish instead of vi
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:02
Geoff typed it first, plus I recognized from other steps....on it
Brett
@burgertime14
Jun 03 2016 03:02
but I don;t know what the kids are using these days :)
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:02
nano
Paul Martin
@Spazholio
Jun 03 2016 03:03
Bah. I remember when nano was still called pico and we liked it!
GeoffWyche
@GeoffWyche
Jun 03 2016 03:07
While I love both vi and emacs, and use them both regularly, I would not recommend them to anyone unfamiliar with Linux.
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:07
why does the file name to write come up $nf? I assume I need to change that back to the whole path or just the file name?
Eric Luhrs
@eluhrs
Jun 03 2016 03:07
Ha, yea, I remember pico too!
GeoffWyche
@GeoffWyche
Jun 03 2016 03:08
@shgrady not necessarily -- I dunno. It sounds like it might do the right thing there. I trust in nano.
(nano looks a whole lot like the pine mail program -- did it come from there?)
Hrm.... I think pine used pico.
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:09
thanks @GeoffWyche the cat shows it saved correctly
GeoffWyche
@GeoffWyche
Jun 03 2016 03:10
@shgrady good. The $nf was something that was given to nano, and nano used it correctly.
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:11
unfortunately, the Pi still cannot see any wireless networks...
Paul Martin
@Spazholio
Jun 03 2016 03:11
Emacs is a good operating system. Just wish it had a decent editor.
GeoffWyche
@GeoffWyche
Jun 03 2016 03:12
:laughing: yep. And a web browser, and mail program, and adventure game...
but at least it indents my code correctly
Brett
@burgertime14
Jun 03 2016 03:13
@shgrady 'sudo iwlist wlan0 scan'
GeoffWyche
@GeoffWyche
Jun 03 2016 03:13
nifty. iwlist is new to me
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:14
wlan0 Scan completed :
Cell 01 - Address: 40:B7:F3:1F:DD:B0
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=45/70 Signal level=-65 dBm
Encryption key:on
ESSID:"ATT688"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 70ms ago
IE: Unknown: 0006415454363838
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: 32040C121860
IE: Unknown: 2D1A7C181BFFFF000000000000000000000000000000000000000000
IE: Unknown: 3D1601080000000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F0101
IE: Unknown: DD090010180200F02C0000
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
Cell 02 - Address: 84:00:2D:15:89:EA
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=22/70 Signal level=-88 dBm
Encryption key:off
ESSID:"xfinitywifi"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 70ms ago
IE: Unknown: 000B7866696E69747977696669
IE: Unknown: 010882848B968C129824
IE: Unknown: 030106
IE: Unknown: 050400010000
IE: Unknown: 0706555320010B1E
IE: Unknown: 2A0100
IE: Unknown: 3204B048606C
IE: Unknown: 2D1AAD011BFFFFFF0000000000000000000100000000000000000000
IE: Unknown: 3D1606000100000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F080100000000000040
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
IE: Unknown: DD0900037F01010000FF7F
Cell 03 - Address: 30:46:9A:55:B4:4E
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=70/70 Signal level=-38 dBm
Encryption key:on
ESSID:"Hsbbs04"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 70ms ago
IE: Unknown: 000748736262733034
IE: Unknown: 010882840B162430486C
IE: Unknown: 030106
IE: Unknown: 2A0104
IE: Unknown: 2F0104
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 3
Brett
@burgertime14
Jun 03 2016 03:15
network={
ssid="Hsbbs04"
psk="XXXXXXXXXXXX"
key_mgmt=WPA-PSK
}
Scott Leibrand
@scottleibrand
Jun 03 2016 03:15
re: pico: I got my first job partly from my experience supporting pico and pine at the UW and on comp.mail.pine ;-)
Brett
@burgertime14
Jun 03 2016 03:15
add that to your wpa_supplicant.conf and then reboot
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:16
Interesting.....it sees the two routers in the house, wonder why not showing in the GUI?
Scott Leibrand
@scottleibrand
Jun 03 2016 03:17
re: !! and !, everyone should also know about the handy ^R (ctrl-r) trick: type that and you can search your bash history for old commands by keyword, not just by the first few characters. and you can keep typing to refine the search, or keep hitting ^R to keep scrolling back until you find what you want.
GeoffWyche
@GeoffWyche
Jun 03 2016 03:17
@scottleibrand Nice! I used pine when I first started on Unix in '90 at UT Austin.
That's a nice trick -- I'll try to remember that tomorrow when I'm searching command history.
David Cintron
@loudestnoise
Jun 03 2016 03:18
@scottleibrand Did not know about ^R
that is fancypants
Scott Leibrand
@scottleibrand
Jun 03 2016 03:18
took me like 10 years of bash before I learned it, and now I use it more than anything except maybe up-arrow :)
David Cintron
@loudestnoise
Jun 03 2016 03:18
I had been using history and then !123
GeoffWyche
@GeoffWyche
Jun 03 2016 03:18
I expect you hit a few up arrow, then start with the ctrl-R
Scott Leibrand
@scottleibrand
Jun 03 2016 03:19
yep :)
yeah, I used to do the history | grep foo and then ! number thing. ^R is so much better. :)
Brett
@burgertime14
Jun 03 2016 03:19
you can also type !<start of command> to run whatever you did last with that command
like !ssh to reconnect to your last ssh
Scott Leibrand
@scottleibrand
Jun 03 2016 03:19
yeah, ^R is basically like a supercharged version of !ssh
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:20
so when I closed the wicd window, I now have 6 networks showing up, and asking for PSK....
GeoffWyche
@GeoffWyche
Jun 03 2016 03:20
progress :)
Brett
@burgertime14
Jun 03 2016 03:21
@shgrady if you use the GUI to put in the PSK it will add it to the wpa_supplicant.conf
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:21
ya, and connected, so, when I take this to work, can I go through the GUI, or must I first update that file with the 63 character key?
oh, ok, thanks...
the wicd was deceptive....its still showing no wireless networks
GeoffWyche
@GeoffWyche
Jun 03 2016 03:26
There are ((unfortunately) multiple and competing ways of connecting Linux on wifi. I think you are getting some answers from one set of utilities and some answers from the other, which is why it is deceptive.
does ps ax | grep NetworkManager return anything interesting?
that is asking if you are currently running the program named "NetworkManager"
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:27
interesting is relative pi@raspberrypi:~ $ ps ax | grep NetworkManager
1601 pts/0 S+ 0:00 grep --color=auto NetworkManager
GeoffWyche
@GeoffWyche
Jun 03 2016 03:30
Nope. Not running NetworkManager. That line shows that you were running 'grep', looking for the network manager.
darn. I think the others here will be more helpful than I will be :(
Eric Luhrs
@eluhrs
Jun 03 2016 03:32
@scottleibrand Thanks for that ctrl-r bash trick. Have been using linux since 93 and didn't know that one.... very cool.
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:33
actually, I am pretty content, updating the file again with my work PSK so I don't have to find a monitor, thanks.
GeoffWyche
@GeoffWyche
Jun 03 2016 03:34
For a flood of command line tricks: http://www.commandlinefu.com/commands/browse
Lynne Butts
@flutelynne_twitter
Jun 03 2016 03:38
Well, went for an evening walk, but turned off ssh. Loop was still doing stuff on the pump before we left. I am not hooked up to it yet. After we got back, I plugged in the pi, plugged the receiver back in. I had put "openAps offline" on the NS careportal choice. Now there is no info. Tried uploading using "openaps do-everything" but nothing. did a bolus wizard on the pump, and still nothing. What is the next step?
Sarah Hodson Grady
@shgrady
Jun 03 2016 03:41
Stuck again, the GUI asks for the PSK everytime, I think it is time for bed, Thanks Everyone!
Lynne Butts
@flutelynne_twitter
Jun 03 2016 03:47
Is it safe to run oref0-fix-git-corruption.sh
It says it is corrupt. tried doing "openaps use <my pump name> model" It returned the model number, printed a lot of info, then corrupt at the end.
Scott Leibrand
@scottleibrand
Jun 03 2016 03:51
yes, that is safe. I would actually add oref0-reset-git to your crontab to run every minute. it will check if git status is working, then run oref0-fix-git-corruption if not, and if that fails to fix it, save the git history off to another directory and re-initialize the history from the current state.
Lynne Butts
@flutelynne_twitter
Jun 03 2016 03:52
I tried the first one I listed, and it said command not found
fjungman
@fjungman
Jun 03 2016 03:55
@loudnate the package seemed to install, but the server isn't there on port 5000. I don't see any settings for the port, so I'm not sure if it changed. I get "refused to connect" in chrome. The install of requirements.txt shows everything is satisfied.
pi@raspberrypi:~ $ cd vmax_aps
pi@raspberrypi:~/vmax_aps $ cd openaps-monitor
pi@raspberrypi:~/vmax_aps/openaps-monitor $ python monitor.py ../vmax_aps
pi@raspberrypi:~/vmax_aps/openaps-monitor $ sudo python monitor.py ../vmax_aps
Lynne Butts
@flutelynne_twitter
Jun 03 2016 03:56
The only crontab I have now is the openaps do-everything. I will come back tomorrow. I am thankful to have gotten this far today.
fjungman
@fjungman
Jun 03 2016 03:56
Those commands run and return nothing, so I am guessing there are no errors.
Nathan Racklyeft
@loudnate
Jun 03 2016 03:59
they return nothing?
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:09
@scottleibrand Would that crontab be added like this? $oref0-reset-git | crontab -
wait:
Rob Kresha
@rkresha
Jun 03 2016 04:10
*/1 * * * cd <openaps_dir> && oref0-reset-git
scratch that */1 * * * * cd <openaps_dir> && oref0-reset-git
thats good advice @scottleibrand ... I've added the reset
Ben West
@bewest
Jun 03 2016 04:14
hmm
Rob Kresha
@rkresha
Jun 03 2016 04:14
@flutelynne_twitter what's this yield for you pwd
@bewest sup
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:16
do I need to precede that with the SHELL part?
I'll post
JaysonEwer
@JaysonEwer
Jun 03 2016 04:16
@eluhrs ctrl+rIs very useful! @scottleibrand taught me that one too;Thanks @scottleibrand !!
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:17
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 707, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 128
stderr: 'error: object file .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe is empty
error: object file .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe is empty
fatal: loose object 4c9bf5d4b1e94b7962371b1951fe71544fea9fbe (stored in .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe) is corrupt'
pi@raspber
Nothing is on the NS site.
Rob Kresha
@rkresha
Jun 03 2016 04:18
@flutelynne_twitter can you run the command pwd
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:19
I had unplugged, then tried my battery, so many interferences there. And tried unplugging the carelink and plugging it back in
Rob Kresha
@rkresha
Jun 03 2016 04:19
yeah, pulling the power for the PI when it is running and actively looping is a no-no
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:19
pwd
/home/pi/abouttime
Rob Kresha
@rkresha
Jun 03 2016 04:19
so just run command oref0-reset-git
what does that give you
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:20
$ oref0-reset-git
Attempting to fix git corruption. Please wait 15s.
error: object file .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe is empty
error: object file .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe is empty
fatal: loose object 4c9bf5d4b1e94b7962371b1951fe71544fea9fbe (stored in .git/objects/4c/9bf5d4b1e94b7962371b1951fe71544fea9fbe) is corrupt
Error: Could not find last valid commit; aborting.
fjungman
@fjungman
Jun 03 2016 04:20
Yeah, it just goes back to the command prompt. I'm assuming that means it is working.
But, how to see what port it is really on, and if it really opened it?
I am addressing it with its IP address, not myraspberrypi.local, as that never works for me with PuTTY...
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:22
So how do you stop the loop and restart it? I was going to take the receiver with me while on a walk so it would keep #'s going. Shut off the pi through my ssh with sudo shutdown -h now before I did any of that.
Rob Kresha
@rkresha
Jun 03 2016 04:22
before you pull the power, do a sudo shutdown -h now
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:23
Or even switching from the wall adapter to a battery source?
Rob Kresha
@rkresha
Jun 03 2016 04:23
via ssh or if you have it hooked to a monitor click the power button
Ben West
@bewest
Jun 03 2016 04:23
hmm
we took a backup
Rob Kresha
@rkresha
Jun 03 2016 04:24
if your battery allows charging while being used you are fine, if the battery shuts off power to pi when charging , then you need to shut it down first
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:24
@rkresha Yes. That's what I did. BUT I tried the battery source, and changed the usb port for the battery. THAT must have been my fatal err.
In which, I did not have ssh going to shut anything down.
Rob Kresha
@rkresha
Jun 03 2016 04:24
if you were just changing from AC to battery, that was the issue
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:24
ok
Rob Kresha
@rkresha
Jun 03 2016 04:24
either that or take the loop out of cron and make sure it isn't running
GeoffWyche
@GeoffWyche
Jun 03 2016 04:24
I haven't had a recent linux kernel ever complain about power being suddenly taken away. Linux always comes back without a complaint. Are "inconvenient shutdowns" a thing of the past?
Rob Kresha
@rkresha
Jun 03 2016 04:24
and then pull the plug
Ben West
@bewest
Jun 03 2016 04:25
yeah, it's not linux, it's a git repo thing @GeoffWyche
Rob Kresha
@rkresha
Jun 03 2016 04:25
+1
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:25
So if I am out of the house, then how do I take the loop out of cron?
Rob Kresha
@rkresha
Jun 03 2016 04:25
ever time your loop runs it is updating repo files
make sure you don't run out of power
Ben West
@bewest
Jun 03 2016 04:25
no, it's fine to leave cron
GeoffWyche
@GeoffWyche
Jun 03 2016 04:25
@bewest got it.
Ben West
@bewest
Jun 03 2016 04:26
issue was losing power unexpectedly
Rob Kresha
@rkresha
Jun 03 2016 04:26
while loop was running
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:26
I had to change a low battery on the pump before all of this. So maybe that added to the prob
Rob Kresha
@rkresha
Jun 03 2016 04:26
yes?
Ben West
@bewest
Jun 03 2016 04:26
sometimes I wait until :03or :04on the clock
Rob Kresha
@rkresha
Jun 03 2016 04:26
git repo isn't getting written to when the loop isn't running
Ben West
@bewest
Jun 03 2016 04:26
nah, pump battery is fine
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:26
ok
Ben West
@bewest
Jun 03 2016 04:27
it runs for about a minute at :00, :05, :10, etc..
Rob Kresha
@rkresha
Jun 03 2016 04:27
the hard time to time is if your loop has issues and is retrying.. you never know when it isn't running
Ben West
@bewest
Jun 03 2016 04:27
so changing battery at :03 should be ok
or unplugging from wall and into battery
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:27
So if I am switching power sources, check the time. It's not a matter of just suspending the pump first?
Rob Kresha
@rkresha
Jun 03 2016 04:27
amirite?
pump has nothing to do with it
Ben West
@bewest
Jun 03 2016 04:27
pump has no affect
Rob Kresha
@rkresha
Jun 03 2016 04:27
it's all the pi
Ben West
@bewest
Jun 03 2016 04:28
@rkresha her loop is very simple based on my templates
it just runs once every 5 minutes
Rob Kresha
@rkresha
Jun 03 2016 04:28
@bewest
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:28
ok. So how would I fix this prob?
Ben West
@bewest
Jun 03 2016 04:28
for this problem, try git status
for today at least
if it complains with error we do some more recovery
Rob Kresha
@rkresha
Jun 03 2016 04:29
@bewest good to know
Ben West
@bewest
Jun 03 2016 04:29
actually in either case, what we'll do is use the backup we took earlier to restore
when switching from battery to wall or wall to battery
actually, in future, maybe tomorrow, we can add a way to fix this in general
or at least workaround
I need some time to make some more tools :-)
Rob Kresha
@rkresha
Jun 03 2016 04:35
@bewest question that I should know the answer to. So I beg your pardon. If I'm not using Git for backups, I can uninstall git without issue, no?
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:36

/abouttime $ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)

API_SECRET=6bece84baaea76ce3e1d4a5be6855b2f6f347cfa/
Clark-session.json
Clark.ini
Maxim.ini
May29B
May30
abouttime/
added
backup-loop.json
calculate-iob.ini
detect-sensitivity.ini
determine-basal.ini
enact/
get-profile.ini
howdy.ini
last_four_pump_hours.json
max-iob.json
mkdir/
mm-format-ns-glucose/
mm-format-ns-pump-history/
mm-stick/
monitor/glucose-raw.json
monitor/iob.json
nightscout-glucose.json
nightscout-status.ini
nightscout/openaps-status.json
nightscout/openaps.ini
nightscout/recent-missing-entries.json
nightscout/uploaded-entries.json
nightscout/uploaded-recent-devicestatus.json
nightscout/uploaded-status.json
ns
ns-status.ini
ns-upload-entries/
ns.ini
oref0-enacted/openaps.ini
oref0-monitor/openaps.ini
oref0-predict/openaps.ini
oref0.ini
profile/
pump-session.json
pump.ini
raw-cgm/openaps.ini
raw-pump/openaps.ini
tz.ini
unit
units.ini

nothing added to commit but untracked files present (use "git add" to track)
pi@raspberrypi:~/abouttime $

Should I come back tomorrow? It was a great interview tonight. Thank you.
apabari
@apabari
Jun 03 2016 04:39
Hi... hoping someone can give me some guidance. I've been at this for hours and seem to be making no progress. I can successfully run the loop, enact the temp basal, and upload to nightscout when I run entries manually.... but when I try and schedule the cron job I keep getting an error message saying "raspberrypi logger: Unable to upload to NIGHTSCOUT_HOST". Any ideas what I'm doing wrong?
Rob Kresha
@rkresha
Jun 03 2016 04:40
need to set NIGHTSCOUT_HOST in the top of the crontab file
well maybe not
apabari
@apabari
Jun 03 2016 04:42
/5 * (cd /home/pi/openaps && time openaps do-everything ) 2>&1 | logger -t openaps-loop
I've been following along and used some of @bewest's guidance. my Crontab script says:
and, do-everything says: do-everything = ! bash -c "openaps loop; openaps status-upload"
my loop statement is: loop = ! bash -c "openaps monitor-cgm 2>/dev/null && ( openaps preflight && openaps gather && openaps enact) || echo No CGM data."
and status-upload is: status-upload = ! bash -c "openaps report invoke monitor/upload-status.json; ns-upload NIGHTSCOUT_HOST API_SECRET devicestatus.json monitor/upload-status.json"
i can run the alias' manually from the command line and they work....just not when scheduled
David Cintron
@loudestnoise
Jun 03 2016 04:44
That’s where I’m at too @apabari
Rob Kresha
@rkresha
Jun 03 2016 04:44
do you have $NIGHTSCOUT_HOST
or just NIGHTSCOUT_HOST
apabari
@apabari
Jun 03 2016 04:45
just NIGHTSCOUT_HOST
@loudestnoise If you figure it out, please let me know :)
Rob Kresha
@rkresha
Jun 03 2016 04:46
gotta put a $ in front
it's a variable
David Cintron
@loudestnoise
Jun 03 2016 04:46
Yeah, gotta have the $$$ :wink:
apabari
@apabari
Jun 03 2016 04:46
odd... when I do that, it doesn't work from the command line, or the script
then it says it can't find entries.json
Rob Kresha
@rkresha
Jun 03 2016 04:46
run this env
Lynne Butts
@flutelynne_twitter
Jun 03 2016 04:47
@bewest Thank you. I will return tomorrow. Your playing sounded very nice. Liked the chords.
David Cintron
@loudestnoise
Jun 03 2016 04:47
Yeah, that’s the exact spot mine fails too @apabari
apabari
@apabari
Jun 03 2016 04:47
with the $... this is what I see:
pi@raspberrypi:~/openaps $ openaps status-upload
ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
Input file entries.json does not exist.
this is the env statement:
pi@raspberrypi:~/openaps $ env
XDG_SESSION_ID=c8
COMP_WORDBREAKS=
"'><;|&(:
NIGHTSCOUT_HOST=http://pabari.azurewebsites.net
TERM=xterm
SHELL=/bin/bash
SSH_CLIENT=192.168.1.149 60691 22
OLDPWD=/home/pi/openaps/monitor
SSH_TTY=/dev/pts/0
USER=pi
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:
MAIL=/var/mail/pi
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
PWD=/home/pi/openaps
LANG=en_GB.UTF-8
SHLVL=3
HOME=/home/pi
LOGNAME=pi
SSH_CONNECTION=192.168.1.149 60691 192.168.1.112 22
XDG_RUNTIME_DIR=/run/user/1000
_=/usr/bin/env
David Cintron
@loudestnoise
Jun 03 2016 04:48
but I’m now trying to ns from what I’m reading on openaps/docs#129
Rob Kresha
@rkresha
Jun 03 2016 04:49
you don't have API_SECRET set
it would appear
unless you redacted it on purpose ;)
also you want to put this in your crontab file
apabari
@apabari
Jun 03 2016 04:51
No.... I do have it set... I think! How can I re-set it?
Rob Kresha
@rkresha
Jun 03 2016 04:51
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
without PATH in crontab it can't find openaps since crontab works different than an interactive session with the user
apabari
@apabari
Jun 03 2016 04:53
I used @bewest's script (oref0 cron-5-minute-helper | crontab -) to add my crontab job... how can I add the Path to the crontab?
Rob Kresha
@rkresha
Jun 03 2016 04:53
API_SECRET=echo -n "<API_SECRET>" | shasum
is how you set it directly
not familiar with that script
crontab -e
crontab -e
and just put PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games above you every 5 min loop
better yet since I'm not sure what the script does, give me the output of crontab -l
Ben West
@bewest
Jun 03 2016 04:55
@apabari the path is already done
it's part of the tool :)
Rob Kresha
@rkresha
Jun 03 2016 04:55
yay
apabari
@apabari
Jun 03 2016 04:56
I see that now... this is the output

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/openaps && time openaps do-everything ) 2>&1 | logger -t openaps-loop

Rob Kresha
@rkresha
Jun 03 2016 04:56
@bewest do you normally just set NIGHTSCOUT_HOST and API_SECRET in the .profile file
Ben West
@bewest
Jun 03 2016 04:56
no, it's in ns device
in ns.ini
that way it's not in environment variable anymore
Rob Kresha
@rkresha
Jun 03 2016 04:57
lol, I'm on an old version prior to the ns device
apabari
@apabari
Jun 03 2016 04:57
Hmm.... when I run echo -n "<API_SECRET>" | shasum it gave me a different value then what I had put into my .profile file... let me change that and see what happens
Ben West
@bewest
Jun 03 2016 04:57
ah, nice
Rob Kresha
@rkresha
Jun 03 2016 04:57
did you replace <API_SECRET> with you API_SECRET value
?
Ben West
@bewest
Jun 03 2016 04:58
or, just do nightscout autoconfigure-device-crud https://my.site.com mylongsecret
Rob Kresha
@rkresha
Jun 03 2016 04:58
cron is terrible about sourcing and setting up the correct environment
Ben West
@bewest
Jun 03 2016 04:58
and then it's in the ns.ini
apabari
@apabari
Jun 03 2016 04:58
oh, nevermind... my oriignal api_secret value was correct
Ben West
@bewest
Jun 03 2016 04:59
 oref0 cron-5-minute-helper
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

*/5 * * * * (cd /root && time openaps do-everything ) 2>&1 | logger -t openaps-loop
mine doesn't need the API_SECRET or NIGHTSCOUT_HOST variables
it uses an ns device created by nightscout autoconfigure-device-crud https://mysite mylongsecret
Rob Kresha
@rkresha
Jun 03 2016 04:59
yeah I don't have them set there either
Ben West
@bewest
Jun 03 2016 04:59
it uses ns-upload and ns-get under the hood
and stores the api secret and hostname in ns.ini
that way you don't have to worry about environment variables
it also avoids getting checked into any public log
Rob Kresha
@rkresha
Jun 03 2016 05:01
@bewest honestly I run my loop through a bash script that does a lot of random stuff... cycling wireless interface, counting number of loops, etc
Ben West
@bewest
Jun 03 2016 05:01
ah
you might like oref0 alias-helper then
Rob Kresha
@rkresha
Jun 03 2016 05:02
so I have NIGHTSCOUT and API set there for me
Ben West
@bewest
Jun 03 2016 05:02
or oref0 device-helper
I'd love to see it and maybe we can make it an oref0 wifi-helper or something
Rob Kresha
@rkresha
Jun 03 2016 05:04
I'm lost with the device and alias helpers
would be nice to see it give you usage with --help
;)
apabari
@apabari
Jun 03 2016 05:09
Well... I have to call it... my toddler is up and I can't get him to sleep for more than a few minutes! @loudestnoise , if you figure it out, please let me know...
@rkresha @bewest thank you... I hope you're available tomorrow to help me work through this :)
take care
David Cintron
@loudestnoise
Jun 03 2016 05:15
:+1:
Darin Krauss
@darinkrauss
Jun 03 2016 05:15
Hi all, just getting started setting up a rig for my son. I have all of the hardware and am re-reading the reference design. I have a question about the "algorithm" listed under "Basic overnight operation". It looks as if the indentation and use of "BG" vs. "eventual BG" vs. "projected BG" is misleading.
Here's what I see with what modifications I would expect in red.
algorithm.png
Am I completely off-base or does this need to be fixed?
David Cintron
@loudestnoise
Jun 03 2016 05:18
makes sense to me. I’m sure @danamlewis & @scottleibrand would say do a PR and add your changes!
Darin Krauss
@darinkrauss
Jun 03 2016 05:18
I can do a PR, but wanted to make sure I wasn't misunderstanding the algorithm first. :)
David Cintron
@loudestnoise
Jun 03 2016 05:18
I’m gonna call it a night too. Tomorrow (er today) is another day
Rob Kresha
@rkresha
Jun 03 2016 05:19
do the PR
they will tell you if you are thinking about it wrong
Darin Krauss
@darinkrauss
Jun 03 2016 05:19
k, will do
Rob Kresha
@rkresha
Jun 03 2016 05:19
they won't judge
Ben West
@bewest
Jun 03 2016 05:26
yeah, I need to update my tutorial
Rob Kresha
@rkresha
Jun 03 2016 05:26
@bewest "@bewest
:-)
add the | openaps alias back on to end again
oref0 alias-helper howdy 'echo howdy $1' | openaps import" This clears it up for me... I'm used to the ropes so not having the flexibility will drive me nuts
Ben West
@bewest
Jun 03 2016 05:26
ah you found the example
nice
or you tried it
Rob Kresha
@rkresha
Jun 03 2016 05:26
nope I searched gitter
Ben West
@bewest
Jun 03 2016 05:26
ah, it's in a few issues
Rob Kresha
@rkresha
Jun 03 2016 05:27
well technically both
Ben West
@bewest
Jun 03 2016 05:27
needs to make it into PR
but:
Rob Kresha
@rkresha
Jun 03 2016 05:27
I tried it first and was confused
Ben West
@bewest
Jun 03 2016 05:27
This message was deleted
sorry
ah
openaps/docs#136
yeah, that needs to go into a tutorial that is less terse somewhere
devices get reports
so devices have "many uses"
and any "use" can be saved as a report
ryanchen26
@ryanchen26
Jun 03 2016 05:30
Nice. Just experienced my first corrupt git repo error as a result of unplugging my PI without a proper shutdown. Everything is cool again after a oref0-git-reset and a sudo oref0-reset-usb. Yay!
Ben West
@bewest
Jun 03 2016 05:30
aliases are just ways to call random stuff with openaps at the beginning
so they can run many reports, or invoke anything inside openaps as a shortcut, much like git alias
I wrote a bit about relationship between device, use, report, and alias here http://openaps.readthedocs.io/en/latest/docs/openaps-guide/overview.html
Rob Kresha
@rkresha
Jun 03 2016 05:34
yeah I do a mixed pot, I went simplistic at first and just followed the directions and then ran into some syntax issues with baking it all into the alias inside of openaps, so I still call openaps $alias but from the "master script"
for the functions within it
which isn't great for less technical people, I know
Ben West
@bewest
Jun 03 2016 05:35
no, I understand completely
I think the alias helper should help
Rob Kresha
@rkresha
Jun 03 2016 05:36
it does the escaping of "'s, etc?
Ben West
@bewest
Jun 03 2016 05:36
hmmm
well
Rob Kresha
@rkresha
Jun 03 2016 05:36
winky face
Ben West
@bewest
Jun 03 2016 05:36
that's why it prints everything out
Rob Kresha
@rkresha
Jun 03 2016 05:36
-==== LOOP #4921 COMPLETE ====-
btw
Ben West
@bewest
Jun 03 2016 05:36
nice
ryanchen26
@ryanchen26
Jun 03 2016 05:36
@bewest Do people really run oref0-git-reset using cron every minute to prevent git repo corruption due to powering on and off the PI (from outlet to external battery for example)? Every minute?
Rob Kresha
@rkresha
Jun 03 2016 05:37
just saves you from missing a loop
Ben West
@bewest
Jun 03 2016 05:37
I do not
Rob Kresha
@rkresha
Jun 03 2016 05:37
not to answer for Ben
I just uninstall git
Ben West
@bewest
Jun 03 2016 05:37
some people do
ah, you need git for sure
Rob Kresha
@rkresha
Jun 03 2016 05:37
meh
I backup nightly to dropbox
not worth corrupting the repo and not having commands work... unless I'm missing the bigger picture
Ben West
@bewest
Jun 03 2016 05:38
I'm surprised it works without having git installed
Rob Kresha
@rkresha
Jun 03 2016 05:38
git just tracks change, right?
lol
whomp whomp
it's not working
brb
Ben West
@bewest
Jun 03 2016 05:39
openaps uses git to track changes to the files going through the workflow
I cover architecture of how reports are related to uses and devices and aliases http://openaps.readthedocs.io/en/latest/docs/openaps-guide/overview.html
you can count loop iterations via git log
ryanchen26
@ryanchen26
Jun 03 2016 05:41
Okay, thanks for the confirmation.
Ben West
@bewest
Jun 03 2016 05:43
I also explain how git can be used to cross-verify what openaps is doing, although it's fairly terse
Rob Kresha
@rkresha
Jun 03 2016 05:44
interesting, I jumped right into the walkthrough
I guess now is as good of a time as any to read the docs to increase understanding
Ben West
@bewest
Jun 03 2016 05:45
well, to be fair, this is placed after the walkthrough
I have a PR to move it before the walk through
it can be done mostly on mac
doesn't use any actual medical devices, just focuses on understanding relationship between the commands
and yeah, it's not a walk through, it's trying to explain each facet
ryanchen26
@ryanchen26
Jun 03 2016 05:45
It is definitely on my reading list. I also hit the walkthrough with some degree of tunnel vision.
Ben West
@bewest
Jun 03 2016 05:46
yeah, it's great to zoom out
Rob Kresha
@rkresha
Jun 03 2016 05:46
I also missed the point on how you get your git repo sync back to github
for backup reasons
is that in the walkthrough somewhere?
Ben West
@bewest
Jun 03 2016 05:47
hmm, actually my new recommended backup procedure is to use oref0 export-loop | tee backup-loop.json
then, if it's corrupt, and recovery isn't working
Rob Kresha
@rkresha
Jun 03 2016 05:48
what if you lose the device or someone snags your sdcard
Ben West
@bewest
Jun 03 2016 05:48
wipe out .git subdir, and openaps init .; openaps import backup-loop.json
Rob Kresha
@rkresha
Jun 03 2016 05:48
need a remote backup too
Ben West
@bewest
Jun 03 2016 05:49
ah yeah, slightly different use case
but consider saving this backup-loop.jsonseparately also
Rob Kresha
@rkresha
Jun 03 2016 05:49
now do you have to redo the init?
because I didn't and it pick right back up
picked*
Ben West
@bewest
Jun 03 2016 05:50
that's surprising, it's designed to error
Rob Kresha
@rkresha
Jun 03 2016 05:50
the the .git dir was gone
Ben West
@bewest
Jun 03 2016 05:50
it's conceivable you had a git dir at a parent directory somewhere
in which case there would be no error
Rob Kresha
@rkresha
Jun 03 2016 05:50
looking
Ben West
@bewest
Jun 03 2016 05:51
all the add/remove commands call git
so does openaps import
hmm, so does report invoke
Rob Kresha
@rkresha
Jun 03 2016 05:51
nope
pi@raspberrypi:/home $ find . -name .git -type d
./pi/rk_openaps/.git
./pi/Adafruit_Python_BluefruitLE/openxshareble/.git
./pi/Adafruit_Python_BluefruitLE/.git
./pi/Dropbox-Uploader/.git
it's there now
pi pi 4096 Jun 3 00:42 refs
pi pi 4096 Jun 3 00:42 info
pi pi 4096 Jun 3 00:42 hooks
pi pi 23 Jun 3 00:42 HEAD
pi pi 73 Jun 3 00:42 description
pi pi 4096 Jun 3 00:42 branches
pi pi 92 Jun 3 00:42 config
pi pi 27 Jun 3 00:42 COMMIT_EDITMSG
pi pi 302 Jun 3 00:52 index
pi pi 4096 Jun 3 00:52 objects
pi pi 4096 Jun 3 00:52 logs
all just recreated
should I pause the loop and wipe the .git and then do the init
?
or you want some logs
Ben West
@bewest
Jun 03 2016 05:54
it's fine
no, need
the git is there
openaps init is just calling this script
it's odd that COMMIT_EDITMSG is there if openaps is not running
Rob Kresha
@rkresha
Jun 03 2016 05:57
the loop never stopped running
I mean it wasn't working
Ben West
@bewest
Jun 03 2016 05:58
ah
Rob Kresha
@rkresha
Jun 03 2016 05:58
but it was still trying to run
ryanchen26
@ryanchen26
Jun 03 2016 05:58
Was there anything in the docs about sending the carbs on board? Or is that specific to the meal assist function (which I'm not planning to use at the moment)?
I don't recall reading it.
Rob Kresha
@rkresha
Jun 03 2016 05:59
meal
ryanchen26
@ryanchen26
Jun 03 2016 05:59
cool
Rob Kresha
@rkresha
Jun 03 2016 05:59
meal and auto-sens are the bees-knees tho
don't wait too long would be my personal recommendation
I like the fact that it doesn't completely surrender to the std basal profile, because I needed up going low before the carbs hit
meal assist monitors and situation and respondings accordingly @ a reduced influence level
monitor the situation*
based on what I can make of it
ryanchen26
@ryanchen26
Jun 03 2016 06:02
Our current dream is to have some kick ass automated basal control overnight.. meal and auto-sens sound very next-level, but we'll probably get there at some point. Like in a week or two.
Rob Kresha
@rkresha
Jun 03 2016 06:03
@bewest correct me if I'm mistaken
you have your plan, I like it
get comfortable
ryanchen26
@ryanchen26
Jun 03 2016 06:05
You got it. Alright, thanks again. I'm out.
Rob Kresha
@rkresha
Jun 03 2016 06:06
I'm checking out, thanks @bewest. PM if you want more specifics around what I'm doing in the wireless realm
David Cintron
@loudestnoise
Jun 03 2016 08:30
Dang, I go low (my fault rage bolusing) so I’m awake in the middle of the night and what do I end up watching? Great talk with @bewest and Wes Ton on the Nightscout Foundation FB page. Forget watching the FDA webinar, this is what you wanna see!
https://www.facebook.com/NightscoutFoundation and look for the last “Live” video
:smiley:
C-Ville
@C-Ville
Jun 03 2016 09:01
@loudestnoise do you by chance have another link to that video, I never felt a need to be on FB
David Cintron
@loudestnoise
Jun 03 2016 09:03
I was trying to figure out how to grab a link to the video itself, but FB can be weird and I can’t seem to figure out a way to grab it. Lemme try again
so can’t figure out a way to a direct link, but the Nightscout Foundation page is “Public” so going to https://www.facebook.com/NightscoutFoundation/ even if you don’t have an account will bring up their page and the video is currently at the top
David Cintron
@loudestnoise
Jun 03 2016 09:32
Hmm, looks like if I use nightscout autoconfigure-device-crud I need to make sure my plain secret is plain. Mine had a semicolon and it looks like that made the tool think there was a new line and tried to run the characters after as a command
Scott Leibrand
@scottleibrand
Jun 03 2016 09:53
You can probably put quotes around it.
David Cintron
@loudestnoise
Jun 03 2016 09:55
Yeah, I got it working actually by using a hashed version of the plain secret, which I guess rehashed it
worked though
Scott Leibrand
@scottleibrand
Jun 03 2016 09:58
Hmm, that is odd. I wouldn't have expected that to work.
David Cintron
@loudestnoise
Jun 03 2016 09:59
Yeah, kind of surprised me too, but if I use openaps use ns shell preflight to test it comes back true
Jarred Yaw
@jyaw
Jun 03 2016 11:35
@loudestnoise thanks for the link. For some reason I wasn't following them yet.
Did anyone find the falls Church round table link that was referred to in the FDA webinar? @ps2 perhaps?
Dana Lewis
@danamlewis
Jun 03 2016 11:38
Someone bumped it in CGMInthecloud, so i would go look for it there
Jarred Yaw
@jyaw
Jun 03 2016 11:41
Great, thanks
JaysonEwer
@JaysonEwer
Jun 03 2016 12:45
@Pazoles @PazolesBrooke_twitter I FOUND IT!!!! I need to figure out a way to get it to you. I wasn't crazy after all! Or perhaps I am crazy!😜 I was pretty sure I had one more sticker and I just found it, the sad thing is I found it right where I was looking for it.🙄😏😬😀. I want to get it to you guys. If you want to PM me your address I am happy to send it to you.
Dana Lewis
@danamlewis
Jun 03 2016 12:46
:)
mm22dl
@mm22dl
Jun 03 2016 15:09
So the time has come for me to buy a new phone... Just wondering if you guys had any suggestions openaps-wise, knowing some of you are working hard on monitoring solutions for instance?
Paul Martin
@Spazholio
Jun 03 2016 15:34
I've been an iPhone user for a LOT of years, but a lot of the openaps tools that are working with Android are really attractive.
Dana Lewis
@danamlewis
Jun 03 2016 15:35
...and a lot of what @loudnate is doing with iOS is also very attractive :)
And @ps2 and others, too ^
Scott Leibrand
@scottleibrand
Jun 03 2016 15:36
I suspect iOS will work better than Android if you want to use openaps with MDT, as there are more US iOS developers with Medtronic pumps. Android seems more focused on Europe.
mm22dl
@mm22dl
Jun 03 2016 16:15
I see
I was hoping you guys would rather recommend Android phones, since the iPhone prices just became plain ridiculous at this point :worried:
Sarah Hodson Grady
@shgrady
Jun 03 2016 16:16
@flutelynne_twitter the trick you gave for SSHing with the pi@IP.AD.DR.ES instead of pi@raspberrypi.local is nice and dandy when I am switching between my home router and my mobile hotspot when I am at home and have a monitor plugged in to the Pi and can see the change, and it appears that setting a static IP for the Pi would make this nicer for use without a monitor, but then I believe I am going to run into issues at work. Does anybody know what I need to fix to get in with pi@raspberrypi.local
David Cintron
@loudestnoise
Jun 03 2016 16:17
so raspberrypi.local is a DNS hostname
Sarah Hodson Grady
@shgrady
Jun 03 2016 16:17
@mm22dl the price for the 6 SE is not that bad, love my S7, but I am not a developer, love the extra android features
David Cintron
@loudestnoise
Jun 03 2016 16:17
it translates the name raspberrypi.local to the IP address X.X.X.X
Sarah Hodson Grady
@shgrady
Jun 03 2016 16:18
yes @loudestnoise and I can see it sitting there in the GUI, but I was not able to connect, Putty kept failing.
Scott Leibrand
@scottleibrand
Jun 03 2016 16:18
avahi-daemon is the thing that does the mDNS responses on the Pi
David Cintron
@loudestnoise
Jun 03 2016 16:18
it may just depend on the setup of the network your Pi is using at work if their DNS server sees the device and adds the hostname
Jarred Yaw
@jyaw
Jun 03 2016 16:18
I moved from iPhone 6 to a $200 Android phone and its better in most ways for openaps. Just my 2 cents.
Scott Leibrand
@scottleibrand
Jun 03 2016 16:18
@loudestnoise no, it's not done by the DNS server
it's done using multicast over the LAN
David Cintron
@loudestnoise
Jun 03 2016 16:19
ah, ok yeah
Scott Leibrand
@scottleibrand
Jun 03 2016 16:19
@jyaw I don't think hardware matters, I think it's developers, OS, and ecosystem
Sarah Hodson Grady
@shgrady
Jun 03 2016 16:19
I could not do it at home, just predicting issues when I bring it work
David Cintron
@loudestnoise
Jun 03 2016 16:19
that’s like the Linux implementation of Bonjour, right?
Scott Leibrand
@scottleibrand
Jun 03 2016 16:19
yeah
David Cintron
@loudestnoise
Jun 03 2016 16:20
And that makes sense, at my work sometimes I have to go look it up in DHCP because we’re multi campus and depending on where my computer is, it’s not the same subnet
and Bonjour over subnets isn’t so hot
Scott Leibrand
@scottleibrand
Jun 03 2016 16:22
yeah, at that point I would rely on ssh tunnels to a server instead (or over a service like Weaved)
mm22dl
@mm22dl
Jun 03 2016 16:43
@jyaw : just wondering, what phone did you get, if I may ask?
I had an iPhone for the last 3-4 years, inherited it from my tech junkie sister hehe
i have very little experience with the android ones, that's why I'm asking :)
Sarah Hodson Grady
@shgrady
Jun 03 2016 16:45
I have very little experience with openAPS, but my Nightscout set-up with my new S7 is a ton more reliably connected than it was on my Note3 @mm22dl
Paul Martin
@Spazholio
Jun 03 2016 17:14
I use a dynamic DNS provider and a reverse SSH connection to my public web server. That might be a bit of overkill though. =)
David Cintron
@loudestnoise
Jun 03 2016 17:14
LOL, sounds like a fun setup
so aka you can SSH over the Interwebs
Paul Martin
@Spazholio
Jun 03 2016 17:15
My connection is almost always NATted, and I'm almost never on the same network (at work, wired is different ISP than wireless, on the go, I SSH into the iPhone hotspot, etc). So yeah. =)
David Cintron
@loudestnoise
Jun 03 2016 17:17
See, that’s what I need to do. At work I’m using a wired connection so I can SSH from my Mac on same network, but I wanna figure out a way to do it over the Internet
Paul Martin
@Spazholio
Jun 03 2016 17:17
Do you have a public site you can SSH into? If so, it's trivial to set up a reverse SSH connection.
live4sw
@live4sw
Jun 03 2016 17:21
FWIW @mm22dl , I used iPhones from 2009 until last year and switched to a Nexus 5X and am very happy with it. My wife uses a 6P which I think is even better but just a bit too big for me.
David Cintron
@loudestnoise
Jun 03 2016 17:29
@Spazholio Do I! Yes I do. I got the Linux VPSes
Teach me
apabari
@apabari
Jun 03 2016 17:44
Hi... wondering if anyone can help me out. :) I am trying to get my rig to upload to my nightscout site, using the instructions at openaps/docs#129
But this report keeps failing out on me
nightscout/recent-missing-entries.json

pi@raspberrypi:~/openaps $ openaps report invoke nightscout/recent-missing-entries.json
ns://JSON/shell/nightscout/recent-missing-entries.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
File "/usr/local/lib/python2.7/dist-packages/setuptools-21.1.0-py2.7.egg/pkgresources/_init.py", line 719, in run_script
File "/usr/local/lib/python2.7/dist-packages/setuptools-21.1.0-py2.7.egg/pkgresources/_init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 92, in call
return self.method.selected(args)(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 31, in call
return self.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 274, in main
if spec.includes(get(elem)):
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 240, in get
return parse(item.get(args.date))
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 1164, in parse
return DEFAULTPARSER.parse(timestr, kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 552, in parse
res, skipped_tokens = self._parse(timestr,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 671, in _parse
l = _timelex.split(timestr) # Splits the timestr into tokens
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 188, in split
return list(cls(s))
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 184, in next
return self.next() # Python 2.x support
File "/usr/local/lib/python2.7/dist-packages/pythondateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 177, in _next
token = self.get_token()
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 93, in get_token
nextchar = self.instream.read(1)
AttributeError: 'NoneType' object has no attribute 'read'
No JSON object could be decoded

Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
File "/usr/local/lib/python2.7/dist-packages/setuptools-21.1.0-py2.7.egg/pkgresources/_init.py", line 719, in run_script
File "/usr/local/lib/python2.7/dist-packages/setuptools-21.1.0-py2.7.egg/pkgresources/_init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python

schulzedj
@schulzedj
Jun 03 2016 17:45
Getting the following error- anyone have any recommendations?
module.js:340
 throw err;
 ^
Error: Cannot find module '/home/pi/daps/monitor/temp_basal.json'
 at Function.Module._resolveFilename (module.js:338:15)
 at Function.Module._load (module.js:280:25)
 at Module.require (module.js:364:17)
 at require (module.js:380:17)
 at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-determine-basal.js:34:23)
 at Module._compile (module.js:456:26)
 at Object.Modul
Brian Bonner
@itsn0tm3
Jun 03 2016 18:14
normally when I see that it means that you did not run all the reports that that specific report requires for example I see it sayign temp_basal.json is missing
was the temp_basal.json report run before you tried to run that one?
Martin Haeberli
@mhaeberli
Jun 03 2016 18:52
our t1d teen was in a clinical trial three years ago using the enlite sensor. But she at the time found it was very inaccurate for her, compared to finger sticks and also to Dexcom. We have heard rumors that more recent enlite sensors are much more accurate. What has been the recent crowd experience here - Dexcom v Enlite?
Scott Leibrand
@scottleibrand
Jun 03 2016 18:53
What country are you in?
There is a second gen Enlite being used with the 640G in Europe that seems a bit better than the one on the market in the US.
And the Enlite 3 that will go with the 670G is almost as good as Dexcom.
Sarah Hodson Grady
@shgrady
Jun 03 2016 18:56
Speaking of the progress of technology. Did anyone wear those "watches" that used electric current to suck BG readings out of the skin on your arm? I cannot think what they were called, but it was in the '90s. It was torture every 5 mins.
Paul Martin
@Spazholio
Jun 03 2016 18:57
@loudestnoise Crap! I just saw your message. Ok, here's a quick and dirty script that I found online that seems to work well for me. I've noticed that sometimes when I switch networks, it won't realize that the SSH connection is dead, so the SSH connection stays up and never gets re-established. But here's the code you run on the Pi:
#!/bin/bash                                                                                                                                                                                                                                                                
createTunnel() {
  date
  /usr/bin/ssh -f -N -R 2222:localhost:22 yourlogin@yourhost.xyz
  if [[ $? -eq 0 ]]; then
    echo Tunnel to jumpbox created successfully
  else
    echo An error occurred creating a tunnel to jumpbox. RC was $?
  fi  
}
date; /bin/pidof ssh 
if [[ $? -ne 0 ]]; then
  echo Creating new tunnel connection
  createTunnel
fi
David Cintron
@loudestnoise
Jun 03 2016 18:58
Thanks!
Paul Martin
@Spazholio
Jun 03 2016 18:58
This is REALLY cobbled together - I can see where things might go wrong with it, but it's sufficient for my needs. The bit about the SSH tunnel dying unnoticed is something that I'm going to toy with on the way home today. I added the following to my .ssh/ssh_config file:
ServerAliveCountMax 2                                                                                                                                                                                                                                                      
ServerAliveInterval 30
If I read what that does right, it means after 2 tries of 30 seconds each of NO reply from the server, it will kill the SSH process. When that happens, it will attempt to reconnect every X minutes (whatever you set that script to run in cron - mine's every minute).
David Cintron
@loudestnoise
Jun 03 2016 18:59
Hmm
Paul Martin
@Spazholio
Jun 03 2016 19:00
Then, let's say you're on your phone and want to SSH into your rig, you would SSH into your public website, then from there, you'd ssh -p 2222 yourpilogin@localhost
David Cintron
@loudestnoise
Jun 03 2016 19:00
I wonder if I could use something like noip.me to setup dynamic dns
Paul Martin
@Spazholio
Jun 03 2016 19:00
Oh!
I do that too. =)
David Cintron
@loudestnoise
Jun 03 2016 19:00
I use that for my Mac Mini @ home
Paul Martin
@Spazholio
Jun 03 2016 19:00
I use these guys: https://freedns.afraid.org/
David Cintron
@loudestnoise
Jun 03 2016 19:00
but I use the GUI client
I’m sure there’s a Linux one though
Paul Martin
@Spazholio
Jun 03 2016 19:01
THey have a one-line wget or cURL command that you put in cron to update regularly.
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:05
@shgrady I haven't taken mine out of the house yet. I just got back with a portable battery dedicated only to the pi. Just recently plugged my receiver back in after giving it a full charge. I still have my Carelink stick plugged into my pi directly. I bought the wrong extender cable. If this is safe to use this way, ok, but I think it might weaken the port if I have to unplug and replug the stick some time.
@bewest Miraculously it is running today! I woke up and NS site had been working and replaced data from the G5 share. I had done the sudo shutdown -h now last night, and just recently plugged everything back in. Success! Now I am trying to get hold of infusion sets.
David Cintron
@loudestnoise
Jun 03 2016 19:09
@flutelynne_twitter Yay! I’m running my loop today too, although still trying to get uploading to Nightscout working. I tried re-reading the convo between you and @bewest and use his templates, but couldn’t get it all together.
I’m close though
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:10
That's great! @loudestnoise
@loudestnoise Did you do the openaps import parts? I'm not sure if that is something you need to do or not.
Scott Leibrand
@scottleibrand
Jun 03 2016 19:13
If one of y'all could write an update to the docs to reflect the new approach, that PR would be much appreciated.
David Cintron
@loudestnoise
Jun 03 2016 19:15
well after trying to go through what @bewest was telling @flutelynne_twitter I then found openaps/docs#132, but I think the problem there is he assumes you’re using a G4 with raw data, which my G5 receiver doesn’t have
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:15
@scottleibrand I could try, but I'm sure you will have to edit a lot!
David Cintron
@loudestnoise
Jun 03 2016 19:15
Ben pretty much has it all documented
although it’s kind of cheating
it does all the work for you
Scott Leibrand
@scottleibrand
Jun 03 2016 19:16
We really need it added to the main docs (and the stuff it replaces taken out).
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:16
@loudestnoise Try what he had me do. "openaps use <cgm name> config --G5" no quotes
Ben West
@bewest
Jun 03 2016 19:17
@flutelynne_twitter for G5, you can use oref0_glucose --no-raw after it's set to G5
err,that was to @loudestnoise
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:17
Thanks, @bewest
David Cintron
@loudestnoise
Jun 03 2016 19:18
Ah ok, that helps.
David Cintron
@loudestnoise
Jun 03 2016 19:26
I can’t tell what’s happening right here. I read it didn’t like the next command inside the gather-pump-data alias, but not sure what it wants
openaps gather-pump-data
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
reporting monitor/temp-basal-status.json
pump://JSON/reservoir/monitor/reservoir.json
reporting monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
reporting monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
reporting monitor/battery.json
usage: openaps-report invoke [-h]
                             {cgm-vendor.json,model.json,monitor/battery.json,monitor/clock.json,monitor/glucose-raw.json,monitor/glucose.json,monitor/pump-history.json,monitor/reservoir.json,monitor/status.json,monitor/temp-basal-status.json,nightscout/recent-treatments.json,nightscout/uploaded.json,oref0-enacted/enacted-temp-basal.json,oref0-monitor/iob.json,oref0-monitor/profile.json,oref0-predict/oref0.json,raw-cgm/calibrations.json,raw-cgm/entries.json,raw-pump/battery.json,raw-pump/bg-targets-raw.json,raw-pump/clock-raw.json,raw-pump/insulin-sensitivities-raw.json,raw-pump/pump-history-raw.json,raw-pump/reservoir.json,raw-pump/selected-basal-profile.json,raw-pump/settings.json,raw-pump/status.json,raw-pump/temp-basal-status.json,settings/bg-targets.json,settings/insulin-sensitivities.json,settings/selected-basal-profile.json,settings/settings.json}
Looks like it’s getting stuck in the alias for monitor-pump-history
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:27
Did you do $openaps gather-clean-data ?
David Cintron
@loudestnoise
Jun 03 2016 19:30
Hadn’t, but looks like that one is getting stuck at the same spot
I think I just need to figure out what alias and what report inside that alias it’s getting angry about
Lynne Butts
@flutelynne_twitter
Jun 03 2016 19:33
Look at June 02 Time 16:39
Ben West
@bewest
Jun 03 2016 19:50
@loudestnoise usually there's part of the error that says which report was bad
openaps-report invoke: error: argument report: invalid choice: 'non-existant-report.json' (choose from ...
should appear two more lines down from what you had
David Cintron
@loudestnoise
Jun 03 2016 19:53
(pi @ raspberrypi): ~/skadoosh
⇢  openaps gather-pump-data
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
reporting monitor/temp-basal-status.json
pump://JSON/reservoir/monitor/reservoir.json
reporting monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
reporting monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
reporting monitor/battery.json
usage: openaps-report invoke [-h]
                             {cgm-vendor.json,model.json,monitor/battery.json,monitor/clock.json,monitor/glucose-raw.json,monitor/glucose.json,monitor/pump-history.json,monitor/reservoir.json,monitor/status.json,monitor/temp-basal-status.json,nightscout/recent-treatments.json,nightscout/uploaded.json,oref0-enacted/enacted-temp-basal.json,oref0-monitor/iob.json,oref0-monitor/profile.json,oref0-predict/oref0.json,raw-cgm/calibrations.json,raw-cgm/entries.json,raw-pump/battery.json,raw-pump/bg-targets-raw.json,raw-pump/clock-raw.json,raw-pump/insulin-sensitivities-raw.json,raw-pump/pump-history-raw.json,raw-pump/reservoir.json,raw-pump/selected-basal-profile.json,raw-pump/settings.json,raw-pump/status.json,raw-pump/temp-basal-status.json,settings/bg-targets.json,settings/insulin-sensitivities.json,settings/selected-basal-profile.json,settings/settings.json}
                             [{cgm-vendor.json,model.json,monitor/battery.json,monitor/clock.json,monitor/glucose-raw.json,monitor/glucose.json,monitor/pump-history.json,monitor/reservoir.json,monitor/status.json,monitor/temp-basal-status.json,nightscout/recent-treatments.json,nightscout/uploaded.json,oref0-enacted/enacted-temp-basal.json,oref0-monitor/iob.json,oref0-monitor/profile.json,oref0-predict/oref0.json,raw-cgm/calibrations.json,raw-cgm/entries.json,raw-pump/battery.json,raw-pump/bg-targets-raw.json,raw-pump/clock-raw.json,raw-pump/insulin-sensitivities-raw.json,raw-pump/pump-history-raw.json,raw-pump/reservoir.json,raw-pump/selected-basal-profile.json,raw-pump/settings.json,raw-pump/status.json,raw-pump/temp-basal-status.json,settings/bg-targets.json,settings/insulin-sensitivities.json,settings/selected-basal-profile.json,settings/settings.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'monitor/pump-history-raw.json' (choose from u'cgm-vendor.json', u'model.json', u'monitor/battery.json', u'monitor/clock.json', u'monitor/glucose-raw.json', u'monitor/glucose.json', u'monitor/pump-history.json', u'monitor/reservoir.json', u'monitor/status.json', u'monitor/temp-basal-status.json', u'nightscout/recent-treatments.json', u'nightscout/uploaded.json', u'oref0-enacted/enacted-temp-basal.json', u'oref0-monitor/iob.json', u'oref0-monitor/profile.json', u'oref0-predict/oref0.json', u'raw-cgm/calibrations.json', u'raw-cgm/entries.json', u'raw-pump/battery.json', u'raw-pump/bg-targets-raw.json', u'raw-pump/clock-raw.json', u'raw-pump/insulin-sensitivities-raw.json', u'raw-pump/pump-history-raw.json', u'raw-pump/reservoir.json', u'raw-pump/selected-basal-profile.json', u'raw-pump/settings.json', u'raw-pump/status.json', u'raw-pump/temp-basal-status.json', u'settings/bg-targets.json', u'settings/insulin-sensitivities.json', u'settings/selected-basal-profile.json', u'settings/settings.json')
usage: openaps-report invoke [-h]
                             {cgm-vendor.json,model.json,monitor/battery.json,monitor/clock.json,monitor/glucose-raw.json,monitor/glucose.json,monitor/pump-history.json,monitor/reservoir.json,monitor/status.json,monitor/temp-basal-status.json,nightscout/recent-treatments.json,nightscout/uploaded.json,oref0-enacted/enacted-temp-basal.json,oref0-monitor/iob.json,oref0-monitor/profile.json,oref0-predict/oref0.json,raw-cgm/calibrations.json,raw-cgm/entries.json,raw-pump/battery.json,raw-pump/bg-targets-raw.json,raw-pump/clock-raw.json,raw-pump/insulin-sensitivities-raw.json,raw-pump/pump-history-raw.json,raw-pump/reservoir.json,raw-pump/selected-basal-profile.json,raw-pump/settings.json,raw-pump/status.json,raw-pump/temp-basal-status.json,settings/bg-targets.json,settings/insulin-sensitivities.json,setti
weird, the block of text didn’t paste over
silly gitter
invalid choice: 'monitor/pump-history-raw.json
David Cintron
@loudestnoise
Jun 03 2016 20:00
well there’s my issue. I do not have a monitor/pump-history-raw.json report
this is in my NEW NEW openaps init that was all from @bewest templates
but I probably screwed something up
Ben West
@bewest
Jun 03 2016 20:05
oh?
can I see openaps alias show
as well as openaps report show
David Cintron
@loudestnoise
Jun 03 2016 20:05
⇢  openaps alias show
rm-warmup ! bash -c "rm -f model.json monitor/clock.json > /dev/null"
warmup report invoke model.json raw-pump/clock-raw.json monitor/clock.json
fail-warmup ! bash -c "echo PREFLIGHT FAIL; exit 1"
preflight ! bash -c "(openaps rm-warmup; echo PREFLIGHT ) && openaps warmup 2>&1 >/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || openaps fail-warmup"
monitor-cgm report invoke monitor/glucose-raw.json monitor/glucose.json
monitor-pump-history report invoke monitor/pump-history-raw.json monitor/pump-history.json
get-basal-status report invoke monitor/temp-basal-status.json
get-pump-details report invoke monitor/reservoir.json monitor/status.json monitor/battery.json
get-settings report invoke settings/bg-targets-raw.json settings/bg-targets.json settings/insulin-sensitivities-raw.json settings/insulin-sensitivities.json settings/selected-basal-profile.json settings/settings.json
gather-pump-data ! bash -c "openaps get-basal-status; openaps get-pump-details; openaps monitor-pump-history;  openaps get-settings"
gather-clean-data ! bash -c "openaps monitor-cgm && openaps gather-pump-data"
do-oref0 report invoke oref0-monitor/profile.json oref0-monitor/iob.json oref0-predict/oref0.json
enact-oref0 report invoke oref0-enacted/enacted-temp-basal.json
do-everything ! bash -c "openaps preflight && openaps gather-clean-data && openaps do-oref0 && openaps enact-oref0"
(pi @ raspberrypi): ~/skadoosh
⇢  openaps report show
pump://JSON/read_bg_targets/raw-pump/bg-targets-raw.json
units://JSON/bg_targets/settings/bg-targets.json
pump://JSON/read_insulin_sensitivities/raw-pump/insulin-sensitivities-raw.json
units://JSON/insulin_sensitivities/settings/insulin-sensitivities.json
pump://JSON/read_clock/raw-pump/clock-raw.json
tz://JSON/clock/monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
determine-basal://text/shell/oref0-predict/oref0.json
pump://JSON/iter_pump_hours/raw-pump/pump-history-raw.json
tz://JSON/rezone/monitor/pump-history.json
pump://JSON/model/model.json
pump://JSON/reservoir/monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0://JSON/shell/settings/settings.json
pump://JSON/read_settings/raw-pump/settings.json
oref0://JSON/shell/settings/selected-basal-profile.json
pump://JSON/read_selected_basal_profile/raw-pump/selected-basal-profile.json
pump://JSON/read_temp_basal/raw-pump/temp-basal-status.json
pump://JSON/reservoir/raw-pump/reservoir.json
pump://JSON/read_status/raw-pump/status.json
pump://JSON/read_battery_status/raw-pump/battery.json
get-profile://text/shell/oref0-monitor/profile.json
calculate-iob://text/shell/oref0-monitor/iob.json
ns://JSON/shell/nightscout/recent-treatments.json
ns://JSON/shell/nightscout/uploaded.json
cgm://JSON/iter_glucose/monitor/glucose-raw.json
tz://JSON/rezone/monitor/glucose.json
looks like oref0 template mint reports medtronic-pump | openaps import adds those reports
Ben West
@bewest
Jun 03 2016 20:07
ok
Eric Luhrs
@eluhrs
Jun 03 2016 20:08
@bewest Now that I've been looping for a few months, I'd like to re-write my openaps.ini. I'm pretty sure there's some unneeded cruft in there. Where is the best documentation for your new templating tools?
David Cintron
@loudestnoise
Jun 03 2016 20:08
openaps/docs#132 is what I’m looking at
Ben West
@bewest
Jun 03 2016 20:09
openaps alias add monitor-pump-history "report invoke raw-pump/pump-history-raw.json monitor/pump-history.json"
I see what happened
your monitor-pump-history is invoking monitor/pump-history-raw.json
but the raw version is actually raw-pump/pump-history-raw.json
checking the template
David Cintron
@loudestnoise
Jun 03 2016 20:11
makes it further now until openaps-report invoke: error: argument report: invalid choice: 'settings/bg-targets-raw.json’
same thing, it’s looking for that in settings not raw-pump
Eric Luhrs
@eluhrs
Jun 03 2016 20:13
thanks, @loudestnoise.
Ben West
@bewest
Jun 03 2016 20:13
hmm
did you get the aliases as well?
David Cintron
@loudestnoise
Jun 03 2016 20:14
Yeah, maybe I should just start over from the beginning. It was late last night, and I was also watching you and Mr. Ton talk :shipit:
Ben West
@bewest
Jun 03 2016 20:15
oref0 template mint alias common
looks like you got older aliases maybe
I think that should make them all align
oh
nope, it's got the same problem
need to go through and double check everything :)
there are some tweaks here tweaked recipes
can curl the raw url and openaps import it, there are some differences between these and the templates in oref0 which should be easy to patch
Jarred Yaw
@jyaw
Jun 03 2016 20:39
@mm22dl I got the huawei honor 5x. Battery life is great and for a couple hundred the screen looks fabulous. It is a good bit bigger than the iPhone 6 which I'm still getting used to. I actually prefer xdrip to the dexcom share app so that's been my main diabetes SW pro over the iPhone. I have noticed the Bluetooth can be a bit more flaky than it was with the iPhone. But I think it's still acceotable for my needs. I should also mention the honor 5x also has band 12 GSM.
Jarred Yaw
@jyaw
Jun 03 2016 20:50
@scottleibrand agreed. Glad this whole thing can work on both platforms!
Lynne Butts
@flutelynne_twitter
Jun 03 2016 21:11
@scottleibrand I just submitted a PR with the basics of what @bewest helped me with yesterday. I hope that it makes sense. I am sure it needs some editing. Thank you.
Scott Leibrand
@scottleibrand
Jun 03 2016 21:17
thanks. that's an excellent start. will probably merge that into dev and then ask someone to incorporate it into the existing docs, replacing the old-style ns-upload stuff it deprecates
Lynne Butts
@flutelynne_twitter
Jun 03 2016 21:19
@scottleibrand You're welcome. I am so grateful!
jaylagorio
@jaylagorio
Jun 03 2016 21:30
@bewest Any idea why openaps use pump model might return "\b" on a 511? On a 751 it returns the expected "751".
jaylagorio
@jaylagorio
Jun 03 2016 21:42
@bewest Using mm-send-comm.py to get the pump model number I get "BAD AILING" errors, but the source doesn't make it clear what that means either.
At least not to me
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 21:46
Hi everyone. 2 days ago I've updated openaps and oref0 to last dev. I am using dexcom vendor of openaps. Since this update I can't find any new callibration entry in mongo. Actually I don't really know how a normal callibration entry should look like, all that I know that after callibration (not new insertion but the 12h onw) I can't find anything different in new entries. Is that something known or should I research? Thank you.
as a result after ns website reset (and 24h passed) I have no raw points in NS even if I have filtered/unfiltered data in mongo.
Ben West
@bewest
Jun 03 2016 22:00
hmmm
511 eh?
yes
hmmm
that's interesting, lemme check some notes
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:03
hmmm, 511 what? :) pump is 715, but reading are from dexcom connected to pi
oh pump is 715?
@jaylagorio you're using a 511?
@jaylagorio https://github.com/bewest/decoding-carelink/blob/master/doc/commands.tsv, unfortunately looks like 511 and prior use different commands
512 was a big upgrade apparently
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:04
ah, it was not for me, sorry :)
Ben West
@bewest
Jun 03 2016 22:04
everything after 512 is mostly incremental improvements on things
before that, the commands for lot of things are different
looks like...
Eric Luhrs
@eluhrs
Jun 03 2016 22:06
@bewest I'm running into an error while following your new style walkthrough here: openaps/docs#132
Ben West
@bewest
Jun 03 2016 22:06
ReadPumpId @jaylagorio maybe try this one?
Eric Luhrs
@eluhrs
Jun 03 2016 22:07
openaps device add pump medtronic xxxxx gives ImportError: No module named timezones
Ben West
@bewest
Jun 03 2016 22:07
ah
Eric Luhrs
@eluhrs
Jun 03 2016 22:07
@bewest ^^^ any suggestions?
Ben West
@bewest
Jun 03 2016 22:07
sudo pip install -U openaps-contrib
Eric Luhrs
@eluhrs
Jun 03 2016 22:07
Did that.
Ben West
@bewest
Jun 03 2016 22:07
openaps vendor add openapscontrib.timezones
Eric Luhrs
@eluhrs
Jun 03 2016 22:09
openaps vendor add openapscontrib.timezones gives me this:
root@wopr-e1:~/wopr# openaps vendor add openapscontrib.timezones
No module named timezones
openapscontrib.timezones doesn't seem to be an importable python module
If it is a python module, try using --path to influence
PYTHONPATH
Ben West
@bewest
Jun 03 2016 22:10
hmm
that's odd
pydoc openapscontrib
should see timezones listed somewhere in there
Eric Luhrs
@eluhrs
Jun 03 2016 22:11

root@wopr-e1:~/wopr# pydoc openapscontrib
Help on package openapscontrib:

NAME
openapscontrib

FILE
(built-in)

PACKAGE CONTENTS
mmhistorytools (package)

root@wopr-e1:~/wopr#

Ben West
@bewest
Jun 03 2016 22:11
hmm I see
there's an issue with the openapscontrib packaging stuff I believe
on my laptop it's worked in the past but recently strated producing errors, and I've seen this pop up a few times now
I've also seen this installing from scratch on new rigs
but only sometimes and not others
do you have ls ~/src?
jaylagorio
@jaylagorio
Jun 03 2016 22:12
Yeah, still getting the BAD AILING errors with ReadPumpID. What does that mean?
Eric Luhrs
@eluhrs
Jun 03 2016 22:13
root@wopr-e1:~/wopr# ls ~/src
importlib-1.0.3 openaps-contrib setuptools-19.7
importlib-1.0.3.tar.gz pip-8.0.2 setuptools-19.7.tar.gz
lynx-cur.tar.gz pip-8.0.2.tar.gz subg_rfspy-0.8-ERF-src
lynx2.8.9dev.9 pyserial-3.0.1 weaved-edison-install-v1.01.tar
mmeowlink-source pyserial-3.0.1.tar.gz weaved_software
root@wopr-e1:~/wopr#
Ben West
@bewest
Jun 03 2016 22:13
hmm, well according to that doc, it looks like 512 started using new model and history commands
tempbasal is the same
ah ok
ok, I'll need to revisit python packaging
for now
sudo pip uninstall openapscontrib.mmhistorytools
Eric Luhrs
@eluhrs
Jun 03 2016 22:14
BTW, this is a new edison rig running yocto.
Ben West
@bewest
Jun 03 2016 22:15
yeah, which install doc did you follow?
curious if you used easy_install vs pip
Eric Luhrs
@eluhrs
Jun 03 2016 22:15
openaps/docs#132
Ben West
@bewest
Jun 03 2016 22:15
ah.... MINE pip
nice
Eric Luhrs
@eluhrs
Jun 03 2016 22:16
yes, pip
ImportError: No module named mmhistorytools
Now getting this error while attempting to install pump device:
Ben West
@bewest
Jun 03 2016 22:19
great
Eric Luhrs
@eluhrs
Jun 03 2016 22:19
:)
Ben West
@bewest
Jun 03 2016 22:20
openaps vendor remove mmhistorytools
Eric Luhrs
@eluhrs
Jun 03 2016 22:21

usage: openaps-vendor remove [-h]

                         {mmeowlink.vendors.mmeowlink,openapscontrib.mmhistorytools,openapscontrib.timezones,openxshareble}

openaps-vendor remove: error: argument name: invalid choice: 'mmhistorytools' (choose from u'mmeowlink.vendors.mmeowlink', u'openapscontrib.mmhistorytools', u'openapscontrib.timezones', u'openxshareble')
root@wopr-e1:~/wopr#

Ben West
@bewest
Jun 03 2016 22:21
ok, let's be pedantic about it:
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:21
Ok, next step in my research why I cannot see callibrations:
pi@raspi2 ~/dyps $ openaps use cgm iter_calibrations 1
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.6.dev0', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 724, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1650, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.6.dev0-py2.7.egg/openaps/vendors/dexcom.py", line 726, in main
    for item in self.dexcom.iter_records('CAL_SET'):
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.9-py2.7.egg/dexcom_reader/readdata.py", line 301, in iter_records
    records = list(self.ReadDatabasePage(record_type, x))
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.9-py2.7.egg/dexcom_reader/readdata.py", line 267, in GenericRecordYielder
    yield record_type.Create(data, x)
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.9-py2.7.egg/dexcom_reader/database_records.py", line 158, in Create
    return cls(unpacked_data, raw_data)
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.9-py2.7.egg/dexcom_reader/database_records.py", line 180, in __init__
    self.check_crc()
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.9-py2.7.egg/dexcom_reader/database_records.py", line 47, in check_crc
    raise constants.CrcError('Could not parse %s' % self.__class__.__name__)
dexcom_reader.constants.CrcError: Could not parse Calibration
Ben West
@bewest
Jun 03 2016 22:21
openaps vendor remove openapscontrib.mmhistorytools
@ktomy is this G5?
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:22
G4
Ben West
@bewest
Jun 03 2016 22:22
openaps --version?
oh nm
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:22
Unfortunately I cannot connect the dexcom now to a regular NS uploader as it is 1am and my son sleeps :)
openaps 0.1.6-dev
Ben West
@bewest
Jun 03 2016 22:23
are you using calibrations for oref0 rawor something?
does iter_glucose or GetFirmwareHeader work?
is it new receiver maybe, does it do same thing with 4 instead of 1?
Eric Luhrs
@eluhrs
Jun 03 2016 22:24
@bewest That worked. Thanks very much. I was able to add timezones and pump. :clap:
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:24
I am using raw data just for disp[laing it in NS, it is not a data source for oref0, so priority is low, I'll try to see tomorrow if I can read them via NS uploader
iter_glucose works normally
I think maybe something was wrong with dexcom itself, yesterday (or 2 days ago) it shown strange things (asked for 2 or 3 callibrations without any reason), so I think maybe it is a real data corruption
it is 2 yars old receiver, without 505, it gives same error with any number of callibrations required (so with 4 it gives exception too).
rafaelmatuk
@rafaelmatuk
Jun 03 2016 22:27
Hi everyone: I have a weird situation...for some reason, my closed loop is failing due to the clock set incorrectly: somehow openaps (or the json files) are coming with a 90sh minutes off set.
Pump, Dexcom and Raspberry appear to be in synch though - has anyone experienced something similar?
Ben West
@bewest
Jun 03 2016 22:27
does typing date match what's on your wall clock/watch/iphone?
rafaelmatuk
@rafaelmatuk
Jun 03 2016 22:28
yeap
and same with dex and pump...is a new dexcomm though (I broke the first one), so I switched to pulling glucose from NS
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:28
also, about date, I am using a 3g stick and out cellphone provider seem to restrict udp packets on ntp port, so my regular ntp sync doesn't work, so in my loop I have something like:
sudo timeout 10 rdate time-c.nist.gov
Ben West
@bewest
Jun 03 2016 22:30
openaps report show --json | json -g | json -c "this[this.name].timezone"
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:30
this "forced sync" is in the beginning of each iteration
Ben West
@bewest
Jun 03 2016 22:30
this will print which timezones have been selected
you can wipe them out if it's the wrong zone:
openaps report show --json | json -g | json -c "this[this.name].timezone" | json -e "this[this.name].timezone = ''" | openaps import
Alin Artiom Kenibasov
@ktomy
Jun 03 2016 22:32
without this line when on 3g after about 2 days of looping pi time and dexcom/pump time are out of sync
so, thank you @bewest , tomorrow I'll try to see if it is a dexcom or parser problem. I'll give you my results.
rafaelmatuk
@rafaelmatuk
Jun 03 2016 22:35
interesting: clock-zoned is showing CST and pumphistory-zoned shows CDT.. let me try wiping them out
rafaelmatuk
@rafaelmatuk
Jun 03 2016 22:41
got it working - damn dexcom iPhone app was frozen or my cellphone was in limbo - thanks @bewest @ktomy
Matt Pazoles
@Pazoles
Jun 03 2016 23:35
This message was deleted