Domotz Pro User Guide

3.2.3. Domotz Agent Installation on RASPBERRY PI Getting started


This section contains a few tips and tricks on how to get started with the Domotz Agent on your Raspberry Pi. We’ll go through what you need to get going with a brand new Raspberry Pi, so if you already have Raspbian installed, you can skip straight to section @ Installing the Domotz Agent‍ . The Agent is compatible with all Raspberry Pi platforms to date, as of February 2016.


If you bought a Raspberry Pi or pre-configured memory card from Domotz, please proceed to section @ First time setup‍ , after connecting your Raspberry Pi to a power adapter and your network.


If your Raspberry Pi has the Snap package installed, you can simply install Domotz PRO from the Snap store, following the instructions @ Install from the Snap store‍.


Note that your Raspberry Pi needs to have a network interface of some kind, or the Domotz Agent won’t be able to detect the devices on your network. Installing Raspbian


Installing the Domotz agent on your Raspberry Pi is a a lot more involved than installing it on a NAS, due to the fact that the Raspberry Pi needs to have an OS installed on it. First, there are some pre-requisites and we’ll take you through everything you need here if you’re starting from scratch.


In addition to your Raspberry Pi board you’ll need a micro SD card onto which you need to install an operating system. We’d recommend getting a Class 10 or faster memory card, as it’ll make the install quicker. Another option is to buy a ready made micro SD card from the Raspberry Pi foundation. If you bought one of these, then you can skip to section @ Installing the Domotz Agent‍ .


You’ll also need either a USB cable or a USB power adapter so you can power your Raspberry Pi, and ideally a screen of some kind with HDMI input, an HDMI cable, a mouse, a keyboard and a network cable.


Once you have the above things, let’s get the operating system installed. We’d recommend using NOOBS if you’re not familiar with Linux and you can download it from the Raspberry Pi foundation by going here – Click on NOOBS and download the “Offline and network install”.


The following guide explains how copy the files onto your micro SD card and how to install Raspbian – This is when that monitor or TV comes into play, as once you’ve prepared the micro SD card according to the instructions, you need to plug your Raspberry Pi into the monitor and connect a keyboard and a mouse to it. After a few seconds, you should see a screen that will ask you to install the OS, simply click on Raspbian followed by Install and the OS should be installed.


Once the installation is done and your Raspberry Pi has rebooted, you’ll see a setup screen. You can configure some options here and we’d recommend enabling to boot into the graphical user interface. Once you’re done, simply select Finish to boot into the Raspbian desktop environment.  Now you need to connect your Raspberry Pi to your network via a network cable, so we can continue with installing the Domotz Agent.


Note that if you don’t make any changes in the setup menu, you can start the graphical user interface by typing “startx” and hitting enter. Installing the Domotz Agent


You’re now at the point where you need to download and install the Domotz Agent on your Raspberry Pi.


  1. Make sure your Raspberry Pi is connected to the internet. We recommend to use a network cable and connect your Raspberry Pi directly to your router.                                                                                        
  2. Download the latest Domotz Agent for Raspberry Pi


If you uses the built in web browser in Raspbian, go to the Domotz Community to download the latest Domotz Agent. The file should  automatically end up in the /usr/home/Downloads


If you have a headless setup (no screen, keyboard or mouse connected), you can login to your Raspberry Pi via SSH using a terminal software such as PuTTY or Tera Term in Windows, or the built in options in OS X or Linux. The default user name is pi and the password is raspberry. Then simply type the following commands to start the download:cd Downloads

wget <file-path-as-specified-on-the-domotz-portal>

      3. Install the Agent


Click on Menu, Accessories, Terminal. A command line window with some green and blue text should appear on the screen. In case of  headless installation, just login to your Raspberry Pi via a terminal. Go to the download directory (if you’re not already there) by typing cd Downloads and hitting enter.

Type the following command to install the Domotz Agent. Note that in place of <package name> you need to type the name of the file you downloaded. As Raspbian is a Linux based OS, you can simply type the first couple of letters of the file name and then hit the tab key on your keyboard and the rest of the text will be automatically filled in for you.

sudo dpkg -i <package name>

Note: To list files in Linux, type ls and hit enter and you’ll see the files in the current directory.

The installer for the Domotz Agent should now be running. The installation will take anything between five and 15 minutes, as the installer is downloading parts of the software and installing it onto your memory card.


Once the installation has finished, the Agent will be automatically started and you’ll see a link that you can either double click to open in a browser, or copy and paste into your browser to continue the setup.


If you want to check that everything is working properly from the command line, you can run sudo /etc/init.d/domotz status to get a status message

If you want to uninstall your Domotz Agent, simply type sudo dpkg --purge domotz and hit enter in the terminal. First time setup


The next step is to configure your Domotz Agent. To do so, make sure you’ve downloaded an installed the Domotz App on your mobile device. Then simply tap on the drawer menu button and tap on “Find New Agents” towards the bottom of the menu. This will automatically detect any new Domotz Agents on your network, as long as your mobile device is connected to the same network as your Domotz Agent. You can then proceed to configuring your Domotz Agent following the steps below on your mobile device without having to know the IP address of your Domotz Agent.


Alternatively, you can type in the IP address and port shown in the Domotz App in a web browser on your PC. For example, if the IP address was you type and then hit enter. You should now see the Domotz Agent webpage.


At this point, you’ll be asked to create an account if you don’t already have one. Please follow the on-screen instructions.


If you’re running any other web service on your Raspberry Pi that uses port 3000, the Domotz Agent will automatically use the next available port, i.e. 3001.


Once you’ve created your account, the Domotz Agent will proceed to scanning your network for devices. This will take anything from a few minutes up to 15 minutes depending on how many devices you have on your network.



This also means that it’ll take some time before all of your devices appears in the Domotz App on your smartphone or tablet. Once the scan has finished, click/tap Done to continue the to the Domotz Agent web UI.


Note that the setup of the Domotz Agent will fail if the time and date isn’t set correctly on your Raspberry Pi. To fix this, simply update the time and date on your Raspberry Pi and you’ll be able to proceed with the setup. Install from the Snap store

A more powerful method to install Domotz PRO on your Raspberry is to install it from the Snap store. If you don't have it already, you need to install the Snapcraft store first:

sudo apt-get update
sudo apt-get install snapd

And then install the Domotz PRO Agent from the Snapcraft store as follows:

sudo snap install domotzpro-agent-publicstore
sudo snap connect domotzpro-agent-publicstore:firewall-control
sudo snap connect domotzpro-agent-publicstore:network-observe
sudo snap connect domotzpro-agent-publicstore:raw-usb
sudo snap connect domotzpro-agent-publicstore:shutdown
sudo snap connect domotzpro-agent-publicstore:system-observe 

sudo sh -c 'echo tun >> /etc/modules'
sudo modprobe tun

powered by tomehost