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

14th
Jan 2019
jaylagorio
@jaylagorio
Jan 14 00:41
@renegadeandy What kind of phone is it?
renegadeandy
@renegadeandy
Jan 14 00:52
its a Honor 9, but has worked a lot in the past
i think ive broked my contrabs
what do you get if you do crontab -l?
jaylagorio
@jaylagorio
Jan 14 00:56
You get what executes after certain periods of time, one of which should be the Bluetooth reconnection script
Is the Honor 9 an Android device? I've seen Android devices "forget" devices that connect to it occasionally. You might try going through the repairing process.
Another trick I do if BT tethering breaks while on the road is changing the phone's Wi-Fi sharing access point name and password to be the same one as the one in your home and turning Wi-Fi network sharing on. The rig will connect to the Internet through the phone, you'll be able to log into the rig using an SSH app on the phone to diagnose any problems too
renegadeandy
@renegadeandy
Jan 14 01:10
nope, it was broken because i nailed the cronjobs list
i was messing with xDripAPS whilst on a flight
and managed to break the whole rig
lol
jaylagorio
@jaylagorio
Jan 14 01:21
You're more courageous than I! Unless something was broken I wouldn't have messed with it. Much respect!
renegadeandy
@renegadeandy
Jan 14 01:23
well i wasn't able to get the offline loop setup working before my flight (the documentation for the offline rig is a bit poor, id make a number of changes), so I was editting the xDripAPS.py code, via the bt-pan network, on my laptop, during the flight lol!
so i got it working, and then i messed up the crontab
i had 8 hours ( Edinburgh -> Chicago!)
jaylagorio
@jaylagorio
Jan 14 01:25
Well congrats on getting it working! Any chance you want to try your hand at updating those docs so they're more fleshed out?
renegadeandy
@renegadeandy
Jan 14 01:25
yeah im tempted
there is one thing before i do though
Something I dont understand
jaylagorio
@jaylagorio
Jan 14 01:26
Been on my fair share of 8 - 12 hour flights, totally understand having that much time on your hands
renegadeandy
@renegadeandy
Jan 14 01:26
the xDripAPS.py - which is in ~/.xDripAPS/ -- is that copied somewhere during the running of the setup?
jaylagorio
@jaylagorio
Jan 14 01:27
During the running of oref0-setup?
renegadeandy
@renegadeandy
Jan 14 01:27
yeah
and, where do the logs from xDripAPS get outputted to?
jaylagorio
@jaylagorio
Jan 14 01:29
I don't use XDripAPS so I wasn't sure if there was a separate setup step for that. It looks like on 891 of oref0-setup there's this line:
git clone https://github.com/colinlennon/xDripAPS.git $HOME/.xDripAPS
So if that repo contains the xdripaps.py file that's how it gets there
(I haven't been in the chat for a while so I need to start remembering to use Markdown, and to do so properly)
renegadeandy
@renegadeandy
Jan 14 01:30
yeah it does
but when i make changes to that xDripAPS.py file, it doesn't seem to get reflected at runtime
for some reason
jaylagorio
@jaylagorio
Jan 14 01:31
As for the logs - and this is a guess - it might be in /var/log/openaps/ ?
renegadeandy
@renegadeandy
Jan 14 01:31
i dont think it is
right now i am getting an HTTP 500 INTERNAL SERVER ERROR reported from xDrip agains xDripAPS, but until I find the output logs, i can't fix it
jaylagorio
@jaylagorio
Jan 14 01:33
Does your crontab contain a line that references Xdrip? Sometimes at the end of that line there's a 2>&1 type of thing at the end of which shows where the log output is dumped
I don't use that package so I don't have a live setup to reference, sorry!
renegadeandy
@renegadeandy
Jan 14 01:36
this line
* * * * * cd /root/myopenaps && ps aux | grep -v grep | grep -q 'monitor-xdrip' || monitor-xdrip | tee -a /var/log/openaps/xdrip-loop.log @reboot python /root/.xDripAPS/xDripAPS.py
but im not very good with cronjbos
xdrip-loop.log isn't the log of the python script
jaylagorio
@jaylagorio
Jan 14 01:38
This means that the rig executes the script once on startup, and the script lives in memory until reboot. It doesn't continually read the file as it executes which is why your changes aren't reflected in real time
renegadeandy
@renegadeandy
Jan 14 01:38
aha
ok cool
jaylagorio
@jaylagorio
Jan 14 01:38
xdrip-loop.log isn't the name of the log file?
renegadeandy
@renegadeandy
Jan 14 01:38
nope
jaylagorio
@jaylagorio
Jan 14 01:38
That's weird, that's exactly what I would expect from that line
renegadeandy
@renegadeandy
Jan 14 01:39
well...i don't see any http 500 details in there....
suppose it could be that file
but i dont see any of the debug print lines in there
jaylagorio
@jaylagorio
Jan 14 01:39
You got me there, honestly not sure
renegadeandy
@renegadeandy
Jan 14 01:40
how would i change that cron entry
so i can route the file's output somewhere definitive?
jaylagorio
@jaylagorio
Jan 14 01:42
Not knowing anything about the xDripAPS.py script, I don't know how it generates its output. If it's printing to standard out, it would end up in the xdrip-loop.log file. But since it's not, I imagine they're logging manually to some file named in the script. Again, totally conjecture.
@renegadeandy Shovel duty, back tomorrow!
renegadeandy
@renegadeandy
Jan 14 01:50
it just uses python print "this is output"
the print lines are not going into the xdrip-loop.log
and the script doesn't mention a file specifically

For example, this code path is running every 5 minutes(I can tell because I get a HTTP 500 from the script on my xDrip
```class Test(Resource):
def get(self):

    # Get hashed API secret from request
    request_secret_hashed = request.headers['Api_Secret']
    print 'request_secret_hashed : ' + request_secret_hashed

    # Get API_SECRET environment variable
    env_secret_hashed = os.environ['API_SECRET']

    # Authentication check
    if request_secret_hashed != env_secret_hashed:
        print 'Authentication failure!'
        print 'API Secret passed in request does not match API_SECRET environment variable'
        return 'Authentication failed!', 401

```

however, no file in /var/log contains any of those print lines
renegadeandy
@renegadeandy
Jan 14 01:58
@danamlewis can you help here?
Dana Lewis
@danamlewis
Jan 14 02:10
@renegadeandy sorry, no experience with xdrip related things, and about to take off on a flight. Someone else will probably chime in here soon though - but general advice, see if you can run things manually and print to screen, then you can try to redirect to print to a new log and then the place you hoped it would go.
renegadeandy
@renegadeandy
Jan 14 02:29
im probably going to do a pull request on the xDripAPS code, with the appropriate additions
to allow it to support tokens, and make it standardize output locations of logs too
renegadeandy
@renegadeandy
Jan 14 02:38
WHats the process to make doc changes to the opendocs?
Boris and Kayley Raskin
@boryanvbu
Jan 14 03:31
@jaylagorio, I finally got it to loop offline after re-running the setup script from the dev branch :) Thanks!
jaylagorio
@jaylagorio
Jan 14 04:10
@boryanvbu Great to hear!
@renegadeandy @Ebgineer Has you covered there!
scotlandpaul
@scotlandpaul
Jan 14 04:16
Hi there, I'm trying to set up openAPS / xdrip+ and have spent 3 days trying to make this work - with no success. Ive been using xdrip+ for a year (but dont think my data is online) and have all the hardware and am at stage 4 of the rig build. Im completely stuck. Is this the right place to ask questions? Sorry if it's not, and any advice where to go would be great
Ebgineer
@Ebgineer
Jan 14 04:23
There's people here who can help set up openAPS, either with NightScout or offline.
I take it you're working on executing the oref0-setup.sh script?
scotlandpaul
@scotlandpaul
Jan 14 04:28
@Ebgineer yup that is correct. I'm at stage 4 I think (per the documents). It keep saying could not install openaps with nogit. It says build failed with error code 128.
Ebgineer
@Ebgineer
Jan 14 04:28
edison or raspberry pi?
scotlandpaul
@scotlandpaul
Jan 14 04:28
edison
I dont know how to copy from putty, or Id put up pictures
Ebgineer
@Ebgineer
Jan 14 04:30
with putty you just highlight the section and it automatically copies to clipboard
before running the setup script you'd want to verify internet connectivity from the edison
scotlandpaul
@scotlandpaul
Jan 14 04:31
aha - thanks! Command /usr/bin/git clone -q https://github.com/openaps/openaps.git /tmp/pip-_FvYH8-build failed with error code 128 in None
Storing debug log for failure in /root/.pip/pip.log
is there an easy way to check internet connectivity? I thought Id set it up correctly in the previous stage (or rather I assumed as it completed that stage, that it worked)
Ebgineer
@Ebgineer
Jan 14 04:33
try ping google.com
and ctrl-c to end
scotlandpaul
@scotlandpaul
Jan 14 04:35
it says unknown host google.com .... so assume this means no internet connectivity? So go back and do the bootstrap script again?
Ebgineer
@Ebgineer
Jan 14 04:35
yeah no connectivity. before you bootstrap again, did it give any error messages during the first run?
scotlandpaul
@scotlandpaul
Jan 14 04:36
I did about 8 runs. Then finally it didn't give me any and allowed me to do the next stage
Ebgineer
@Ebgineer
Jan 14 04:37
are you connected to the edison via ssh or serial port?
scotlandpaul
@scotlandpaul
Jan 14 04:37
serial
Ebgineer
@Ebgineer
Jan 14 04:38
If you can get connected from the PC to the rig using SSH it would be a good start. It will basically go the other direction on the same connection to reach the internet.
you might check that your network has been set up correctly in this file https://openaps.readthedocs.io/en/master/docs/Customize-Iterate/on-the-go-wifi-adding.html
scotlandpaul
@scotlandpaul
Jan 14 04:41
Ah _ Im using putty. The instructions said just to use serial and change to the port it was plugged into. Wasnt aware that SSH could be used.
Ebgineer
@Ebgineer
Jan 14 04:41
you have to set the host name first before you can reach it with ssh
the wpa_supplicant.conf file is important because the edison needs to know your router password to get out
scotlandpaul
@scotlandpaul
Jan 14 04:44
Im not sure how to 'set the host name'? I was just following the instructions https://openaps.readthedocs.io/en/latest/docs/Build%20Your%20Rig/OpenAPS-install.html#run-oref0-setup I for sure put in the network and the password - but sounds like SSH is a better method?
Ebgineer
@Ebgineer
Jan 14 04:45
you have to start with serial until you set up the host name. that is done by the bootstrap script.
on that page you linked, under steps 2-3 you should follow the link for Intel Edison instructions
scotlandpaul
@scotlandpaul
Jan 14 04:46
sounds like I should just start again with the bootstrap script? The steps are what I followed 8 or so times, and bootstrap kept failing. Not sure why.
Ebgineer
@Ebgineer
Jan 14 04:47
I'd hesitate to say you need to do it again if you already tried 8 times
scotlandpaul
@scotlandpaul
Jan 14 04:48
It seemed to work the 8th time. That was when I was able to start the oref script from the intel edison instructions
Ebgineer
@Ebgineer
Jan 14 04:48
it could be something simple, like an error in the network name or password entry
scotlandpaul
@scotlandpaul
Jan 14 04:49
I was pretty meticulous when I checked them (by the 8th time I was triple checking everything). Is there any way to tell?
Ebgineer
@Ebgineer
Jan 14 04:49
if you have a phone or other device you could try connecting from it using the name and password
scotlandpaul
@scotlandpaul
Jan 14 04:50
from the edison?
Ebgineer
@Ebgineer
Jan 14 04:50
you can also look in the file using cat /etc/wpa_supplicant/wpa_supplicant.conf
don't paste the results here though, since this is public
if you're on the edison you can double check that the wifi info is in the wpa_supplicant file
if you connect from a phone or other device you can verify that the info in the supplicant file is correct
scotlandpaul
@scotlandpaul
Jan 14 04:54
I checked using that script and the network and password are correct.
Ebgineer
@Ebgineer
Jan 14 04:57
try ifconfig
that should show the IP address, which is the numbers after "inet" in the wlan0 section
if the edison rig is connecting to your wifi network correctly, you should be able to ping that IP address from your computer
Ebgineer
@Ebgineer
Jan 14 05:02
you can also start a putty SSH session using the edison rig's IP address. specify port 22.
scotlandpaul
@scotlandpaul
Jan 14 05:09
sorry computer crashed (seems like that kind of day). THe above didnt work - it says it timed out due to a network error
Ebgineer
@Ebgineer
Jan 14 05:09
no problem. the ifconfig timed out?
scotlandpaul
@scotlandpaul
Jan 14 05:10
I got the IP address from the ifconfig. Then restarted putty and tried to connect via SSH using the IP address - thats what timed out
Ebgineer
@Ebgineer
Jan 14 05:11
can you verify the network name and password by connecting to the wifi network from a different device?
scotlandpaul
@scotlandpaul
Jan 14 05:12
yup did that. From phone and this computer.
Ebgineer
@Ebgineer
Jan 14 05:13
that's good. I'm kind of scratching my head now though. It's almost like wifi isn't getting activated on the edison.
you might try running the bootstrap again, and see if you spot any error messages with the wifi setup. that might give a clue.
scotlandpaul
@scotlandpaul
Jan 14 05:14
OK will do. That'll take about 20 mins per the last few times. Thanks for your help. I'll come back later when done.
Ebgineer
@Ebgineer
Jan 14 05:14
unfortunately I'll have to hand you off to another helper since I'll be heading to bed soon.
scotlandpaul
@scotlandpaul
Jan 14 05:15
cool - thanks for your help - it definitely feels better to not be stuck at a dead end!
Ebgineer
@Ebgineer
Jan 14 05:15
best of luck!
scotlandpaul
@scotlandpaul
Jan 14 05:36
No DHCPOFFERS received.
No working leases in persistent database - sleeping. This now comes up - which Ive no idea what it means, but suggests connecting to wifi is the problem. Is it likely the edison is the issue?
Dana Lewis
@danamlewis
Jan 14 06:45
Try resetting the Edison to the explorer board if you haven’t already?
Evgeny Pakhomov
@eupakhomov
Jan 14 13:43
@Ricco555 it's ok that you receive the same message as I didn't clean the message itself. I just modified program to execute further after the message. If you checked that contacts are ok and with ./ccprog -p 19,7,36 status you have no other output than Unsupported chip id = 0x00 ... message then I am afraid your C1110 is dead.
Evgeny Pakhomov
@eupakhomov
Jan 14 13:49
@Ricco555 other option - you might try to reinstall everything from scratch to check if is's an issue with drivers.
Ivica Suran
@isuran
Jan 14 13:50
@Ricco555 I have also buried two boards after "Unsupported chip id "
Evgeny Pakhomov
@eupakhomov
Jan 14 13:54
@Ricco555 your pump.ini should look like:
[device "pump"]
serial = <here is your serial number>
port = /dev/spidev5.1
radio_type = subg_rfspy
radio_locale=WW
Raymond Richmond
@PedanticAvenger
Jan 14 15:44
Anyone able to share some personal experiences comparing actually using a 670g system with OpenAPS w/ SMB? I'm going to trial the 670 (I'm really curious if the new cgm is better than the previous Enlite for me) and wondering about areas to focus attention on.
loztblaz
@loztblaz
Jan 14 16:30
@PedanticAvenger I used the 670g from May-November and OpenAPS with all the features after that. I hugely prefer OpenAPS both in effectiveness and in day to day convenience. Of course there's a higher technical barrier with OpenAPS, but that up front cost in effort pays off constantly. The 12 hour calibration timer on the 670g was oppressive for me, causing me to unconsciously build my routine around it and experience a bunch of timing anxiety about how I'd fit in sleep/life/etc between the timers. My sleep quality plummeted when I started using the 670g, but it did eventually get to the point where I'd call it mediocre. At my worst I was experiencing severe symptoms of sleep deprivation from how needy the 670g was.
loztblaz
@loztblaz
Jan 14 16:35
@PedanticAvenger The 670g does do a surprisingly good job at glucose control for being years behind OpenAPS however, with a few notable exceptions. Dawn phenomenons were always rough, sometimes I'd rocket to 230-250 before the pump would be able to catch it. The target of 120 meant that I'd zero-temp for hours sometimes before dawn phenomenon kicked in, and with auto-mode my corrections were limited by what the unknown proprietary loop logic allowed me. The hidden settings and lack of customization also caused plenty of issues. The Guardian 3 CGM is quite good, but I'd suggest skipping the belly site and going straight to the arm. It's very accurate with good calibration discipline.
Raymond Richmond
@PedanticAvenger
Jan 14 16:38
Thanks @loztblaz I already have a pretty rigid 12h calibration schedule so that isn't as difficult for me, but if you are not used to it I can see a bunch of stress being injected into life. I plan on asking for access to real technical resources, they are aware I am an OpenAPS user and also that I'm not afraid to honestly share my thoughts. :P
loztblaz
@loztblaz
Jan 14 16:38
@PedanticAvenger Finally the biggest issue with the 670g is alarms. Many of them cannot be muted, and they've got a feature where they escalate if not immediately (within 1-2 minutes) dealt with. Sometimes it's reminding you about an upcoming calibration, sometimes it just decides it needs a new glucose reading, and doing things as common as driving can suddenly turn into stressful situations when your pump starts alarming and escalates to what I can only describe as a siren due to you not risking an accident to deal with it.
Raymond Richmond
@PedanticAvenger
Jan 14 16:39
Oh that wouldn't be annoying at all.....
loztblaz
@loztblaz
Jan 14 16:40
Good luck getting any real technical resources on the 670g, they guard any information about it's algorithm so strongly that they'll end phone calls if you ask too many questions. Everything I figured out I had to do myself, beyond really basic directions.
But basically, it wasn't for me at all and required a level of discipline with everything that was causing me burnout, but it works well if it's something that one can tolerate. Sitting at 250 with 0 IOB and being told by your pump that no correction is needed is like, the definition of frustrating.
Tom Boudreau
@tomasboudr
Jan 14 16:46
Wow thats really bad @loztblaz
I already get frustrated at OpenAPS for not driving me back down faster (when its really the insulin's fault), and its def not 0 IOB
The Medtronic calibration bit where you don;t get readings if you don;t calibrate immediately is what drove me to the G5 in the first place
loztblaz
@loztblaz
Jan 14 16:47
one useful bit of undocumented info is that carb bolus IOB time is invisibly hard coded to 3 hours, regardless of what your pump settings are, and carb bolus IOB doesn't decay on a curve. at 2:59:59 it'll refuse to give a correction regardless of glucose and iob, but at 3:00:01 it's fine with it.
Tom Boudreau
@tomasboudr
Jan 14 16:47
its so damn user hostile
@loztblaz thats just dumb, and makes me glad I didn;t jump on that ship
loztblaz
@loztblaz
Jan 14 16:50
and in auto-mode, insulin active time is essentially an aggression setting for their temp basal adjustments, which is why i had mine set to 2 hours because otherwise it could just not keep me under 150 average reliably
Raymond Richmond
@PedanticAvenger
Jan 14 16:53
I find it getting harder to find pumps and when I had a "Why am I having a 630g sit around just in case" moment I told Medtronic I was sending it back. I have been a customer for 15 years and they got twitchy. I will give it an honest run but expect to be sending it back. By the time I"m done perhaps AndroidAPS will support the Omnipod that would allow me to ahve a supported pump (in canada) and loop with dexcom. Maybe....
Tom Boudreau
@tomasboudr
Jan 14 16:54
@PedanticAvenger I had a 530g and they still send me replacement belt clips for my original 722 when I ask for free.
which is what I use with OpenAPS
Raymond Richmond
@PedanticAvenger
Jan 14 16:55
@tomasboudr Heh. I use belt mounted pouches. The challenge for me is finding canadian 722s available. I'm sure I could do it, but out of pocket vs covered is a powerful port of the decision process.
Tom Boudreau
@tomasboudr
Jan 14 16:56
finding them sucks for sure...
loztblaz
@loztblaz
Jan 14 16:56
Yep, I've been a long time medtronic customer too and when I talked about returning the 670 I got a ton of emails and requests that I just try it for a little bit longer, offers to totally let me return it beyond the official return policy window. I never tested that offer, but it gave me a sort of scummy vibe off of them.
If you do encounter issues you want to work through, try to get in contact with your local medtronic rep if you've got one. Mine was one of the few people that seemed to get the issues I was having and was willing to give information about what things I could cut corners on instead of expecting a patient to follow every single line of instruction in the manual, as if any diabetic does that.
Raymond Richmond
@PedanticAvenger
Jan 14 17:40
@loztblaz Thanks. I have a good connection with the local rep. and do not have any hesitations about hounding them for this. The whole IOB decay curve thing so far frankly gives me the biggest pause.
Tom Boudreau
@tomasboudr
Jan 14 17:51
I asked this before but I have more specifications now... when I start airpods on my iphone playing anything and I'm at home on wifi. Then leave to walk somewhere, a few minutes the airpods stop playing sound but the phone thinks its still working and podcasts for example keep playing but not producing any audio in the airpods. I'm 99% sure this is due to the edison BT tethering kicking on now that the wifi is no longer reachable. I have a bug in with Apple as I think this is the fault of the BT software stack on the phone/airpods as I have had this problem with both an Iphone 7 and a Xs (which was setup as new)
Does no one else experience this?
Dana Lewis
@danamlewis
Jan 14 17:52
No. That sounds really odd. Can you reproduce worth a different pair of AirPods?
Tom Boudreau
@tomasboudr
Jan 14 17:53
I have other BT headphones I should try it with
Dana Lewis
@danamlewis
Jan 14 17:53
The bt tethering of a rig shouldn’t influence the AirPod connection...
Tom Boudreau
@tomasboudr
Jan 14 17:53
I agree it shouldn't
Dana Lewis
@danamlewis
Jan 14 17:53
Wacky for sure; let us know if it persists on another pair of headphones?
dudapdantas
@dudapdantas
Jan 14 18:02
hi! I'm new here. I want to use the OpenAPS system with my accu-chek combo roche pump + libre and miaomiao. I still don't have a android phone to use so i'm still searching for a good samsung smartphone that fits the system. Have any of you tested it on android 8.1 ? Does it work?
Scott Leibrand
@scottleibrand
Jan 14 18:12
are you talking about using AndroidAPS? If so, that might be a question for https://gitter.im/MilosKozak/AndroidAPS
I think they also have some documentation on which phones have been tested successfully
jgslade
@jgslade
Jan 14 18:34
@PedanticAvenger I also came from the 670g and my experience mirrors @loztblaz. I also had the problem of I have ms which had reduced my coordination and the cumbersome way of inserting sensors was very difficult for me.
Riko L
@Ricco555
Jan 14 20:09
@eupakhomov @isuran : tried all that I could come up with my limited knowledge, even removed the screws :) not a budge. I will try with reflashing edison and start from scratch unless I get back with some more insights from EnhancedRadioDevices first. I was wondering if there is a way to reflash Explorer Board without edison plugged in.
Andrew Kirkby
@kirkbysound
Jan 14 20:14
Quick query... if I re-run the setup script and change pump serial. Does anything else change / reset? I have a backup pump I'd like to switch to for a few days to check it's ok.. Also, is there any way of switching without running the setup script via a text editor? Thx!
Jon Cluck
@cluckj
Jan 14 20:47
~/myopenaps/pump.ini is where the pump serial is stored
Dana Lewis
@danamlewis
Jan 14 20:52
But also edit and save your runagain file w the updated pump too (if you edit directly) otherwise next time it’ll rerun with the old one