Initial commit
This commit is contained in:
commit
e0ee091a7b
33 files changed
+788
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# Uncomment and change the following variables if you want to use them.
|
||||
|
||||
#RESTART=unless-stopped
|
||||
#SYNOLOGY_VOLUME=volume1
|
||||
#STACK_NAME=domotica
|
||||
#UID=1024
|
||||
#GID=101
|
||||
#TZ=Europe/Amsterdam
|
||||
|
||||
#HOMEASSISTANT_CONTAINER_NAME=HomeAssistant
|
||||
#HOMEASSISTANT_TAG=latest
|
||||
|
||||
#ZIGBEE2MQTT_CONTAINER_NAME=Zigbee2mqtt
|
||||
#ZIGBEE2MQTT_TAG=latest
|
||||
|
||||
#NODERED_CONTAINER_NAME=NodeRed
|
||||
#NODERED_TAG=latest
|
||||
|
||||
#ECLIPSEMOSQUITTO_CONTAINER_NAME=EclipseMosquitto
|
||||
#ECLIPSEMOSQUITTO_TAG=latest
|
||||
|
||||
#INFLUXDB_CONTAINER_NAME=InfluxDB
|
||||
#INFLUXDB_TAG=latest
|
||||
|
||||
#TELEGRAF_CONTAINER_NAME=Telegraf
|
||||
#TELEGRAF_TAG=latest
|
||||
#TELEGRAF_CONF_INFLUXDBV2_URL=http://localhost:8086
|
||||
TELEGRAF_CONF_INFLUXDBV2_TOKEN=
|
||||
TELEGRAF_CONF_INFLUXDBV2_ORGANIZATION=
|
||||
TELEGRAF_CONF_INFLUXDBV2_BUCKET=
|
||||
|
||||
#GRAFANA_CONTAINER_NAME=Grafana
|
||||
#GRAFANA_TAG=latest
|
||||
#GRAFANA_SECURITY_ALLOW_EMBEDDING=true
|
||||
|
||||
#ESPHOME_CONTAINER_NAME=ESPHome
|
||||
#ESPHOME_TAG=latest
|
||||
@@ -0,0 +1,30 @@
|
||||
[agent]
|
||||
interval = "10s"
|
||||
round_interval = true
|
||||
metric_batch_size = 1000
|
||||
metric_buffer_limit = 10000
|
||||
collection_jitter = "0s"
|
||||
flush_interval = "10s"
|
||||
flush_jitter = "0s"
|
||||
precision = ""
|
||||
hostname = ""
|
||||
omit_hostname = false
|
||||
[[outputs.influxdb_v2]]
|
||||
urls = ["$TELEGRAF_CONF_INFLUXDBV2_URL"]
|
||||
token = "$TELEGRAF_CONF_INFLUXDBV2_TOKEN"
|
||||
organization = "$TELEGRAF_CONF_INFLUXDBV2_ORGANIZATION"
|
||||
bucket = "$TELEGRAF_CONF_INFLUXDBV2_BUCKET"
|
||||
[[inputs.cpu]]
|
||||
percpu = true
|
||||
totalcpu = true
|
||||
collect_cpu_time = false
|
||||
report_active = false
|
||||
[[inputs.disk]]
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
[[inputs.diskio]]
|
||||
[[inputs.mem]]
|
||||
[[inputs.net]]
|
||||
[[inputs.processes]]
|
||||
[[inputs.swap]]
|
||||
[[inputs.system]]
|
||||
[[inputs.temp]]
|
||||
@@ -0,0 +1,101 @@
|
||||
services:
|
||||
# Home Assistant
|
||||
homeassistant:
|
||||
container_name: ${HOMEASSISTANT_CONTAINER_NAME:-HomeAssistant}
|
||||
image: homeassistant/home-assistant:${HOMEASSISTANT_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:8123/ || exit 1
|
||||
environment:
|
||||
TZ: ${TZ:-Europe/Amsterdam}
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${HOMEASSISTANT_CONTAINER_NAME:-HomeAssistant}/config:/config
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${HOMEASSISTANT_CONTAINER_NAME:-HomeAssistant}/media:/media
|
||||
|
||||
# Zigbee2mqtt
|
||||
zigbee2mqtt:
|
||||
container_name: ${ZIGBEE2MQTT_CONTAINER_NAME:-Zigbee2mqtt}
|
||||
image: koenkk/zigbee2mqtt:${ZIGBEE2MQTT_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
environment:
|
||||
TZ: ${TZ:-Europe/Amsterdam}
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${ZIGBEE2MQTT_CONTAINER_NAME:-Zigbee2mqtt}/app/data:/app/data
|
||||
|
||||
# Node-RED
|
||||
nodered:
|
||||
container_name: ${NODERED_CONTAINER_NAME:-NodeRed}
|
||||
image: nodered/node-red:${NODERED_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
environment:
|
||||
TZ: ${TZ:-Europe/Amsterdam}
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${NODERED_CONTAINER_NAME:-NodeRed}/data:/data
|
||||
|
||||
# Eclipse Mosquitto
|
||||
eclipsemosquitto:
|
||||
container_name: ${ECLIPSEMOSQUITTO_CONTAINER_NAME:-EclipseMosquitto}
|
||||
image: eclipse-mosquitto:${ECLIPSEMOSQUITTO_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${ECLIPSEMOSQUITTO_CONTAINER_NAME:-EclipseMosquitto}/mosquitto/config:/mosquitto/config
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${ECLIPSEMOSQUITTO_CONTAINER_NAME:-EclipseMosquitto}/mosquitto/data:/mosquitto/data
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${ECLIPSEMOSQUITTO_CONTAINER_NAME:-EclipseMosquitto}/mosquitto/log:/mosquitto/log
|
||||
|
||||
# InfluxDB
|
||||
influxdb:
|
||||
container_name: ${INFLUXDB_CONTAINER_NAME:-InfluxDB}
|
||||
image: influxdb:${INFLUXDB_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${INFLUXDB_CONTAINER_NAME:-InfluxDB}/var/lib/influxdb2:/var/lib/influxdb2
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${INFLUXDB_CONTAINER_NAME:-InfluxDB}/etc/influxdb2:/etc/influxdb2
|
||||
|
||||
# Telegraf
|
||||
telegraf:
|
||||
container_name: ${TELEGRAF_CONTAINER_NAME:-Telegraf}
|
||||
image: telegraf:${TELEGRAF_TAG:-latest}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
environment:
|
||||
TELEGRAF_CONF_INFLUXDBV2_URL: ${TELEGRAF_CONF_INFLUXDBV2_URL:-http://localhost:8086}
|
||||
TELEGRAF_CONF_INFLUXDBV2_TOKEN: $TELEGRAF_CONF_INFLUXDBV2_TOKEN
|
||||
TELEGRAF_CONF_INFLUXDBV2_ORGANIZATION: $TELEGRAF_CONF_INFLUXDBV2_ORGANIZATION
|
||||
TELEGRAF_CONF_INFLUXDBV2_BUCKET: $TELEGRAF_CONF_INFLUXDBV2_BUCKET
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${PROJECT_NAME:-domotica}/${TELEGRAF_CONTAINER_NAME:-Telegraf}/etc/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||
|
||||
# Grafana
|
||||
grafana:
|
||||
container_name: ${GRAFANA_CONTAINER_NAME:-Grafana}
|
||||
image: grafana/grafana:${GRAFANA_TAG:-latest}
|
||||
user: ${UID:-1024}:${GID:-101}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:3000/ || exit 1
|
||||
environment:
|
||||
GF_SECURITY_ALLOW_EMBEDDING: ${GRAFANA_SECURITY_ALLOW_EMBEDDING:-true}
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${GRAFANA_CONTAINER_NAME:-Grafana}/var/lib/grafana:/var/lib/grafana
|
||||
|
||||
# ESPHome
|
||||
esphome:
|
||||
container_name: ${ESPHOME_CONTAINER_NAME:-ESPHome}
|
||||
image: esphome/esphome:${ESPHOME_TAG:-latest}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:6052/ || exit 1
|
||||
volumes:
|
||||
- /${SYNOLOGY_VOLUME:-volume1}/docker/${STACK_NAME:-domotica}/${ESPHOME_CONTAINER_NAME:-ESPHome}/config:/config
|
||||
@@ -0,0 +1,157 @@
|
||||
# domotica
|
||||
|
||||
This project/stack consists of multiple software which combined create my domotica project/stack.
|
||||
|
||||
## Installation using Synology Container Manager
|
||||
|
||||
### Untested, but should work with
|
||||
|
||||
* Synology DS1019+ running DSM DSM 7.2-64570 Update 1;
|
||||
* Container Manager from Synology Package Center version 20.10.23-1413;
|
||||
* Home Assistant 2023.9;
|
||||
* Zigbee2mqtt 1.33.0;
|
||||
* Node-RED 3.1.0-16;
|
||||
* Eclipse Mosquitto 2.0.17;
|
||||
* InfluxDB 2.7.1
|
||||
* Telegraf 1.27.4;
|
||||
* Grafana 10.1.1;
|
||||
* ESPHome 2023.8.
|
||||
|
||||
### Installation steps
|
||||
|
||||
* Within your docker folder (/volume1/docker) create a folder named: domotica
|
||||
* Move the following files to that newly created folder
|
||||
* compose.yml
|
||||
* .env.sample
|
||||
* Rename .env.sample to .env
|
||||
* Change the environment variables in the file .env as you see fit (don't forget to remove the # in front of the row you want to use)
|
||||
* Create the folowing folders under /volume1/docker/domotica
|
||||
* HomeAssistant/config
|
||||
* HomeAssistant/media
|
||||
* Zigbee2mqtt/app/data
|
||||
* NodeRed/data
|
||||
* EclipseMosquitto/mosquitto/config
|
||||
* EclipseMosquitto/mosquitto/data
|
||||
* EclipseMosquitto/mosquitto/log
|
||||
* InfluxDB/var/lib/influxdb2
|
||||
* Grafana/var/lib/grafana
|
||||
* ESPHome/config
|
||||
* Copy the following file from the repository
|
||||
* Telegraf/etc/telegraf/telegraf.conf, copy to: Telegraf/etc/telegraf
|
||||
* Open Container Manager via Synology DiskStation Manager (DSM)
|
||||
* Go to Project (in the left pane)
|
||||
* Click Create
|
||||
* Name your project domotica
|
||||
* Select the path you created in step 1
|
||||
* Choose to use the existing docker-compose.yml file
|
||||
* Click Next
|
||||
* Click Next on the Web portal settings page
|
||||
* Click Done and wait for Container Manager to finish (Exit Code: 0)
|
||||
|
||||
## Installation using Portainer
|
||||
|
||||
### Tested with
|
||||
|
||||
* Synology DS1019+ running DSM DSM 7.2-64570 Update 1;
|
||||
* Container Manager from Synology Package Center version 20.10.23-1413;
|
||||
* Portainer.io Community Edition version 2.19.0;
|
||||
* Home Assistant 2023.9;
|
||||
* Zigbee2mqtt 1.33.0;
|
||||
* Node-RED 3.1.0-16;
|
||||
* Eclipse Mosquitto 2.0.17;
|
||||
* InfluxDB 2.7.1
|
||||
* Telegraf 1.27.4;
|
||||
* Grafana 10.1.1;
|
||||
* ESPHome 2023.8.
|
||||
|
||||
### Installation steps
|
||||
|
||||
* Within your docker folder (/volume1/docker) create a folder named: domotica
|
||||
* Create the folowing folders under /volume1/docker/domotica
|
||||
* HomeAssistant/config
|
||||
* HomeAssistant/media
|
||||
* Zigbee2mqtt/app/data
|
||||
* NodeRed/data
|
||||
* EclipseMosquitto/mosquitto/config
|
||||
* EclipseMosquitto/mosquitto/data
|
||||
* EclipseMosquitto/mosquitto/log
|
||||
* InfluxDB/var/lib/influxdb2
|
||||
* Grafana/var/lib/grafana
|
||||
* ESPHome/config
|
||||
* Copy the following file from the repository
|
||||
* Telegraf/etc/telegraf/telegraf.conf, copy to: Telegraf/etc/telegraf
|
||||
* Open Portainer with the correct environment.
|
||||
* Under Stacks click the button + Add stack.
|
||||
* Give your stack a name (i.e.: domotica).
|
||||
* Paste the contents of compose.yml under Web editor.
|
||||
* Paste the contents of .env.sample under Environment variables.
|
||||
* Click Advanced mode to be able to paste.
|
||||
* Change the environment variables as you see fit. (don't forget to remove the # in front of the row you want to use)
|
||||
* Click Deploy the stack and wait for Portainer to finish.
|
||||
|
||||
## Environment variables
|
||||
|
||||
The following variables could be set an environment varaiables using the .env file.
|
||||
|
||||
| Value | Default | Information |
|
||||
|-|-|-|
|
||||
| RESTART | unless-stopped | Choose a restart policy. |
|
||||
| SYNOLOGY_VOLUME | volume1 | Volume you docker folder is on. |
|
||||
| STACK_NAME | domotica | The name of your project/stack and also the base folder within your docker folder. |
|
||||
| UID | 1024 | The User ID you want to use for ownership of the files. 1024 is the default Synology admin user. |
|
||||
| GID | 101 | The Groud ID you want to use for ownership of the files. 101 is the default Synology admin group. |
|
||||
| TZ | Europe/Amsterdam | |
|
||||
| HOMEASSISTANT_CONTAINER_NAME | HomeAssistant | This is used for the name of the container |
|
||||
| HOMEASSISTANT_TAG | latest | Choose a version tag. |
|
||||
| ZIGBEE2MQTT_CONTAINER_NAME | Zigbee2mqtt | This is used for the name of the container |
|
||||
| ZIGBEE2MQTT_TAG | latest | Choose a version tag. |
|
||||
| NODERED_CONTAINER_NAME | NodeRed | This is used for the name of the container |
|
||||
| NODERED_TAG | latest | Choose a version tag. |
|
||||
| ECLIPSEMOSQUITTO_CONTAINER_NAME | EclipseMosquitto | This is used for the name of the container |
|
||||
| ECLIPSEMOSQUITTO_TAG | latest | Choose a version tag. |
|
||||
| INFLUXDB_CONTAINER_NAME | InfluxDB | This is used for the name of the container |
|
||||
| INFLUXDB_TAG | latest | Choose a version tag. |
|
||||
| TELEGRAF_CONTAINER_NAME | Telegraf | This is used for the name of the container |
|
||||
| TELEGRAF_TAG | latest | Choose a version tag. |
|
||||
| TELEGRAF_CONF_INFLUXDBV2_URL | http://localhost:8086 | The location of InfluxDB. |
|
||||
| TELEGRAF_CONF_INFLUXDBV2_TOKEN | | The Token created in InfluxDB for your Telegraf information. |
|
||||
| TELEGRAF_CONF_INFLUXDBV2_ORGANIZATION | | The organization created in InfluxDB for your Telegraf information. |
|
||||
| TELEGRAF_CONF_INFLUXDBV2_BUCKET | | The bucket created in InfluxDB for your Telegraf information. |
|
||||
| GRAFANA_CONTAINER_NAME | Grafana | This is used for the name of the container |
|
||||
| GRAFANA_TAG | latest | Choose a version tag. |
|
||||
| GRAFANA_SECURITY_ALLOW_EMBEDDING | true | Needed if you want to acces Grafana from an iframe in Home Assiatnt. [More info](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#allow_embedding). |
|
||||
| ESPHOME_CONTAINER_NAME | ESPHome | This is used for the name of the container |
|
||||
| ESPHOME_TAG | latest | Choose a version tag. |
|
||||
|
||||
## Links
|
||||
|
||||
* Home Assistant
|
||||
* [Website](https://www.home-assistant.io/)
|
||||
* [Docker Hub](https://hub.docker.com/r/homeassistant/home-assistant)
|
||||
* [GitHub](https://github.com/home-assistant/core)
|
||||
* Zigbee2mqtt
|
||||
* [Website](https://www.zigbee2mqtt.io/)
|
||||
* [Docker Hub](https://hub.docker.com/r/koenkk/zigbee2mqtt)
|
||||
* [GitHub](https://github.com/Koenkk/zigbee2mqtt)
|
||||
* Node-RED
|
||||
* [Website](https://nodered.org/)
|
||||
* [Docker Hub](https://hub.docker.com/r/nodered/node-red)
|
||||
* [GitHub](https://github.com//node-red/node-red-docker)
|
||||
* Eclipse Mosquitto
|
||||
* [Website](https://mosquitto.org/)
|
||||
* [Docker Hub](https://hub.docker.com/_/eclipse-mosquitto)
|
||||
* [GitHub](https://github.com/eclipse/mosquitto)
|
||||
* InfluxDB
|
||||
* [Docker Hub](https://hub.docker.com/_/influxdb)
|
||||
* [GitHub](https://github.com/influxdata/influxdata-docker/tree/master/influxdb)
|
||||
* Telegraf
|
||||
* [Docker Hub](https://hub.docker.com/_/telegraf)
|
||||
* [GitHub](https://github.com/influxdata/influxdata-docker/tree/master/telegraf)
|
||||
* Grafana
|
||||
* [Website](https://grafana.com/)
|
||||
* [Docker Hub](https://hub.docker.com/r/grafana/grafana)
|
||||
* [GitHub](https://github.com/grafana/grafana)
|
||||
* ESPHome
|
||||
* [Website](https://esphome.io/)
|
||||
* [Docker Hub](https://hub.docker.com/r/esphome/esphome)
|
||||
* [GitHub](https://github.com/esphome/esphome)
|
||||
Reference in new issue
Block a user