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

13th
Apr 2018
mkericson
@mkericson
Apr 13 2018 00:25
Been having some flaky connection issues this week. While watching the logs tonight I see the following. Any thoughts on where I should look to target a fix?

[ 677.779874] connect failed event=0 e->status 1 e->reason 0
[ 677.786347] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
ed^C
root@MarksAPS2:~# [ 683.843067] perf samples too long (5030 > 5000), lowering kernel.perf_event_max_sample_rate to 25000
[ 694.370665] CFG80211-ERROR) wl_cfg80211_connect : Connectting with14:91:82:f1:43:b4 channel (9) ssid "belkin.3b4", len (10)
[ 694.370665]
[ 694.694888] connect failed event=0 e->status 1 e->reason 0
[ 694.701070] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
[ 715.042025] wl_android_wifi_off in
[ 715.046330] wifi_platform_set_power = 0
[ 716.058878]
[ 716.058878] Dongle Host Driver, version 1.141.59 (r)
[ 716.058878] Compiled in /home/robin/src/edison-linux-helper/edison-bcm43340 on Apr 4 2017 at 22:42:52
[ 716.059054] wl_android_wifi_on in
[ 716.064129] wifi_platform_set_power = 1
[ 716.644821] F1 signature OK, socitype:0x1 chip:0xa94c rev:0x2 pkg:0x0
[ 716.653276] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 716.661965] dhdsdio_download_firmware: firmware path=/lib/firmware/fw_bcmdhd.bin, nvram path=/lib/firmware/bcmdhd.cal
[ 716.797662] sdioh_request_buffer: [1] doing memory copy buf=f4d0d000, len=2037
[ 716.808762] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 716.977436] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 716.986440] wifi_platform_get_mac_addr
[ 716.990126] wifi_get_mac_addr_intel: unable to open /config/wifi/mac.txt
[ 717.002336] Firmware up: op_mode=0x0015, MAC=90:b6:86:0e:99:23
[ 717.029075] Firmware version = wl0: Aug 15 2014 15:09:17 version 6.20.190.2 (r497061) FWID 01-bb9bbd07
[ 717.038868] dhd_preinit_ioctls wl ampdu_hostreorder failed -23
[ 717.124049] CFG80211-ERROR) wl_update_wiphybands : bw_cap failed, -23
[ 721.698957] CFG80211-ERROR) wl_cfg80211_connect : Connectting with14:91:82:f1:43:b4 channel (9) ssid "belkin.3b4", len (10)

[ 722.097314] connect failed event=0 e->status 1 e->reason 0
[ 722.103927] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
[ 726.505132] CFG80211-ERROR) wl_cfg80211_connect : Connectting with14:91:82:f1:43:b4 channel (9) ssid "belkin.3b4", len (10)

[ 727.042046] connect failed event=0 e->status 1 e->reason 0
[ 727.048330] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
[ 731.845021] CFG80211-ERROR) wl_cfg80211_connect : Connectting with14:91:82:f1:43:b4 channel (9) ssid "belkin.3b4", len (10)

[ 732.305837] connect failed event=0 e->status 1 e->reason 0
[ 732.312245] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
[ 737.571499] CFG80211-ERROR) wl_cfg80211_connect : Connectting with14:91:82:f1:43:b4 channel (9) ssid "belkin.3b4", len (10)

[ 737.958783] connect failed event=0 e->status 1 e->reason 0
[ 737.965056] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed

wifi is good - I'm chatting with you on in now....
Scott Leibrand
@scottleibrand
Apr 13 2018 00:31
are you just having trouble with this wifi network, or others as well?
mkericson
@mkericson
Apr 13 2018 00:31
When I say flaky - I mean I have needed to power down then back up often to get it to connect.
no problems with wifi networks.
Scott Leibrand
@scottleibrand
Apr 13 2018 00:38
can you repeat that without pronouns?
not sure what you mean by "it"
mkericson
@mkericson
Apr 13 2018 00:40
Sorry the rig. As I have checked NS to see that I have a loop in progress - I've noticed this week that it has lost connection "unknown" more often - and i have had to reset the rig
mkericson
@mkericson
Apr 13 2018 00:51
OK. when I try to bash ~/myopenaps/oref0-runagain.sh I get no response
Dana Lewis
@danamlewis
Apr 13 2018 00:52
is your edison seated good on the explorer board?
Scott Leibrand
@scottleibrand
Apr 13 2018 00:53
also check pump-loop.log and see if the rig is actually looping, and just not able to upload to NS, or if it's failing to loop
mkericson
@mkericson
Apr 13 2018 00:53
my root directory looks like this:root@MarksAPS2:~# dir
-bash:
crontab.old.txt
crontab.txt
in
lan0
myopenaps
\336\377\377\375\374\376\370\377\377\377\374\375\377\373\207\374\370\377\217n\377\3778\376\370\377\377\374\377\377\377n\370\376\370\377\374\377\377\377
root@MarksAPS2:~#
src
ted.
mkericson
@mkericson
Apr 13 2018 01:41
Not sure what's up. reseated explorer and having the same issues. Seems to resemble a seating issue - so perhaps I have something loose on the board. ---- Switched to an spare edision and tried to rerun the oref0. get this error:

Removing any existing git
Removed any existing git
Checking openaps 0.2.1 installation with --nogit support
Installing latest openaps w/ nogit
Downloading/unpacking git+https://github.com/openaps/openaps.git@nogit
Cloning https://github.com/openaps/openaps.git (to nogit) to /tmp/pip-Qy5BpI-build
fatal: unable to access 'https://github.com/openaps/openaps.git/': Could not resolve host: github.com
Complete output from command /usr/bin/git clone -q https://github.com/openaps/openaps.git /tmp/pip-Qy5BpI-build:


Cleaning up...
Command /usr/bin/git clone -q https://github.com/openaps/openaps.git /tmp/pip-Qy5BpI-build failed with error code 128 in None
Storing debug log for failure in /root/.pip/pip.log
Couldn't install openaps w/ nogit
root@MarksAPS:~#

Dana Lewis
@danamlewis
Apr 13 2018 02:25
Usually means not online
Martin Haeberli
@mhaeberli
Apr 13 2018 03:37
@mkericson - what does ifconfig show
also what about ping 8.8.8.8
?
the latter should succeed if wifi is connected
(or bluetooth)
hotelmama
@hotelmama
Apr 13 2018 09:36
Bildschirmfoto 2018-04-13 um 11.14.00.jpg
hello! my bluetooth tethering does not work, on an intel edison. It works fine via wlan, just stops working when I leave the house. I rerun the script and redid the setup for bt-t, the rig accepted the phone as a bt-device in the setup-dialogue, on my samsung the edison results connected, but the rig still does not find it when I do the steps suggested as test for the setup (http://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/bluetooth-tethering-edison.html#testing-to-make-sure-it-works-after-you-successfully-did-the-above). On terminal there are listed countless devices with "advertising flags", seems like a whole store with bluetooth-devices next door. Any ideas?
I meant: the rig works fine via wlan, but it can’t do bluetooth tethering.
mkericson
@mkericson
Apr 13 2018 12:14
@mhaeberli not a connection issue. Getting garbbled logs and doesn't let me do bash runagain. root@MarksAPS2:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=43.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=39.4 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=35.4 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=60 time=31.2 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=60 time=57.7 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=60 time=62.6 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=60 time=34.5 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=60 time=36.8 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=60 time=36.0 ms
64 bytes from 8.8.8.8: icmp_seq=11 ttl=60 time=37.4 ms
64 bytes from 8.8.8.8: icmp_seq=12 ttl=60 time=60.4 ms
Thinking that I will need to reflash the edison and start with a clean slate. Other thought is that there is a loose connection on the board somewhere.
John
@jhendersion_twitter
Apr 13 2018 12:27
I have 722 with 2.4A
which is better openaps or rileylink
Martin Haeberli
@mhaeberli
Apr 13 2018 12:37
@mkericson I concur that reflash is worth trying... where are you geographically? Wonder whether someone nearby can swap in a spare Edison ...
John
@jhendersion_twitter
Apr 13 2018 12:49
what are the options to buy a case for the Rig
James Babcock
@jimrandomh
Apr 13 2018 13:29
What else goes in the case?
John
@jhendersion_twitter
Apr 13 2018 13:29
the edison board
James Babcock
@jimrandomh
Apr 13 2018 13:30
The docs have some options, including a 3d-printed case which is pretty good if it's just Edison+Explorer+LiPo, but nothing particularly good if you're including a receiver. I made a 3d-printed case for Edison+Explorer+G4 receiver, which I plan to write up so other people can reproduce it
John
@jhendersion_twitter
Apr 13 2018 13:32
I don't have a 3d printer
James Babcock
@jimrandomh
Apr 13 2018 13:32
People usually order them from Shapeways
John
@jhendersion_twitter
Apr 13 2018 13:33
ok so I can provide the print and they will do it for you?
James Babcock
@jimrandomh
Apr 13 2018 13:35
Yes
mkericson
@mkericson
Apr 13 2018 14:14

After flashing then running oref0 in get this error in the process: Any thoughts?After this operation, 1,237 kB of additional disk space will be used.
Err http://http.debian.net/debian/ jessie/main libmnl0 i386 1.0.3-5
404 Not Found
Err http://http.debian.net/debian/ jessie/main libnetfilter-conntrack3 i386 1.0.4-1
404 Not Found
Err http://http.debian.net/debian/ jessie/main dnsmasq-base i386 2.72-3+deb8u2
404 Not Found
Err http://http.debian.net/debian/ jessie-updates/main dns-root-data all 2017072601~deb8u1
404 Not Found
Get:1 http://security.debian.org/ jessie/updates/main dnsmasq-base i386 2.72-3+deb8u2 [410 kB]
Get:2 http://security.debian.org/ jessie/updates/main dnsmasq all 2.72-3+deb8u2 [15.8 kB]
Fetched 425 kB in 38s (11.1 kB/s)
E: Failed to fetch http://http.debian.net/debian/pool/main/libm/libmnl/libmnl0_1.0.3-5_i386.deb 404 Not Found

E: Failed to fetch http://http.debian.net/debian/pool/main/libn/libnetfilter-conntrack/libnetfilter-conntrack3_1.0.4-1_i386.deb 404 Not Found

E: Failed to fetch http://http.debian.net/debian/pool/main/d/dns-root-data/dns-root-data_2017072601~deb8u1_all.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Couldn't install hostapd dnsmasq

James Babcock
@jimrandomh
Apr 13 2018 14:15
Are you on wifi with a captive portal?
(I spot-checked downloading one of those links, and it downloaded fine for me)
mkericson
@mkericson
Apr 13 2018 14:16

root@jubilinux:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=112 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=28.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=90.8 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=28.9 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=60 time=24.5 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=60 time=58.1 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=60 time=32.0 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=60 time=30.0 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=60 time=28.1 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=60 time=29.1 ms
64 bytes from 8.8.8.8: icmp_seq=11 ttl=60 time=23.8 ms
64 bytes from 8.8.8.8: icmp_seq=12 ttl=60 time=31.9 ms
64 bytes from 8.8.8.8: icmp_seq=13 ttl=60 time=40.7 ms
64 bytes from 8.8.8.8: icmp_seq=14 ttl=60 time=31.1 ms
64 bytes from 8.8.8.8: icmp_seq=15 ttl=60 time=30.2 ms
^C
--- 8.8.8.8 ping statistics ---
15 packets transmitted, 15 received, 0% packet loss, time 14018ms
rtt min/avg/max/mdev = 23.803/41.407/112.594/25.259 ms
root@jubilinux:~# isconfig
-bash: isconfig: command not found
root@jubilinux:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:396 errors:0 dropped:0 overruns:0 frame:0
TX packets:396 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34712 (33.8 KiB) TX bytes:34712 (33.8 KiB)

usb0 Link encap:Ethernet HWaddr 02:00:86:7c:5e:92
inet addr:192.168.2.15 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::86ff:fe7c:5e92/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000

James Babcock
@jimrandomh
Apr 13 2018 14:18
A captive portal is where, when you connect to the wifi, it redirects your first web-page view to a different page which acts you to click on terms or something
Any wifi network that does that won't work
mkericson
@mkericson
Apr 13 2018 14:22
Not captive - but could be the issue. I'll try latter. Would it work through my phones hotspot?
@jimrandomh Thanks for the help. :smile:
James Babcock
@jimrandomh
Apr 13 2018 14:27
Worth a try
Martin Haeberli
@mhaeberli
Apr 13 2018 15:49
@mkericson sorry I missed this. Highly likely your phone hotspot can / will work. Or a home Wi-Fi network w no portal
mkericson
@mkericson
Apr 13 2018 16:03
OK.. Back in business. Quick question. Have the passcode requests to turn on SMB/UAM been removed? Didn't get asked.
Dana Lewis
@danamlewis
Apr 13 2018 16:08
Yes. Please read the release notes for 0.6.0 if you haven't already.
James Babcock
@jimrandomh
Apr 13 2018 16:23
Are there good public datasets of peoples' Nightscout data? I want to play around with some hypotheses involving things like modeling glycogen stores and nonlinear insulin response
scarral
@scarral
Apr 13 2018 16:43
Hi! Is this the official chat for autotune?
James Babcock
@jimrandomh
Apr 13 2018 16:44
There's also a more-specific channel for autotune, openaps/autotune. This one is for general discussion of all of OpenAPS, autotune included
Nothing is in any way official, we're all DIYers, everything at your own risk/talk to your endocrinologist/etc/etc.
James Babcock
@jimrandomh
Apr 13 2018 16:49
Anyone have button-error'ed or missing-sticker'ed Medtronic pumps they're looking to donate? I have an idea for how to repair them (by which I mean: I think I can create a replacement part for the dome/tape/sticker component), but I don't want to experiment on the pump I'm actually using
Dana Lewis
@danamlewis
Apr 13 2018 17:04
@jimrandomh public, no. Available - yes. Submit a request for the NS Data Commons
Also, I have a demo pump that you could play with for stickers, no one else has come up with a good use for it
James Babcock
@jimrandomh
Apr 13 2018 17:06
That'd be handy--I'd be happy to reimburse its shipping cost
(My main pump has some of its button-domes metal fatigued in such a way that they periodically get crushed and give button errors, which I can fix by peeling up the sticker and popping them back up. I've identified domes that I think match on Digikey, but want to practice before doing a full dome-and-sticker replacement on a pump I'm depending on)
Dana Lewis
@danamlewis
Apr 13 2018 17:18
Can you email me your shipping address? I'll see if my favorite shipper helper can do it while I'm gone :smile:
James Babcock
@jimrandomh
Apr 13 2018 17:22
Sent
Dana Lewis
@danamlewis
Apr 13 2018 17:25
:+1:
Martin Haeberli
@mhaeberli
Apr 13 2018 17:47
question:
e1.png
e2.png
e3.png
to paraphrase Steve Jobs: “you (must be) holding it wrong"
James Babcock
@jimrandomh
Apr 13 2018 17:48
What does Autotune say about your settings?
Martin Haeberli
@mhaeberli
Apr 13 2018 17:48
we thought we had all modes of SMB enabled, but (yes we did have a high 140-140 temp target) it seemed stuck not being able to bring BG values down (night time - certainly no COB by the end)
the pattern varies every night
anyway, here I set a low target 80-80, it SMBd for a while, then I reset the target.
Autotune last I checked recommended only minor basal adjustments during the 11 pm - 8 am window
but I’ll check again
i believe/‘think’ I may still be missing some kind of SMB enable
Scott Leibrand
@scottleibrand
Apr 13 2018 18:14
grep SMB ~/myopenaps/preferences.json
Martin Haeberli
@mhaeberli
Apr 13 2018 18:18
        "enableSMB_with_COB": true,
        "enableSMB_with_temptarget": true,
         "maxSMBBasalMinutes": 30,
        "allowSMB_with_high_temptarget": false,
        "enableSMB_always": true
James Babcock
@jimrandomh
Apr 13 2018 18:22
allowSMB_with_high_temptarget is false, and you had a high temp target set at the relevant time
Martin Haeberli
@mhaeberli
Apr 13 2018 18:22
d’oh! thx
mkericson
@mkericson
Apr 13 2018 18:28
happend across the Advanced Radio site where they proclaimed the last batch of edisons. --- then clicked in to find "out of stock". Assume they are all gone?
and i'm a $1 short and a day late
James Babcock
@jimrandomh
Apr 13 2018 18:37
I think that means they've run out, yes. You can probably still find one on eBay, though.
mkericson
@mkericson
Apr 13 2018 18:41

Still something going on with my rig. Reflashed and ran oref0. Watching logs and have seen this pop in again:
[ 6539.575684] CFG80211-ERROR) wl_bss_connect_done : Report connect result - connection failed
[ 6539.584016] CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_DEAUTH
.[ 6545.254235] wl_android_wifi_off in
[ 6545.260234] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f597c800 drv_status 0x0 e_type 69 e_states 4
[ 6545.271957] wifi_platform_set_power = 0
[ 6545.984911]
[ 6545.984911] Dongle Host Driver, version 1.141.59 (r)
[ 6545.984911] Compiled in /home/robin/src/edison-linux-helper/edison-bcm43340 on Jun 23 2017 at 02:24:35
[ 6545.985085] wl_android_wifi_on in
[ 6545.991059] wifi_platform_set_power = 1
[ 6546.572321] F1 signature OK, socitype:0x1 chip:0xa94c rev:0x2 pkg:0x0
[ 6546.580823] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 6546.589497] dhdsdio_download_firmware: firmware path=/lib/firmware/fw_bcmdhd.bin, nvram path=/lib/firmware/bcmdhd.cal
[ 6546.727110] sdioh_request_buffer: [1] doing memory copy buf=f5b1d000, len=2037
[ 6546.738297] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 6546.906455] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 6546.915084] wifi_platform_get_mac_addr
[ 6546.918770] wifi_get_mac_addr_intel: unable to open /config/wifi/mac.txt
[ 6546.930590] Firmware up: op_mode=0x0015, MAC=90:b6:86:0e:99:23
[ 6546.958153] Firmware version = wl0: Aug 15 2014 15:09:17 version 6.20.190.2 (r497061) FWID 01-bb9bbd07
[ 6546.968114] dhd_preinit_ioctls wl ampdu_hostreorder failed -23
[ 6547.060575] CFG80211-ERROR) wl_update_wiphybands : bw_cap failed, -23
[ 6551.614764] CFG80211-ERROR) wl_cfg80211_connect : Connectting with0e:8d:cb:66:51:aa channel (161) ssid "Elite Herring", len (13)

[ 6551.852399] wl_bss_connect_done succeeded with 0e:8d:cb:66:51:aa
[ 6551.866373] cfg80211: Calling CRDA for country: US
[ 6551.913972] cfg80211: Regulatory domain changed to country: US
[ 6551.914061] cfg80211: DFS Master region FCC
[ 6551.914112] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 6551.914204] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[ 6551.914282] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2300 mBm)
[ 6551.914359] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm)
[ 6551.914436] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2300 mBm)
[ 6551.914514] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm)
[ 6551.914592] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[ 6552.076011] wl_bss_connect_done succeeded with 0e:8d:cb:66:51:aa

Scott Leibrand
@scottleibrand
Apr 13 2018 18:41
why are you looking at that log?
what is the underlying problem?
mkericson
@mkericson
Apr 13 2018 18:42
idk. I watching the regular log. "l". then this breaks in and floods the screen. have to ctl c to get out.
Scott Leibrand
@scottleibrand
Apr 13 2018 18:42
are you doing this over USB console?
mkericson
@mkericson
Apr 13 2018 18:42
Yes
Scott Leibrand
@scottleibrand
Apr 13 2018 18:43
ok, do dmesg -D to turn off console kernel logging
and those shouldn't interrupt you again. they're probably harmless, just makes it hard to see what you're doing
mkericson
@mkericson
Apr 13 2018 18:44
OK. never turned it on. so this isn't a problem?
Scott Leibrand
@scottleibrand
Apr 13 2018 18:44
console logging is on by default
it's probably not a problem, unless you're having wifi issues
mkericson
@mkericson
Apr 13 2018 18:44
@scottleibrand TY :)
statuur
@statuur
Apr 13 2018 19:13
@aditmer Looked into your https://github.com/aditmer/cgm-remote-monitor/tree/wip/azurepush code. (I will do some more reading this evening, not too familiar with the Azure environment).
Could it be an idea to use local notifications, instead of using Push notifications. This could by accomplished by adding Express Websocket server (https://www.npmjs.com/package/express-ws) to your Express instance. The socket acts like a messaging server with short JSON messages. The client (IOS app) is able to receive messages from the Websocket. Add an event listener to your IOS app that triggers the different alarms and other notifications when receiving things from the websocket server. iOS app needs to be able to tun in background mode. Would this simplify the process?
James Babcock
@jimrandomh
Apr 13 2018 19:23
I have some work done on notifications on my oref0 fork. Right now the breakdown of responsibility between oref0 and Nightscout is weird; most notifications are handled by Nightscout, but the carbs-required notification is handled by oref0 (and can only be handled by oref0 for algorithm reasons)
Scott Leibrand
@scottleibrand
Apr 13 2018 19:24
we could have Nightscout search for the carbsReq message in the devicestatus data uploaded by oref0
James Babcock
@jimrandomh
Apr 13 2018 19:25
My thinking is actually that notifications should be migrating in the other direction--make OpenAPS able to do all the notification types, then offer a notification backend other than Pushover for use when there's no internet access
Scott Leibrand
@scottleibrand
Apr 13 2018 19:47
the main reason for wanting to centralize them is so that we don't get duplicate notifications from multiple rigs
James Babcock
@jimrandomh
Apr 13 2018 19:48
Ah yes, multi-rig setups complicate things
Dana Lewis
@danamlewis
Apr 13 2018 19:48
#ChiefComplicator
James Babcock
@jimrandomh
Apr 13 2018 19:50
Hmm. To get something that simultaneously works offline and avoids duplication with multi-rig setups, you'd need the rigs to be able to send alerts independently, but to check with a cloud service for the alert history
Scott Leibrand
@scottleibrand
Apr 13 2018 19:51
that's what we do now for carbsReq alerts
James Babcock
@jimrandomh
Apr 13 2018 19:52
Is that in github? I don't see any synchronization on the master or dev branches
Scott Leibrand
@scottleibrand
Apr 13 2018 19:53
I would skip dev and do all your development on the go-explorer-hat branch at this point
James Babcock
@jimrandomh
Apr 13 2018 19:53
Ohhh, I remember seeing that and noticing I was confused by the hardcoded server/port, but didn't actually figure out what it did
Scott Leibrand
@scottleibrand
Apr 13 2018 19:54
oops, lemme fix that
James Babcock
@jimrandomh
Apr 13 2018 19:59
Ok, assuming the dedup/synchronized-snooze thing works, is NS going to have information that drives alerts and is awkward to work with on-rig?
Scott Leibrand
@scottleibrand
Apr 13 2018 20:08
the pushover_snooze stuff will prevent a rig from sending an alert if it learns that another rig has already sent one before it tries to locally. if it can't talk to NS, or if one rig tries to send an alert before the snooze info has been uploaded to NS by the another rig and downloaded by the first one, then it'll still (try to) send a duplicate alert
currently that info is uploaded and downloaded by a job running in cron once a minute, so two rigs alerting in the same minute is not uncommon
James Babcock
@jimrandomh
Apr 13 2018 20:14
There's a Byzantine Generals issue which makes it hard to guarantee alerts are sent exactly once, if they're being sent from rigs and you include the possibility of rigs losing internet access.
Scott Leibrand
@scottleibrand
Apr 13 2018 20:14
yeah, no need for it to be perfect, especially if comms are down or slow
James Babcock
@jimrandomh
Apr 13 2018 20:14
If you assume they never lose internet access in the middle of the alert-sending procedure, you can guarantee it's exactly once
Scott Leibrand
@scottleibrand
Apr 13 2018 20:15
would be nice to get the signaling time down from minutes to single-digit seconds
James Babcock
@jimrandomh
Apr 13 2018 20:15
Which part is taking minutes?
Scott Leibrand
@scottleibrand
Apr 13 2018 20:16
that's how often oref0-ns-loop runs
James Babcock
@jimrandomh
Apr 13 2018 20:16
By that, do you mean the CGM-produces-data-->SMB-command-delivered latency?
Bulbul Ahmed
@bahmedraaz
Apr 13 2018 20:17
Hi good people, I am using openaps. in glucose data there is a field called date and the format is like "date": 1468180869000.0. openaps is interpreting this date as Thu Jun 22 2017 16:51:29. Can you please help me understand this format? I appreciate your support.
James Babcock
@jimrandomh
Apr 13 2018 20:17
That's probably number of seconds since epoch (Jan 1, 1970)
Scott Leibrand
@scottleibrand
Apr 13 2018 20:17
yeah, if rigs can upload carbsReq to NS and download snooze info faster than oref0-pump-loop can finish talking to the pump, you won't get any duplicates except in the case where two rigs are talking to the pump at the exact same time
@jimrandomh @bahmedraaz in that case it's actually milliseconds
drop the three zeros off the end and it's normal epoch seconds
Bulbul Ahmed
@bahmedraaz
Apr 13 2018 20:19
Hi james babcock, thank you very much.
Scott Leibrand
@scottleibrand
Apr 13 2018 20:19
although that number (1468180869) is actually July 10, 2016 8:01:09 PM UTC
I spend way too much of my life looking at epoch times, so I knew that one wasn't recent. :)
Bulbul Ahmed
@bahmedraaz
Apr 13 2018 20:20
Thank you so much
And also there is a key in pumphistory.json "_date": "4ff30c4a10". Is this also epoch time?
Scott Leibrand
@scottleibrand
Apr 13 2018 20:22
no, that's the medtronic internal date representation from the pump
you can ignore it
Bulbul Ahmed
@bahmedraaz
Apr 13 2018 20:23
Thank you.
James Babcock
@jimrandomh
Apr 13 2018 20:24
If carbs-required is the only alert being coordinated this way then using the timing of the pump loop to prevent a race condition might make sense. OTOH if there are alerts like change-your-cannula or maybe-you-missed-a-meal-bolus, then that's not going to work.
(In my branch I've added low-disk-space and can't-sense-battery-and-uptime-suggests-time-to-change-it alerts, neither of which require cross-rig coordination)
Scott Leibrand
@scottleibrand
Apr 13 2018 20:25
you could have those other alerts only trigger at the end of an oref0-pump-loop run...
James Babcock
@jimrandomh
Apr 13 2018 20:26
Longer-term, it's probably best not to attach stuff to the pump loop that doesn't conceptually need to be attached to it
One of my wishlist items is to get hardcore about timing everything, so that when a CGM reading arrives, if that reading means there should be an SMB, the bolus command reaches in something like seconds rather than minutes
Scott Leibrand
@scottleibrand
Apr 13 2018 20:29
you also have to guarantee that no other boluses have been given before issuing an SMB
most of the time between CGM reading arrival and SMB delivery is spent doing pump comms for safety checks
James Babcock
@jimrandomh
Apr 13 2018 20:30
Right. So the way you'd do that is to time the pump-history download so that it finishes just before the CGM reading arrives.
Scott Leibrand
@scottleibrand
Apr 13 2018 20:30
yeah, I suppose if you did a reservoir reading as well, you could just do the reservoir check after the CGM reading arrival
James Babcock
@jimrandomh
Apr 13 2018 20:31
Time it to a small margin, keep the radio channel full during the margin so that nothing can jump in in between, and then you can deliver the full SMB without having to do the split-for-safety thing.
The long-term future is squeezing all the latency out of everywhere--faster insulins, faster sensors, and faster control in between
Scott Leibrand
@scottleibrand
Apr 13 2018 20:32
I wouldn't want to hog the radio channel, and you still have to account for manual boluses
James Babcock
@jimrandomh
Apr 13 2018 20:33
Depends how predictable the history download time is
James Babcock
@jimrandomh
Apr 13 2018 22:45
My first PR! (Sort of). Adds a link to my 3D-printed case design to the docs.
(Sort-of because I've got more substantive changes on a fork that aren't a PR yet)
Dana Lewis
@danamlewis
Apr 13 2018 23:19
:+1: