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

21st
Feb 2019
Abigail Cember
@acember
Feb 21 00:13
@danamlewis lives a dangerous life -- get better soon! @scottleibrand I'm not on Fiasp yet, but I will not leave my endocrinologist's office next time until she gives me a prescription, because this is getting ridiculous.
Speaking of insulin stuff, I accidentally entered into nightscout that I gave a 30 unit bolus earlier today (it was 3.0, forgot the decimal place). I wasn't looping at the time and figured I should stay offline for a while, but is that going to screw with the autosens calculation?
(I couldn't figure out a way to delete or edit something I had already entered into NS care portal.)
Jon Cluck
@cluckj
Feb 21 00:47
edit mode (top right corner) is the little checkbox looking icon, click + drag the thing you want deleted
Zakm0n
@Zakm0n
Feb 21 00:52
So, got a freshly built explorer hat rig, and for some reason, the screen turned off and won't come back on. Am I missing something?
Scott Leibrand
@scottleibrand
Feb 21 00:58
@acember false bolus data in NS will only affect autotune, so as long as you clean it up (as Jon described) before 4am, it won't have any effect.
of if edit mode is difficult, you can go to Reports, choose treatments, select today, find the incorrect treatment, and hit the X on it
Abigail Cember
@acember
Feb 21 01:42
@cluckj That was exactly what I needed, didn't know I could do that. OK, then I'm safe! I definitely didn't want autotune thinking I just absorbed 30 units of insulin -- not even I get that resistant :D
Jon Cluck
@cluckj
Feb 21 01:47
:laughing:
Zakm0n
@Zakm0n
Feb 21 01:51
npm ERR! invalid: oref0@0.7.0-dev /usr/local/lib/node_modules/oref0 npm ERR! not ok code 0
Jon Cluck
@cluckj
Feb 21 01:51
thanks for moving over here
Zakm0n
@Zakm0n
Feb 21 01:52
just saw that on the install log
also seeing a lot of npm warn pop up
Jon Cluck
@cluckj
Feb 21 01:55
the warnings are okay
Zakm0n
@Zakm0n
Feb 21 02:04
my shortcuts are back, but nothing on the display
Jon Cluck
@cluckj
Feb 21 02:06
systemctl status openaps-menu to see what's going on there?
Zakm0n
@Zakm0n
Feb 21 02:12
● openaps-menu.service - OpenAPS Menu service for Explorer HAT.
   Loaded: loaded (/etc/systemd/system/openaps-menu.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-02-20 21:01:33 EST; 10min ago
 Main PID: 499 (openaps-menu.sh)
   CGroup: /system.slice/openaps-menu.service
           ├─499 /bin/bash /root/src/openaps-menu/openaps-menu.sh
           └─501 node index.js

Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Object.fs.writeSync (fs.js:735:20)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Bus.i2cWriteSync (/root/src/openaps-menu/node_modules/i2c-bus/i2c-bus.js:348:13)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Oled._transfer (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:136:25)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Oled._initialise (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:110:10)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at new Oled (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:81:8)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Object.init (/root/src/openaps-menu/lib/display/ssd1306.js:36:24)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at module.exports (/root/src/openaps-menu/lib/display/ssd1306.js:68:13)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Object.<anonymous> (/root/src/openaps-menu/index.js:24:51)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Module._compile (module.js:652:30)
Feb 20 21:02:01 PiAps openaps-menu.sh[499]:     at Object.Module._extensions..js (module.js:663:10) errno: -121, code: 'EREMOTEIO', syscall: 'write' }
Jon Cluck
@cluckj
Feb 21 02:15
can you see if dtparam=i2c_arm=on is set in /boot/config.txt, and if your screen is cracked or broken?
Zakm0n
@Zakm0n
Feb 21 02:20
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
screen isn't cracked, this rig is fresh out of the box
possible bad solder joint from the hat board to the screen board?
Eric
@ecc1
Feb 21 02:28
You could run i2cdetect from the i2c-tools package to see if the kernel sees the device and has the right driver
probably worth finding some standalone "draw a picture on the screen" program as a diagnostic
Zakm0n
@Zakm0n
Feb 21 02:30
how would I go about all that?
Eric
@ecc1
Feb 21 02:30
sudo apt-get install i2c-tools
sudo i2cdetect -l
sudo i2cdetect -y NNN
where NNN is the number of the i2c bus (probably 1) displayed in the previous command
it should show UU at the address of the screen if a driver has claimed it (@cluckj probably knows the i2c address of that display?)
Zakm0n
@Zakm0n
Feb 21 02:33
i2c-1   i2c             bcm2835 I2C adapter                     I2C adapter
sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Zakm0n
@Zakm0n
Feb 21 02:38
So, am I seeing that there isn't a driver, or is the 48 indicative of a driver claiming the screen?
Eric
@ecc1
Feb 21 02:38
That says there's an i2c device at address 0x48, not in use by any driver. I'm at the end of my useful knowledge, since I don't know whether @cluckj's code uses entirely user-space access to the screen, or relies on a driver, and in either case whether that's its i2c address
Jon Cluck
@cluckj
Feb 21 02:38
3c is the screen
Eric
@ecc1
Feb 21 02:39
That's what I was afraid of (same part as on my ESP32 module actually)
Zakm0n
@Zakm0n
Feb 21 02:39
So, the screen isn't even showing up on the bus?
Eric
@ecc1
Feb 21 02:39
So there's a hardware connectivity issue (could well be bad solder as you suggested)
^ right
Jon Cluck
@cluckj
Feb 21 02:39
yeah
Zakm0n
@Zakm0n
Feb 21 02:39
Weird. Well, I'm gonna reflow them really quick
Jon Cluck
@cluckj
Feb 21 02:40
be really careful, the screen is extremely easy to crack
Zakm0n
@Zakm0n
Feb 21 02:40
I'm literally going to just heat the 4 solder points on the headers
Jon Cluck
@cluckj
Feb 21 02:41
:thumbsup:
Zakm0n
@Zakm0n
Feb 21 02:42
sda looked a little jank
how soon should I see the screen light up from power on?
Jon Cluck
@cluckj
Feb 21 02:42
it'll probably be the last thing to start
Zakm0n
@Zakm0n
Feb 21 02:43
also, the ribbon cable on the screen, soldered on or is it socketed?
Jon Cluck
@cluckj
Feb 21 02:43
I think it's soldered, let me check
Eric
@ecc1
Feb 21 02:44
(BTW this helpful page https://learn.adafruit.com/i2c-addresses/the-list and a look at the ERD schematic shows that 0x48 is the ADS1014 ADC used to measure the battery)
Zakm0n
@Zakm0n
Feb 21 02:44
I've got double stick between the screen board and the hat
sweet, thanks
still not showing on i2c bus
Jon Cluck
@cluckj
Feb 21 02:46
it's soldered
Zakm0n
@Zakm0n
Feb 21 02:47
it's so weird that it worked then it just didn't\
The only thing I did between it working and it not working was setting up my prefs
Eric
@ecc1
Feb 21 02:50
maybe some thermal intermittency? do you have any cold spray? or just power it off and wait a little while
Zakm0n
@Zakm0n
Feb 21 02:51
Well, it was hottest right after oref finished installing. It's been hardly in use since and hasn't worked since
Jon Cluck
@cluckj
Feb 21 02:56
:\
Zakm0n
@Zakm0n
Feb 21 02:56
So should I just email ERD?
Jon Cluck
@cluckj
Feb 21 02:57
yeah I think so, if there's even a hairline crack on the glass where the ribbon cable goes into the OLED it'll croak
Zakm0n
@Zakm0n
Feb 21 02:57
IT'S SHOWING IN I2C NOW
 sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Jon Cluck
@cluckj
Feb 21 02:58
nice!
Zakm0n
@Zakm0n
Feb 21 02:58
still no display tho
Jon Cluck
@cluckj
Feb 21 02:58
systemctl restart openaps-menu
Zakm0n
@Zakm0n
Feb 21 02:59
and it's gone
right after restarting the menu
tepidjuice
@tepidjuice
Feb 21 03:03
@PieterGit this is on a pi hat
Zakm0n
@Zakm0n
Feb 21 03:04
ok, so. right after I power up I think I saw it flash for a split second after it showing on i2c, then it disappears from i2c
restarting now, gonna watch closer
Jon Cluck
@cluckj
Feb 21 03:06
the first thing it should do is show some static (random pixels on), then show the unicorn logo
Zakm0n
@Zakm0n
Feb 21 03:09
It's staying in i2c now, but still no display
restarted menu and got nothing
Jon Cluck
@cluckj
Feb 21 03:10
if it's not showing up as a device in i2c, the display init stuff that openaps-menu does isn't going to work
Zakm0n
@Zakm0n
Feb 21 03:10
wiggled it just a bit and it came on. I'm calling ERD tomorrow
Jon Cluck
@cluckj
Feb 21 03:10
:grimacing: ow, yeah
Zakm0n
@Zakm0n
Feb 21 03:14
Just my luck. Ordered before a long weekend and it took from Friday until today to make it's way 300 miles from their shop to my house, and then it's DOA
Jon Cluck
@cluckj
Feb 21 03:17
yep
Zakm0n
@Zakm0n
Feb 21 03:29
next question. Is there anything specific I have to do to get BT tethering to work, or just follow edison instructions?
Eric
@ecc1
Feb 21 03:32
I use network-manager, nmcli from the command line. Nice thing is that it knows how to treat bt as just another network interface, and can auto switch between bt and wifi
Zakm0n
@Zakm0n
Feb 21 03:35
hmm, don't already have it and apt-get install didn't work.
ah, network-manager worked
Eric
@ecc1
Feb 21 03:40
But it might conflict with the script that openaps uses (oref-online or ?) which you'd have to disable
Zakm0n
@Zakm0n
Feb 21 03:40
eh, I'm not sure I want to go that far down the rabbit hole right now
Eric
@ecc1
Feb 21 03:40
Away from computer but I can provide more details tomorrow if interested
just the oref0-cron-every-minute.sh part takes care of it
you'll need a connection to the rig that doesn't use wifi or BT, like a usb ethernet adapter or keyboard+hdmi
basic instructions for keyboard+hdmi:
make the changes to oref0-cron-every-minute.sh to disable oref0-online
Comment out the line with tvservice in `/usr/local/lib/node_modules/oref0/bin/oref0-cron-post-reboot.sh`
shutdown -r now
apt-get install network-manager
add denyinterfaces wlan0 bnep0 to the bottom of /etc/dhcpcd.conf
systemctl enable network-manager
shutdown -r now
nmtui
<setup bluetooth tethering as usual, stop before btpan step>
nmcli c m <network> connection.autoconnect yes
Zakm0n
@Zakm0n
Feb 21 04:05
Well the sht hit the fan. Installed that package and it knocked me offline. I didn't have otg serial set up, and my case blocks the HDMI port, so I pulled the rig out of the case and somehow killed my sd card.
currently setting up an 8gb card
I'm not having a good time with this right now lol
Jon Cluck
@cluckj
Feb 21 04:20
ouch
Matthew Yeager
@AmazingThew
Feb 21 04:51
Hey, I just had an infusion set fail; is there a convenient way to keep the loop running through this? Essentially had to do two meal boluses because the first one wasn't absorbed, so now IOB is super high. I've switched off the rig so it doesn't start low-temping, but I'd much rather correct the IOB if there's any way to do that
Dana Lewis
@danamlewis
Feb 21 04:54
@AmazingThew no good way to delete it since it’s in pump history. You may want to set a low target too. In future you can try priming the replacement bolus instead - primes don’t count as ion
*iob
Matthew Yeager
@AmazingThew
Feb 21 04:58
ah priming's a good hack haha. Thanks!
PieterGit
@PieterGit
Feb 21 06:17
@tepidjuice do you use a WW pump or a US pump?
tepidjuice
@tepidjuice
Feb 21 07:21
@PieterGit US
tuzoenduro
@tuzoenduro
Feb 21 08:05
@cluckj @danamlewis It worked, it worked, I installed the WIP 0.7.0 from the 600SeriesAndroidUploader (which is using ZULU datestrings) and now my openaps rig picks up within the 3rd bg reading after I change sensors and the timestamps are correct (no longer 1h55 ahead one of the other). Thank you so much for your help in finding out this bug... The 0.7.0 master version should be out later in the year, but at least I know this is working, the COB is reading properly now at the correct entry time and decaying rate.
Martin Haeberli
@mhaeberli
Feb 21 10:28
Just -one- of our rigs is stuck saying ‘ns_meal_carbs failed’ and so never successfully looping. Suggestions?
Dana Lewis
@danamlewis
Feb 21 15:47
@tuzoenduro great - thanks for letting us know! The one other person I knew of with this issue switched cgm so was no longer affected.
djnoor
@djnoor
Feb 21 17:32
Can I upgrade my rig from 0.6 stable to 0.7 dev without losing my old Autotune data?
Martin Haeberli
@mhaeberli
Feb 21 19:45
trying to upgrade dev to current dev on a PiHat rig (RPi3, not RPi0W), getting this error on install:
Already up-to-date.
v8.11.1
Checking oref0 installation
(node:2687) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! invalid: oref0@0.7.0-dev /usr/local/lib/node_modules/oref0
npm ERR! not ok code 0
Installing latest oref0 from /root/src/oref0/
Jon Cluck
@cluckj
Feb 21 20:48
@djnoor yes, and you can back it up if you'd like too, with cp -R ~/myopenaps/autotune ~/autotune-backup
Jon Cluck
@cluckj
Feb 21 21:13
@mhaeberli run it again?
Zakm0n
@Zakm0n
Feb 21 21:16
@cluckj I'm trying to set up my networking with nmtui and I can't get the bluetooth portion to work
Jon Cluck
@cluckj
Feb 21 21:17
which step are you at?
Zakm0n
@Zakm0n
Feb 21 21:17
sudo /usr/local/bin/bluetoothd --experimental & doesn't work
Jon Cluck
@cluckj
Feb 21 21:18
is bluetooth already running? systemctl status bluetooth
Zakm0n
@Zakm0n
Feb 21 21:18
nope, it isnt'
hold on, lemme copy what I'm seeing
root@PiAps:/home/pi# sudo /usr/local/bin/bluetoothd --experimental &
[1] 1169
root@PiAps:/home/pi# sudo: /usr/local/bin/bluetoothd: command not found
Jon Cluck
@cluckj
Feb 21 21:21
that's okay on the pi
Zakm0n
@Zakm0n
Feb 21 21:22
it gives this when I hit enter:
[1]+  Exit 1                  sudo /usr/local/bin/bluetoothd --experimental
root@PiAps:/home/pi#
and then:

root@PiAps:/home/pi# sudo hciconfig hci0 name $HOSTNAME
Can't change local name on hci0: Network is down (100)
root@PiAps:/home/pi#
bluetoothctl gives "waiting to connect to bluetoothd"
and just sits there
Jon Cluck
@cluckj
Feb 21 21:26
can you check the status of the bluetooth service with systemctl status bluetooth?
Zakm0n
@Zakm0n
Feb 21 21:27
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
   Active: inactive (dead) since Thu 2019-02-21 16:19:13 EST; 8min ago
     Docs: man:bluetoothd(8)
  Process: 369 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited, status=0/SU
 Main PID: 369 (code=exited, status=0/SUCCESS)
   Status: "Quitting"

Feb 21 16:17:17 PiAps systemd[1]: Started Bluetooth service.
Feb 21 16:17:17 PiAps bluetoothd[369]: Starting SDP server
Feb 21 16:17:17 PiAps bluetoothd[369]: Bluetooth management interface 1.14 initi
Feb 21 16:17:17 PiAps bluetoothd[369]: Failed to obtain handles for "Service Cha
Feb 21 16:17:17 PiAps bluetoothd[369]: Sap driver initialization failed.
Feb 21 16:17:17 PiAps bluetoothd[369]: sap-server: Operation not permitted (1)
Feb 21 16:17:17 PiAps bluetoothd[369]: Failed to set privacy: Rejected (0x0b)
Feb 21 16:19:13 PiAps bluetoothd[369]: Terminating
Feb 21 16:19:13 PiAps bluetoothd[369]: Stopping SDP server
Feb 21 16:19:13 PiAps bluetoothd[369]: Exit
Jon Cluck
@cluckj
Feb 21 21:28
oof, give it a restart and see what happens?
Zakm0n
@Zakm0n
Feb 21 21:29
the rig?
Jon Cluck
@cluckj
Feb 21 21:29
no, bluetooth: systemctl restart bluetooth
Zakm0n
@Zakm0n
Feb 21 21:30
weird, that crashed my terminal
Jon Cluck
@cluckj
Feb 21 21:30
:sweat:
Zakm0n
@Zakm0n
Feb 21 21:31
yeah, just tried reboothing BT and it crashed the pi
Scott Leibrand
@scottleibrand
Feb 21 21:32
time to reimage the SD card and start fresh?
Zakm0n
@Zakm0n
Feb 21 21:33
should I go the iso route? I'm using pi bakery currently
Scott Leibrand
@scottleibrand
Feb 21 21:33
I usually recommend the latest raspbian lite for anyone who has trouble with a stock pibakery image
Jon Cluck
@cluckj
Feb 21 21:35
^ same
Abigail Cember
@acember
Feb 21 22:04
@AmazingThew @danamlewis On a similar vein, is there any way to set things up so that the information on Nightscout overrides the pump history?
Scott Leibrand
@scottleibrand
Feb 21 22:05
no, we very specifically designed OpenAPS to not allow that: we don't trust Nightscout to be accurate, and don't want to keep dosing if the records of our recent dosing don't show up there.
Abigail Cember
@acember
Feb 21 22:06
I see :/ Because that would take care of the situation that Matt was describing, and also my pen-using. ..
Scott Leibrand
@scottleibrand
Feb 21 22:06
there are a lot of checks in OpenAPS to make sure that the pumphistory is being updated to reflect recent dosing, in order to guarantee that we stop trying to dose additional insulin if we don't have accurate information about what was just dosed
Abigail Cember
@acember
Feb 21 22:07
Admittedly that makes sense...Also, I'm curious about the "eating soon" mode -- could I somehow get that to start automatically before I wake up?
Scott Leibrand
@scottleibrand
Feb 21 22:08
if someone were to update OpenAPS to support the pen use case, it'd need to be some sort of merge of both sets of data. but in our experience most people don't need to keep using both OpenAPS and MDI in parallel once they have their OpenAPS rig set up and working well
yes, there are ways to automate setting temp targets in NS
there are likely other tools as well: basically anything that can be set up to issue an HTTP POST on a schedule could do it.
heck, you could even do that by adding a curl command to crontab on your rig
Zakm0n
@Zakm0n
Feb 21 22:13
and now we wait for openaps to install for the 3rd time in 24 hours, lol
Scott Leibrand
@scottleibrand
Feb 21 22:14
or, if you only have (or want it to apply on) one rig, schedule a oref0-append-local-temptarget command locally on the rig
Abigail Cember
@acember
Feb 21 22:16
Sweet. I'm going to play around with that. What I really want to do (but probably will not get around to in the foreseeable future) is make a version where instead of setting a temp target in BG value, I set a temp target for IOB. In some cases, that would amount to the same thing, but conceptually I think they're different. For example, in the morning I don't care whether my blood sugar is 120 or 80, but I need to wake up with 3-4 units IOB so that I can eat breakfast.
Zakm0n
@Zakm0n
Feb 21 22:24

  ┌──────────────────────┤ Configuring openssh-server ├──────────────────────┐
  │ A new version (/tmp/fileGsDSzu) of configuration file                    │
  │ /etc/ssh/sshd_config is available, but the version installed currently   │
  │ has been locally modified.                                               │
  │                                                                          │
  │ What do you want to do about modified configuration file sshd_config?    │
  │                                                                          │
  │        install the package maintainer's version                          │
  │        keep the local version currently installed                        │
  │        show the differences between the versions                         │
  │        show a side-by-side difference between the versions               │
  │        show a 3-way difference between available versions                │
  │        do a 3-way merge between available versions (experimental)        │
  │        start a new shell to examine the situation                        │
  │                                                                          │
  │                                                                          │
  │                                  <Ok>                                    │
  │                                                                          │
  └──────────────────────────────────────────────────────────────────────────┘
Martin Haeberli
@mhaeberli
Feb 21 22:24
@cluckj run it again (a number of times) did the trick. [for some reason, it kept on pairing with my iPhone for bt tether during the install, and then wouldn’t talk to the outside network…)]
@Zakm0n - I just went with the first choice ...
Scott Leibrand
@scottleibrand
Feb 21 22:36
I doubt it matters. you can view the diff if you are interested
Zakm0n
@Zakm0n
Feb 21 22:55
Ok... so the openaps install never asked me to set up a new password?
Zakm0n
@Zakm0n
Feb 21 23:44
and once again the edit-pref and other shortcuts don't work