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

13th
Apr 2019
marafie
@marafie
Apr 13 01:14 UTC
-99 means the pump is to far
@propelid
Natalia S.
@Propelld
Apr 13 01:56 UTC
I have my pump right beside it :(
Katie Aldridge
@kcrcgm
Apr 13 03:54 UTC
@cluckj The patch worked! Thank you!!
Dana Lewis
@danamlewis
Apr 13 04:05 UTC
@propelld have you tried reseating the board on the pi?
tuzoenduro
@tuzoenduro
Apr 13 06:19 UTC
Hi, after setting up master on an edison and having it loop well for an hour or two i shut it off to go to bed (kept my pi rig going only).
this morning i started the edy again and keep getting a lot of these
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Preflight OK. Profile less than 60m old; Profile valid. Refreshed pumphistory and meal.json
Checking pump clock: "2019-04-13T08:10:30+02:00" is within 90s of current time: Sat Apr 13 08:14:58 CEST 2019
Pump clock is more than 55s off: attempting to reset it
Waiting for ntpd to synchronize... OK!
Setting pump time to Sat Apr 13 08:15:00 CEST 2019
Error: pump clock refresh error / mismatch
oref0-pump-loop failed. If pump and rig are close enough, this error usually self-resolves. Stand by for the next loop.
Unsuccessful oref0-pump-loop at Sat Apr 13 08:15:05 CEST 2019
It looped once, and then back to the same errors
what gives?
jvemme
@jvemme
Apr 13 09:11 UTC
Hi there. I have been messing with a Openaps setup these past few days. And now I'm kinda stuck.
I have a Raspberry pi Zero W and a RFM69 radio. I followed the setup instructions, and done it 3-4 times now.
Seems like I can do a mmtune manually and while doing that it finds my pump, but when the loop is runnning I get this "Radio check failed. ImportError: No module named spi_serial" and when I try "openaps use pump status
" I get a "serial.serialutil.SerialException: Attempting to use a port that is not open" exception. Any Idears?
jvemme
@jvemme
Apr 13 09:20 UTC
I also get this error i the log "ERROR port is not set in pump.ini." Shouldnt these settings have been handled by script?
Natalia S.
@Propelld
Apr 13 11:15 UTC
@danamlewis should I remove it and put it back?
Jieseldeep
@Jieseldeep
Apr 13 12:10 UTC
Is anyone on at this hour? I'm having autosens errors but I can't remember my login password and can't find the darn notebook I wrote everything down in. I'm about ready to just start over, but I don't know how to wipe the edison without being able to login.
viq
@viq
Apr 13 12:19 UTC
@Jieseldeep I don't know the edison specifically, is it booted off of SD card, or internal storage?
@Jieseldeep also, I really recommend getting a password manager, for this and your daily life. I can give some suggestions if you're interested.
Jieseldeep
@Jieseldeep
Apr 13 12:25 UTC
pw manager would be great
what do you recommend?
internal storage, no SD card
viq
@viq
Apr 13 12:26 UTC
Can you get to the console as it's booting, via serial console or something like that?
Jieseldeep
@Jieseldeep
Apr 13 12:26 UTC
yes, I'm using windows with PuTTy to connect
viq
@viq
Apr 13 12:27 UTC
Depends on your preferences, I like https://www.passwordstore.org/ with https://github.com/gopasspw/gopass since I'm a linux nerd; there's https://keepass.info/ if you want local storage, LastPass seems to be decent if you trust cloud, and I believe I heard recommendations for 1password from apple crowd
Jieseldeep
@Jieseldeep
Apr 13 12:27 UTC
thanks!
viq
@viq
Apr 13 12:28 UTC
Does it have a grub boot menu ("boot kernel X or Y") at the beginning?
Jieseldeep
@Jieseldeep
Apr 13 12:28 UTC
Hmm, not seeing that in PuTTy
Do I need to be logged in as root for that?
jvemme
@jvemme
Apr 13 12:29 UTC

Anyone:

Hi there. I have been messing with a Openaps setup these past few days. And now I'm kinda stuck.
I have a Raspberry pi Zero W and a RFM69 radio. I followed the setup instructions, and done it 3-4 times now.
Seems like I can do a mmtune manually and while doing that it finds my pump, but when the loop is runnning I get this "Radio check failed. ImportError: No module named spi_serial" and when I try "openaps use pump status
" I get a "serial.serialutil.SerialException: Attempting to use a port that is not open" exception. Any Idears?

viq
@viq
Apr 13 12:29 UTC
Also good idea to enable 2FA (preferably not SMS based) wherever you can, and YubiKey is a good device to help with that
No, that would be way before you're able to ssh in
Jieseldeep
@Jieseldeep
Apr 13 12:31 UTC
I still have access via papertrail if that helps
But from what I'm reading, I think however you flashed the system onto the edison in the first place, should work again. On the other hand, if you plug it in to begin doing that, and are able to see files on it, we could try some tricks to get access to it.
Or you could just copy /root/myopenaps from it, set it up anew, and copy that back, and that should get you operational again, if you want to pave over instead of trying to pry it open ;)
Jieseldeep
@Jieseldeep
Apr 13 12:35 UTC
can I do this all without root?
viq
@viq
Apr 13 12:36 UTC
That's direct access to storage, instead of going through system and it's access mechanisms. Which is a long way of saying "yes"
"direct access trumps all (defence mechanisms)"
Jieseldeep
@Jieseldeep
Apr 13 12:39 UTC
ok, can you walk me through this, sorry, not a Linux guy.
viq
@viq
Apr 13 12:40 UTC
Can you point me to usual edison setup instructions?
I assume you're on windows, correct?
Jieseldeep
@Jieseldeep
Apr 13 12:41 UTC
Yes, win7
I think that's what you're looking for
I flashed this all about a year ago, so it might be time to start fresh and update anyway
actually, come to think of it, I bought a couple spare Edisons on ebay too. I could just flash one of those if I can figure out how to reflash without a PW
that would leave this one intact if I can figure out the pw later. Not sure thats necessary, but it's another option
viq
@viq
Apr 13 12:44 UTC
You don't need a password to flash, I believe
Jieseldeep
@Jieseldeep
Apr 13 12:44 UTC
thanks for the help, btw!
viq
@viq
Apr 13 12:45 UTC
I'm reading those links, trying to see how to get it into single user mode - that would let you set password anew
just paying it forward :)
Jieseldeep
@Jieseldeep
Apr 13 12:47 UTC
I still have the oref setup script saved on my computer
viq
@viq
Apr 13 12:49 UTC
Are you able to reboot that edison? Does it show boot> prompt as it starts booting? Via the serial console, not ssh.
Jieseldeep
@Jieseldeep
Apr 13 12:49 UTC
I think that should help with skipping much of the prompts (wifi/bluetooth/etc.)
I guess I'm not sure what the difference is between ssh and serial. I'm using PuTTY via usb cables, I assumed that is serial.
viq
@viq
Apr 13 12:50 UTC
It most likely is serial, yes
Jieseldeep
@Jieseldeep
Apr 13 12:55 UTC
hmm, not sure I can get reconnected to it fast enough
yes, I see all the ....
[ OK ] Reached target Bluetooth.
[ OK ] Started Load/Save RF Kill Switch Status of rfkill3.
[ OK ] Started Login Service.
... type stuff
haven't seen the boot> prompt specifically though
viq
@viq
Apr 13 12:59 UTC
that would be before all that
Jieseldeep
@Jieseldeep
Apr 13 13:00 UTC

0
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
reading vmlinuz
5143872 bytes read in 128 ms (38.3 MiB/s)
Valid Boot Flag
Setup Size = 0x00003c00
Magic signature found
Using boot protocol version 2.0c
Linux kernel version 3.10.98-poky-edison (robin@robin-i7) #5 SMP PREEMPT Tue Apr 4 22:42:44 EDT 2017
Building boot_params at 0x00090000
Loading bzImage at address 00100000 (5128512 bytes)
Magic signature found
Kernel command line: "rootwait root=PARTUUID=012b3303-34ac-284d-99b4-34e03a2335f4 rootfstype=ext4 console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 g_multi.ethernet_config=rndis systemd.unit=multi-user.target hardware_id=00 g_multi.iSerialNumber=48e7ad523cffdc9dd92e9655fcf07339 g_multi.dev_addr=02:00:86:f0:73:39"

Starting kernel ...

that's the first text I've been able to see when I connect as it reboots
viq
@viq
Apr 13 13:00 UTC
hmmm
Do any disks show up when you plug it in?
Jieseldeep
@Jieseldeep
Apr 13 13:02 UTC
no
viq
@viq
Apr 13 13:05 UTC
Sorry, i'm out of ideas for now :(
Jieseldeep
@Jieseldeep
Apr 13 13:06 UTC
lol, ok thanks. I might try a different cable to see if that affects seeing it as a disk
viq
@viq
Apr 13 13:06 UTC
Probably won't :(
For the future, you could also set up ssh keys
Jieseldeep
@Jieseldeep
Apr 13 13:41 UTC
ok, got access to one of the ebay edisons, I can see it as storage
if you're still online
;)
viq
@viq
Apr 13 13:45 UTC
Ah, cool
Can you access /etc/shadow in it?
Since that's where password is
Or, if it connects to your network, you could put your public ssh key on it and just connect that way
Btw, if you didn't update putty recently, do so soon
Jieseldeep
@Jieseldeep
Apr 13 13:57 UTC
not seeing any of that
updating putty
it looks like the edison was wiped before they listed it on ebay. I'm following a guide to reflash jubilinux now...
viq
@viq
Apr 13 14:07 UTC
:+1:
That's a good thing to do when getting rid of electronics
Riko L
@Ricco555
Apr 13 16:09 UTC

0
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
reading vmlinuz
5143872 bytes read in 128 ms (38.3 MiB/s)
Valid Boot Flag
Setup Size = 0x00003c00
Magic signature found

@Jieseldeep when it does this, just hit <ENTER> couple of times, it will drop you to boot prompt

you have to be fast
Dana Lewis
@danamlewis
Apr 13 16:19 UTC
@propelld yes if you’re still having issues try removing and replacing it so you know the connectors are good. Sometimes the board can come loose
@jvemme give this a try? https://gist.github.com/danamlewis/ed73bd2008def086a334a7102f6005bd it’s a fix for spi serial stuff on master, not sure if it’ll fix for you on dev but worth trying
marafie
@marafie
Apr 13 17:35 UTC
any one can assist the error i am getting
image.png
i am using dev branch
ImportError: No module named openapscontrib.timezones
/usr/bin/nightscout: line 341: jq: command not found
/usr/bin/nightscout: line 340: jq: command not found
Traceback (most recent call last):
any suggestions
running on edison
viq
@viq
Apr 13 17:46 UTC
Looks like your install is incomplete
marafie
@marafie
Apr 13 17:51 UTC
yesm but how can i fix it ?
Scott Leibrand
@scottleibrand
Apr 13 17:53 UTC
Go back a few steps and re-run the bootstrap?
marafie
@marafie
Apr 13 17:58 UTC
image.png
@scottleibrand got this error
after runing this
curl https://raw.githubusercontent.com/openaps/oref0/master/bin/openaps-install.sh > /tmp/openaps-install.sh
bash /tmp/openaps-install.sh
viq
@viq
Apr 13 18:11 UTC
@marafie which version of system is it?
marafie
@marafie
Apr 13 18:12 UTC
0.3.0
jvemme
@jvemme
Apr 13 18:12 UTC
@danamlewis Dosnt seem to help in the 0.7.0 dev...
marafie
@marafie
Apr 13 18:12 UTC
jubilinux-stretch
marafie
@marafie
Apr 13 18:19 UTC
the above error is for edison
the blow image is for rasp pi installation no idea , why it is taking to long time to reboot
image.png
Katja Jacob
@straykatz
Apr 13 18:20 UTC
Offline looping ... I am unable to get the BG from the plugged in G6 transmitter. Here's what I tried: CGM G6. OTG cable in OTG port, other cable in powerblock (as I understand from the docs) and UART port: No BG, no charging light on Receiver.
marafie
@marafie
Apr 13 18:20 UTC
is this normal ?
Katja Jacob
@straykatz
Apr 13 18:21 UTC
Also: OTG cable in UART, other cable in UART. Charging light "on" on the Receiver. No BGs
I went back a couple of months when Jon and Scott helped me get this to work, and I then tried out this: in prefs: "cgm": "G6", and "cgm_loop_path": "/root/myopenaps" directly below. No BGs

and nstalled a newer version of the Dexcom_reader: pip install git+git://github.com/openaps/dexcom_reader.git

cd ~/src/
git clone https://github.com/openaps/openaps
cd openaps
git fetch origin pull/139/head:G6
git checkout G6
python setup.py install

Still no luck.
is offline-looping with the G6 receiver plugged in working for someone? I am on Dev, Explorerboard/Edison combo. this rig is looping fine when it pulls data from nightscout.
jvemme
@jvemme
Apr 13 18:38 UTC
@danamlewis I just reviewed putty view and I noticed these errors:
mraa-1.7.0/tests/platform_checks.py
bash: line 7: cmake: command not found
make: * No targets specified and no makefile found. Stop.
Is this due to it belonging to master branch?
Eric
@ecc1
Apr 13 18:50 UTC
@jvemme I'm guessing the usual install doesn't include all the development tools needed to build mraa from source (it used to be installed as a pre-built Debian package). You could try "apt-get install cmake" but be prepared for similar errors until you've installed all the dependencies.
jvemme
@jvemme
Apr 13 18:51 UTC
@ecc1 Thanks, I just found that my self. :-) Maybe that should be included in the script. Its running the script now as we speak
man Im used to .net coding and now all sort of color code lines made me think that script failed... guess I better get used to this
jvemme
@jvemme
Apr 13 19:08 UTC
@danamlewis @ecc1 Thanks so far. Though I got the script running, i didnt fix my issue, still getting the same error. Might be this fix doesnt work for dev branch? and if so, is there an dev option like this?
Dana Lewis
@danamlewis
Apr 13 20:33 UTC
Tagging @cluckj to see if he knows a resolution for dev branch spi errors
jvemme
@jvemme
Apr 13 20:34 UTC
@danamlewis Man its nice someone is replying. :-)
jvemme
@jvemme
Apr 13 20:50 UTC
Anyone that knows what version Raps PI, RFM69 was testet and worked on? Must have worked at some point
Katja Jacob
@straykatz
Apr 13 21:14 UTC
@cluckj This is just so weird. I have flashed three different chips several times - flashing works. I wait before starting bootstrap. Last one I waited 90 minutes. Once I paste your dev-bootstrap script (which has worked for one of my chips a couple of weeks ago), things go whacky. Either 1) or 2) happens.
1) I get to entering the WIFI SSID and password, it runs a bit, and then goes into a reboot loop.
2) I actually get to the TZ stuff, and then, reboot loop.
To minimize other reasons, I have done this with 2 different sets of USB cables (flashing works), and 3 different explorer boards.
Jon Cluck
@cluckj
Apr 13 22:22 UTC
@jvemme you will need to use at least the dev branch for the rfm69, or my updated-setup branch ( https://github.com/cluckj/oref0/tree/updated-setup )
Natalia S.
@Propelld
Apr 13 22:48 UTC
Hey all! Sorry to be a bother again :( I have everything set up but have only been able to connect to my rig (Pi0 with HAT) sporadically, for up to 15mins at a time. I am trying to re-run everything again and do not seem to be successful. I am getting the following log:
Starting oref0-pump-loop at Sat 13 Apr 18:42:06 EDT 2019 with 6 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Preflight OK. Profile less than 60m old; Profile valid. Refreshed pumphistory and meal.json
Checking pump clock: "2019-04-13T18:46:22-04:00" is within 90s of current time: Sat 13 Apr 18:46:24 EDT 2019
Error: pumphistory too old
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 40s silence before mmtuning
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Listening for 40s silence before mmtuning: .
Trying to re run the script

But when I run cd ~/myopenaps && cat oref0-runagain.sh

I get

pi@nataliasrig:~$ cd ~/myopenaps && cat oref0-runagain.sh
-bash: cd: /home/pi/myopenaps: No such file or directory

Jon Cluck
@cluckj
Apr 13 22:54 UTC
you need to be root to run those commands, and master runs really really really slowly on the pi0 and sometimes misses the timings
Dana Lewis
@danamlewis
Apr 13 23:00 UTC
You’ll also want dev branch to go with your HAT
Jon Cluck
@cluckj
Apr 13 23:00 UTC
yep ^
Natalia S.
@Propelld
Apr 13 23:15 UTC
Ah ok. Stupid question(s) : how do I run it as root? And when I run dev branch is it just the instructions in the documentation?
Jon Cluck
@cluckj
Apr 13 23:16 UTC
sudo su will make you root if you're logged in as pi, or you can log in as root at the login prompt
Natalia S.
@Propelld
Apr 13 23:25 UTC
@cluckj Thank you so much! I will try this and hopefully be able to move forward.
Sarah Wagner
@SarahRWagner
Apr 13 23:33 UTC
I've got a bit of an odd question about pulling just the dateString and sgv value from Mongo. I wanted to graph my bloodsguar live in a graph that I'm writing in JavaScript. Right now I have PyMongo pulling the data down from the server, but because Mongo is a flat file type database any suggestions on how I can get just those two values?
Dana Lewis
@danamlewis
Apr 13 23:33 UTC
Pull from the api of Ns for entries? Believe it just has those two
Sarah Wagner
@SarahRWagner
Apr 13 23:34 UTC
In the python I get this as the print out:
{'_id': ObjectId('5c9f90b3df75f75eebdd238d'), 'date': 1553947960255.0, 'dateString': 'Sat Mar 30 08:12:40 EDT 2019', 'key600': 'CGM82C855BD', 'sgv': 98, 'type': 'sgv'}
Scott Leibrand
@scottleibrand
Apr 13 23:40 UTC
You’ll definitely want to use the Nightscout API instead of directly pulling from Mongo.
Probably the entries.json or sgv.json endpoint.
Sarah Wagner
@SarahRWagner
Apr 13 23:41 UTC
ahhh that might save a lot of headache. I will give that a shot! Thank you!!