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.
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.
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
andS1
. - Enable SSH server: Go to option
3
andP2
. - Regional and language settings: Go to option
5
andL1
. I have selectedes_ES.UTF-8 UTF-8
. - Set Timezone: Go to option
5
andL2
. I have selectedEurope
andMadrid
. - Set WLAN Country: Go to option
5
andL4
. I have selectedES Spain
. - Expand Filesystem: Go to option
6
andA1
.
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
.
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.
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.
- Raspberry PI 3 B+ with Raspberry Pi OS version 2021-03-04.
- Odroid XU4 (donated by DrBoom) with Debian Buster and Ubuntu Focal.
Licensed under the Apache-2.0
Read LICENSE for more information