<
From version < 7.1 >
edited by Richard Johnson
on 2020/08/06 18:02
To version < 10.1 >
edited by Richard Johnson
on 2020/08/10 16:37
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,7 +2,7 @@
2 2  
3 3  [[https:~~/~~/github.com/schmitzn/howto-nightscout-linux>>url:https://github.com/schmitzn/howto-nightscout-linux]]
4 4  
5 -except that where it mentions port 80, you **must** use port 443.  You should be using Python3. You **must** use https to connect, which means you need a certificate.  Everything else seems pretty straight-forward and I have verified that it works, pulling numbers from Dexcom share, if you configure BRIDGE_USER_NAME, BRIDGE_PASSWORD, and "bridge" under the Enable options.  Everywhere pages mention changing the "Config Vars", this maps directly to the environment variables in the "start.sh" file.
5 +except that where it mentions port 80, you **must** use port 443.  You should be using Python3. You will also probably need to install "npm" in addition to the packages he mentions. You **must** use https to connect, which means you need a certificate.  Everything else seems pretty straight-forward and I have verified that it works, pulling numbers from Dexcom share, if you configure BRIDGE_USER_NAME, BRIDGE_PASSWORD, and "bridge" under the Enable options.  Everywhere pages mention changing the "Config Vars", this maps directly to the environment variables in the "start.sh" file.
6 6  
7 7  
8 8  Now, on to trying to install my own MongoDB on a Raspberry Pi Zero W...
... ... @@ -10,3 +10,60 @@
10 10  * The reason MongoDB 2.4 is installed under Raspian, seems to be because later versions of MongoDB are 64 bit and Raspian is 32 bit.  You would need to install a 64 bit version of Linux, such as [[Ubuntu>>https://pimylifeup.com/ubuntu-server-raspberry-pi/]], onto your Raspberry Pi and then you can follow the instructions above.
11 11  ** You can't install a 64 bit Ubuntu onto a Raspberry PI Zero or Zero W, because it requires ARMv7 processor and the Zero series is based on ARMv6.
12 12  *** Probably the smallest choice would be Raspberry Pi Model 3 A+.
13 +
14 +I finally ended up using a Raspberry Pi model 3 A+.  This is an ARMv7 processor, so it can do 64 bit Linux, it has built-in Wifi, and it's still small and cheap.  I installed Ubuntu 19 from here:
15 +
16 +[[http:~~/~~/cdimage.ubuntu.com/releases/eoan/release/ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img.xz>>http://cdimage.ubuntu.com/releases/eoan/release/ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img.xz]]
17 +
18 +
19 +You'll want to configure the Wifi using "netplan" (/etc/netplan directory):
20 +
21 +(% class="box" %)
22 +(((
23 +network:
24 + ethernets:
25 + eth0:
26 + dhcp4: true
27 + optional: true
28 + version: 2
29 + wifis:
30 + wlan0:
31 + dhcp4: true
32 + access-points:
33 + "My Network Name":
34 + password: "My Network Password"
35 +)))
36 +
37 +Then install the packages mentioned on the above web page as root, but install the "Nightscout" installation ("npm install") as a non-root user.
38 +
39 +Finally, here's a sample "start.sh" file:
40 +
41 +
42 +(% class="box" %)
43 +(((
44 +#!/usr/bin/bash
45 +
46 +export SSL_KEY=MyCertKeyFile.key
47 +export SSL_CERT=MyCertFullchainFile.cer
48 +export SSL_CA=MyCertFullchainFile.cer
49 +
50 +# environment variables
51 +export DISPLAY_UNITS="mg/dl"
52 +#export MONGO_CONNECTION="mongodb:~/~/MyNightscoutUsername:MyNightscoutPassword@localhost:27017/Nightscout"
53 +export MONGO_CONNECTION="mongodb:~/~/localhost:27017/Nightscout"
54 +export BASE_URL="https:~/~/nightscout.example.com"
55 +export PORT=443
56 +export API_SECRET="My Nightscout Secret"
57 +
58 +export PUMP_FIELDS="reservoir battery status"
59 +export DEVICESTATUS_ADVANCED=true
60 +export ENABLE="careportal iob cob openaps pump bwg rawbg basal bridge"
61 +export BRIDGE_PASSWORD="My Dexcom Share password"
62 +export BRIDGE_USER_NAME="My Dexcom Share Username"
63 +
64 +export TIME_FORMAT=24
65 +
66 +# start server
67 +node ~-~-no-deprecation server.js
68 +
69 +)))

Need help?

If you need help with XWiki you can contact: