Skip to content

Domoticz in the docker-version with Raspberry Pi

License

Notifications You must be signed in to change notification settings

zoilomora/domoticz-raspberry-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domoticz in the docker-version with Raspberry Pi

This is a Quick Guide on how to install Raspberry Pi OS with Docker container system and how to configure a home automation system based on Domoticz, MQTT and Node-RED.

Install Raspberry Pi OS

First we will have to download the Raspberry Pi OS image, this guide is based on version 2021-03-04.

Once downloaded, we will unzip the .zip and we will have an .img.

2021-03-04-raspios-buster-armhf-lite.zip
2021-03-04-raspios-buster-armhf-lite.img

Now we will have to burn the image on a MicroSD card. I do it with the Etcher software.

Insert the MicroSD card into our Raspberry Pi and connect the power. After starting the operating system, it will ask us to log in. The default username and password are pi and raspberry respectively.

Raspberry Pi settings

There are a number of Raspberry Pi specific settings that we would have to adjust:

First we run the sudo raspi-config command and the configuration menu will appear.

  • Connect to your WLAN (if you connect via WIFI): Go to option 1 and S1.
  • Enable SSH server: Go to option 3 and P2.
  • Regional and language settings: Go to option 5 and L1. I have selected es_ES.UTF-8 UTF-8.
  • Set Timezone: Go to option 5 and L2. I have selected Europe and Madrid.
  • Set WLAN Country: Go to option 5 and L4. I have selected ES Spain.
  • Expand Filesystem: Go to option 6 and A1.

When finished click on Finish and it will ask if you would like to rebbot now. Yes selection.

Login again and see the IP address assigned by DHCP with the ifconfig command. It is advisable to configure a static ip in our Router.

Login from our main computer for your future convenience and next steps with the ssh [user]@[ip] command. For example: ssh pi@192.168.0.100.

Software installation

Run the command once logged into the Raspberry Pi.

curl -sS https://raw.githubusercontent.com/zoilomora/domoticz-raspberry-docker/main/environment.sh | bash

It will ask you to enter the password (if you haven't changed it) raspberry.

Wait for the installation script to finish.

Now we reboot the system with the sudo reboot command.

Run the command once logged into the Raspberry Pi.

curl -sS https://raw.githubusercontent.com/zoilomora/domoticz-raspberry-docker/main/services.sh | bash

Domoticz takes a while to start the first time, it has to generate the DH parameters.

Enjoy

System ready! You can check the containers created with the docker ps -a command.

We have the following ports open:

  • Domoticz: 8080, 1443 and 6144.
  • MQTT: 1883 and 9001.
  • Node-RED: 1880.

A folder will have been created in ~/docker with all the necessary docker-compose.yml.

I recommend finding out about Domoticz, MQTT and Node-RED to configure the software to your liking.

Board tested

License

Licensed under the Apache-2.0

Read LICENSE for more information