Skip to content

Commit 8dfd983

Browse files
committed
Merge branch 'doc-improvements'
2 parents c1e406b + 6e63ba8 commit 8dfd983

File tree

4 files changed

+107
-19
lines changed

4 files changed

+107
-19
lines changed

docs/Containers/Grafana.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ The default *~/IOTstack/services/grafana/grafana.env* contains this line:
1515

1616
Uncomment that line and change the right hand side to [your own timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
1717

18+
## Adding InfluxDB datasource
19+
20+
Select Data Sources -> Add data source -> InfluxDB.
21+
22+
Set options:
23+
* HTTP / URL: `http://influxdb:8086`
24+
* InfluxDB Details / Database: `telegraf`
25+
* InfluxDB Details / User: `nodered`
26+
* InfluxDB Details / Password: `nodered`
1827

1928
## Security
2029

docs/Containers/Pi-hole.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,63 @@
11
# Pi-hole
2-
Pi-hole is a fantastic utility to reduce ads
2+
Pi-hole is a fantastic utility to reduce ads.
33

4-
The interface can be found on `"your_ip":8089/admin`
4+
The interface can be found on `http://"your_ip":8089/admin`
55

6-
Default password is `pihole`. This can be changed in the `~/IOTstack/services/pihole/pihole.env` file
6+
Default password is `IOtSt4ckP1Hol3`. This can be changed with:
7+
```
8+
docker exec pihole pihole -a -p myNewPassword
9+
```
710

8-
To enable your router to use the pihole container edit your DNS settings on your router to point to your Pi's IP address
11+
## DNS server for ESPhome devices
12+
13+
If you want to avoid hardcoding your Raspberry Pi ip on your ESPhome devices, you need
14+
a DNS server that will do the resolving. This can be done using the Pi-hole container.
15+
16+
Assuming your pihole hostname is `raspberrypi` and has the IP `192.168.1.10`:
17+
18+
1. Go to the Pi-hole web interface: `http://raspberrypi.local:8089/admin` and Login
19+
2. From Left menu: Select Local DNS -> DNS Records
20+
3. Enter Domain: `raspberrypi.home.arpa` and IP Address: `192.168.1.10`. Press Add.
21+
4. Go to your DHCP server, usually your Wireless Access Point / WLAN Router web interface:
22+
5. Find where DNS servers are defined
23+
6. Change all DNS fields to `192.168.1.10`.
24+
7. All local machines have to be rebooted or have their DHCP leases released. Without this they will continue to use the old DNS setting from an old DHCP lease for quite some time.
25+
26+
Now you can use `raspberrypi.home.arpa` as the domain name for the Raspberry Pi in your whole local network.
27+
28+
For the Raspberry Pi itself to also use the Pi-hole DNS server, run:
29+
```bash
30+
echo "name_servers=127.0.0.1" | sudo tee -a /etc/resolvconf.conf
31+
echo "name_servers_append=8.8.8.8" | sudo tee -a /etc/resolvconf.conf
32+
echo "resolv_conf_local_only=NO" | sudo tee -a /etc/resolvconf.conf
33+
sudo resolvconf -u # Ignore "Too few arguments."-complaint
34+
```
35+
Quick explanation: resolv_conf_local_only is disabled and a public nameserver is added, so that in case the Pi-hole container is stopped, the whole Raspberry won't completely lose DNS functionality.
36+
37+
### Testing & Troubleshooting
38+
39+
Install dig:
40+
```
41+
apt install dnsutils
42+
```
43+
44+
Test that pi-hole is correctly configured (should respond 192.168.1.10):
45+
```
46+
dig raspberrypi.home.arpa @192.168.1.10
47+
```
48+
49+
To test on your desktop if your network configuration is correct, and an ESP will resolve its DNS queries correctly, restart your desktop machine to ensure DNS changes are updated and then use:
50+
```
51+
dig raspberrypi.home.arpa
52+
```
53+
This should produce the same result as the previous command.
54+
55+
If this fails to resolve the IP, check that the server in the response is `192.168.1.10`.
56+
If it's `127.0.0.xx` check `/etc/resolv.conf` begins with `nameserver 192.168.1.10`.
57+
58+
## Why .home.arpa?
59+
60+
Instead of `.home.arpa` - which is the real standard, but a mouthful - you may use `.internal`.
61+
Using `.local` would technically also work, but it should be reserved only for mDNS use.
62+
63+
Note: There is a special case for `.local` addresses. If you do a `ping raspberrypi.local` on your desktop linux or the RPI, it will first try using mDNS/bonjour to resolve the IP address raspberrypi.local. If this fails it will ask the DNS server. Esphome devices can't use mDNS to resolve an IP address, so you need a proper DNS server to respond to queries made by an ESP. As such, `dig raspberrypi.local` will fail, simulating ESPhome device behavior. This is as intended.

docs/Home.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
The README is moving to the Wiki, It's easier to add content and example to the Wiki vs the README.md
44

5-
* [Getting Started](https://sensorsiot.github.io/IOTstack/Containers/Getting-Started)
6-
* [Updating the project](https://sensorsiot.github.io/IOTstack/Containers/Updating-the-Project)
7-
* [How the script works](https://sensorsiot.github.io/IOTstack/Containers/How-the-script-works)
8-
* [Understanding Containers](https://sensorsiot.github.io/IOTstack/Containers/Understanding-Containers)
5+
* [Getting Started](https://sensorsiot.github.io/IOTstack/Getting-Started)
6+
* [Updating the project](https://sensorsiot.github.io/IOTstack/Updating-the-Project)
7+
* [How the script works](https://sensorsiot.github.io/IOTstack/How-the-script-works)
8+
* [Understanding Containers](https://sensorsiot.github.io/IOTstack/Understanding-Containers)
99

1010
***
1111

1212
# Docker
1313

14-
* [Commands](https://sensorsiot.github.io/IOTstack/Containers/Docker-commands)
15-
* [Docker Networks](https://sensorsiot.github.io/IOTstack/Containers/Networking)
14+
* [Commands](https://sensorsiot.github.io/IOTstack/Docker-commands)
15+
* [Docker Networks](https://sensorsiot.github.io/IOTstack/Networking)
1616

1717
***
1818

@@ -48,28 +48,28 @@ The README is moving to the Wiki, It's easier to add content and example to the
4848

4949
# Native installs
5050

51-
* [RTL_433](https://sensorsiot.github.io/IOTstack/Containers/Native-RTL_433)
52-
* [RPIEasy](https://sensorsiot.github.io/IOTstack/Containers/RPIEasy_native)
51+
* [RTL_433](https://sensorsiot.github.io/IOTstack/Native-RTL_433)
52+
* [RPIEasy](https://sensorsiot.github.io/IOTstack/RPIEasy_native)
5353

5454
***
5555

5656
# Backups
5757

58-
* [Docker backups](https://sensorsiot.github.io/IOTstack/Containers/Backups)
58+
* [Docker backups](https://sensorsiot.github.io/IOTstack/Backup-and-Restore)
5959
* Recovery (coming soon)
6060
***
6161

6262
# Remote Access
6363

64-
* [VPN and Dynamic DNS](https://sensorsiot.github.io/IOTstack/Containers/Accessing-your-Device-from-the-internet)
64+
* [VPN and Dynamic DNS](https://sensorsiot.github.io/IOTstack/Accessing-your-Device-from-the-internet)
6565
* [x2go](https://sensorsiot.github.io/IOTstack/Containers/x2go)
6666

6767
***
6868

6969
# Miscellaneous
7070

71-
* [log2ram](https://sensorsiot.github.io/IOTstack/Containers/Misc)
72-
* [Dropbox-Uploader](https://sensorsiot.github.io/IOTstack/Containers/Misc)
71+
* [log2ram](https://sensorsiot.github.io/IOTstack/Misc)
72+
* [Dropbox-Uploader](https://sensorsiot.github.io/IOTstack/Misc)
7373

7474
***
7575

docs/Updating-the-Project.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
# Updating the project
2-
**If you ran the git checkout -- 'git ls-files -m' as suggested in the old wiki entry then please check your duck.sh because it removed your domain and token**
3-
42

53
Periodically updates are made to project which include new or modified container template, changes to backups or additional features. As these are released your local copy of this project will become out of date. This section deals with how to bring your project to the latest published state.
64

5+
Quick instructions:
6+
7+
1. backup your current settings: `cp docker-compose.yml docker-compose.yml.bak`
8+
2. check `git status` for any local changes you may have made to project files. Save and preserve your changes by doing a commit: `git commit -a -m "local customization"`. Or revert them using: `git checkout -- path/to/changed_file`.
9+
3. update project files from github: `git pull origin master -r`
10+
4. get latest images from the web: `docker-compose pull`
11+
5. rebuild localy created images from new Dockerfiles: `docker-compose build --pull --no-cache`
12+
6. update running containers to latest: `docker-compose up --build -d`
13+
14+
*Troubleshooting:* if a container fails to restart after update
15+
* try restarting the whole stack: `docker-compose restart`
16+
* backup your stack settings: `cp docker-compose.yml docker-compose.yml.bak`
17+
* Check log output of the failing service: `docker-compose logs *service-name*`
18+
* try googling and fixing problems in docker-compose.yml manually.
19+
* try recreating the failing service definition using menu.sh:
20+
* `./menu.sh`, select Build Stack, unselect the failing service, press enter
21+
to build, and then exit.
22+
* `./menu.sh`, select Build Stack, select the service back again, press enter
23+
to build, and then exit.
24+
* Try starting now: `docker-compose up -d`
25+
* Go to the IOTStack Discord and ask for help.
26+
27+
## Details, partly outdated
28+
29+
**If you ran the git checkout -- 'git ls-files -m' as suggested in the old wiki entry then please check your duck.sh because it removed your domain and token**
30+
731
Git offers build in functionality to fetch the latest changes.
832

933
`git pull origin master` will fetch the latest changes from GitHub without overwriting files that you have modified yourself. If you have done a local commit then your project may to handle a merge conflict.
@@ -18,4 +42,4 @@ With the new latest version of the project you can now use the menu to build you
1842

1943
![image](https://user-images.githubusercontent.com/46672225/68646024-8fee2f80-0522-11ea-8b6e-f1d439a5be7f.png)
2044

21-
After your stack had been rebuild you can run `docker-compose up -d` to pull in the latest changes. If you have not update your images in a while consider running the `./scripts/update.sh` to get the latest version of the image from Docker hub as well
45+
After your stack had been rebuild you can run `docker-compose up -d` to pull in the latest changes. If you have not update your images in a while consider running the `./scripts/update.sh` to get the latest version of the image from Docker hub as well

0 commit comments

Comments
 (0)