Skip to content

Commit

Permalink
Merge branch 'master' of github.com:marciogranzotto/addon-nightscout
Browse files Browse the repository at this point in the history
  • Loading branch information
marciogranzotto committed Aug 8, 2020
2 parents 786025a + 402ef71 commit 2de5ac5
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Run NightScout inside a Home Assistant Add-on
- Run Nightscout inside a Home Assistant Add-on
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Home Assistant Add-On for NightScout
# Home Assistant Add-On for Nightscout

[![GitHub Release][releases-shield]][releases]
![Project Stage][project-stage-shield]
Expand All @@ -22,7 +22,7 @@
Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.

This add-on is a wrapper around [nightscout/cgm-remote-monitor][cgm-remote-monitor].
Please refere to their documentation for issues releated to NightScout and not this add-on.
Please refere to their documentation for issues releated to Nightscout and not this add-on.

It includes a Mongo Database which is used to store the uploaded values.

Expand All @@ -34,11 +34,11 @@ The installation of this add-on is pretty straightforward and not different in
comparison to installing any other Home Assistant add-on.

1. [Add our Hass.io add-ons repository][repository] to your Hass.io instance.
1. Install the "NightScout" add-on.
1. Install the "Nightscout" add-on.
1. Change the configuration files with the required values.
1. Start the "NightScout" add-on
1. Check the logs of the "NightScout" add-on to see if everything went well.
1. Click "OPEN WEB UI" to open the NightScout website.
1. Start the "Nightscout" add-on
1. Check the logs of the "Nightscout" add-on to see if everything went well.
1. Click "OPEN WEB UI" to open the Nightscout website.
1. Log in with your `api_key`.

**NOTE**: Starting the add-on might take a couple of minutes (especially the
Expand Down Expand Up @@ -67,7 +67,7 @@ plugins:
### Option: `ssl`

Enables/Disables SSL (HTTPS) on the web interface of NightScout. Set it `true`
Enables/Disables SSL (HTTPS) on the web interface of Nightscout. Set it `true`
to enable it, `false` otherwise.

### Option: `certfile`
Expand All @@ -84,7 +84,7 @@ The private key file to use for SSL.

### Option: `api_key`

The api key that will be used to login and upload data to NightScout.
The api key that will be used to login and upload data to Nightscout.

**Note**: _It has to be at least 12 characters long_

Expand All @@ -96,8 +96,8 @@ The default list should be pretty much what you need.

## Embedding into Home Assistant

It is possible to embed NightScout directly into Home Assistant, allowing you to
access your NightScout through the Home Assistant frontend.
It is possible to embed Nightscout directly into Home Assistant, allowing you to
access your Nightscout through the Home Assistant frontend.

Home Assistant provides the `panel_iframe` integration, for these purposes.

Expand All @@ -106,7 +106,7 @@ Example configuration:
```yaml
panel_iframe:
nightscout:
title: NightScout
title: Nightscout
icon: mdi:water-alert
url: https://[email protected]:5423
```
Expand Down
4 changes: 2 additions & 2 deletions nightscout/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ ARG BUILD_VERSION

# Labels
LABEL \
io.hass.name="NightScout" \
io.hass.name="Nightscout" \
io.hass.description="Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime." \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Marcio Granzotto <[email protected]>" \
org.opencontainers.image.title="NightScout" \
org.opencontainers.image.title="Nightscout" \
org.opencontainers.image.description="Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime." \
org.opencontainers.image.vendor="Marcio Granzotto" \
org.opencontainers.image.authors="Marcio Granzotto <[email protected]>" \
Expand Down
4 changes: 2 additions & 2 deletions nightscout/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "NightScout",
"name": "Nightscout",
"version": "1.0.0",
"slug": "nightscout",
"description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.",
Expand All @@ -16,7 +16,7 @@
"5423/tcp": 5423
},
"ports_description": {
"5423/tcp": "NightScout frontend"
"5423/tcp": "Nightscout frontend"
},
"map": ["ssl", "config:rw"],
"options": {
Expand Down
4 changes: 2 additions & 2 deletions nightscout/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Add-on: NightScout
# Configures NGINX for use with NightScout
# Home Assistant Add-on: Nightscout
# Configures NGINX for use with Nightscout
# ==============================================================================
declare certfile
declare keyfile
Expand Down
4 changes: 2 additions & 2 deletions nightscout/rootfs/etc/cont-init.d/nightscout.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Add-on: NightScout
# Configures NightScout
# Home Assistant Add-on: Nightscout
# Configures Nightscout
# ==============================================================================

readonly api_key=$(bashio::config 'api_key')
Expand Down
2 changes: 1 addition & 1 deletion nightscout/rootfs/etc/services.d/nginx/finish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Home Assistant Add-on: NightScout
# Home Assistant Add-on: Nightscout
# Take down the S6 supervision tree when Nginx fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
Expand Down
6 changes: 3 additions & 3 deletions nightscout/rootfs/etc/services.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Add-on: NightScout
# Home Assistant Add-on: Nightscout
# Runs the Nginx daemon
# ==============================================================================

# Wait for NightScout to become available
bashio::log.info "Nginx waiting for NightScout..."
# Wait for Nightscout to become available
bashio::log.info "Nginx waiting for Nightscout..."
bashio::net.wait_for 1337

bashio::log.info "Starting NGINX..."
Expand Down
2 changes: 1 addition & 1 deletion nightscout/rootfs/etc/services.d/nightscout/finish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Home Assistant Add-on: NightScout
# Home Assistant Add-on: Nightscout
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
Expand Down
8 changes: 4 additions & 4 deletions nightscout/rootfs/etc/services.d/nightscout/run
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/with-contenv bashio
# shellcheck disable=SC2191
# ==============================================================================
# Home Assistant Add-on: NightScout
# Runs NightScout
# Home Assistant Add-on: Nightscout
# Runs Nightscout
# ==============================================================================
declare -a options

# Wait for MongoDB to become available
service mongodb start
bashio::net.wait_for 27017

bashio::log.info 'Starting the NightScout server...'
bashio::log.info 'Starting the Nightscout server...'

# Config server variables
readonly api_key=$(bashio::config 'api_key')
Expand All @@ -35,5 +35,5 @@ export ENABLE="${joined}"
# Change current working directory
cd /opt/app || bashio::exit.nok 'Failed changing working directory'

# Run NightScout server
# Run Nightscout server
exec node server.js

0 comments on commit 2de5ac5

Please sign in to comment.