Domoticz: installation on Raspberry Pi

The Micro SD card must be fitted in the Raspberry Pi 2B with suitable software before the Pi may be used. The Pi will not work without Micro SD card or with the wrong software. Note that the Micro SD slot in the Raspberry Pi has a locking mechanism. As soon as the Micro SD card pops out to fast, the lock of the Pi can be damaged. IMPORTANT For USB devices other than a mouse and a simple wired keyboard (for USB devices drawing more than 100┬ámA) a powered USB hub is strongly recommended. It is recommended that a powered hub is used – this will provide any additional power to the devices without affecting the Raspberry Pi itself.

If you use both a R-PI power supply and a powered hub, its recommended you connect them to the same switched power bar, and use the switch on the power bar to switch off both the R-PI and hub at the exact same time.

Also, always shutdown using the software shutdown function (sudo halt), not by pulling the plug. When not using a GUI, (with a GUI use the GUI command) you can use the command “sudo halt -h”, and power off when all the LED’s on the board (except the power LED) go off. This is especially important the first time you boot, as in the process the R-PI modifies the content of the SD-card, without a clean shutdown the contents of the card may be damaged.

This guide will show you how to install Domoticz by hand.

  1. Plug the SD Card loaded with the Operating System into the Raspberry Pi.
  2. If required, plug the USB keyboard and mouse into the Raspberry Pi, perhaps via a USB Hub. Connect the Hub to power, if necessary
  3. If required, plug the video cable into the display and into the Raspberry Pi
  4. Plug in your Network cable, or Wi-Fi dongle, if required
  5. Ensure that your USB Hub (if any) and display are working
  6. With your screen on, plug the other end of the power source into the Raspberry Pi
  7. Plug the power source into the main socket, and switch it on
  8. If connected to a display, the Raspberry Pi should boot up and display messages on the screen
  9. If running headless, it should boot up. When the leds have stopped flashing, connect to the Raspberry Pi from the remote computer. Whether this works will depend on the operating system you are using; the Raspian Linux operating system is configured to allow SSH connections by default


user: pi
password: raspberry

sudo raspi-config
  • expand Filesystem
  • Change User Password
  • Change Locale: set locale to nl_NL.UTF-8
  • Change Timezone: set to appropriate timezone
  • Change Keyboard Layout: stick to the generic layouts (104, US layout)
  • Advanced Options: Enable SSH
  • Memory Split: Set to 16M since we don’t need a graphical environment
  • Finish the config tool and reboot
sudo su
echo "deb jessie main contrib non-free rpi" > /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade
sudo update-rc.d -f dhcpcd remove
# For updating firmware PI firmware
sudo apt-get install git-core ca-certificates
sudo wget -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update (Optionally, I did not do this)
sudo reboot
mkdir ~/domoticz
cd ~/domoticz
tar xvfz domoticz_linux_armv7l.tgz
rm domoticz_linux_armv7l.tgz
sudo cp /etc/init.d
sudo chmod +x /etc/init.d/
sudo update-rc.d defaults
# Check settings (I did not changed anything)
sudo nano /etc/init.d/
DAEMON_ARGS="-daemon -www 8080"
(cd domoticz)
sudo ./domoticz (remember to ctrl-c before shutdown or reboot)
sudo service start
Use the Web Interface to update Domoticz (Setup->Check for Updates).
# Make a backup now (Win32DiskImager)
# Install RaZberry
sudo nano -w /etc/udev/rules.d/09-tty.rules
sudo reboot
# Go to IP-DOMOTICZ:8080
Click "Setup" on the Domoticz menu, followed by "Hardware"
Make sure "Enabled" is ticked, then type a descriptive name in the "Name" field (RaZberry)
From the dropdown "Type" list, select "OpenZWave USB"
From the dropdown "Serial Port" list, select "/dev/ttyUSB20"
Finally click the "Add" button
Your RaZberry device should now be shown in the list - click on the "Setup" button next to it
If the details of the RaZberry do not populate, click on the "Refresh" button
The RaZberry should now be installed and working correctly, so it's time to add your first Z-Wave device!