alaub81 / openHAB

openHAB Setup and Tools
https://www.laub-home.de/wiki/OpenHAB_3_Docker_Installation
2 stars 1 forks source link
docker docker-compose grafana mosquitto openhab openhab3 postgres renderer scripts smarthome

openHAB Setup and Tools

In this repsoitory I collect everything needed to have a good running openHAB Setup. This Setup is based on a docker compose deployment. Included you can find the following toolset:

Docker compose project

Just clone that complete repository (e.g. under /opt/):

git clone https://github.com/alaub81/openHAB.git

And configure the .envfile.

Then you can create an openhab user and group on the host system if you like to map them.

groupadd -g 9001 openhab
useradd -u 9001 -g openhab -r -s /sbin/nologin openhab

Now we need the certificates for the secure mqtt connection of Mosquitto. For the generation of the certs we will use the generate-certs.sh. Just configure the script upfront:

cd /opt/openHAB/certs
chmod +x generate-certs.sh
./generate-certs.sh

After that you schould be able to start the whole setup with:

cd /opt/openHAB
docker compose up -d

Now the Setup should be reachable:

Configure Mosquitto User

to connect to the secure MQTT Broker, you need at minimum one configured user. Just create the first one:

cd /opt/openHAB
docker compose exec mosquitto mosquitto_passwd -c /mosquitto/config/mosquitto.passwd mosquitto

Scripts / Tools

here you can find some usefull scripts I am using to administrate my openHAB setup. For example there are some scripts to do things in the persistence layer - influxDB. Or to bring more stability into the digitalstrom binding. Just have a look at the descriptions on top of each script.

To make the scripts running, please add the execute right to them and then just start it, e.g.:

cd scripts
chmod +x cleanup-influxdb-integer.sh
./cleanup-influxdb-integer.sh

Links

If you need more Details about the setup: