APNT-84 - Configuring Domoticz on the Raspberry Pi
Configuring Domoticz on the Raspberry Pi
IMPORTANT - Read this first!
These guides are now considerably out of date and remain here only as a reference.
Please visit the Domoticz forum for help with installing and configuring Domoticz.
This guide shows how to carry out some initial configuration of the Domoticz Home Automation software on the Raspberry Pi.
Domoticz is a well supported and actively developed piece of software that can be used as a Home Automation system in it's own right.
When coupled with a Rasberry Pi, it makes a great value for money Home Automation Controller that can integrate many different technologies.
In our other related guides, we show you how to use Domoticz to control Z-Wave and RFXtrx433E based devices.
We also explain how to extend your Fibaro Home Center based system to incorporate devices that are controlled by Domoticz - this is a great way to add devices from manufacturers like LightwaveRF, Oregon Scientific and Somfy to the Fibaro Home Center!
While we are happy to provide the Domoticz related guides to our Customers, we are unable to provide detailed Technical Support for any Domoticz related problems.
The best place to seek assistance with Domoticz is the forum.
Full information on what Vesternet Technical Support covers is available here.
Before beginning, it is assumed that you have already completed the initial installation of Domoticz on your Raspberry Pi.
If you haven't completed this step yet, we recommend that you follow the tutorial here - it's a relatively simple process and mainly involves downloading the Domoticz "image" and writing it to an appropriately sized SD Card using the software included with the download.
Once Domoticz is installed, you should be able to connect to the web based User Interface by accessing "http://IPADDRESS:8080" where "IPADDRESS" matches the IP address of your Raspberry Pi (this will be given out by the DHCP server in your Broadband Router, or you may have set a "static" IP address during installation).
Domoticz User Interface
There's no getting away from it, unfortunately when dealing with the Raspberry Pi and Domoticz you will invariably be required to get your hands dirty in the Linux Shell, which is just a fancy name for a simple (mainly) text based interface.
Luckily though, there's only a handful of commands that you'll need to use and as you progress through our application notes they will soon become second nature.
There are plenty of other tutorials on finding your way around a Linux installation (Google is the best place to find them), but we'll run through a few commands here to get you familiar with them.
If you are running your Raspberry Pi "headless" without a keyboard and monitor like we are, you'll need a "client" to connect to the SSH server running on the Raspberry Pi. SSH stands for "Secure SHell" and refers to the name of the protocol used to connect to a remote shell. We recommend either Putty or SecureCRT under Windows. Linux / Mac OSX users already have an SSH client built in.
Once you've connected to Raspberry Pi (the default user is "pi" and the default password is "raspberry"), you'll be greeted with the Linux Shell "Prompt":
Linux Shell Prompt
The "pi" user is a low-level user, so in most cases we'll want to change to the highest level user known as "root". The root user has privileges to change system settings and edit configuration files - to change to the root user simply type "sudo su" and press the "ENTER" key:
Switch to root user
Whenever you wish to exit the Shell, you simply type "exit" and press the "ENTER" key. Note that if you have switched to the root user, you will need to exit twice.
Next we can try out a few commands (don't worry if you don't understand some of the terms used) - all commands should be followed by pressing the "ENTER" key:
"df" - this shows how much space is left on all the "mounted partitions".
"ls -al" - this shows the contents of the current directory.
"cd .." - this moves up a directory level.
"cd /home/pi/domoticz" - this moves to the directory specified.
Linux Shell Prompt Commands
It's important to keep a Linux install updated to ensure that it has the latest bug fixes and patches to resolve any security issues.
The following commands should be run periodically - once a week or so is a good plan!
"apt-get update" - this updates the "package lists" which contain all the software packages:
Keeping the Raspberry Pi up to date
"apt-get upgrade" - this will update all installed software packages with any newer versions:
Keeping the Raspberry Pi up to date
There's also a specific tool for making configuration changes to the Raspbery Pi.
Configuring the Raspberry Pi
After typing this command, a semi-graphical menu will be displayed, this allows you to make changes to the Raspberry Pi configuration.
Important settings to check and edit as required are your "locale" and "timezone".
You can also expand the file system to ensure that all of the capacity of the SD Card is available and enable or disable the "Camera" module - if you don't have this installed, you should disable it as it frees up memory!
For more information on the raspi-config tool, please read the tutorial here.
Configuring the Raspberry Pi
Now that your Raspberry Pi is up and running, updated and configured to suit your requirements, you can now make some initial changes to the Domoticz configuration.
You can leave the Linux Shell behind you (for now) as configuration of Domoticz is carried out in the web User Interface.
Click "Setup" on the Domoticz menu, followed by "Application Settings".
There are numerous settings that you can configure here, we recommend that you set your location "Latitude" and "Longitude" first - you can click the link shown to retrieve this information from Google.
We also recommend that you configure Domoticz to check for updates automatically and to change the "Release Channel" to "Beta" as this will give you access to the latest features.
You should also tick the "Enable automatic backup" check-box so that Domoticz peridically creates a backup of the database and settings.
Once you are happy with the changes that you have made to the settings, click the red "Save" button.
Next, click "Setup" on the Domoticz menu again, followed by "Check for Update".
If an update is available, it will be downloaded and installed for you - this happens automagically, so there's no need for any further manual interaction!
We hope that you've found this application note useful - you should now have a working installation of Domoticz configured with sensible default settings!
Don't forget to check out our other guides, which show you how to use Domoticz with Z-Wave and RFXtrx433E based devices as well as how to extend a Fibaro Home Center based Home Automation system to integrate other technologies via Domoticz.