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

24th
Sep 2018
Martin Haeberli
@mhaeberli
Sep 24 2018 00:43
still stuck on ‘Invalid SPI context'
Martin Haeberli
@mhaeberli
Sep 24 2018 00:50
(on an Edison) ...
Martin Haeberli
@mhaeberli
Sep 24 2018 05:09
still lost with ‘Invalid SPI context’ - will look in the AM.
(on a newly-flashed Edison)
Martin Haeberli
@mhaeberli
Sep 24 2018 05:25
looks likely that I ran my initial install without my Explorer board attached (using some kind of intel breakout board instead.) this probably is the root cause. I’ll know soon
Martin Haeberli
@mhaeberli
Sep 24 2018 05:41
now hung at ‘Adding OpenAPS log shortcuts’...
I’ll let it run overnight and try in the AM
marafie
@marafie
Sep 24 2018 11:03
hello, in NS its giving me that openaps pill is unknown, once i deleted (after donating) i still do get for the openaps pill unknown, any suggestions how to fix it, i have read the NS trouble shouting
image.png
i checked the devicestuatus table in the MLAB, i do not see any records related to the pump uploaded
alimhassam
@alimhassam
Sep 24 2018 11:10
@marafie did you look to see if there was anything suspicous in your ns-loop.log ?
marafie
@marafie
Sep 24 2018 11:10
will check, by the way the loop is working properly
but no info is presented on the NS
Tom Boudreau
@tomasboudr
Sep 24 2018 14:35
iOS 12 so far has broken my apple watch dexcom app, also checking if it broke my BT tethering as it didn't work on my morning dog walk today
so be wary of upgrading OpenAPS friends
Martin Haeberli
@mhaeberli
Sep 24 2018 15:38
still stuck on SPI issue; now edison boots but hangs on login… :-( I’ll start over…
iValkou
@iValkou
Sep 24 2018 16:27
Why Pi OpenAPS doesn't upload devicestatus to Nightscout via Bluetooth?
Scott Leibrand
@scottleibrand
Sep 24 2018 16:34
what does your ns-loop.log say?
iValkou
@iValkou
Sep 24 2018 16:43
ns-looplog says thats all ok, but status not updated in NS
no errors on the rig
Scott Leibrand
@scottleibrand
Sep 24 2018 16:43
I can't troubleshoot effectively without seeing exactly what it says. Can you please also paste the relevant lines?
This message was deleted
iValkou
@iValkou
Sep 24 2018 16:49
IMAGE 2018-09-24 19:49:37.jpg
Scott Leibrand
@scottleibrand
Sep 24 2018 16:51
Can you find the last time it didn’t say “No recent suggested.json” and tried a devicestatus upload?
You may need to use less instead of tail
iValkou
@iValkou
Sep 24 2018 16:53
1 moment, i will connect it to my computer
Starting oref0-ns-loop at Mon 24 Sep 19:38:17 MSK 2018:
Found recent valid BG:
{"glucose":106,"dateString":"2018-09-24T19:37:17.993000+03:00"}
{"sgv":106,"dateString":"2018-09-24T19:37:17.993000+03:00"}
 19:40:34 up 31 min  0 users  load average: 5.89 6.22 5.12
-rw-r--r-- 1 root root 0 Sep 23 21:37 monitor/pushover-sent
Latest NS temptargets: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
Merging local temptargets: (NOT VALID JSON: empty)
Temptargets merged: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
Refreshed carbhistory; COB: 12
{"batteryVoltage":3820,"battery":61}
No recent suggested.json found; last updated Sep 24 19:32
No new treatments to upload
Completed oref0-ns-loop at Mon 24 Sep 19:47:09 MSK 2018
iValkou
@iValkou
Sep 24 2018 16:59
sometimes it succeeded
Scott Leibrand
@scottleibrand
Sep 24 2018 17:00
that paste still shows No recent suggested.json found; last updated Sep 24 19:32 - can you go back to around 19:32 and find when it last did a devicestatus upload?
iValkou
@iValkou
Sep 24 2018 17:02
I just disabled Edison rig, and waiting for successfull loop on Pi
Or I can do some treatment like 0.1 U
Scott Leibrand
@scottleibrand
Sep 24 2018 17:04
I would set a temp
that it's likely to want to change/cancel
a 0.1U bolus might not make it want to do anything
iValkou
@iValkou
Sep 24 2018 17:06
it's mmtuning =/
I set 30 min zero temp
iValkou
@iValkou
Sep 24 2018 17:21
still mmtuning...
Edison rig works much better
iValkou
@iValkou
Sep 24 2018 17:30
Finaly Completed oref0-pump-loop at Mon 24 Sep 20:30:20 MSK 2018
Starting oref0-ns-loop at Mon 24 Sep 20:27:09 MSK 2018:
Found recent valid BG:
{"glucose":104,"dateString":"2018-09-24T20:22:17.675000+03:00"}
{"sgv":104,"dateString":"2018-09-24T20:22:17.675+0300"}
 20:28:57 up  1:19  1 user  load average: 4.08 4.89 5.23
Load high at Mon 24 Sep 20:28:58 MSK 2018: waiting up to 5m to continue
Nightscout still not updated
Scott Leibrand
@scottleibrand
Sep 24 2018 17:38
it should at some point decide to do a devicestatus upload despite the high load
iValkou
@iValkou
Sep 24 2018 17:40
What does high load mean?
CPU load?
Scott Leibrand
@scottleibrand
Sep 24 2018 17:41
indirectly, ya: it's the linux "load average" it uses
iValkou
@iValkou
Sep 24 2018 17:42
Why is there no high load if it is connected through Wifi?
Scott Leibrand
@scottleibrand
Sep 24 2018 17:43
the high load comes from pump-loop, not from whether/how it's connected to wifi/BT
iValkou
@iValkou
Sep 24 2018 17:44
But no problem with uploading through Wifi.
Once the device is connected to the home network, the problem disappears.
Scott Leibrand
@scottleibrand
Sep 24 2018 17:47
the high load would occur on home network, too: that's not really the problem, but just making it harder to see what's really going on when it does upload
iValkou
@iValkou
Sep 24 2018 17:49
Thank you, Scott, now I know that the problem is in a high load, not in the connection.
Scott Leibrand
@scottleibrand
Sep 24 2018 17:50
no!
iValkou
@iValkou
Sep 24 2018 17:50
?
Scott Leibrand
@scottleibrand
Sep 24 2018 17:50
high load is not the problem, it's just making it hard for you to find the devicestatus upload attempt in the logs
it's checking that file_is_recent /tmp/ns-loop-completed
once it's been 5m since the last upload, it will try again
iValkou
@iValkou
Sep 24 2018 17:52
understood. I'm not an English speaker, I use Google Translate, sorry
Scott Leibrand
@scottleibrand
Sep 24 2018 17:53
no problems: I've had to do that, too.
iValkou
@iValkou
Sep 24 2018 17:55
again Load high at Mon 24 Sep 20:44:52 MSK 2018: waiting up to 5m to continue
Scott Leibrand
@scottleibrand
Sep 24 2018 17:55
there should've been a Completed oref0-ns-loop in between those two
iValkou
@iValkou
Sep 24 2018 17:56
Starting oref0-ns-loop at Mon 24 Sep 20:29:09 MSK 2018:
Found recent valid BG:
{"glucose":105,"dateString":"2018-09-24T20:27:17.575000+03:00"}
{"sgv":105,"dateString":"2018-09-24T20:27:17.575+0300"}
 20:32:07 up  1:23  1 user  load average: 5.74 5.33 5.34
-rw-r--r-- 1 root root 0 Sep 23 21:37 monitor/pushover-sent
Latest NS temptargets: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
Merging local temptargets: (NOT VALID JSON: empty)
Temptargets merged: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
Refreshed carbhistory; COB: 0
{"batteryVoltage":4130,"battery":98}
No recent suggested.json found; last updated Sep 24 20:29
[{"duration":30,"raw_duration":{"timestamp":"2018-09-24T20:30:00+03:00","_type":"TempBasalDuration","id":"FgGAXhRYEg==","duration (min)":30},"timestamp":"2018-09-24T20:30:00+03:00","absolute":0.55,"rate":0.55,"raw_rate":{"timestamp":"2018-09-24T20:30:00+03:00","_type":"TempBasal","id":"MxaAXhRYEgA=","temp":"absolute","rate":0.55},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-09-24T20:30:00+03:00","enteredBy":"openaps://medtronic/722","_id":"5ba9219d376556b12d7c6045"},{"timestamp":"2018-09-24T20:18:33+03:00","_type":"Battery","id":"GgGhUhQYEg==","medtronic":"mm://openaps/mm-format-ns-treatments/Battery","created_at":"2018-09-24T20:18:33+03:00","enteredBy":"openaps://medtronic/722","eventType":"Note","notes":"Battery 722 ","_id":"5ba9219d376556b12d7c6049"},{"timestamp":"2018-09-24T20:18:10+03:00","_type":"Battery","id":"GgCKUhQYEg==","medtronic":"mm://openaps/mm-format-ns-treatments/Battery","created_at":"2018-09-24T20:18:10+03:00","enteredBy":"openaps://medtronic/722","eventType":"Note","notes":"Battery 722 ","_id":"5ba9219d376556b12d7c604d"},{"duration":30,"raw_duration":{"timestamp":"2018-09-24T20:07:30+03:00","_type":"TempBasalDuration","id":"FgGeRxQYEg==","duration (min)":30},"timestamp":"2018-09-24T20:07:30+03:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2018-09-24T20:07:30+03:00","_type":"TempBasal","id":"MwCeRxQYEgA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-09-24T20:07:30+03:00","enteredBy":"openaps://medtronic/722","_id":"5ba9219d376556b12d7c6051"},{"duration":30,"raw_duration":{"timestamp":"2018-09-24T19:59:23+03:00","_type":"TempBasalDuration","id":"FgGXexNYEg==","duration (min)":30},"timestamp":"2018-09-24T19:59:23+03:00","absolute":0.35,"rate":0.35,"raw_rate":{"timestamp":"2018-09-24T19:59:23+03:00","_type":"TempBasal","id":"Mw6XexNYEgA=","temp":"absolute","rate":0.35},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-09-24T19:59:23+03:00","enteredBy":"openaps://medtronic/722","_id":"5ba9219d376556b12d7c6055"}]
Completed oref0-ns-loop at Mon 24 Sep 20:40:46 MSK 2018

Starting oref0-ns-loop at Mon 24 Sep 20:41:12 MSK 2018:
Found recent valid BG:
{"glucose":104,"dateString":"2018-09-24T20:37:17.506000+03:00"}
{"sgv":104,"dateString":"2018-09-24T20:37:17.506+0300"}
 20:44:51 up  1:35  1 user  load average: 7.53 6.83 6.19
Load high at Mon 24 Sep 20:44:52 MSK 2018: waiting up to 5m to continue
Снимок экрана 2018-09-24 в 20.57.41.png
Scott Leibrand
@scottleibrand
Sep 24 2018 17:58
hmm: No recent suggested.json found; last updated Sep 24 20:29
iValkou
@iValkou
Sep 24 2018 17:59
I canceled temp manualy
OpenAPS set temp
and SMB )
Scott Leibrand
@scottleibrand
Sep 24 2018 18:04
I'm not sure why it reported No recent suggested.json found with a recent timestamp. I wonder if we'll want to change https://github.com/openaps/oref0/blob/dev/bin/oref0-ns-loop.sh#L169 to remove the | awk '{print $6,$7,$8}' portion so we can see whether the enact/suggested.json was less than minimum size
it might also be worth commenting out https://github.com/openaps/oref0/blob/dev/bin/oref0-ns-loop.sh#L22-L25 to see if there's a timing issue (and if not, to be able to more quickly see what's happening)
iValkou
@iValkou
Sep 24 2018 18:13
I did that changes, need I reboot the rig?
Scott Leibrand
@scottleibrand
Sep 24 2018 18:14
no, they should pick up immediately if you're running the dev branch
iValkou
@iValkou
Sep 24 2018 18:14
yes, dev
Scott Leibrand
@scottleibrand
Sep 24 2018 18:15
so now if you tail the logs the next ns-loop run after pump-loop sets a temp should do an upload
iValkou
@iValkou
Sep 24 2018 18:15
ok
hm
Снимок экрана 2018-09-24 в 21.19.15.png
iValkou
@iValkou
Sep 24 2018 18:21
Preflight OK. Profile less than 60m old; Profile valid. Couldn't invoke_pumphistory_etc - continuing
Retry 1 of refresh_pumphistory_and_meal
Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Mon 24 Sep 21:21:29 MSK 2018
Retry 2 of refresh_pumphistory_and_meal
Scott Leibrand
@scottleibrand
Sep 24 2018 18:26
that's usually due to weak rig to pump communications
iValkou
@iValkou
Sep 24 2018 18:27
IMAGE 2018-09-24 21:27:32.jpg
Scott Leibrand
@scottleibrand
Sep 24 2018 18:28
k, keep an eye out for the rssi (signal strength) if it has to mmtune
iValkou
@iValkou
Sep 24 2018 18:33
I noticed that the pushover works as it should, the data on my watch is fresh
iValkou
@iValkou
Sep 24 2018 18:40
Starting oref0-ns-loop at Mon 24 Sep 21:26:10 MSK 2018:
Found recent valid BG:
{"glucose":114,"dateString":"2018-09-24T21:22:17.251000+03:00"}
{"sgv":114,"dateString":"2018-09-24T21:22:17.251+0300"}
-rw-r--r-- 1 root root 0 Sep 23 21:37 monitor/pushover-sent
Latest NS temptargets: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
Merging local temptargets: (NOT VALID JSON: empty)
Temptargets merged: {"target":80,"duration":60,"start":"2018-09-24T12:52:07.276Z"}
{ "carbs": 0, "mealCOB": 0, "reason": "Could not parse input data" }
ns_meal_carbs failed
{"batteryVoltage":4070.0000000000005,"battery":94}
No recent suggested.json found; last updated -rw-r--r-- 1 root root 922 Sep 24 21:26 enact/suggested.json
[{"duration":0,"raw_duration":{"timestamp":"2018-09-24T21:29:55+03:00","_type":"TempBasalDuration","id":"FgC3XRUYEg==","duration (min)":0},"timestamp":"2018-09-24T21:29:55+03:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2018-09-24T21:29:55+03:00","_type":"TempBasal","id":"MwC3XRUYEgA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-09-24T21:29:55+03:00","enteredBy":"openaps://medtronic/722","_id":"5ba92f45376556b12d84f880"},{"duration":60,"raw_duration":{"timestamp":"2018-09-24T21:26:51+03:00","_type":"TempBasalDuration","id":"FgKzWhVYEg==","duration (min)":60},"timestamp":"2018-09-24T21:26:51+03:00","absolute":0,"rate":0,"raw_rate":{"timestamp":"2018-09-24T21:26:51+03:00","_type":"TempBasal","id":"MwCzWhVYEgA=","temp":"absolute","rate":0},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-09-24T21:26:51+03:00","enteredBy":"openaps://medtronic/722","_id":"5ba92f45376556b12d84f886"}]
Completed oref0-ns-loop at Mon 24 Sep 21:39:02 MSK 2018
But suggested.json IS recent
Scott Leibrand
@scottleibrand
Sep 24 2018 18:41
it looks like ns-loop is taking more than 5m to get to that point
iValkou
@iValkou
Sep 24 2018 18:43
file_is_recent /tmp/ns-loop-completed 10 ? 10 min?
It seems that problems with communication with the pump. Too long loop
Scott Leibrand
@scottleibrand
Sep 24 2018 18:44
could be. or it could just be that the Pi zero is really slow
iValkou
@iValkou
Sep 24 2018 18:45
aw, my pi is undeclocked ))) 500 MHz
I'll try to get the frequency back
Scott Leibrand
@scottleibrand
Sep 24 2018 18:46
we should also try to make it work underclocked
but that makes more sense now why you're seeing issues that others don't
iValkou
@iValkou
Sep 24 2018 18:46
ok, will add 10
Scott Leibrand
@scottleibrand
Sep 24 2018 18:47
sorry, that won't do anything there: you already removed the completed_recently check
iValkou
@iValkou
Sep 24 2018 18:47
ok
Scott Leibrand
@scottleibrand
Sep 24 2018 18:47
iValkou
@iValkou
Sep 24 2018 18:48
if ! file_is_recent_and_min_size enact/suggested.json 10; then ?
Scott Leibrand
@scottleibrand
Sep 24 2018 18:48
add the 10 after suggested.json before the ; - ya
iValkou
@iValkou
Sep 24 2018 18:49
done
Scott Leibrand
@scottleibrand
Sep 24 2018 18:49
if that helps, we'll want to PR that L167 change to dev
10m should work fine for everyone there
iValkou
@iValkou
Sep 24 2018 18:50
ok, let's check
iValkou
@iValkou
Sep 24 2018 19:00
@scottleibrand it helps

I will

  1. fork oref0
  2. commit L167 change
  3. make PR

All right?

iValkou
@iValkou
Sep 24 2018 19:10
I think I'll test a couple of days
iValkou
@iValkou
Sep 24 2018 19:20
Thank you very much for your help
Scott Leibrand
@scottleibrand
Sep 24 2018 19:37
Perfect, thanks.
Martin Haeberli
@mhaeberli
Sep 24 2018 19:58
post install, get message:
Resetting spi_serial Traceback (most recent call last): File "/usr/local/bin/reset_spi_serial.py", line 3, in <module> s = spi_serial.SpiSerial() File "/usr/local/lib/python2.7/dist-packages/spi_serial/spi_serial.py", line 11, in __init__ self.dev = m.spiFromDesc("spi-raw-5-1") AttributeError: 'module' object has no attribute 'spiFromDesc’ - will try to reboot to see if it fixes (a different newly-flashed edison)
Scott Leibrand
@scottleibrand
Sep 24 2018 20:00
which version(s) are you installing? master? dev?
Martin Haeberli
@mhaeberli
Sep 24 2018 20:00
master
@scottleibrand btw, for the other re-flashed rig, any suggestions on how to resolve ‘Invalid SPI context’?
Martin Haeberli
@mhaeberli
Sep 24 2018 20:08
@scottleibrand reboot seems to have fixed the above post install error
running 0.6 I think now; any reason to switch to dev (for Edison)?
Scott Leibrand
@scottleibrand
Sep 24 2018 20:16
the spi_serial stuff is only used by 0.6.x master. dev does things completely differently.
Martin Haeberli
@mhaeberli
Sep 24 2018 20:18
:+1:
alimhassam
@alimhassam
Sep 24 2018 22:07
@mhaeberli dev saves on battery and has numerous new features compared to master but is not as well tested and is still changing I think, so it depends what you're after. openaps/oref0#1036
Tracey Berg-Fulton
@BergFulton
Sep 24 2018 22:16
@scottleibrand Yep, Shortcuts app (aka Workflow). I think I'm missing a step in accessing the API. I've got it running but it's not getting the data from the keys. I'll share if I get it working.
Martin Haeberli
@mhaeberli
Sep 24 2018 22:16
@alimhassam thx. but for PiHat I assume dev is still required?
alimhassam
@alimhassam
Sep 24 2018 22:18
Right I was referring to Edison. For pi hat my understanding is that it's possible to use master but it's a bit too slow to work well.
I use dev on my Edison and I'm really happy with it.
Martin Haeberli
@mhaeberli
Sep 24 2018 22:30
:+1:
Scott Leibrand
@scottleibrand
Sep 24 2018 22:48
@BergFulton I got it working for POSTing to NS treatments.json. which API are you trying to hit?
Tracey Berg-Fulton
@BergFulton
Sep 24 2018 22:52
I was doing MyHerokuApp.com/api/v2/properties/openaps
Then doing Get Contents of URL with a GET request, then I tried to reach for dictionary values for Status, and then Label, and set those as a variable. Then I did Get Dictionary Value for When
Scott Leibrand
@scottleibrand
Sep 24 2018 22:52
if you aren't already, use Quick Look to add debug visibility into what the data looks like at each step
Tracey Berg-Fulton
@BergFulton
Sep 24 2018 22:54
I think I need to actually do a bit more drilling down to get to Label and When. I think I need to do Get Dictionary Value for Seen Devices, then OpenAps, then Status, then Label and then When
I'll check out Quick Look!
Martin Haeberli
@mhaeberli
Sep 24 2018 23:26
random sounding question - when using a G6 with OpenAPS, is it possible to connect a G6 receiver to, say, an Explorer or PiHAT based system via cable?
tzachi-dar
@tzachi-dar
Sep 24 2018 23:38
Thanks @ecc1 @scottleibrand so, I'll go with the pi option then.
Does anyone know if the minimed 508 can be used for looping?