Giter Club home page Giter Club logo

deploy-ns-local-raspi's Introduction

Tested with:

  • Raspberry Pi 3 (rpi3): Everything works nicely now
  • Raspberry Pi 1 Model B (rpi1): Working with Raspian Jessie Lite with PIXEL (Release date: 2016-09-23)
  • Raspberry Pi Zero (rpi0): Working with Raspian Jessie Lite (Release date: 2016-09-23)

Brief:

Use this script to setup a complete local running nightscout instance with a local mongoDB instance

Prerequisites

  1. Make sure your Raspberry kernel is up to date $ sudo apt-get install rpi-update && sudo rpi-update and reboot.

  2. Configure your Rasberry Pi $ sudo raspi-config

1. Expand Filesystem   ==> Make use of the whole SD-CARD
2. Change User Password     	
3. Bootoptions ==> Choose what you want
4. Wait for Network at Boot ==> Set to No
5.  Internationalisation Options => Change Locale, Timezone, Keyboard Layout, Wi-Fi country to your needs
A2. Hostname ==> Set your hostname. This will be used for the URL of your Nightscout 
A4. SSH ==> Enable SSH for remote access

Usage:

  1. open console on your raspi eg ssh [email protected] default-password raspberry and run ns-local-install script: curl -s https://raw.githubusercontent.com/SandraK82/deploy-ns-local-raspi/master/ns-local-install.sh | bash - relax and drink some โ˜• - script runtime over 1.5 hour on clean and fresh raspi.

  2. after running the script you will have a running nightscout local installation. Now open editor with your config for nightscout. nano /home/pi/cgm-remote-monitor/start-nightscout.sh You need to configure at least the lines at the top of the file: CUSTOM_TITLE=mysitename_without_spaces `API_SECRET=my_12_characters_or_more_password``

    Put your personal password (at least 12 characters long) and the name of your site (just for display) there!

  3. once finished, restart nightscout with: sudo /etc/init.d/nightscout stop && sudo /etc/init.d/nightscout start

  4. navigate to http://192.168.10.4:1337/ complete nightscout profile settings

  5. Have fun ๐Ÿ˜ƒ

Troubleshooting:

  • nodejs manual start: pi@raspberrypi:~/cgm-remote-monitor $ start-nightscout.sh (must be in cgm-remote-monitor directory)
  • nodejs / nightscout log: check cat /var/log/openaps/nightscout.log
  • mongodb check cat /var/log/mongodb/mongodb.log should contain: [initandlisten] waiting for connections on port 27017

Changelog:

I forked the current dev-branch of nightscout/cgm-remote-monitor and changed the mongodb compatibility problems. Now it runs smoothly with mongodb 2.x on a raspi! Maybe the pull request gets accepted soon. As soon as Iยดm notified, I will change the script again to use the current dev-branch again. The patches for mongo2.x compatibility are now merged back into the official dev branch.

2016-10-14:

  • change to nightscout 0.9.0 stable Grilled Cheese)
  • add start_nightscout.sh instead of my.env

With help from:

Whishlist/To Do:

  • seperate username/password for Mongo
  • Nginx to use for https / letsencrypt certificate
  • Script to create wifi hotspot on the raspberry pi
  • Always install latest Node (now 6.8.0 instead of 6.7.0 what is being installed)
  • ...

deploy-ns-local-raspi's People

Contributors

mjyrala avatar desserthunter avatar pietergit avatar sandrak82 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.