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

23rd
Nov 2018
Jon Cluck
@cluckj
Nov 23 2018 00:02
"solved"?
Martin Haeberli
@mhaeberli
Nov 23 2018 05:05
As in - complaint error messages go away.
But since it was looping fine before, I don’t know how it’s looping ‘better’ now.
Also, I’d like to understand what to fix in dev so the error doesn’t appear, and all functions correctly
Martin Haeberli
@mhaeberli
Nov 23 2018 05:53
Without having to edit preferences.json
mrboletmrpot
@mrboletmrpot
Nov 23 2018 09:01
Hello, is there a guide to make an openaps with a pi3? Does it needs external antennas /tranceiver to communicate with the pump? (my edison are broken, radio problem, and I look for a solution for my daughter's nights)
Cas Eliëns
@cascer1
Nov 23 2018 09:35
@danamlewis I'm running the latest version of 0.7.0-dev, last updated maybe 10 hours ago
mrboletmrpot
@mrboletmrpot
Nov 23 2018 09:55
(found it, it's more than heavy, and I have no usb stick https://github.com/oskarpearson/mmeowlink/wiki/TI-USB-stick )
tzachi-dar
@tzachi-dar
Nov 23 2018 12:44
is there any discount on the "EXPLORER HAT" for the black friday?
Scott Leibrand
@scottleibrand
Nov 23 2018 14:07
@mrboletmrpot you can use the Explorer HAT with the Pi 3 the same way as with a Pi Zero
@tzachi-dar not that I'm aware of. I don't think ERD has high enough margins on their other products to justify big discounts on anything
Cas Eliëns
@cascer1
Nov 23 2018 14:58
after re-installing the pi doesn't show its battery percentage on the display or on nightscout anymore, how can I fix this? running most recent 0.7.0-dev and pi zero + hat
Rachel Sandlain
@audiefile
Nov 23 2018 17:31
@Ebgineer I'm using chrome on my mac and on my android phone all on the same network (either mobile hotspot from phone or home wifi) and I can't get anything. I updated this week and even tried dev but I can't get it to work.
There isn't anything that needs to be added to cron for the offline webpage to load? or something that needs to be installed manually? From what I've read it should 'just work' but I may have missed something
Ebgineer
@Ebgineer
Nov 23 2018 17:34
as it happens I just reinstalled master yesterday, and didn't customize anything to get the web page activated
Rachel Sandlain
@audiefile
Nov 23 2018 17:34
Edison and explorerboard?
Ebgineer
@Ebgineer
Nov 23 2018 17:34
the last line of my crontab -l has @reboot cd ~/src/oref0/www && export FLASK_APP=app.py && flask run -p 80 --host=0.0.0.0
pi0 in my case but it should be the same
from the mac do you get a response if you ping the IP address?
Rachel Sandlain
@audiefile
Nov 23 2018 17:35
yes
0% packet loss which is why I'm so puzzled. Trying to log in now to check if my cron matches
Ebgineer
@Ebgineer
Nov 23 2018 17:38
on the rig if you look at top do you see flask running?
Rachel Sandlain
@audiefile
Nov 23 2018 17:39
no and I don't see that line in my cron file
Ebgineer
@Ebgineer
Nov 23 2018 17:40
it sounds like the web service wasn't installed on the rig for some reason
Rachel Sandlain
@audiefile
Nov 23 2018 17:40
which would explain why the webpage doesn't show up.
I recently re-ran the setup script and re-installed oref0/openaps (some git files went missing in src/oref0 so I couldn't update or anything). Is it difficult to install flask by itself?
Ebgineer
@Ebgineer
Nov 23 2018 17:44
I'm not sure actually. Either it is supposed to be part of the base install or I did it so long ago I can't remember doing it. :)
looking at the setup script here https://github.com/openaps/oref0/search?q=flask&unscoped_q=flask it seems that flask is supposed to be installed. You might try manually entering the relevant flask lines.
Rachel Sandlain
@audiefile
Nov 23 2018 17:53
I'll give it a shot, thank you!
Rachel Sandlain
@audiefile
Nov 23 2018 18:47
thank you @Ebgineer! adding the flask line for crontab after checking it was installed did it. I can see the web page now
Dana Lewis
@danamlewis
Nov 23 2018 18:54
@audiefile would you be willing to make a quick PR and add that as a Troubleshooting tip to the offline webpage section?
Ebgineer
@Ebgineer
Nov 23 2018 18:54
@audiefile awesome!
tazitoo
@tazitoo
Nov 23 2018 19:27
Happy post-thanskgiving all! I'm working on redoing/updating a Pi to use with a G4 receiver and USB cable for night time looping. I think I followed the instructions from readthedocs - but I'm missing the mmtune bits for talking to the pump. Error during install is: mv: cannot stat '/usr/local/bin/mmtune': No such file or directory Couldn't move mmtune to Go-mmtune Anyone recognize what I might have done wrong?
This is the contents of oref0-runagain.sh: # To run again with these same options, use: /root/src/oref0/bin/oref0-setup.sh --dir=/root/myopenaps --serial=xxxxxx --cgm=G4-go --bleserial=n --ns-host=https://www.xxxx.xxx:1337 --api-secret=xxxxxxxxxxxx --tty=/dev/ttyAMA0 --max_iob=13 --enable=' autotune ' --radio_locale='US'
Dana Lewis
@danamlewis
Nov 23 2018 19:34
What radio are you planning to use with your Pi?
tazitoo
@tazitoo
Nov 23 2018 19:37
it a slice of radio - used to run with mmeolink
...so maybe that's the fix? Install Oscar's mmeowlink repo?
Dana Lewis
@danamlewis
Nov 23 2018 19:42
No, try master instead of dev
Pi instructions currently assume HAT which needs dev
Not sure anyone's tested a SoR with dev, but the ti stick right now needs master still
Scott Leibrand
@scottleibrand
Nov 23 2018 19:43
^^ that. mmeowlink only works with master: there are new Go based tools for dev, which require some additional work to work with SoR or similar
Dana Lewis
@danamlewis
Nov 23 2018 19:44
If you have time, would appreciate a PR noting that on the Pi docs
tazitoo
@tazitoo
Nov 23 2018 19:44
ok - I'll flip back to master and run through the install again
Dana Lewis
@danamlewis
Nov 23 2018 19:45
:+1:
tazitoo
@tazitoo
Nov 23 2018 19:45
@danamlewis - -the note being "This set of instructions intended for HAT - all other legacy Pi rigs should use master." ?
Dana Lewis
@danamlewis
Nov 23 2018 19:56
Yes, and maybe "other Pi rigs with different types of radios (e.g. TI stick, slice of radio, or any other non-HAT)" to be as clear as possible.
Thx!
tazitoo
@tazitoo
Nov 23 2018 19:59
it was this line in the docs that made me think I needed dev - 'the master installation of oref0 is not compatible with the the newest Raspian system kernels'. If that's not the case - should that be edited out as well?
djnoor
@djnoor
Nov 23 2018 20:00
@cluckj I installed OpenAPS Dev on another Intel Edison Rig w/ explorerboard. Here are the contents of ~/myopenaps/pump.ini as you requested.
[device "pump"]
serial = 123456
@cluckj The pump's serial no is also incorrect on my system.
Jon Cluck
@cluckj
Nov 23 2018 20:02
Correct them and see what happens :)
That is definitely a bug
Martin Haeberli
@mhaeberli
Nov 23 2018 20:04
@cluckj following up on the preferences for cgm-loop discussion from yesterday, where might I look to see how that changed between master and dev, and/or how to propose a fix so that it no longer happens on fresh installs of dev on freshly-erased Edisons?
djnoor
@djnoor
Nov 23 2018 20:14
@cluckj Should I also add lines for port and radio_type in pump.ini. The pump.ini version in master has them?
Jon Cluck
@cluckj
Nov 23 2018 20:16
Yes
@mhaeberli which CGM type uses that script?
Martin Haeberli
@mhaeberli
Nov 23 2018 20:17
configured to use G5 - don’t know whether or not it NEEDS that script
djnoor
@djnoor
Nov 23 2018 20:34
@cluckj After fixing the pump.ini log in Dev, it's now looping and setting temp basals!
Jon Cluck
@cluckj
Nov 23 2018 20:40
:clap:
@mhaeberli there should be a spot in oref0-setup.sh that configures the G5
That function would need to call the add-preference bash command to add the line to preferences.json with the appropriate directory
iirc there are other examples of that for the different CGM types that you can crib from :)
djnoor
@djnoor
Nov 23 2018 20:51
@cluckj Anything else I should do?
Jon Cluck
@cluckj
Nov 23 2018 20:53
Enjoy the peaceful sleep on openaps? :laughing:
djnoor
@djnoor
Nov 23 2018 20:54
@cluckj I'd suspect the bug is in the dev bash install script, but I'm not much of a programmer and know little about bash scripting.
Jon Cluck
@cluckj
Nov 23 2018 20:54
Yes, it's in there; I think I know where it is but haven't had time to track it down
The same thing happened to me on an Edison install a couple weeks ago
djnoor
@djnoor
Nov 23 2018 20:55
@cluckj Ok, well I really appreciate your work on OpenAPS.
Jon Cluck
@cluckj
Nov 23 2018 20:55
:)
Martin Haeberli
@mhaeberli
Nov 23 2018 20:56
@cluckj :+1:
Dana Lewis
@danamlewis
Nov 23 2018 21:44
Want to create an issue to flag it? Thx'
Tim Howard
@tghoward
Nov 23 2018 22:36

One of my edisons conks out every now and then. We thought the battery was just being drained, but sleuthing through ns-loop.log indicates the battery level was {"batteryVoltage":3822, "battery":64} the last time it stopped. I'm using a cylindrical battery (which is new to me) (https://www.adafruit.com/product/1781).

I'm not sure where to check for a voltage-level shutdown value? Is there a spot for that? Does anyone know of other reasons it may be shutting down?

Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:37
@tghoward Have you been able to determine that it's shutting down as opposed to crashing?
Tim Howard
@tghoward
Nov 23 2018 22:37
Hmm, nope. How would I distinguish? Nothing clear on any of the other logs
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:38
if you look at /var/log/messages is there anything prior to the messages generated by booting?
Tim Howard
@tghoward
Nov 23 2018 22:38
/var/log/syslog was giving me nothing. I'll look in messages now
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:39
Could also take the timestamps from the boot log entries and correlate to the other log files for values closest to that time. If it was a shutdown I suspect you would see a "shutting down due to low power" type message were it due to a threshold.
Tim Howard
@tghoward
Nov 23 2018 22:43

the very last message was a normal uploaded message, so nothing there. The very last syslog was

Nov 23 14:46:04 localhost CRON[9536]: (CRON) info (No MTA installed, discarding output)

which is pretty common, so I nothing suspect there either.

good point that there is no "shutting down due to low power"
so if it crashing ... is there any debugging I can do in the log files? Or elsewhere?
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:45
Given the info you've been able to provide so far my feeling is flakey hardware or a crash that is taking the whole thing down. But if it could do that I'd kinda expect a core somewhere or other. When you say "every now and then" how frequently are we talking?
Tim Howard
@tghoward
Nov 23 2018 22:46
Perhaps about once a day this happens.
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:46
Same general time of day or randomly?
Tim Howard
@tghoward
Nov 23 2018 22:46
We've been blaming bad connections when plugged in, but this makes more sense
randomly. Sometimes middle of the night, sometimes middle of the day
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:47
For the middle of the night maybe keep it plugged into a computer via USB to allow a serial terminal to be up and logging?
Tim Howard
@tghoward
Nov 23 2018 22:49
Ok, I can keep a serial terminal open, but don't know how to log it ... with a pipe on the terminal?
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:49
Varies depending on the terminal app. Some have a built=in log to textfile capability.
Tim Howard
@tghoward
Nov 23 2018 22:50
I generally use screen. I can research that, thanks.
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:50
Ahh, linux user?
Tim Howard
@tghoward
Nov 23 2018 22:50
Ok, I can try to look into it
well, yes, I fumble along in ubuntu ...
Tim Howard
@tghoward
Nov 23 2018 22:51
that was fast! thanks!
Tim Howard
@tghoward
Nov 23 2018 22:57
I'll see if I can capture a crash/shutdown and report back here. Might be a while ....
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:58
Such is troubleshooting. ;)
Tim Howard
@tghoward
Nov 23 2018 22:58
:) thanks for the help!
Raymond Richmond
@PedanticAvenger
Nov 23 2018 22:58
No problem.