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

18th
Aug 2018
Debby Muskar
@debbymuskar
Aug 18 2018 01:47
I'm having major issues with my rig not connecting to wifi. I was trying to fix another issue and I tried to reinstall the bootstrap script but I have node-js running and the installation didn't go all the way through. It did ask me to enter my Wifi network name and password, which I did. However, once the installation failed, I notice that I am no longer connected to the wifi. Here are a few things I am seeing:
root@debbymuskar2:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 90:b6:86:05:59:60
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2394 (2.3 KiB)
root@debbymuskar2:~# cat-wifi
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="debbyryaninternet-2.4"
  psk="xxxxxxx"
wfeddern
@wfeddern
Aug 18 2018 01:51
Is the closing bracket missing or just missed in your copy?
Debby Muskar
@debbymuskar
Aug 18 2018 01:51
just in my copy - sorry
I just deleted the update_config line as well
I tried rebooting as well
wfeddern
@wfeddern
Aug 18 2018 01:53
what is /var/log/openaps/network.log saying?
Debby Muskar
@debbymuskar
Aug 18 2018 01:56
root@debbymuskar2:~# /var/log/openaps/network.log
-bash: /var/log/openaps/network.log: Permission denied
wfeddern
@wfeddern
Aug 18 2018 01:57
just try ' tail -50 /var/log/openaps/network.log '
do you have any special (non alpha numeric) characters in your psk?
Debby Muskar
@debbymuskar
Aug 18 2018 01:59
I have a # in my psk
root@debbymuskar2:~# tail -50 /var/log/openaps/network.log
At Fri Aug 17 20:56:02 CDT 2018 my Bluetooth PAN is not connected
At Fri Aug 17 20:56:02 CDT 2018 my public IP is: not found

At Fri Aug 17 20:56:02 CDT 2018 my wifi is not connected

Getting new wlan0 IP

No Internet access detected, attempting to connect BT to 64:B0:A6:A9:5F:54
UID        PID  PPID  C STIME TTY          TIME CMD
root       525     1  0 20:54 ?        00:00:00 /usr/lib/bluetooth/bluetoothd
edison:x:1002:100::/home/edison:/bin/bash

Offline hotspot not enabled in preferences.json
wlan0     IEEE 802.11abgn  Mode:Master  Tx-Power=31 dBm
Shutting down local-only hotspot
Attempting to stop hostapd
Stopping hostapd (via systemctl): hostapd.service.
Attempting to stop dnsmasq
Stopping dnsmasq (via systemctl): dnsmasq.service.
Activating client config

Offline hotspot not enabled in preferences.json
At Fri Aug 17 20:56:36 CDT 2018 my local hotspot is not running (and not enabled in preferences.json)
Cycling wlan0
Renewing IP Address for wlan0
Cycling wlan0
Finished oref0-online at Fri Aug 17 20:56:58 CDT 2018.

Starting oref0-online at Fri Aug 17 20:57:02 CDT 2018.
At Fri Aug 17 20:57:02 CDT 2018 my Bluetooth PAN is not connected
At Fri Aug 17 20:57:02 CDT 2018 my public IP is: UID        PID  PPID  C STIME TTY          TIME CMD
root       525     1  0 20:54 ?        00:00:00 /usr/lib/bluetooth/bluetoothd
edison:x:1002:100::/home/edison:/bin/bash
not found
The password is correct - it worked for the initial set-up when I ran the bootstrap script
at least we know the offline looping with Lookout is working!
and I just toggled my BT hotspot on and it connected
so the issue is definitely with my wifi
Debby Muskar
@debbymuskar
Aug 18 2018 02:05
root@debbymuskar2:~# ifconfig
bnep0     Link encap:Ethernet  HWaddr 98:4f:ee:06:41:93
          inet addr:172.20.10.2  Bcast:172.20.10.15  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:94722 (92.5 KiB)  TX bytes:39044 (38.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:436 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:704084 (687.5 KiB)  TX bytes:704084 (687.5 KiB)

usb0      Link encap:Ethernet  HWaddr 02:00:86:b6:fb:be
          inet addr:10.11.12.13  Bcast:10.11.12.255  Mask:255.255.255.0
          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
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
what is usb0?
why don't I see wlan?
Debby Muskar
@debbymuskar
Aug 18 2018 02:12
Here is another issue - I tried running the bootstrap script again and this is what I get:
Scanning for wifi networks:
ifup: interface wlan0 already configured
Selected interface 'wlan0'
FAIL

Strongest networks found:
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
Debby Muskar
@debbymuskar
Aug 18 2018 02:18
@wfeddern - any advice? I'm supposed to leave for vacation tomorrow morning at 5:45am and I'm pretty clueless about what happened...Thanks
wfeddern
@wfeddern
Aug 18 2018 02:21
not sure, I am running a raspberrry pi myself so don't know too much on the edison side
could be when bnep0/bluetooth is activated the wlan0 is deactivatead
maybe try creating hotspot on your phone and see if it will connect to that?
will at least eliminate your home router as the issue.
Debby Muskar
@debbymuskar
Aug 18 2018 02:24
hotspot works
@cluckj - can you help me figure out why my rig can't connect to my wifi?
Martin Haeberli
@mhaeberli
Aug 18 2018 02:25
@debbymuskar - one thing to check VERY carefully is the configuration of wpa_supplicant.conf (if its syntax has even a minor error, that can cause a problem)
Debby Muskar
@debbymuskar
Aug 18 2018 02:27
@mhaeberli - thanks - could this problem during reboot be the issue?

[FAILED] Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
See 'systemctl status dnsmasq.service' for details.
[DEPEND] Dependency failed for Host and Network Name Lookups.
[  OK  ] Started Login Service.
[  OK  ] Reached target Bluetooth.
         Starting Hostname Service...
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
         Starting Load/Save RF Kill Switch Status of rfkill4...
         Starting Load/Save RF Kill Switch Status of rfkill5...
         Starting Load/Save RF Kill Switch Status of rfkill3...
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill4.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill5.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill3.
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
         Starting Bluetooth service...
I see that the dependency failed for host and network name lookups
that would be the problem, I think
Martin Haeberli
@mhaeberli
Aug 18 2018 02:31
I have seen the failed to start Hostname Service but have had my system work despite it … so I don’t know
Debby Muskar
@debbymuskar
Aug 18 2018 02:37
Does this make any sense to you?
/
WARNING: this script will back up and remove all of your current wifi configs.
Press Ctrl-C to cancel, or press Enter to continue:

NOTE: Spaces in your network name or password are ok. Do not add quotes.
Enter your network name: debbyryaninternet-2.4
Enter your network password: XXXXXX

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto usb0
iface usb0 inet static
  address 10.11.12.13
  netmask 255.255.255.0

auto wlan0
iface wlan0 inet dhcp
  wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="debbyryaninternet-2.4"
  psk="XXXXXXXX"
}

Attempting to bring up wlan0:

Removed stale PID file
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/90:b6:86:05:59:60
Sending on   LPF/wlan0/90:b6:86:05:59:60
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 10.0.0.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
dhclient.c:2331: Failed to send 300 byte long packet over fallback interface.
root@debbymuskar2:~#
Debby Muskar
@debbymuskar
Aug 18 2018 02:57
root@debbymuskar2:~# systemctl status systemd-hostnamed.service
● systemd-hostnamed.service - Hostname Service
   Loaded: loaded (/lib/systemd/system/systemd-hostnamed.service; static)
   Active: failed (Result: exit-code) since Fri 2018-08-17 21:55:40 CDT; 47s ago
     Docs: man:systemd-hostnamed.service(8)
           man:hostname(5)
           man:machine-info(5)
           http://www.freedesktop.org/wiki/Software/systemd/hostnamed
  Process: 483 ExecStart=/lib/systemd/systemd-hostnamed (code=exited, status=226/NAMESPACE)
 Main PID: 483 (code=exited, status=226/NAMESPACE)

Aug 17 21:55:39 debbymuskar2 systemd[483]: Failed at step NAMESPACE spawning...y
Aug 17 21:55:40 debbymuskar2 systemd[1]: systemd-hostnamed.service: main pro...E
Aug 17 21:55:40 debbymuskar2 systemd[1]: Failed to start Hostname Service.
Aug 17 21:55:40 debbymuskar2 systemd[1]: Unit systemd-hostnamed.service ente....
Hint: Some lines were ellipsized, use -l to show in full.
Debby Muskar
@debbymuskar
Aug 18 2018 03:13
I ended up re-running oref-0 setup and wifi is working again
Xabeth
@Xabeth
Aug 18 2018 04:13
Hi -- I've been working on setting up my rig, Pi0w/HAT -- and now that it's up, I'm working on IFTTT commands. The OpenAPS docs say to pull the API key using "nightscout hash-api-secret <your_API_secret>" -- but when I used that key I got a 401 error. When I pulled the API key from the webpage via the console it works without issue. Why aren't those API keys the same, and should I be concerned that they aren't?
Scott Leibrand
@scottleibrand
Aug 18 2018 05:56
Did you get the syntax right? Maybe you included extra <>’s? If you have a working API secret from NS, you can just use that.
Sacha M
@coolestkidsever
Aug 18 2018 06:41
Hi all, I think I've got Pi hat set up.. managed to get thru all the aspects with not so many errors this time.. but watching loop, I'm getting errors (and it's not working) , I'm getting Not Valid Json errors.. but I've searched and unsure what the issue is.. can anyone help please?
Aug 18 18:27:50 Pi4e ns-loop.log:  Latest NS temptargets: (NOT VALID JSON: empty)
Aug 18 18:27:50 Pi4e ns-loop.log:  Merging local temptargets: (NOT VALID JSON: empty)
Aug 18 18:27:50 Pi4e ns-loop.log:  Temptargets merged: (NOT VALID JSON: empty)
I get this also
Could not parse suggested.json:  { Error: ENOENT: no such file or directory, open '/root/myopenaps/enact/suggested.json'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (/root/src/openaps-menu/scripts/status.js:88:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/root/myopenaps/enact/suggested.json' }
and this
Profile less than 60m old; Profile valid. Couldn't invoke_pumphistory_etc - continuing
Retry 1 of refresh_pumphistory_and_meal
Full history refresh failed.
Couldn't invoke_pumphistory_etc - continuing
Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Continuing oref0-pump-loop at Sat 18 Aug 18:32:06 NZST 2018
Retry 2 of refresh_pumphistory_and_meal
Couldn't invoke_pumphistory_etc - continuing
I’d love any advice I can get in this please, it’s a bit beyond me
Ebgineer
@Ebgineer
Aug 18 2018 11:46
@coolestkidsever you can check the log for the result from mmtune. Be sure it doesn't return -99, which would mean the rig radio isn't able to talk to the pump.
Wiper70
@Wiper70
Aug 18 2018 12:36
Hi, I just started my rig again (Intel Edison MDT/522), but I don't get any BG data in NS. Looplog shows the following message: "tail: cannot open ‘/var/log/openaps/cgm-loop.log’ for reading: No such file or directory". Is this fixable or should I runagain (again....)?
Martin Haeberli
@mhaeberli
Aug 18 2018 13:45
What does ‘error’ mean in NightScout pump pill and how to resolve? Battery is good-maybe too good? Reads 1.57v
Dana Lewis
@danamlewis
Aug 18 2018 15:32
@Wiper70 run openaps first-upload
Scott Leibrand
@scottleibrand
Aug 18 2018 15:51
@mhaeberli that is a good normal reading for a new battery. Mouse over the pill to see what it’s complaining about?
Martin Haeberli
@mhaeberli
Aug 18 2018 18:08
no detail but now no error ...
looping, happy
Dana Lewis
@danamlewis
Aug 18 2018 20:31
@Xabeth (this channel, thanks!)
Xabeth
@Xabeth
Aug 18 2018 20:48
Hi everyone! I'm brand new to OpenAPS and I'm having a few questions. Technically the whole set up seems to be working for me (522/Pi0/Explorer Hat), but I don't really understand what the day to day should look like. As I understand it, OpenAPS will update/change basals as needed to keep BS in range
Does that mean I should be bolusing for what I eat?
If I'm bolusing for what I eat, what purpose does entering the carbs in IFTTT serve?
How can I check and see what changes are actually being made to my basal, or rather, how do I verify that those changes are being made?
(I can see the changes in NightScout, but is this best way to view that on the go through the web browser?)
Sacha M
@coolestkidsever
Aug 18 2018 21:03
@Ebgineer thanks but def not there.. maybe I’m not picking the right errors to show .. but seems like openaps didn’t install correctly somehow, even though the steps all got me to the right places.. looking at log, it’s sort of trying to loop but not getting all the info.. I tried to run a simple openaps first upload command and it fails.. “not an openaps command”
Trying to compare things to Edison rig but unsure if differences some from diff platforms.. am stuck really and reinstalling just gets me back to the same place..
Ebgineer
@Ebgineer
Aug 18 2018 21:50
@Xabeth Hi, and welcome! Yes, NightScout is one of the best ways to visualize OpenAPS activity. IFTTT is one of several different ways to enter carbs. The rig needs this info to calculate how much insulin you need vs. how much you have taken. It then adjusts basals up or down to get closer. In NightScout you should see your glucose trend, dots representing the carbs you entered and manual boluses, and a line showing the adjusted basals.
Dana Lewis
@danamlewis
Aug 18 2018 22:12

@Xabeth if you don't want to look in NS, you can also look on your rig's logs. Many of us also like Pebble watches for the glanceabity to see what's been happening.

Yes, you should still bolus for meals. Ifttt just gives you another option for carb entry if you don't want to enter them via the bolus wizard