Skip to content

Commit

Permalink
Merge branch 'master' into feature/AddZigbee2MqttAssistant
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem-Dekker authored Jun 14, 2020
2 parents 80821d5 + 1b6ea53 commit 3b3e76b
Show file tree
Hide file tree
Showing 22 changed files with 693 additions and 95 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
/services/
/volumes/
/backups/
/.tmp/*
docker-compose.yml
.outofdate
.outofdate

!.gitkeep
44 changes: 44 additions & 0 deletions .templates/deconz/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

#deCONZ device configuration

DOCKER_COMPOSE_PATH=./.tmp/docker-compose.tmp.yml

if [[ ! -f $DOCKER_COMPOSE_PATH ]]; then
echo "[deCONZ] Warning: $DOCKER_COMPOSE_PATH does not exist."
fi

device_selection=$(whiptail --radiolist --title "Select deCONZ gateway" --notags \
"Use the [SPACEBAR] to select your deCONZ gateway from the list below AND MAKE SURE IT IS PLUGGED IN (if not, press [ESC])." 20 78 12 \
"ConBeeII" "ConBee II " "ON" \
"ConBee" "ConBee " "OFF" \
"RaspBee" "RaspBee " "OFF" \
3>&1 1>&2 2>&3)

case $device_selection in

"ConBeeII")
if [[ ! -f ./.templates/deconz/service_conbee_II.yml ]]; then
echo "Error: ./.templates/deconz/service_conbee_II.yml does not exist."
else
cat ./.templates/deconz/service_conbee_II.yml >> $DOCKER_COMPOSE_PATH
echo "...copied ConBee II config from template"
fi
;;
"ConBee")
if [[ ! -f ./.templates/deconz/service_conbee.yml ]]; then
echo "Error: ./.templates/deconz/service_conbee.yml does not exist."
else
cat ./.templates/deconz/service_conbee.yml >> $DOCKER_COMPOSE_PATH
echo "...copied ConBee config from template"
fi
;;
"RaspBee")
if [[ ! -f ./.templates/deconz/service_raspbee.yml ]]; then
echo "Error: ./.templates/deconz/service_raspbee.yml does not exist."
else
cat ./.templates/deconz/service_raspbee.yml >> $DOCKER_COMPOSE_PATH
echo "...copied RaspBee config from template"
fi
;;
esac
1 change: 1 addition & 0 deletions .templates/deconz/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

21 changes: 21 additions & 0 deletions .templates/deconz/service_conbee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
deconz:
image: marthoc/deconz
container_name: deconz
restart: unless-stopped
ports:
- '8090:80'
- '443:443'
- '5901:5900'
volumes:
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
devices:
#ConBee:
- /dev/ttyUSB0
environment:
- DECONZ_VNC_MODE=1
- DECONZ_VNC_PASSWORD=changeme
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0
21 changes: 21 additions & 0 deletions .templates/deconz/service_conbee_II.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
deconz:
image: marthoc/deconz
container_name: deconz
restart: unless-stopped
ports:
- '8090:80'
- '443:443'
- '5901:5900'
volumes:
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
devices:
#ConBee II:
- /dev/ttyACM0
environment:
- DECONZ_VNC_MODE=1
- DECONZ_VNC_PASSWORD=changeme
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0
22 changes: 22 additions & 0 deletions .templates/deconz/service_raspbee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
deconz:
image: marthoc/deconz
container_name: deconz
restart: unless-stopped
ports:
- '8090:80'
- '443:443'
- '5901:5900'
volumes:
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
devices:
#RaspBee:
- /dev/ttyAMA0
#alternatively - /dev/ttyS0
environment:
- DECONZ_VNC_MODE=1
- DECONZ_VNC_PASSWORD=changeme
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0
9 changes: 9 additions & 0 deletions .templates/dozzle/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dozzle:
container_name: dozzle
image: amir20/dozzle:latest
restart: unless-stopped
network_mode: host
ports:
- 8888:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2 changes: 1 addition & 1 deletion .templates/grafana/service.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
grafana:
container_name: grafana
image: grafana/grafana:6.3.6
image: grafana/grafana
restart: unless-stopped
user: "0"
ports:
Expand Down
4 changes: 3 additions & 1 deletion .templates/mosquitto/mosquitto.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
#log_dest file /mosquitto/log/mosquitto.log
# To avoid flash wearing
log_dest stdout

#Uncomment to enable passwords
#password_file /mosquitto/config/pwfile
Expand Down
9 changes: 7 additions & 2 deletions .templates/nodered/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ node_selection=$(whiptail --title "Node-RED nodes" --checklist --separate-output
"Use the [SPACEBAR] to select the nodes you want preinstalled" 20 78 12 -- \
"node-red-node-pi-gpiod" " " "ON" \
"node-red-dashboard" " " "ON" \
"node-red-contrib-influxdb" " " "ON" \
"node-red-contrib-boolean-logic" " " "ON" \
"node-red-node-rbe" " " "ON" \
"node-red-configurable-ping" " " "ON" \
"node-red-node-openweathermap" " " "OFF" \
"node-red-contrib-discord" " " "OFF" \
"node-red-node-email" " " "on" \
"node-red-node-google" " " "OFF" \
"node-red-node-emoncms" " " "OFF" \
"node-red-node-geofence" " " "OFF" \
Expand All @@ -15,7 +21,6 @@ node_selection=$(whiptail --title "Node-RED nodes" --checklist --separate-output
"node-red-node-smooth" " " "OFF" \
"node-red-node-darksky" " " "OFF" \
"node-red-node-sqlite" " " "OFF" \
"node-red-contrib-influxdb" " " "ON" \
"node-red-contrib-config" " " "OFF" \
"node-red-contrib-grove" " " "OFF" \
"node-red-contrib-diode" " " "OFF" \
Expand All @@ -29,12 +34,12 @@ node_selection=$(whiptail --title "Node-RED nodes" --checklist --separate-output
"node-red-contrib-isonline" " " "OFF" \
"node-red-contrib-npm" " " "OFF" \
"node-red-contrib-file-function" " " "OFF" \
"node-red-contrib-boolean-logic" " " "OFF" \
"node-red-contrib-home-assistant-websocket" " " "OFF" \
"node-red-contrib-blynk-ws" " " "OFF" \
"node-red-contrib-owntracks" " " "OFF" \
"node-red-contrib-alexa-local" " " "OFF" \
"node-red-contrib-heater-controller" " " "OFF" \
"node-red-contrib-deconz" " " "OFF" \
3>&1 1>&2 2>&3)

##echo "$check_selection"
Expand Down
4 changes: 2 additions & 2 deletions .templates/pihole/pihole.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ WEBPASSWORD=pihole
#DNSSEC=false
#DNS_BOGUS_PRIV=True
#CONDITIONAL_FORWARDING=False
#CONDITIONAL_FORWARDING_IP=your_router_ip_here (only if CONDITIONAL_FORWARDING=ture)
#CONDITIONAL_FORWARDING_IP=your_router_ip_here (only if CONDITIONAL_FORWARDING=true)
#CONDITIONAL_FORWARDING_DOMAIN=optional
#CONDITIONAL_FORWARDING_REVERSE=optional
#ServerIP=your_Pi's_IP_here << recommended
#ServerIPv6= your_Pi's_ipv6_here << Required if using ipv6
#VIRTUAL_HOST=$ServerIP
#IPv6=True
INTERFACE=eth0
#DNSMASQ_LISTENING=local
#DNSMASQ_LISTENING=local
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions .templates/timescaledb/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
timescaledb:
container_name: timescaledb
image: timescale/timescaledb:latest-pg12
restart: unless-stopped
env_file:
- ./services/timescaledb/timescaledb.env
ports:
- 5432:5432
volumes:
- ./volumes/timescaledb/data:/var/lib/postgresql/data
3 changes: 3 additions & 0 deletions .templates/timescaledb/timescaledb.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POSTGRES_USER=postuser
POSTGRES_PASSWORD=postpassword
POSTGRES_DB=postdb
Empty file added .tmp/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# IOT Stack
IOTstack is a builder for docker-compose to easily make and maintain IoT stacks on the Raspberry Pi.


## Documentation for the project:

https://sensorsiot.github.io/IOTstack/


## Video
https://youtu.be/a6mjt8tWUws


## Installation
1. On the (RPi) lite image you will need to install git first

Expand All @@ -33,3 +36,22 @@ cd ~/IOTstack && bash ./menu.sh
```
docker-compose up -d
```

## Experimental Features
Want to have the latest and greatest features? Switch to the experimental branch:
```
git pull && git checkout experimental
./menu.sh
```

Do note that the experimental branch may be broken, or may break your setup, so ensure you have a good backup, and please report any issues.

## Migrating from the old repo?
```
cd ~/IOTstack/
git remote set-url origin https://github.com/SensorsIot/IOTstack.git
git pull origin master
docker-compose down
./menu.sh
docker-compose up -d
```
Loading

0 comments on commit 3b3e76b

Please sign in to comment.