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

12th
Apr 2019
Katie Aldridge
@kcrcgm
Apr 12 01:31
Hi! I'm trying to rerun the setup script
and keep getting an error. I'll post screen shots
Can someone help? TIA!
rig setup problem 4.11.2019.PNG
rig setup problem.2 4.11.2019.PNG
Riko L
@Ricco555
Apr 12 08:09

@kcrcgm related to authentication thing, can you try

$ sudo apt-key update
$ sudo apt-get update

and try to install something. Related to the other stuff.. not really sure. This is Edison? New or used one?

viq
@viq
Apr 12 08:13
There was this whole big discussion about how looping is DIY, and you need to be able to Do It Yourself to do it safely... So what should the barrier to entry be? Someone reached out to me whether I would help them set it up (AAPS + combo), what would be good things to ask them to do themselves to prove they have a chance of managing it themselves afterwards? Right now I asked them to come back to me once they have their BGs in nightscout, but I don't know if that's not enough or too much
Riko L
@Ricco555
Apr 12 08:39
haven't tried AAPS, but openaps can be quite straightforward to install and setup (thanks to the extensive guide), but once there are issues, it really is not for everyone. So barrier to entry is that you have to be prepared to mess things up and have a huge openness to learn a lot of new things.
if expectations is "fire and forget" then it's better not to start. But, to get BG in NS is a really useful in my opinion, even without going into the looping part. And it shows commitment.
marafie
@marafie
Apr 12 11:31
@Ricco555 i did the
sudo apt-get update
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
whats next?
marafie
@marafie
Apr 12 11:41
@Ricco555 i ran setup after downloading the openaps
got this at the end
Running apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Del exim4-config 4.89-2+deb9u1 [131 kB]
Removing any existing ns device:
Running nightscout autoconfigure-device-crud https://alhumaidhi.herokuapp.com saraalhumaidhi
added process://ns/nightscout/ns NIGHTSCOUT_HOST API_SECRET
/usr/bin/nightscout: line 338: json: command not found
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
Traceback (most recent call last):
File "/usr/local/bin/openaps-import", line 89, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-import", line 77, in run
candidates = json.load(args.input)
File "/usr/lib/python2.7/json/init.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Could not run nightscout autoconfigure-device-crud
root@jubilinux:~#
@Ricco555 just installed json
and got another error
marafie
@marafie
Apr 12 11:46
will send it to you privalty
Jon Cluck
@cluckj
Apr 12 12:27
@kcrcgm are you using master or dev?
@marafie same question :) ^^^^^
marafie
@marafie
Apr 12 12:30
how can i know, during installation i see master
how can i verify ?
Jon Cluck
@cluckj
Apr 12 12:30
cd ~/src/oref0 && git branch
marafie
@marafie
Apr 12 12:30
i think its going to work, i have timezone issue, and i installed something and i see that its instaling
@cluckj just reached to this

Adding OpenAPS log shortcuts
Add NIGHTSCOUT_HOST and API_SECRET to /root/.bash_profile
sed: can't read .profile: No such file or directory
sed: can't read .profile: No such file or directory

Resetting spi_serial
Schedule openaps in cron? y/[N] y
Saving existing crontab to /root/crontab.txt:
no crontab for root
Would you like to remove your existing crontab first? y/[N]

will reboot and check version
Jon Cluck
@cluckj
Apr 12 12:33
that looks like a successful install :)
marafie
@marafie
Apr 12 12:33
master
let me check tail
tail -F /var/log/openaps/autotune.log
says no such file
Jon Cluck
@cluckj
Apr 12 12:35
that's fine, autotune hasn't run yet? try looking at the pump-loop log, you can type l as a shortcut to it
marafie
@marafie
Apr 12 12:36
Starting oref0-pump-loop at Fri Apr 12 15:36:02 +03 2019 with 3 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
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Preflight
grep: settings/model.json: No such file or directory
grep: settings/model.json: No such file or directory
fail. Retrying preflight
grep: settings/model.json: No such file or directory
grep: settings/model.json: No such file or directory
fail. Retrying preflight
grep: settings/model.json: No such file or directory
grep: settings/model.json: No such file or directory
fail. Couldn't preflight
any suggestions ?
Jon Cluck
@cluckj
Apr 12 12:37
what model pump do you have?
marafie
@marafie
Apr 12 12:38
745, it used to work on old setup
754
Jon Cluck
@cluckj
Apr 12 12:38
make sure the pump battery is okay and give it a few minutes to make a connection
marafie
@marafie
Apr 12 12:39
batrry is full
usally 1st 2 runs dont run proerly
then works
Katie Aldridge
@kcrcgm
Apr 12 12:39
@Ricco555 It is an Edison, and it was new to me 2 years ago. I have used it for the last 2 years, but recently have had to switch to a new pump. So I'm trying to do the setup again for this new pump. I will try the commands you suggested. @cluckj I'm trying to install master. One of my rigs WAS running dev last summer, but now I'd like both of them to be on master. I'm getting this same install failure on BOTH rigs now. Thank you for any help!
marafie
@marafie
Apr 12 12:39
but for this 0.3.0 is my 1st time
mmtune: "868.318", 5, -70 waiting for 20 second silence before continuing
Radio ok. Listening: .
Jon Cluck
@cluckj
Apr 12 12:41
@kcrcgm okay, there's a patch here: openaps/oref0@2ce4acb
marafie
@marafie
Apr 12 12:42
Could not parse input data: SyntaxError: /root/myopenaps/monitor/glucose.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (module.js:672:27)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/oref0/bin/oref0-determine-basal.js:96:28)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
Checking deliverAt: is within 1m of current time: Fri Apr 12 15:41:45 +03 2019
date: option requires an argument -- 'd'
Try 'date --help' for more information.
Couldn't smb_verify_suggested
??
Jon Cluck
@cluckj
Apr 12 12:43
if you run those commands, I think it should get you going
@marafie it's waiting for BG readings, but it looks like it's communicating with your pump now
marafie
@marafie
Apr 12 12:46
Temp refreshed
Could not parse input data: SyntaxError: /root/myopenaps/monitor/glucose.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (module.js:672:27)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/oref0/bin/oref0-determine-basal.js:96:28)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
Checking deliverAt: is within 1m of current time: Fri Apr 12 15:45:48 +03 2019
date: option requires an argument -- 'd'
Try 'date --help' for more information.
Couldn't smb_verify_suggested
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 40s silence before mmtuning
@cluckj any idea ?
Jon Cluck
@cluckj
Apr 12 12:50
is there anything in /root/myopenaps/monitor/glucose.json?
marafie
@marafie
Apr 12 12:50
its beeing realing
empty
Jon Cluck
@cluckj
Apr 12 12:51
is your rig connected to the internet?
marafie
@marafie
Apr 12 12:51
how can i know that the NS is working ?
yes
connected
Jon Cluck
@cluckj
Apr 12 12:51
I think master has the ns-looplog shortcut
marafie
@marafie
Apr 12 12:52
what should i do now ?
tail -F /var/log/openaps/ns-loop.log
Jon Cluck
@cluckj
Apr 12 12:53
yep
marafie
@marafie
Apr 12 12:54

Starting ns-loop at Fri Apr 12 15:53:03 +03 2019:
ns://JSON/shell/cgm/ns-glucose.json
No JSON object could be decoded

ns://JSON/shell/settings/temptargets.json
reporting settings/temptargets.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
Refreshed temptargetsns://JSON/shell/monitor/carbhistory.json
reporting monitor/carbhistory.json
and meal-carbs
{"batteryVoltage":3837, "battery":66}
Uploaded
Starting ns-loop at Fri Apr 12 15:54:03 +03 2019:

ns://JSON/shell/cgm/ns-glucose.json
No JSON object could be decoded ?????
any idea ?
Katie Aldridge
@kcrcgm
Apr 12 12:58
@cluckj Thanks!!! Can you step me through how to apply this? Do I cut and paste? Do I have to get it through Github onto my branch... or something like that?? Lol, I need help. Thank you again!
Jon Cluck
@cluckj
Apr 12 13:00
@kcrcgm copy & paste from there into the terminal the two lines which start with echo and the one that starts with curl
@marafie something is preventing BG from getting to your rig; is the loop log still showing the same error?
marafie
@marafie
Apr 12 13:02
yes
straykatz
@straykatz
Apr 12 14:47
Good morning. For what reason would a chip get into a rebooting loop after flashing, during the bootstrap install? It's the second attempt to reflash and reinstall where this is happening. (The same chip had issues getting back onto WIFI from BT tether, which is the reason for I am reflashing.)
FWIW - I reflashed both of my chips, and for the other one, installation worked flawlessly using the same cables and mac - all the way to BT tethering.
straykatz
@straykatz
Apr 12 15:10
doing a apt --fix-broken install now. Maybe when I get home from work, it'll be all working/good :).
Dana Lewis
@danamlewis
Apr 12 15:34
@viq my suggestion would be sitting beside them and answering questions. Their hands on the keyboard. If they’re not willing to do that, they’re likely not wanting to learn what they need to do to be successful for real life looping. I’ve been helping people for 4+ years and have observed that those who want to shortcut the build & learn process by having someone else build (if they talk someone else into it) often also forgo the self learning process and end up with more headaches down the line
Dana Lewis
@danamlewis
Apr 12 15:44
@cluckj can I convince you (if your hands are near a keyboard?) to write a quick gist or issue or something to copy and paste the link in different channels for those who run into the spi error?
Jon Cluck
@cluckj
Apr 12 15:46
ya, I think a scripted hotfix is best too
is it also happening on jubilinux stretch ?
viq
@viq
Apr 12 15:51
@danamlewis yeah, the issue is that they're apparently in a different city. So I guess I'll try to first get them on a call and talk with them about diabetes management in general, and see what expectations they have of the loop.
Natalia S.
@Propelld
Apr 12 15:52
@danamlewis I'm here!
Dana Lewis
@danamlewis
Apr 12 15:53
@propelld great thanks! @cluckj has a suggested workaround for the spi stuff he can paste here:
Natalia S.
@Propelld
Apr 12 15:53
@danamlewis also, as a CDE, I approve of your teaching style :P People develop much better survival skills for a crisis when they have a chance to DIY!
Dana Lewis
@danamlewis
Apr 12 15:55
@viq there’s a great online support community here to help for that reason
@propelld :+1:
viq
@viq
Apr 12 15:59
@danamlewis Yeah, I guess something along the lines "If you want to talk to a person in your native language, I'm here. I can give you some advice. I can explain to you what the settings do. I can explain to you which you want to start with. But you'll need to learn yourself how to operate it, because you'll be operating it yourself. Here are some good places to ask questions."
Dana Lewis
@danamlewis
Apr 12 16:12
:+1:
Natalia S.
@Propelld
Apr 12 16:23
@danamlewis just a question - does reflashing the SD card with a quick format do anything to the card? I find that if I reflash in PiBakery and try to use the 'used' card I can't log in to my rig at all...
viq
@viq
Apr 12 16:26
@Propelld "quick format" just wipes "table of contents"
Jon Cluck
@cluckj
Apr 12 16:26
okay here is a script for the folks getting that invalid SPI context error: curl https://gist.githubusercontent.com/cluckj/1f93b89388dfeec686be73f85e852a00/raw/a80388dc07eb43655b11be019ee2334d0a773a24/install_mraa.sh | bash
Natalia S.
@Propelld
Apr 12 16:26
@danamlewis oh, so I need to select the other option?
viq
@viq
Apr 12 16:26
Sometimes when working with various media (completely not related to OpenAPS in any way) I found it beneficial to completely wipe the disk/media, eg using dd command if it's available
Though again, I'm not familiar with the specific things in use here, and describing a general use and terms I'm familiar with there.
Natalia S.
@Propelld
Apr 12 16:35
@danamlewis is the script posted by @cluckj the one I need for my issue?
Jon Cluck
@cluckj
Apr 12 16:37
maybe
@Propelld are you trying to install master or dev?
Dana Lewis
@danamlewis
Apr 12 16:47
She is doing master
Jon Cluck
@cluckj
Apr 12 16:50
it's a different error, but it might be the same problem
Natalia S.
@Propelld
Apr 12 16:54
Ok. At what step in the process should I type this? because after the interactive script the Pi basically won't do anymore commands.
Jon Cluck
@cluckj
Apr 12 16:59
after the install is best
what does it not accepting more commands look like?
Natalia S.
@Propelld
Apr 12 17:05
So I don't have a screenshot, but basically everything will be perfect until the interactive setup. I run the cd && ~/src/oref0/bin/oref0-setup.sh command and answer all the questions. At the end it will ask me to press enter to reboot or ctrl-c to cancel. When I press enter nothing happens. I doesn't reboot or accept any new commands.
viq
@viq
Apr 12 17:06
Can you still ping it? Can you open another ssh session to it?
Natalia S.
@Propelld
Apr 12 17:06
yes, if I just end the session without rebooting it lets me go in again
Jon Cluck
@cluckj
Apr 12 17:07
ah, okay
Natalia S.
@Propelld
Apr 12 17:07

so I tried that assuming the setup was complete. I press 'l' to see the logs and I get this: Starting oref0-pump-loop at Thu 11 Apr 16:13:06 +05 2019 with 2 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
grepImportError: No module named spi_serial

Radio check failed. ImportError: No module named spi_serial
Listening for 40s silence before mmtuning:.......

forever
and ever
Jon Cluck
@cluckj
Apr 12 17:08
run that line I pasted above and see if that helps
Natalia S.
@Propelld
Apr 12 17:08
at any time or after I run the interactive script?
Jon Cluck
@cluckj
Apr 12 17:10
after the interactive script
Natalia S.
@Propelld
Apr 12 17:10
right now I'm running everything again and I'm at the point where it's asking me if I want to do the interactive script again. Should I just press n and run the command you provided?
Jon Cluck
@cluckj
Apr 12 17:11
no, run it after you've run the interactive script
but before you reboot :)
when it asks if you want to reboot or press ctrl+c to cancel, cancel it and run the command
Natalia S.
@Propelld
Apr 12 17:11
Ok. Just to clarify at the end of the interactive script my options are cancel or reboot
ah ok
will do that right now :)
Jon Cluck
@cluckj
Apr 12 17:14
even if you reboot and run it, it'll be fine
Natalia S.
@Propelld
Apr 12 17:49
Okay @cluckj running it now! What should I do when it ends?
Jon Cluck
@cluckj
Apr 12 17:50
reboot
Natalia S.
@Propelld
Apr 12 17:51
And then can I run a log again?
Jon Cluck
@cluckj
Apr 12 17:51
yep!
Natalia S.
@Propelld
Apr 12 18:02
I tried to include an image of the log
but it's basically the same result
Jon Cluck
@cluckj
Apr 12 18:09
okay, it may have been a different problem then
Natalia S.
@Propelld
Apr 12 18:09
I'm getting "Radio check failed. ValueError: Invalid SPI context"
Jon Cluck
@cluckj
Apr 12 18:10
that's an improvement
sed -i.bak -e "s/#dtparam=spi=on/dtparam=spi=on/" /boot/config.txt
^ run that, then reboot -f
Natalia S.
@Propelld
Apr 12 18:20
Ok, so after I rebooted after running the log, I tried to go in again via PuTTY and I'm getting an error message. It says Network Error: Connection Refused
(I didn't get a chance to run your new script yet)
It let me in via Serial though...
Ok I will run the script now
Now I'm getting:
sed: couldn't open temporary file /boot/sednJe8La: Permission denied
Jon Cluck
@cluckj
Apr 12 18:25
check the loop log?
Natalia S.
@Propelld
Apr 12 18:29
ok one sec

Starting oref0-pump-loop at Fri 12 Apr 23:22:13 +05 2019 with 20 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. Old pumphistory-24h, waiting for 20 seconds of silence: Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Old pumphistory-24h refreshed
Old settings: Pump profile refreshed; Could not parse autotune_data
Settings refreshed; Profile valid. Refreshed pumphistory and meal.json
Checking pump clock: "2019-04-12T14:28:21+05:00" is within 90s of current time: Fri 12 Apr 23:28:58 +05 2019
Pump clock is more than 55s off: attempting to reset it
Waiting for ntpd to synchronize... OK!
Setting pump time to Fri 12 Apr 23:28:59 +05 2019
Error: pump clock refresh error / mismatch
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 40s silence before mmtuning
Radio ok. Listening: .No more radio errors; canceling reboot

Starting oref0-pump-loop at Fri 12 Apr 23:30:08 +05 2019 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
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

looks different?
Dana Lewis
@danamlewis
Apr 12 18:38
yay. give it 20 minutes
Jon Cluck
@cluckj
Apr 12 18:39
:thumbsup:
Natalia S.
@Propelld
Apr 12 18:47
Can I do other things while it's going? like adding another wifi network?
Jon Cluck
@cluckj
Apr 12 18:47
yep
Natalia S.
@Propelld
Apr 12 18:48
cool! Thank you so much, I may reach out if something weird happens
Dana Lewis
@danamlewis
Apr 12 18:49
@Propelld :+1: thanks for popping over here!
@Propelld I think you had commented on someone else's post (not the one where you were talking to me, another one) who had the same error - but I can't find it, if you find that thread can you post that link for them? Thanks!
Natalia S.
@Propelld
Apr 12 18:54
I will
So one last question - the other issue I was having earlier, I am not able to get into the rig wirelessly anymore
Only with the serial
Jon Cluck
@cluckj
Apr 12 18:55
sonja's post?
Natalia S.
@Propelld
Apr 12 18:57
Yes, I just shared with her
Dana Lewis
@danamlewis
Apr 12 19:02
perfect thanks
Natalia S.
@Propelld
Apr 12 23:47
Hello, I'm back :/ I'm now having issues with the communication between the pump and the rig. It was able to connect for a few minutes, then the connection dropped and I have not been able to reconnect since.
Starting oref0-pump-loop at Fri 12 Apr 19:41:05 EDT 2019 with 7 second wait_for_silence:
Waiting up to 4 minutes for new BG: glucose.json newer than pump_loop_completed
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-12T19:44:22-04:00" is within 90s of current time: Fri 12 Apr 19:44: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: .No interfering pump comms detected from other rigs (this is a good thing!)
mmtune: "916.636", 0, -99 waiting for 78 second silence before continuing
Radio ok. Listening: ...