From Domoticz
Jump to: navigation, search



Ubuntu / Raspberry Pi (wheezy)

sudo apt-get install build-essential -y
sudo apt-get install cmake libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev subversion curl libcurl4-openssl-dev libusb-dev zlib1g-dev libssl-dev git

Debian stretch

sudo apt-get install build-essential -y
sudo apt-get install cmake libboost1.61-dev libboost-system1.61-dev libboost-thread1.61-dev libsqlite3-dev subversion curl libcurl4-openssl-dev libusb-dev zlib1g-dev libssl-dev git

Raspberry Pi (Arch Linux)

sudo pacman -S gcc cmake subversion boost sqlite make curl libusb zlib1g-dev

Debian (Mac OS)

See Mac_OSX


Make sure the device is bootstrapped

Install some packages

ipkg install gcc
ipkg install make
ipkg install optware-devel (dont worry about the wget-ssl error)
ipkg install boost-dev
ipkg install boost-thread
ipkg install boost-system
ipkg install boost-date-time
ipkg install libcurl-dev
ipkg install libusb
ipkg install zlib1g-dev

Install cmake

(Take a coffee while doing the bootstrap and make commands)

tar xvf cmake-2.8.10.tar.gz
cd cmake-2.8.10
make install
cd ..
rm -R cmake-2.8.10
rm cmake-2.8.10.tar.gz

Fix known pthread problem

1. backup the pthread libraries found in /opt/arm-none-linux-gnueabi/lib/:

mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled

2. Copy the pthread libraries found in /opt/lib

cp /lib/ /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s
ln -s


cp /opt/lib/libboost_* /lib

Verify to check your /root/.profile

4. Install the FTDI and usb drivers

For a tutorial on a DS212+ see:

Basic installation:

insmod ftdi_sio.ko
mknod /dev/usb/ttyUSB0 c 188 0

Plug your USB RFXtrx transceiver, verify it is found with


You should see messages about it and an assigned usb device (in my case /dev/usb/ttyUSB0). Go back to root folder for the next steps: cd


OpenZWave is required for example to use an Aeon USB V2 ZWave adapter.

Install libudev-dev

We assume the specific dependencies for your system have been installed. sudo apt-get install libudev-dev

Compile OpenZWave

git clone
ln -s open-zwave open-zwave-read-only
cd open-zwave
cd ..

Update OpenZWave

cd open-zwave
git pull
make clean
cd ..


Get the source code and compile with:

git clone domoticz
cd domoticz
git pull
cmake -DCMAKE_BUILD_TYPE=Release .

Note 1: For recent Debian version, these options may be required for compilation to succeed: -DBOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu -DBoost_USE_MULTITHREADED=OFF

Note 2: If you got undefined reference to boost::atomics::detail::lockpool::get_lock_for(void const volatile*)' linker error, append -lboost_atomic at the end of ./CMakeFiles/domoticz.dir/link.txt

Note 3: If you face runtime issues please use cmake -DCMAKE_BUILD_TYPE=Debug . to recompile and review logs for troubleshooting


Note: Compiling on the Raspberry Pi will take about 45 minutes

You should now have the binary application, you can start it with


For additional parameters type:

sudo ./domoticz -h


To Update to a newer version:

  • stop the application (control-c), or stop the startup script (see below) with /etc/init.d/ stop
  • Execute

cd /home/pi/domoticz (or where you installed domoticz)
git pull

  • start domoticz

If you have installed the Unix startup script (see below), you can also update with the provided script:


How to start domoticz at boot (Unix only)

sudo cp /etc/init.d
sudo chmod +x /etc/init.d/
sudo update-rc.d defaults

Edit the startup script, esp. point DAEMON to the installation folder:

sudo nano /etc/init.d/

If you want to use another web interface port change:

OPTIONS="-www 8080"

You can now start/stop domoticz with:

sudo /etc/init.d/ start sudo /etc/init.d/ stop

To check if domoticz is running:

sudo /etc/init.d/ status

If your system supports it you can also issue:

sudo service start
sudo service stop
sudo service status