Dashticz V2 - Installation

From Domoticz
Jump to: navigation, search

Basic installation instructions

Since Beta 2.4.6 (October 2018) the installation instruction changed. Main reason is that for most functionality PHP support in the web server is needed. The Domoticz web server doesn't support PHP. That means that Dashticz needs to be installed under a different web server with PHP enabled.
The installation instruction consists in two steps:

  • Installation of a web server
  • Installation of Dashticz v2

Installation of a web server

This example shows installation of Apache on Raspberry in it's most basic configuration: running at port 80.
Besides Apache also PHP needs to be installed, since it's used by the Calendar and Garbage module in Dashticz.

sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php7.0
sudo apt-get install php7.0-xml php7.0-curl
sudo systemctl restart apache2

Remark:
On some Raspberry configurations the installation of php is failing. In that case you can try the following guide:
https://www.stewright.me/2016/03/turn-raspberry-pi-3-php-7-powered-web-server/

Now check whether Apache is running by browsing to http://<YOUR IP>
You should see the Apache demo page.

Installation of Dashticz v2

Example for Raspberry PI running Apache web server:
Assumption:

First clone the dashticz repository to a folder of your choice:

cd /home/pi
git clone https://github.com/robgeerts/dashticz_v2 --branch beta

After the installation is finished, go to the /home/pi/dashticz_v2/custom/ folder, copy the CONFIG_DEFAULT.js file to CONFIG.js (mind the CAPITALS!), and edit it with the basics:

cd dashticz_v2/custom/
cp CONFIG_DEFAULT.js CONFIG.js
nano CONFIG.js

Example of CONFIG.js:

var config = {}
config['language'] = 'nl_NL'; //or: en_US, de_DE, fr_FR, hu_HU, it_IT, pt_PT, sv_SV
config['domoticz_ip'] = 'http://192.168.1.3:8084';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';


Parameter Description
config['language'] can be used to select the language, Chinese (cn_CN), Cestina (cz_CZ), Danish(dk_DK), German (de_DE), English (en_US), Spanish (es_ES), Finnish (fi_FI), French (fr_FR), Hungarian (hu_HU), Italian (it_IT), Dutch (nl_NL), Norwegian (no_NO), Polish (pl_PL) Portuguese (pt_PT), Russian (ru_RU), Slovak (sk_SK), Slovenian (si_SI), Swedish (sv_SV) or Ukrainian (ua_UA)
config['domoticz_ip'] is the URL to your Domoticz installation (with the correct PORT address)
config['domoticz_refresh'] the refresh rate of Dashticz v2.0 to get information from Domoticz
config['dashticz_refresh'] the refresh rate of the Dashticz v2.0 Dashboard



Then create a symbolic link from the root of the www folder of your web server to the previously created Dashticz location:

sudo ln -s /home/pi/dashticz_v2/ /var/www/html

Now you can browse to the dashboard: http://192.168.1.3/dashticz_v2/index.html
Replace 192.168.1.3 with the IP Address and Port number for your web server, NOT your Domoticz IP!

By default, Dashticz V2 will show all your Domoticz favorites on the dashboard.

If the basic Dashticz dashboard is working continue to Dashticz V2 - ConfigurationDv2-config.png

Advanced installation

Installation on a non-standard port

This are the installation instructions for using Apache on port 82 instead of the default port 80.

Edit the Apache2 configuration:

sudo nano /etc/apache2/sites-available/000-default.conf

Add the following code:

<VirtualHost *:82>
DocumentRoot /var/www/html
</VirtualHost>

Edit the port configuration:

sudo nano /etc/apache2/ports.conf

Add the following line:

Listen 82

Now restart Apache:

sudo systemctl restart apache2

Now your Dashticz dashboard can be found at http://<YOUR IP>:82/dashticz_v2/index.html

Installation instructions (depreciated)

To install Dashticz v2.0, download the latest version from Dashticz V2 on Github (https://github.com/robgeerts/dashticz_v2). Create a map in the domoticz\www\<subfolder>, for example domoticz\www\dashboard and unzip all the files in that folder.

It is also possible to install Dashticz v2 through Github with the git clone command. How is it done?

  • Logon to your system with SSH and go to the \domoticz\www folder with the command "cd domoticz/www" (without the ")
  • Enter the command:


git clone https://github.com/robgeerts/dashticz_v2 (for master branch) or

git clone https://github.com/robgeerts/dashticz_v2 --branch beta (for beta branch)

  • Dashticz v2.0 will be cloned into the \domoticz\www\dashticz_v2 folder.


If you like Dashticz v2.0 to be cloned into an other directory (example 'dashboard') enter:

git clone https://github.com/robgeerts/dashticz_v2 dashboard (for master branch) or

git clone https://github.com/robgeerts/dashticz_v2 --branch beta dashboard (for beta branch)

After the installation is finished, go to the /domoticz/www/<dashticzv2 folder>/custom/ folder, copy the CONFIG_DEFAULT.js file to CONFIG.js (mind the CAPITALS!).

cd domoticz/www/<dashticzv2 folder>/custom/
cp CONFIG_DEFAULT.js CONFIG.js

If you installed Dashticz V2 with the git clone command, than it's possible to update to the latest version:

  • Logon to your system with SSH and go to the \domoticz\www\<dashticzv2 folder> folder
  • Enter git pull and there will be looked if there is an update from the current version. WARNING! First make a backup of the custom folder otherwise some files may be overwritten.


When Domoticz is updated, it has removed this dashboard?!
Unfortunately, this occurs when the dashboard is installed into Domoticz's www-directory. When Domoticz installs an update, it removes the www-directory completely, before placing the updated version back. You'll have to re-install Dashticz in that case. There are a few solutions to this:
1. Install dashticz on another web server
2. Make a symlink in the www folder in Domoticz:

  • Install or copy Dashticz to a folder outside the Domoticz folder, i.e. /home/pi/dashticz_v2/
  • Make a symlink: ln -s /home/pi/dashticz_v2/ /home/pi/domoticz/www/dashticz
  • Now you can access Dashticz on http://domoticz_ip:port/dashticz/index.html
  • After a Domoticz update, you only need to make the symlink again.


By default, Dashticz V2 will show all your Domoticz favorites on the dashboard. You just have to edit the CONFIG.js file with the basics.
Remove the /* at the beginning and */ at the end, next fill in YOUR IP Address and Port number for YOUR Domoticz installation!

var config = {}
config['language'] = 'nl_NL'; //or: en_US, de_DE, fr_FR, hu_HU, it_IT, pt_PT, sv_SV
config['domoticz_ip'] = 'http://192.168.1.3:8084';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';


Parameter Description
config['language'] can be used to select the language, Chinese (cn_CN), Cestina (cz_CZ), Danish(dk_DK), German (de_DE), English (en_US), Spanish (es_ES), Finnish (fi_FI), French (fr_FR), Hungarian (hu_HU), Italian (it_IT), Dutch (nl_NL), Norwegian (no_NO), Polish (pl_PL) Portuguese (pt_PT), Russian (ru_RU), Slovak (sk_SK), Slovenian (si_SI), Swedish (sv_SV) or Ukrainian (ua_UA)
config['domoticz_ip'] is the URL to your Domoticz installation (with the correct PORT address)
config['domoticz_refresh'] the refresh rate of Dashticz v2.0 to get information from Domoticz
config['dashticz_refresh'] the refresh rate of the Dashticz v2.0 Dashboard


Now you can browse to the dashboard: http://192.168.1.3:8084/<dashticz v2 folder>/index.html
Replace 192.168.1.3:8084 with YOUR IP Address and Port number for YOUR Domoticz installation!


Dv2-home.png Dv2-config.png
Dashticz V2.0 Main Page Configuration