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

5th
Jun 2018
Benjamin van Houts
@tanuki2k_twitter
Jun 05 2018 00:02
G'day @scottleibrand & @danamlewis I've just started looping and i noticed everything is showing up as a future item in NS https://i.imgur.com/DzDaoRy.png. in the rig I can see the following error "clock zone invalid date is unzoned https://i.imgur.com/2YBd9YD.png. I saw back on 28th of November 2017 another use with the unzoned problem and Dana said to change the rig's timezone, I did this following the guide but it made no differences. tried switching it to a different zone, then back to my zone but items still show up as future item. Any advise would be much appreciated, thanks.
Martin Haeberli
@mhaeberli
Jun 05 2018 00:05
@scottleibrand thx
James Babcock
@jimrandomh
Jun 05 2018 00:06
Is there a recipe for deleting Nightscout data older than a certain date somewhere? My Nightscout instance ran out of space on Mongolab, and it's sending multiple Pushover notifications per minute because it can't remember that it already sent them
Dana Lewis
@danamlewis
Jun 05 2018 00:10
@jimrandomh look at the open docs PR around deleting old mlab using the API
James Babcock
@jimrandomh
Jun 05 2018 00:12
Exactly what I was looking for, thanks
Martin Haeberli
@mhaeberli
Jun 05 2018 00:22

following http://openaps.readthedocs.io/en/latest/docs/Build%20Your%20Rig/pi-install.html on a freshly-flashed PiZeroW. did the step:

sudo bash
curl -s https://raw.githubusercontent.com/openaps/oref0/dev/bin/openaps-install.sh > /tmp/openaps-install.sh && bash /tmp/openaps-install.sh

got as far as: (after setting name, password, etc)

Collecting six>=1.9 (from mock->openaps)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting funcsigs>=1; python_version < "3.3" (from mock->openaps)

and got error messages:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/pyth
Jon Cluck
@cluckj
Jun 05 2018 00:30
run it again, see if it does it a second time?
Scott Leibrand
@scottleibrand
Jun 05 2018 00:34
Is there anyone here with good troubleshooting skills and access to a MDT CGM rig who could work with Benjamin on the future-dated entries thing? This seems like a recurring issue for EU enlite users, but no one has yet successfully drilled down into why it’s occurring.
Martin Haeberli
@mhaeberli
Jun 05 2018 00:47
@cluckj as illogical as it sounds, it looks like your suggestion is likely to have worked!
Jon Cluck
@cluckj
Jun 05 2018 00:48
:thumbsup:
EU, or AUS?
Benjamin van Houts
@tanuki2k_twitter
Jun 05 2018 01:09
@cluckj AUS
garykidd
@garykidd
Jun 05 2018 01:29
ancient history here--having trouble with ECDSA known hosts---can someone refresh me---I did thislast night not an issue but cant seem to add signature to knowns hosts locally on my imac
Martin Haeberli
@mhaeberli
Jun 05 2018 01:37
@garykidd simple answer - edit .ssh/known_hosts - with a text editor - remove the lines it’s complaining about. there are more elegant answers, I’m sure...
just delete the line, save the file, try logging in again. if multiple lines are mentioned, delete the highest-numbered ones first so you don’t invalidate the line references.
garykidd
@garykidd
Jun 05 2018 01:38
yeah---I actually tried that but thinking somehting must be wrong with wpa_supplicant.conf as well
garykidd
@garykidd
Jun 05 2018 01:45
thx....I just 86'd the entire file
working now
Martin Haeberli
@mhaeberli
Jun 05 2018 02:11
that can work
:+1:
Dana Lewis
@danamlewis
Jun 05 2018 04:01
@jimrandomh did it work? If so. Can you comment on the PR ? If not, ditto? 🙃 thanks
Zev Spitz
@zspitz
Jun 05 2018 06:11
Can DANAR / DANARS be used with OpenAPS, without AndroidAPS? They don't appear on the compatible pumps flowchart, and the documentation states only that these models might be able to use AndroidAPS. In addition, the product page for DANA*RS says it is easily connected to OpenAPS -- is this reliable? Does it mean OpenAPS, or only via AndroidAPS?
Scott Leibrand
@scottleibrand
Jun 05 2018 06:21
AndroidAPS uses the OpenAPS algorithm: that's what SOOIL means
it's not currently possible to use any SOOIL or Roche pumps with OpenAPS rigs, just old Medtronic ones.
the ongoing efforts are actually in the other direction: to get a Rileylink-based AndroidAPS pump driver for Medtronic pumps
Peter Kok
@kretep
Jun 05 2018 08:56
I've been using the Raspberry Pi 0 + Explorer HAT for a few days now and it's working well, but I already managed to break the screen :cry: Loop is still running well, just showing errors when it tries to write to the screen. Is there an easy way to replace it?
JohnDoeAkira
@JohnDoeAkira
Jun 05 2018 09:01
I have not been able to find the docs for the explorer HAT on the usual openAPS readthedocs pages. Do you have a link ?
Peter Kok
@kretep
Jun 05 2018 09:03
I just followed the instructions for the Raspberry Pi, but used the 0.7.0-dev branch of oref0 instead of master
Dosefinder
@Dosefinder
Jun 05 2018 11:02
Is it possible to Connect a G5 dexcom receiver to an edisonboard and upload CGM-data directly from the rig to nigthscout without using xDrip or dexcom share?
Jon Cluck
@cluckj
Jun 05 2018 11:27
@kretep what kind of errors?
Peter Kok
@kretep
Jun 05 2018 11:45
The error I get in my pump loop log is below. The screen is physically broken though, so I'm pretty sure that is the cause :)
fs.js:658
    return binding.writeBuffer(fd, buffer, offset, length, position);
                   ^

Error: Unknown system error -121: Unknown system error -121, write
    at Error (native)
    at Object.fs.writeSync (fs.js:658:20)
    at Bus.i2cWriteSync (/root/src/openaps-menu/node_modules/i2c-bus/i2c-bus.js:348:13)
    at Oled._transfer (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:136:25)
    at Oled._initialise (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:110:10)
    at new Oled (/root/src/openaps-menu/node_modules/oled-i2c-bus/oled.js:81:8)
    at Object.Display.init (/root/src/openaps-menu/lib/display/ssd1306.js:36:24)
    at module.exports (/root/src/openaps-menu/lib/display/ssd1306.js:68:13)
    at Object.<anonymous> (/root/src/openaps-menu/scripts/status.js:41:68)
    at Module._compile (module.js:409:26)
marafie
@marafie
Jun 05 2018 11:57
How can I prevent NS from getting
Database contains 18 future records
Jeremy Cunningham
@jpcunningh
Jun 05 2018 12:05
@Skyshaker , Lookout and Logger are two options for connecting to a G5 dexcom receiver to an Edison and upload CGM data directly to nightscout from the rig. They are both located at https://github.com/xdrip-js
Both are based on the xdrip-js library that's also hosted at https://github.com/xdrip-js
James Babcock
@jimrandomh
Jun 05 2018 12:15
@danamlewis I ended up doing it through the mongo command line rather than doing the weird thing with mlab's API and manually url-encoding stuff.
Jon Cluck
@cluckj
Jun 05 2018 12:48
@kretep yes :laughing:
I haven't seen how a physically broken screen is represented in software errors :) thanks
you can probably replace the screen with the same part
Peter Kok
@kretep
Jun 05 2018 13:53
@cluckj I'm glad that my broken screen is of some use :P Any idea of what type/model it is or where to get it?
Jon Cluck
@cluckj
Jun 05 2018 13:57
@kretep it's a 4-pin SSD1306
they're sold...everywhere :)
let me see if I can dig up the exact part number
hah, okay; it's not listed on the spec sheet
Jon Cluck
@cluckj
Jun 05 2018 14:04
You might want to email ERD for additional info, but 4-pin SSD1306 should get you most of the way to finding the right part. Make sure the replacement looks the same as the part on the HAT, and make sure the pinout labels are exactly the same (i.e., GND VCC SCL SDA)
Peter Kok
@kretep
Jun 05 2018 14:08
@cluckj thanks, I found one!
Jon Cluck
@cluckj
Jun 05 2018 14:09
:thumbsup:
oooo they have different colored ones
Tim Street
@tim2000s
Jun 05 2018 15:17
@scottleibrand quick question. What’s the status of the offline hotspot. Been discussing with Miguel in the Spike FB group and he mentioned that it’s not stable and doesn’t work properly. Before I recommend it to people I’d like to understand the “official” point of view.
Scott Leibrand
@scottleibrand
Jun 05 2018 16:25
Officially Dana and I don’t use it, so it’s up to y’all to make it work.
If you’re talking about the offline wifi network, I agree it’s not stable, which is why we turned it off. I probably won’t try it again until someone gets Debian stretch’s Network Manager working as a replacement for oref0-online.
@Skyshaker @jpcunningh Lookout and Logger read from a G5 transmitter, not a receiver, right? If you want to plug in a receiver to a rig with a USB OTG cable, oref0 can upload from there as well. The new portrait-mode receivers are not supported, though, just the old landscape ones.
Tim Street
@tim2000s
Jun 05 2018 16:37
I’m wondering whether Pi will provide for a more resilient offline Wi-fi. Needs playin with I guess.
Jeremy Cunningham
@jpcunningh
Jun 05 2018 16:38
Yes, you are correct, @scottleibrand. I saw G5 and thought transmitter, but wrote receiver. :smile:
Jon Cluck
@cluckj
Jun 05 2018 16:49
NM is pretty stable on the Pi, still testing it out though
Eric
@ecc1
Jun 05 2018 17:10
Same. I've switched to it on my production rig. The only downside I've noticed is that if you want it to switch automatically between WiFi and BT tethering (which of course you do), then it seems that you have to set both of those connections to autoconnect (with appropriate priorities). That means that it has a BT connection to the phone all the time, even when it's actually using WiFi. It hasn't been a problem in practice, just a little surprising to see the BT hotspot icon on my phone's status bar.
Jon Cluck
@cluckj
Jun 05 2018 17:11
that's not a downside for me :)
Scott Leibrand
@scottleibrand
Jun 05 2018 17:32
that is a huge downside for anyone using an iPhone (other than iPhone X)
that blue bar really interferes with using a lot of the convenience features of the iPhone
Eric
@ecc1
Jun 05 2018 17:35
Not an iPhone user, so that never occurred to me. What kind of interference do you mean?
Martin Haeberli
@mhaeberli
Jun 05 2018 17:35
@kretep @cluckj I found https://www.amazon.com/gp/product/B076PDVFQD/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1 which look to be the exact part. But the old display has to be de-soldered ...
so I haven’t swapped it yet.
@ecc1 think of it as ‘user interface’ interference ; the top of the display has a blue bar showing devices tethered
Eric
@ecc1
Jun 05 2018 17:37
@scottleibrand @cluckj maybe there's a half-step we should do: keep the oref0-online script, but make it use nmcli instead of bt-pan. That way you wouldn't need to set it to autoconnect
Scott Leibrand
@scottleibrand
Jun 05 2018 17:37
that sounds like it's be worth exploring
Jon Cluck
@cluckj
Jun 05 2018 17:38
yeah
Eric
@ecc1
Jun 05 2018 17:38
and autoconnect for wifi should still work
Scott Leibrand
@scottleibrand
Jun 05 2018 17:39
the blue bar is a tap target, so all the shortcuts that involve tapping on the top bar open the hotspot screen instead of whatever they would normally do (scroll to top of screen, or switch to the most-recently-open app)
and it also uses up extra screen space, which some apps deal with poorly
N3FM
@N3FM
Jun 05 2018 17:49
@ecc1 I wonder if you could use IFTTT to turn on phone's BT tethering only when you have no Wi-Fi connection. Would that solve your issue?
Eric
@ecc1
Jun 05 2018 17:58
@N3FM well it's not my problem (happy Android user :-), but even so, I think there's a chicken-and-egg problem since IFTTT is web based and we're dealing with lack of internet connectivity
Plus, I'm just a grumpy old-timer, but I never liked the idea of marshaling a planet-wide network to accomplish a 2-line shell script ... :-)
Scott Leibrand
@scottleibrand
Jun 05 2018 18:01
lol
"it's easier to get blood glucose data around the world than it is to get it across a room" ;-)
Martin Haeberli
@mhaeberli
Jun 05 2018 18:01
nota bene (and worth a doc PR) - I found I have to enable i2c using raspi-config after erasing flash, and doing a fresh install of 0.7.0-dev with a PiHAT. (Still true as of this morning).
Scott Leibrand
@scottleibrand
Jun 05 2018 18:02
$ grep i2c bin/oref0-setup.sh
echo "Enabling i2c device nodes..."
sed -i.bak -e "s/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/" /boot/config.txt
egrep "^dtparam=i2c1=on" /boot/config.txt || echo "dtparam=i2c1=on,i2c1_baudrate=400000" >> /boot/config.txt
echo "i2c-dev" > /etc/modules-load.d/i2c.conf
AFIAK you shouldn't need to do that manually: it might be worth digging into why that isn't sufficient
Martin Haeberli
@mhaeberli
Jun 05 2018 18:03
so it’s in the script but for some reason it didn’t work\
ok
Scott Leibrand
@scottleibrand
Jun 05 2018 18:03
did you reboot after oref0-setup?
Martin Haeberli
@mhaeberli
Jun 05 2018 18:03
no d’oh?
Scott Leibrand
@scottleibrand
Jun 05 2018 18:03
nothing in /boot is going to take effect until reboot
Martin Haeberli
@mhaeberli
Jun 05 2018 18:04
adding to ‘my’ cheatsheet...
Scott Leibrand
@scottleibrand
Jun 05 2018 18:04
does the setup script prompt for a reboot? or do the docs indicate you should do so?
Scott Leibrand
@scottleibrand
Jun 05 2018 18:06
I noticed in particular this: "Added the realtimeValue and smoothedValue fields to handle EGV smoothing in G6—be sure to read the Notes section closely"
Martin Haeberli
@mhaeberli
Jun 05 2018 18:07
script did not prompt for reboot. docs say ‘press enter to reboot after the cron is installed’, but that didn’t seem to happen here - I accepted cron update. on the other had, my cron install ‘failed’ for some reason, even though the result looked ok
Scott Leibrand
@scottleibrand
Jun 05 2018 18:07
want to look at the script and see if you can figure out why it didn't reboot?
Martin Haeberli
@mhaeberli
Jun 05 2018 18:08
sounds like a plan …
Jon Cluck
@cluckj
Jun 05 2018 18:52
Your instance of oref0 [0.7.0-dev, 0.7.0-dev] is out-of-date by 90 commits: you may want to consider updating.
what
Scott Leibrand
@scottleibrand
Jun 05 2018 18:55
I merged the g4 dexcom Go stuff
(as a merge commit instead of a squash and merge, in case we need to revert anything specific)
Jon Cluck
@cluckj
Jun 05 2018 19:02
ah, okay
:thumbsup:
alimhassam
@alimhassam
Jun 05 2018 19:03
:+1: also good to see list of changes as commits
Hannah Crabtree
@lollydaggle
Jun 05 2018 21:40
I'm very out of the loop (pun not intended) with regards to OpenAPS but I have an Explorer-HAT on the way. Are there details on what I can do to prepare? I can make some judgments on what hardware I may need and think back to my experience with my first Pi rigs but I'm honestly kind of lost.
Dosefinder
@Dosefinder
Jun 05 2018 22:35
@scottleibrand Thanks for your comment.
Yes I want to plug in a receiver to a rig with a USB OTG cable. But Got the new portrait-mode receiver. Oref0 seems to read the BG from the receiver for offline mode but are not able to upload to NS so my solution at the moment is Dexcom Share for NS
Dana Lewis
@danamlewis
Jun 05 2018 22:45
@lollydaggle (waiting on someone to help write up a quick hardware guide for the docs, showing Pi0W vis Pi3 pros/cons, etc., but it'll be a Pi + SD card that you'll also need)
garykidd
@garykidd
Jun 05 2018 23:02
hmmm reflashed pi0w w/ hat 2x..and still having radio errors...
After flashing was able to ssh into rig and run
sudo bash
curl -s https://raw.githubusercontent.com/openaps/oref0/dev/bin/openaps-install.sh > /tmp/openaps-install.sh && bash /tmp/openaps-install.sh
after restarting and logging into my rig
just get this ...
tarting oref0-pump-loop at Tue  5 Jun 18:45:06 EDT 2018 with 21 second wait_for_silence:
Waiting up to 4 minutes for new BG: jq: error: Could not open file monitor/glucose.json: No such file or directory
jq: error: Could not open file monitor/glucose.json: No such file or directory
date: invalid date ‘@’
ls: cannot access '/tmp/pump_loop_completed': No such file or directory
ImportError: No module named mraa

Radio check failed. ImportError: No module named mraa
Listening for 40s silence before mmtuning: ..............................................................................................................................................................................................................................................................................
Starting oref0-pump-loop at Tue  5 Jun 18:57:05 EDT 2018 with 9 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
ImportError: No module named mraa

Radio check failed. ImportError: No module named mraa
Listening for 40s silence before mmtuning: ........................................................................................................................................................
never advances
Martin Haeberli
@mhaeberli
Jun 05 2018 23:05
@garykidd did you control-c out of the default oref0 install at the end of your sudo bash … above?
then reboot, login as root, checkout 0.7.0-dev, npm run global-install, then finally run oref0-setup?
garykidd
@garykidd
Jun 05 2018 23:06
I think I was able to just hit enter---that's not right
?
Martin Haeberli
@mhaeberli
Jun 05 2018 23:07
@garykidd I’m mentioning only because the just hitting enter I think wouldn’t get -0.7.0-dev
try cd ~/src/oref0 then ‘git branch -a’ (and show us what it says) I’m betting on ‘master'
garykidd
@garykidd
Jun 05 2018 23:07
ok...thought that dev or master would advance the radio though...will try 0.7.0
now
standby
Martin Haeberli
@mhaeberli
Jun 05 2018 23:08
ok (i generally had trouble if I had already installed 0.6.1, but maybe I was ‘holding it wrong’) - my process was to flash a fresh card, then the bash you mention above, then control-c before it offers to install oref0 at the end of the bash thing...
then reboot, login as root, cd ~/src/oref0 ; git checkout 0.7.0-dev ; npm run global-install ; cd ; ~/src/oref0/oref0-setup.sh (or whatever the path then is for that script), then reboot after the cron is installed
garykidd
@garykidd
Jun 05 2018 23:10
ok---thinking trying the shortcut of just checking out 0.7.0 and running global install will cuase a conflict---but I'm gonna try cause it's just 1 line
Martin Haeberli
@mhaeberli
Jun 05 2018 23:11
:+1:
garykidd
@garykidd
Jun 05 2018 23:11
and flashing takes quite WHILE ON MY MACHINE
Martin Haeberli
@mhaeberli
Jun 05 2018 23:11
(what machine do you have?) I’m having good luch with Etcher or with dd to rdisk...
garykidd
@garykidd
Jun 05 2018 23:13
etcher---maybe it's the microsd card im using
garykidd
@garykidd
Jun 05 2018 23:27
so i'm guessing the power switch needs to be on on the hat right?
does that shut down the whole rig if its ontheoff position
is it OK to shut down that way/
Jon Cluck
@cluckj
Jun 05 2018 23:34
it does power the rig off, and you probably don't want to do it because it might break the SD card
Martin Haeberli
@mhaeberli
Jun 05 2018 23:34
@garykidd I’ve not yet broken an SD card shutting down that way or pulling the power, but shutdown now seems better. seems to shut down the whole rig unless power is plugged in...
ok @cluckj i’ll defer to you
@garykidd i’m now using eco plus 32 from samsung
EVO plus - per recommendations - it’s a pretty fast card
Jon Cluck
@cluckj
Jun 05 2018 23:35
I haven't broken one either doing it several times, but better safe than sorry :)
Jon Cluck
@cluckj
Jun 05 2018 23:42
@lollydaggle you'll need a battery too
Martin Haeberli
@mhaeberli
Jun 05 2018 23:49
@efidoman i gather you have been playing with the Qi chargers… what are the rules about how much air or plastic can be between the Qi and the charging pad; also, any experience with how long to charge a 4400 battery to full from near empty?