Skip to content

Commit 171283a

Browse files
Merge pull request #3 from Willem-Dekker/mkdocks
Mkdocks
2 parents 55542d4 + 96454c9 commit 171283a

34 files changed

+141
-109
lines changed

docs/Accessing-your-Device-from-the-internet.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
# accessing your device from the internet
12
The challenge most of us face with remotely accessing your home network is that you don't have a static IP. From time to time the IP that your ISP assigns to you changes and it's difficult to keep up. Fortunately, there is a solution, a DynamicDNS. The section below shows you how to set up an easy to remember address that follows your public IP no matter when it changes.
23

34
Secondly, how do you get into your home network? Your router has a firewall that is designed to keep the rest of the internet out of your network to protect you. Here we install a VPN and configure the firewall to only allow very secure VPN traffic in.
45

5-
# DuckDNS
6+
## DuckDNS
67
If you want to have a dynamic DNS point to your Public IP I added a helper script.
78
Register with duckdns.org and create a subdomain name. Then edit the `nano ~/IOTstack/duck/duck.sh` file and add your
89

@@ -20,7 +21,7 @@ paste the following in the editor `*/5 * * * * sudo ~/IOTstack/duck/duck.sh >/de
2021

2122
Your Public IP should be updated every five minutes
2223

23-
# PiVPN
24+
## PiVPN
2425
pimylifeup.com has an excellent tutorial on how to install [PiVPN](https://pimylifeup.com/raspberry-pi-vpn-server/)
2526

2627
In point 17 and 18 they mention using noip for their dynamic DNS. Here you can use the DuckDNS address if you created one.
@@ -31,7 +32,7 @@ Once you activate your VPN (from your phone/laptop/work computer) you will effec
3132

3233
I personally use the VPN any time I'm on public wifi, all your traffic is secure.
3334

34-
# Zerotier
35+
## Zerotier
3536
https://www.zerotier.com/
3637

3738
Zerotier is an alternative to PiVPN that doesn't require port forwarding on your router. It does however require registering for their free tier service [here](https://my.zerotier.com/login).

docs/Adminer.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# References
1+
# Adminer
2+
## References
23
- [Docker](https://hub.docker.com/_/adminer)
34
- [Website](https://www.adminer.org/)
45

5-
# About
6+
## About
67

78
This is a nice tool for managing databases. Web interface has moved to port 9080. There was an issue where openHAB and Adminer were using the same ports. If you have an port conflict edit the docker-compose.yml and under the adminer service change the line to read:
89
```

docs/Backups.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
# Backups
12
Because containers can easily be rebuilt from docker hub we only have to back up the data in the "volumes" directory.
23

3-
# Cloud Backups
4-
## Dropbox-Uploader
4+
## Cloud Backups
5+
### Dropbox-Uploader
56
This a great utility to easily upload data from your Pi to the cloud. https://magpi.raspberrypi.org/articles/dropbox-raspberry-pi. It can be installed from the Menu under Backups.
6-
## rclone (Google Drive)
7+
### rclone (Google Drive)
78
This is a service to upload to Google Drive. The config is described [here]( https://medium.com/@artur.klauser/mounting-google-drive-on-raspberry-pi-f5002c7095c2). Install it from the menu then follow the link for these sections:
89
* Getting a Google Drive Client ID
910
* Setting up the Rclone Configuration
@@ -15,10 +16,10 @@ When naming the service in `rclone config` ensure to call it "gdrive"
1516
If you want your Google Drive to mount on every boot then follow the instructions at the bottom of the wiki page
1617

1718

18-
# Influxdb
19+
## Influxdb
1920
`~/IOTstack/scripts/backup_influxdb.sh` does a database snapshot and stores it in ~/IOTstack/backups/influxdb/db . This can be restored with the help a script (that I still need to write)
2021

21-
# Docker backups
22+
## Docker backups
2223
The script `~/IOTstack/scripts/docker_backup.sh` performs the master backup for the stack.
2324

2425
This script can be placed in a cron job to backup on a schedule.
@@ -27,20 +28,20 @@ Then add `0 23 * * * ~/IOTstack/scripts/docker_backup.sh >/dev/null 2>&1` to hav
2728

2829
This script cheats by copying the volume folder live. The correct way would be to stop the stack first then copy the volumes and restart. The cheating method shouldn't be a problem unless you have fast changing data like in influxdb. This is why the script makes a database export of influxdb and ignores its volume.
2930

30-
## Cloud integration
31+
### Cloud integration
3132
The docker_backup.sh script now no longer requires modification to enable cloud backups. It now tests for the presence of and enable file in the backups folder
32-
### Drobox-Uploader
33+
#### Drobox-Uploader
3334
The backup tests for a file called `~/IOTstack/backups/dropbox`, if it is present it will upload to dropbox. To disable dropbox upload delete the file. To enable run `sudo touch ~/IOTstack/backups/dropbox`
34-
### rclone
35+
#### rclone
3536
The backup tests for a file called `~/IOTstack/backups/rclone`, if it is present it will upload to google drive. To disable rclone upload delete the file. To enable run `sudo touch ~/IOTstack/backups/rclone`
3637

37-
### Pruning online backups
38+
#### Pruning online backups
3839
@877dev has added functionality to prune both local and cloud backups. For dropbox make sure you dont have any files that contain spaces in your backup directory as the script cannot handle it at this time.
3940

40-
## Restoring a backup
41+
### Restoring a backup
4142
The "volumes" directory contains all the persistent data necessary to recreate the container. The docker-compose.yml and the environment files are optional as they can be regenerated with the menu. Simply copy the volumes directory into the IOTstack directory, Rebuild the stack and start.
4243

43-
# Added your Dropbox token incorrectly or aborted the install at the token screen
44+
## Added your Dropbox token incorrectly or aborted the install at the token screen
4445

4546
Make sure you are running the latest version of the project [link](https://github.com/gcgarner/IOTstack/wiki/Updating-the-Project).
4647

@@ -70,7 +71,7 @@ Ensure you **are not** running as sudo as this will store your api in the /root
7071

7172
If you ran the command with sudo the remove the old token file if it exists with either `sudo rm /root/.dropbox_uploader` or `sudo ~/Dropbox-Uploader/dropbox_uploader.sh unlink`
7273

73-
# Auto-mount Gdrive with rclone
74+
## Auto-mount Gdrive with rclone
7475

7576
To enable rclone to mount on boot you will need to make a user service. Run the following commands
7677

docs/Blynk_server.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Blynk server
12
This is a custom implementation of Blynk Server
23

34
```yml
@@ -21,30 +22,30 @@ When setting up the application on your mobile be sure to select custom setup [h
2122

2223
Writeup From @877dev
2324

24-
**Getting started:**
25+
## Getting started
2526
Log into admin panel at https://youripaddress:9443/admin
2627
(Use your Pi's IP address, and ignore Chrome warning).
2728

2829
Default credentials:
2930
3031
pass:admin
3132

32-
**Change username and password:**
33+
## Change username and password
3334
Click on Users > "email address" and edit email, name and password.
3435
Save changes
3536
Restarting the container using Portainer may be required to take effect.
3637

37-
**Setup gmail:**
38+
## Setup gmail
3839
Optional step, useful for getting the auth token emailed to you.
3940
(To be added once confirmed working....)
4041

41-
**iOS/Android app setup:**
42+
## iOS/Android app setup
4243
Login the app as per the photos [HERE](https://github.com/blynkkk/blynk-server#app-and-sketch-changes)
4344
Press "New Project"
4445
Give it a name, choose device "Raspberry Pi 3 B" so you have plenty of [virtual pins](http://help.blynk.cc/en/articles/512061-what-is-virtual-pins) available, and lastly select WiFi.
4546
Create project and the [auth token](https://docs.blynk.cc/#getting-started-getting-started-with-the-blynk-app-4-auth-token) will be emailed to you (if emails configured). You can also find the token in app under the phone app settings, or in the admin web interface by clicking Users>"email address" and scroll down to token.
4647

47-
**Quick usage guide for app:**
48+
## Quick usage guide for app
4849
Press on the empty page, the widgets will appear from the right.
4950
Select your widget, let's say a button.
5051
It appears on the page, press on it to configure.
@@ -55,7 +56,7 @@ To start the project running, press top right Play button.
5556
You will get an offline message, because no devices are connected to your project via the token.
5657
Enter node red.....
5758

58-
**Node red:**
59+
## Node red
5960
Install node-red-contrib-blynk-ws from pallette manager
6061
Drag a "write event" node into your flow, and connect to a debug node
6162
Configure the Blynk node for the first time:
@@ -64,7 +65,7 @@ Enter your [auth token](https://docs.blynk.cc/#getting-started-getting-started-w
6465
When you deploy the flow, notice the app shows connected message, as does the Blynk node.
6566
Press the button on the app, you will notice the payload is sent to the debug node.
6667

67-
**What next?**
68+
## What next?
6869
Further information and advanced setup:
6970
https://github.com/blynkkk/blynk-server
7071

docs/Custom.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Custom container
12
If you have a container that you want to stop and start with the stack you can now use the custom container option. This you can use for testing or in prep for a Pull Request.
23

34
You will need to create a directory for your container call `IOTstack/services/<container>`

docs/Docker-commands.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Aliases
1+
# Docker commands
2+
## Aliases
23

34
I've added bash aliases for stopping and starting the stack. They can be installed in the docker commands menu. These commands no longer need to be executed from the IOTstack directory and can be executed in any directory
45

docs/EspruinoHub.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Espruinohub
12
This is a testing container
23

34
I tried it however the container keeps restarting `docker logs espruinohub` I get "BLE Broken?" but could just be i dont have any BLE devices nearby

docs/Getting-Started.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Download the project
1+
# Getting started
2+
## Download the project
23

34
On the lite image you will need to install git first
45
```
@@ -14,28 +15,28 @@ To enter the directory run:
1415
```
1516
cd ~/IOTstack
1617
```
17-
# The Menu
18+
## The Menu
1819
I've added a menu to make things easier. It is good however to familiarise yourself with how things are installed.
1920
The menu can be used to install docker and then build the docker-compose.yml file necessary for starting the stack and it runs a few common commands. I do recommend you start to learn the docker and docker-compose commands if you plan using docker in the long run. I've added several helper scripts, have a look inside.
2021

2122
Navigate to the project folder and run `./menu.sh`
2223

23-
## Installing from the menu
24+
### Installing from the menu
2425
Select the first option and follow the prompts
2526

26-
## Build the docker-compose file
27+
### Build the docker-compose file
2728
docker-compose uses the `docker-compose.yml` file to configure all the services. Run through the menu to select the options you want to install.
2829

29-
## Docker commands
30+
### Docker commands
3031
This menu executes shell scripts in the root of the project. It is not necessary to run them from the menu. Open up the shell script files to see what is inside and what they do
3132

32-
## Miscellaneous commands
33+
### Miscellaneous commands
3334
Some helpful commands have been added like disabling swap
3435

35-
# Running Docker commands
36+
## Running Docker commands
3637
From this point on make sure you are executing the commands from inside the project folder. Docker-compose commands need to be run from the folder where the docker-compose.yml is located. If you want to move the folder make sure you move the whole project folder.
3738

38-
## Starting and Stopping containers
39+
### Starting and Stopping containers
3940
to start the stack navigate to the project folder containing the docker-compose.yml file
4041

4142
To start the stack run:
@@ -49,13 +50,13 @@ To remove the stack:
4950

5051
The first time you run 'start' the stack docker will download all the images for the web. Depending on how many containers you selected and your internet speed this can take a long while.
5152

52-
## Persistent data
53+
### Persistent data
5354
Docker allows you to map folders inside your containers to folders on the disk. This is done with the "volume" key. There are two types of volumes. Any modification to the container reflects in the volume.
5455

55-
### Sharing files between the Pi and containers
56+
#### Sharing files between the Pi and containers
5657
Have a look a the wiki on how to share files between Node-RED and the Pi. [Wiki](https://github.com/gcgarner/IOTstack/wiki/Node-RED#sharing-files-between-node-red-and-the-host)
5758

58-
## Updating the images
59+
### Updating the images
5960
If a new version of a container image is available on docker hub it can be updated by a pull command.
6061

6162
Use the `docker-compose stop` command to stop the stack
@@ -68,14 +69,14 @@ Start the new stack based on the updated images
6869

6970
`docker-compose up -d`
7071

71-
## Node-RED error after modifications to setup files
72+
### Node-RED error after modifications to setup files
7273
The Node-RED image differs from the rest of the images in this project. It uses the "build" key. It uses a dockerfile for the setup to inject the nodes for pre-installation. If you get an error for Node-RED run `docker-compose build` then `docker-compose up -d`
7374

74-
## Deleting containers, volumes and images
75+
### Deleting containers, volumes and images
7576

7677
`./prune-images.sh` will remove all images not associated with a container. If you run it while the stack is up it will ignore any in-use images. If you run this while you stack is down it will delete all images and you will have to redownload all images from scratch. This command can be helpful to reclaim disk space after updating your images, just make sure to run it while your stack is running as not to delete the images in use. (your data will still be safe in your volume mapping)
7778

78-
## Deleting folder volumes
79+
### Deleting folder volumes
7980
If you want to delete the influxdb data folder run the following command `sudo rm -r volumes/influxdb/`. Only the data folder is deleted leaving the env file intact. review the docker-compose.yml file to see where the file volumes are stored.
8081

8182
You can use git to delete all files and folders to return your folder to the freshly cloned state, AS IN YOU WILL LOSE ALL YOUR DATA.

docs/Grafana.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# References
1+
# Grafana
2+
## References
23
- [Docker](https://hub.docker.com/r/grafana/grafana)
34
- [Website](https://grafana.com/)
45

5-
# Security
6+
## Security
67
Grafana's default credentials are username "admin" password "admin" it will ask you to choose a new password on boot. Go to `<yourIP>:3000` in your web browser.
78

8-
# Overwriting grafana.ini settings
9+
## Overwriting grafana.ini settings
910

1011
A list of the settings available in grafana.ini are listed [here](https://grafana.com/docs/installation/configuration/)
1112

docs/Home-Assistant.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
# References
1+
# Home assistant
2+
## References
23
- [Docker](https://hub.docker.com/r/homeassistant/home-assistant/)
34
- [Webpage](https://www.home-assistant.io/)
45

56
Hass.io is a home automation platform running on Python 3. It is able to track and control all devices at home and offer a platform for automating control. Port binding is `8123`.
67
Hass.io is exposed to your hosts' network in order to discover devices on your LAN. That means that it does not sit inside docker's network.
78

8-
# Menu installation
9+
## Menu installation
910
Hass.io now has a seperate installation in the menu. The old version was incorrect and should be removed. Be sure to update you project and install the correct version.
1011

1112
You will be asked to select you device type during the installation. Hass.io is no longer dependant on the IOTstack, it has its own service for maintaining its uptime.
1213

13-
# Installation
14+
## Installation
1415
The installation of Hass.io takes up to 20 minutes (depending on your internet connection). Refrain from restarting your Pi until it had come online and you are able to create a user account
1516

16-
# Removal
17+
## Removal
1718

1819
To remove Hass.io you first need to stop the service that controls it. Run the following in the terminal:
1920

0 commit comments

Comments
 (0)