This system is intended to collect, distribute and persist data from all suitable systems in a household.
The docker-compose file sets up these components
- prometheus (time series database)
- grafana (visualization)
- mosquitto (MQTT message broker, suitable for IoT purposes)
- mqtt_exporter (bridge to provide MQTT data to prometheus)
Prometheus is set up in the simlplest possible way you will likely want to modify the setup.
The config file is prometheus.yml. At least you need to adapt the scrape targets to your needs.
Simplistic setup too.
Basic setup, no authentication etc. Adapt mosquitto/mosquitto.conf to your needs.
I have added some examples for configuration I use.
You need to add your own configuration for your MQTT topics to mqtt_exporter
- Prepare a volume for data storage. See also Docker documentation for volumes.
-
I used for example
docker volume create --driver local \ --opt type=ext4 \ --opt device=/dev/sdd2 \ home-data
-
Set up directory structure with (untested!!!)
docker run -v home-data:/home-data -v <home-data-project-root>/setup-dirs.sh:/setup-dirs.sh debian:stretch-slim bash /setup-dirs.sh
-
Setup systemd unit (optional)
sudo cp systemd/home-data-system.service /etc/systemd/system/ systemctl daemon-reload systemctl enable home-data-system.service systemctl start home-data-system.service
-
Start manually (optional)
docker-compose up
-
I will use it to collect data from and provide data to
- electricity meter
- solar power inverters
- battery power inverters
- EV wallbox
- electricity meter
- EVSE unit
All files I wrote in this project are published under the GPL 3 license. A copy of this license is included in this project.
This project uses through the docker-compose file the following third-party components. Please note they come with their own licenses which you need to consider.
- Prometheus - Apache License 2.0
- Grafana - Apache License 2.0
- mosquitto - Eclipse Public License 1.0 and Eclipse Distribution License 1.0
- mqtt_exporter - MIT License
All trademarks used here are owned by their respective owners. :-)