You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Accessing-your-Device-from-the-internet.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
+
# accessing your device from the internet
1
2
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.
2
3
3
4
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.
4
5
5
-
# DuckDNS
6
+
##DuckDNS
6
7
If you want to have a dynamic DNS point to your Public IP I added a helper script.
7
8
Register with duckdns.org and create a subdomain name. Then edit the `nano ~/IOTstack/duck/duck.sh` file and add your
8
9
@@ -20,7 +21,7 @@ paste the following in the editor `*/5 * * * * sudo ~/IOTstack/duck/duck.sh >/de
20
21
21
22
Your Public IP should be updated every five minutes
22
23
23
-
# PiVPN
24
+
##PiVPN
24
25
pimylifeup.com has an excellent tutorial on how to install [PiVPN](https://pimylifeup.com/raspberry-pi-vpn-server/)
25
26
26
27
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
31
32
32
33
I personally use the VPN any time I'm on public wifi, all your traffic is secure.
33
34
34
-
# Zerotier
35
+
##Zerotier
35
36
https://www.zerotier.com/
36
37
37
38
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).
Copy file name to clipboardExpand all lines: docs/Adminer.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
-
# References
1
+
# Adminer
2
+
## References
2
3
-[Docker](https://hub.docker.com/_/adminer)
3
4
-[Website](https://www.adminer.org/)
4
5
5
-
# About
6
+
##About
6
7
7
8
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:
Copy file name to clipboardExpand all lines: docs/Backups.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
+
# Backups
1
2
Because containers can easily be rebuilt from docker hub we only have to back up the data in the "volumes" directory.
2
3
3
-
# Cloud Backups
4
-
## Dropbox-Uploader
4
+
##Cloud Backups
5
+
###Dropbox-Uploader
5
6
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)
7
8
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:
8
9
* Getting a Google Drive Client ID
9
10
* Setting up the Rclone Configuration
@@ -15,10 +16,10 @@ When naming the service in `rclone config` ensure to call it "gdrive"
15
16
If you want your Google Drive to mount on every boot then follow the instructions at the bottom of the wiki page
16
17
17
18
18
-
# Influxdb
19
+
##Influxdb
19
20
`~/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)
20
21
21
-
# Docker backups
22
+
##Docker backups
22
23
The script `~/IOTstack/scripts/docker_backup.sh` performs the master backup for the stack.
23
24
24
25
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
27
28
28
29
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.
29
30
30
-
## Cloud integration
31
+
###Cloud integration
31
32
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
33
34
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
35
36
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`
36
37
37
-
### Pruning online backups
38
+
####Pruning online backups
38
39
@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.
39
40
40
-
## Restoring a backup
41
+
###Restoring a backup
41
42
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.
42
43
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
44
45
45
46
Make sure you are running the latest version of the project [link](https://github.com/gcgarner/IOTstack/wiki/Updating-the-Project).
46
47
@@ -70,7 +71,7 @@ Ensure you **are not** running as sudo as this will store your api in the /root
70
71
71
72
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`
72
73
73
-
# Auto-mount Gdrive with rclone
74
+
##Auto-mount Gdrive with rclone
74
75
75
76
To enable rclone to mount on boot you will need to make a user service. Run the following commands
Click on Users > "email address" and edit email, name and password.
34
35
Save changes
35
36
Restarting the container using Portainer may be required to take effect.
36
37
37
-
**Setup gmail:**
38
+
## Setup gmail
38
39
Optional step, useful for getting the auth token emailed to you.
39
40
(To be added once confirmed working....)
40
41
41
-
**iOS/Android app setup:**
42
+
## iOS/Android app setup
42
43
Login the app as per the photos [HERE](https://github.com/blynkkk/blynk-server#app-and-sketch-changes)
43
44
Press "New Project"
44
45
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.
45
46
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.
46
47
47
-
**Quick usage guide for app:**
48
+
## Quick usage guide for app
48
49
Press on the empty page, the widgets will appear from the right.
49
50
Select your widget, let's say a button.
50
51
It appears on the page, press on it to configure.
@@ -55,7 +56,7 @@ To start the project running, press top right Play button.
55
56
You will get an offline message, because no devices are connected to your project via the token.
56
57
Enter node red.....
57
58
58
-
**Node red:**
59
+
## Node red
59
60
Install node-red-contrib-blynk-ws from pallette manager
60
61
Drag a "write event" node into your flow, and connect to a debug node
61
62
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
64
65
When you deploy the flow, notice the app shows connected message, as does the Blynk node.
65
66
Press the button on the app, you will notice the payload is sent to the debug node.
Copy file name to clipboardExpand all lines: docs/Custom.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
# Custom container
1
2
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.
2
3
3
4
You will need to create a directory for your container call `IOTstack/services/<container>`
Copy file name to clipboardExpand all lines: docs/Docker-commands.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
# Aliases
1
+
# Docker commands
2
+
## Aliases
2
3
3
4
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
Copy file name to clipboardExpand all lines: docs/Getting-Started.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
# Download the project
1
+
# Getting started
2
+
## Download the project
2
3
3
4
On the lite image you will need to install git first
4
5
```
@@ -14,28 +15,28 @@ To enter the directory run:
14
15
```
15
16
cd ~/IOTstack
16
17
```
17
-
# The Menu
18
+
##The Menu
18
19
I've added a menu to make things easier. It is good however to familiarise yourself with how things are installed.
19
20
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.
20
21
21
22
Navigate to the project folder and run `./menu.sh`
22
23
23
-
## Installing from the menu
24
+
###Installing from the menu
24
25
Select the first option and follow the prompts
25
26
26
-
## Build the docker-compose file
27
+
###Build the docker-compose file
27
28
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.
28
29
29
-
## Docker commands
30
+
###Docker commands
30
31
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
31
32
32
-
## Miscellaneous commands
33
+
###Miscellaneous commands
33
34
Some helpful commands have been added like disabling swap
34
35
35
-
# Running Docker commands
36
+
##Running Docker commands
36
37
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.
37
38
38
-
## Starting and Stopping containers
39
+
###Starting and Stopping containers
39
40
to start the stack navigate to the project folder containing the docker-compose.yml file
40
41
41
42
To start the stack run:
@@ -49,13 +50,13 @@ To remove the stack:
49
50
50
51
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.
51
52
52
-
## Persistent data
53
+
###Persistent data
53
54
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.
54
55
55
-
### Sharing files between the Pi and containers
56
+
####Sharing files between the Pi and containers
56
57
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)
57
58
58
-
## Updating the images
59
+
###Updating the images
59
60
If a new version of a container image is available on docker hub it can be updated by a pull command.
60
61
61
62
Use the `docker-compose stop` command to stop the stack
@@ -68,14 +69,14 @@ Start the new stack based on the updated images
68
69
69
70
`docker-compose up -d`
70
71
71
-
## Node-RED error after modifications to setup files
72
+
###Node-RED error after modifications to setup files
72
73
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`
73
74
74
-
## Deleting containers, volumes and images
75
+
###Deleting containers, volumes and images
75
76
76
77
`./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)
77
78
78
-
## Deleting folder volumes
79
+
###Deleting folder volumes
79
80
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.
80
81
81
82
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.
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.
7
8
8
-
# Overwriting grafana.ini settings
9
+
##Overwriting grafana.ini settings
9
10
10
11
A list of the settings available in grafana.ini are listed [here](https://grafana.com/docs/installation/configuration/)
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`.
6
7
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.
7
8
8
-
# Menu installation
9
+
##Menu installation
9
10
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.
10
11
11
12
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.
12
13
13
-
# Installation
14
+
##Installation
14
15
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
15
16
16
-
# Removal
17
+
##Removal
17
18
18
19
To remove Hass.io you first need to stop the service that controls it. Run the following in the terminal:
0 commit comments