Installing and running Domoticz on CubieBoard2

From Domoticz
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This guide is for installing domoticz on a cubieboard2 or cubietruck

Firmware Requirements

You need a microSD card from at least 4GB.

Please install the latest software from: https://www.armbian.com/download/
For cubietruck use: http://www.igorpecovnik.com/2013/12/24/cubietruck-debian-wheezy-sd-card-image/comment-page-1/
For cubieboard2 use: https://www.armbian.com/cubieboard-2/

Select the Mainline Jessie kernel 4.x.x image

For old cubieboard images:


after you boot for the first time (username root, password 1234), flash this image on the nand or ssd,
scripts can be found in the /root folder

This script (for nand at least) you have to execute 2 times

After you booted from the nand or ssd, update the system with:

Create Linaro user: Add a user called 'linaro'

adduser linaro
next add this user to the sudo group


adduser linaro sudo

next we make sure we do not need to enter a password when issuing a sudo command

visudo

at the bottom of this file place the following line:

linaro ALL=(ALL) NOPASSWD: ALL

For current images:


- after reboot (for 2 times), the disk is expanded automatically. You can login (username root, password 1234) via tty or ssh. You are asked to change pwd foor root. You are asked to add a sudo enabled user. Type "linaro" as user.
sudo apt-get update
sudo apt-get upgrade

Domoticz Setup

Login to your cubieboard with the "linaro" user (for windows you can use the program putty)


Setup you timezone with:
sudo dpkg-reconfigure tzdata

Installing from Binary (old images)

mkdir domoticz

cd domoticz

wget http://domoticz.sourceforge.net/beta/domoticz_linux_armv7l.tgz

tar xvfz domoticz_linux_armv7l.tgz

rm domoticz_linux_armv7l.tgz

Installing from Binary (new images)

Login as linaro user
cd ~

mkdir domoticz

cd domoticz

sudo curl -L install.domoticz.com | bash
follow the wizard.
- select http and or https access
- select used ports. I choose 80 (https) and 443 (https)
- select web root folder

Test Domoticz

old images:

First we are going to test if domoticz is correctly installed:

While still in the domoticz folder (if not issue: cd ~/domoticz)
./domoticz

domoticz should now start, to quit domoticz press control-c

current images

- open a browser, go to your website. (output of setup will show the ip and port info)

Make Domoticz startup at boot time (Also needed for Web Update) - auto done for installation "current images"

sudo cp domoticz.sh /etc/init.d

sudo chmod +x /etc/init.d/domoticz.sh

sudo update-rc.d domoticz.sh defaults


Edit the startup script and point the DAEMON location to point to the installation folder:

sudo nano /etc/init.d/domoticz.sh [ or use the vi editor ]

Change: DAEMON=/home/pi/domoticz/domoticz

In to: DAEMON=/home/linaro/domoticz/domoticz


If you want to use another web interface port change:

OPTIONS="-www 8080" For example: 8070

Start Domoticz
sudo service domoticz.sh start


Now connect with a browser ip:port to see if it is up and running.

Updating Domoticz

Use the Web Interface to update Domoticz (Setup->Check for Updates)
Choose Beta or Stable in the application settings

Compiling from scratch with CubieTruck (dualcore 1 GHz) takes 38:30 min.