Install Domoticz 2020 on Raspberry Pi OS
Step-by-step how-to guide install Domoticz on Raspberry Pi with the latest Raspberry image. With the new Raspberry Pi OS (previously know as Raspbian) this guide has been updated to reflect the latest changes.
Please do not use the Raspberry imager, is still rather buggy at the moment.
Working with Win32 Disk Imager gives better results and is proven to be a reliable way to image your Micro SD card…
This how-to is part of a bigger series of Domoticz how-to’s on sancla.com!
This tutorial has been verified with the latest Domoticz 2020.2
- Raspberry Pi 4 with 2GB or 4GB of memory
– 32GB Micro SD card (16GB works just fine to!)
Class 10 from a good brand, such as Kingston, Transcend or Samsung.
Pay attention to the Read/Write speeds…
– Original or equivalent USB-C Power supply
– Active or passive cooling
Try the Flirc passive cooling case, you won’t be disappointed!
- Network cable
- Micro-SD card reader
- Windows 10 installation with win32 disk imager
- Free IP address in your network
- Raspberry Pi 4 (4GB model with 16GB sd-card)
- Raspberry Pi OS Lite 4.19 (release date 2020-05-27)
- Domoticz Stable 2020.2 (compile date Apr 27 2020)
- Windows 10 ver 1909
- Win32 Disk Imager
Step 1 – Prepare your Micro SD card
Assuming you work with Windows 10, let’s start by downloading everything we need:
- Latest Raspberry Pi OS image (Lite version):
- Win32 Disk Imager:
- SD Formatter
- Putty standalone 32bit
To be sure the SD card is in perfect shape, format the SD
card before you begin (source: raspberrypi.org):
- Download SD Formatter for Windows
- Follow the instructions and install
- Format your card with SD Formatter
Load the Raspbian image with WIn32 Disk Imager:
– Start Win32 Disk Imager (assuming your already have this application installed)
– Select the Raspbian image file (*.img, unpack the *.zip file first if you have to already done so)
– Select the drive letter of the SD card
– Click on “write” to start imaging your SD card
To enable SSH for a headless configuration you have to add a file named “ssh” to the “boot” partition/disk of the SD card. Make sure you add this file without any extension!!!
Once all these steps have bee taken, put the SD card into your Raspberry Pi, connect power and let it boot for a couple of minutes.
Step 2 – Find the IP adres of your Raspberry Pi
To be able to connect to the Raspberry Pi we need to know the IP adres that has been supplied by your router. Please be aware that we assume your connect your pi with a network cable. You can connect your pi wirelessly but this is not part of this how-to…
There are a couple of ways we can do this and the raspberrypi.org website published a great article about how to do this:
For most home environments I believe the easiest way to do this is by installing the Find app on your phone:
Getting the IP address of a Pi using your smartphoneSource: https://www.raspberrypi.org/documentation/remote-access/ip-address.md
The Fing app is a free network scanner for smartphones. It is available for Android and iOS.
Your phone and your Raspberry Pi have to be on the same network, so connect your phone to the correct wireless network.
When you open the Fing app, touch the refresh button in the upper right-hand corner of the screen. After a few seconds you will get a list with all the devices connected to your network. Scroll down to the entry with the manufacturer “Raspberry Pi”. You will see the IP address in the bottom left-hand corner, and the MAC address in the bottom right-hand corner of the entry.
Step 3 – Connect with SSH
Once you have found the IP adres of your Raspberry Pi, connect to it with a tool called Putty. It is a standalone SSH tool and by far an industry standard application for SSH on Windows.
Start the Putty application, fill in the IP address and press Enter. You get a warning “Putty Security Alert” about the host key which you can safely ignore, continue and connect to the Raspberry Pi.
The default username and password are pi and raspberry.
Should you receive an error instead such as “Network error: Connection refused”, you probably did not correctly configure the SSH file on your SD card, most times caused by using a extension with the SSH file, such as SSH.txt for example.
Follow this YouTube video for more help on this matter:
Step 4 – raspi-config
Once connected we start with setting up your Raspberry Pi. We can do so by connecting to the Raspberry pi with SSH/putty and running the following command:
2 steps are important here:
– Setting the “Localisation Options”, so the time zone and date are correctly configured
– Setting a fixed IP address with “Network Options”, so we can always find back the Raspberry Pi in our network.
To do so, check the Raspberry Pi documentation, there are also plenty of YouTube video’s that can assist you with this step.
Step 5 – Update, upgrade and reboot
To make sure we have the latest software versions, run the following command on your Raspberry Pi:
sudo apt update -y && sudo apt upgrade -y && sudo reboot
Your Raspberry pi will start updating and upgrading automatically.
Once done it will reboot your Raspberry Pi, your SSH connection terminates during reboot so you know when it’s finished. Rebooting can take a 1-2 minutes is my experience.
Step 6 – Install Domoticz
Once the Raspbian setup and preperation has been completed, it’s finally time to install Domoticz on your Raspberry Pi 4! Connect to your Raspberry with SSH/Putty if you have not already done so and execute the following command to automatically install Domoticz for you:
curl -L https://install.domoticz.com | bash
During installation you are able to configure the HTTP port, by default configured on port 8080.
You could change this to port 80, the default port for HTTP traffic. This way, you do not need to write “:8080” every time to connect to your Domoticz installation. However, should you wish to install Dashticz later on, port 80 could become conflicted.
My advise, stick to the default port 8080!