Dashticz V3 - Automatic installation

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dashticz V3 - Automatic installation

Post by Lokonli »

Dashticz V3, beta branch, contains an automatic installation script, for which I need a few beta tester.

The script has been tested on a Raspberry and on a Ubuntu system.

The script:
* asks for a folder where to install Dashticz V3
* asks to install the beta or master branch : For now only beta works with the auto install!!
* Clones the Dashticz V3 repository and selected branch into a new folder
* Asks for the IP adress of your Domoticz server.
* Copies CONFIG_DEFAULT.js to CONFIG.js with the correct IP address for Domoticz

Then a Makefile is executed which:
* Installs Docker (if not installed yet)
* Creates a Dashticz V3 container, named dtv3, containing Apache and PHP
* FInd the first free port, 8082 or higher
* Starts the container on the first free port
* Mounts the dashticz_v3 folder to the web-root of the container
* Shows the Dashticz url

If you open this url then the default Dashticz dashboard becomes visible.

So no more need to configure Apache and/or PHP! It just works out-of-the box.
You need a few 100 MB free space on your system.

The first time the installation may take a while (5 - 15 minutes?): be patient.

If the default page is working then you can copy your previous CONFIG.js, custom.css, custom.js from your previous installation to dashticz/custom.

Just refresh your browser, and your new dashboard is shown. No need to rebuild the docker container.

For now, this installation scripts is only recommended for people with some Linux experience, because it was only tested on a limited number of systems.

If issues popup I'll try to fix them as quick as possible.

Instructions:
First go to a folder of choice:

Code: Select all

mkdir test
cd test
Then start the script:

Code: Select all

. <(wget -qO - https://raw.githubusercontent.com/Dashticz/dashticz/beta/scripts/dashticz_install.sh )
If you have tested the installation script, please leave some feedback here on the result, and on the system you are using.

See the documentation for additional info:
https://dashticz.readthedocs.io/en/mast ... stall.html

Thanks for your cooperation.
Last edited by Lokonli on Tuesday 04 August 2020 7:18, edited 1 time in total.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz V3 - Automatic installation

Post by EdwinK »

Tried on Synology
Configuring Dashticz.

What is the IP:port address of your Domoticz server? (example: 192.168.178.18:8080): 192.168.0.11:8080

Finding a free port for Dashticz
-ash: ss: command not found
Port 8082 is NOT in use

Setting up Dashticz on port 8082

-ash: make: command not found

Domoticz connection OK
All done
So if I understand it correctly, you can not install it on a separate server? My domoitcz runs on a Pi, but dashticz on Synology.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

EdwinK wrote: Tuesday 18 June 2019 15:21 Tried on Synology
Configuring Dashticz.

What is the IP:port address of your Domoticz server? (example: 192.168.178.18:8080): 192.168.0.11:8080

Finding a free port for Dashticz
-ash: ss: command not found
Port 8082 is NOT in use

Setting up Dashticz on port 8082

-ash: make: command not found

Domoticz connection OK
All done
So if I understand it correctly, you can not install it on a separate server? My domoitcz runs on a Pi, but dashticz on Synology.
There is no need to run Domoticz and Dashticz on the same system: separate server should be fine.

To not pollute the forum too much I've created an issue on Github:
https://github.com/dashticzv3/dashticz_v3/issues/3

I'll do the follow-up there, ok?
brain
Posts: 15
Joined: Saturday 03 March 2018 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by brain »

it works well.
nice work .
my system is a pi 3.
with Raspbian Stretch Lite
I had just done a new domoticz installation, and I had to install dashticz again.
perfect timing thanks
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

brain wrote: Tuesday 18 June 2019 19:16 it works well.
nice work .
my system is a pi 3.
with Raspbian Stretch Lite
I had just done a new domoticz installation, and I had to install dashticz again.
perfect timing thanks
ok, good to know. Thanks!
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

I have followed the steps to install V3 on my xbian (Kodi) driven RPI.

Issues:
Curl wasn't installed initially. Installed it with sudo apt-get install curl

Since xbian makes regular backups of home and system folders, I tried to keep V3 out of the home folder and decided to create a folder in root. The script doesn't like this, since it returns an error with 'permission denied'. However, the script tries to continue, even while it can't 'cd' into this 'not created' folder.

I created a folder under 'home' at the end. The script goes nicely through all steps, until, at the end of the script, it says: -bash: make: command not found, and continues with the 2 lines 'Domoticz connection OK' and 'All done'

I added make by sudo apt-get install make

When I tried to restart the script, it gives the warning message that I should update Dashticz, by cancelling the installer. However, it doesn't say to use 'CTRL-C' for that.

make update didn't cut it for me (of course). I discovered to enter 'make start'. Unfortunately it ended with the following error:

Code: Select all

xbian@xbian ~/docker/dashticz_v3 $ make start
Let's install docker first
curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 2f4ae48
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker xbian

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
sudo docker build -t dtv3 .
ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or dir
ectory
context canceled
Makefile:29: recipe for target 'start' failed
make: *** [start] Error 1
xbian@xbian ~/docker/dashticz_v3
For the time being I copied the dashticz folder to my /var/www/html/ folder and run it from there in the default way.


Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

jake wrote: Wednesday 19 June 2019 20:24 I have followed the steps to install V3 on my xbian (Kodi) driven RPI.

Issues:
Curl wasn't installed initially. Installed it with sudo apt-get install curl

Since xbian makes regular backups of home and system folders, I tried to keep V3 out of the home folder and decided to create a folder in root. The script doesn't like this, since it returns an error with 'permission denied'. However, the script tries to continue, even while it can't 'cd' into this 'not created' folder.

I created a folder under 'home' at the end. The script goes nicely through all steps, until, at the end of the script, it says: -bash: make: command not found, and continues with the 2 lines 'Domoticz connection OK' and 'All done'

I added make by sudo apt-get install make

When I tried to restart the script, it gives the warning message that I should update Dashticz, by cancelling the installer. However, it doesn't say to use 'CTRL-C' for that.

make update didn't cut it for me (of course). I discovered to enter 'make start'. Unfortunately it ended with the following error:

Code: Select all

xbian@xbian ~/docker/dashticz_v3 $ make start
Let's install docker first
curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 2f4ae48
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker xbian

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
sudo docker build -t dtv3 .
ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or dir
ectory
context canceled
Makefile:29: recipe for target 'start' failed
make: *** [start] Error 1
xbian@xbian ~/docker/dashticz_v3
For the time being I copied the dashticz folder to my /var/www/html/ folder and run it from there in the default way.
It seems the Docker daemon is not running on your system. Can you check with:

Code: Select all

sudo systemctl status docker
If docker is not running you should be able to start it with:

Code: Select all

sudo systemctl enable docker
sudo systemctl start docker
You can check again with:

Code: Select all

sudo systemctl status docker
If docker is active, you should be able to build and run the container with the following command from your dashticz_v3 folder:

Code: Select all

make start
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

Lokonli wrote:
jake wrote: Wednesday 19 June 2019 20:24 I have followed the steps to install V3 on my xbian (Kodi) driven RPI.

Issues:
Curl wasn't installed initially. Installed it with sudo apt-get install curl

Since xbian makes regular backups of home and system folders, I tried to keep V3 out of the home folder and decided to create a folder in root. The script doesn't like this, since it returns an error with 'permission denied'. However, the script tries to continue, even while it can't 'cd' into this 'not created' folder.

I created a folder under 'home' at the end. The script goes nicely through all steps, until, at the end of the script, it says: -bash: make: command not found, and continues with the 2 lines 'Domoticz connection OK' and 'All done'

I added make by sudo apt-get install make

When I tried to restart the script, it gives the warning message that I should update Dashticz, by cancelling the installer. However, it doesn't say to use 'CTRL-C' for that.

make update didn't cut it for me (of course). I discovered to enter 'make start'. Unfortunately it ended with the following error:

Code: Select all

xbian@xbian ~/docker/dashticz_v3 $ make start
Let's install docker first
curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 2f4ae48
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker xbian

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
sudo docker build -t dtv3 .
ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or dir
ectory
context canceled
Makefile:29: recipe for target 'start' failed
make: *** [start] Error 1
xbian@xbian ~/docker/dashticz_v3
For the time being I copied the dashticz folder to my /var/www/html/ folder and run it from there in the default way.
It seems the Docker daemon is not running on your system. Can you check with:

Code: Select all

sudo systemctl status docker
If docker is not running you should be able to start it with:

Code: Select all

sudo systemctl enable docker
sudo systemctl start docker
You can check again with:

Code: Select all

sudo systemctl status docker
If docker is active, you should be able to build and run the container with the following command from your dashticz_v3 folder:

Code: Select all

make start
Thanks, on Xbian I had to follow this procedure from the forum http://forum.xbian.org/thread-4021.html ... ght=docker (xbian uses upstart instead of systemd). Afterwards the 'make start' ran fine.
Dashticz runs as well under port 8082 now!

So, I guess, you have to check with your script every tool used to see whether or not it is installed and if this systemd or upstart thing is used. For me this procedure was just as much of a hassle as before with PHP and apache ;) and that is not what you're aiming for of course! Keep up the good work!

UPDATE:
In my previous post I said that copying the V3 to my /var/www/html folder worked fine.
I now ran the 'Docker version' and saw that the 'garbage bin' block doesn't want to load. Going back to my /var/www/html variant, the 'garbage bin' block loads OK. I copied the /custom folder from the one into the other, so they're identical!
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

What is your garbage provider?

Sent from my SM-A320FL using Tapatalk

jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

Lokonli wrote:What is your garbage provider?

Sent from my SM-A320FL using Tapatalk
Hvc
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz V3 - Automatic installation

Post by poudenes »

Did the install test.

got a error that GIT was not installed. After installed GIT manual the install went ok.
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

poudenes wrote: Thursday 20 June 2019 8:14 Did the install test.

got a error that GIT was not installed. After installed GIT manual the install went ok.
Good. Thanks for testing!
What kind of system do you have?

I will add the dependencies for GIT, curl, make to the script/makefile/instructions.

It seems there is one PHP module missing in the Docker container: Some garbage calendars won't work.

I will fix this within a few days.
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz V3 - Automatic installation

Post by poudenes »

Lokonli wrote: Thursday 20 June 2019 12:12
poudenes wrote: Thursday 20 June 2019 8:14 Did the install test.

got a error that GIT was not installed. After installed GIT manual the install went ok.
Good. Thanks for testing!
What kind of system do you have?

I will add the dependencies for GIT, curl, make to the script/makefile/instructions.

It seems there is one PHP module missing in the Docker container: Some garbage calendars won't work.

I will fix this within a few days.
RPi 3B+
Debian Stretch Lite latest update

Domoticz:
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.6.4 (default, Oct 10 2018, 09:47:26) [GCC 6.3.0 20170516]
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

Lokonli wrote: ...
I will add the dependencies for GIT, curl, make to the script/makefile/instructions.

It seems there is one PHP module missing in the Docker container: Some garbage calendars won't work.

I will fix this within a few days.
As soon as you have an update, I will test again. Since Xbian automatically makes system images, I can roll back to last week and try again with the same starting point.

Will the update also take into account the 'upstart method' to install docker?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

That sounds great. Do you have a reference to the Docker install upstart method? Then I'll have a look.

Sent from my SM-A320FL using Tapatalk

jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

Lokonli wrote:That sounds great. Do you have a reference to the Docker install upstart method? Then I'll have a look.

Sent from my SM-A320FL using Tapatalk
Yes, the suggested script is mentioned in the forum in my previous message.
http://forum.xbian.org/thread-4021.html ... ght=docker
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz V3 - Automatic installation

Post by poudenes »

Lokonli wrote: Thursday 20 June 2019 13:31 That sounds great. Do you have a reference to the Docker install upstart method? Then I'll have a look.

Sent from my SM-A320FL using Tapatalk
1 off topic question. What is the positive reason to use Docker? I read its because of containers. But why. Just install is the same right?
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

I noticed some people had difficulties with installing apache and php. The goal was to create a multi platform install script.
One of the advances of a Docker container is that we then have a more or less standard platform. That makes developing and testing of new functionality easier.
Example: add authentication for Apache, automatic test scripts, ...
But you can of course use manual install as well.

Sent from my SM-A320FL using Tapatalk

jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3 - Automatic installation

Post by jake »

I did a 'make update' and now the garbage is loading alright. Thankf for fixing!

I noticed something else (very minor issue):
Because I had V3 setup 'manually' and via Docker, I can load them both in different tabs. I skipped between them and found something 'moving' in the calendar. Finally I saw that in the docker version of dashticz V3 the 'all day' events have a 02:00 time after the date, where the normal version doesn't have that.
Again, equal config file, so that doesn't explain.
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3 - Automatic installation

Post by Lokonli »

jake wrote: Wednesday 26 June 2019 23:34 I did a 'make update' and now the garbage is loading alright. Thankf for fixing!

I noticed something else (very minor issue):
Because I had V3 setup 'manually' and via Docker, I can load them both in different tabs. I skipped between them and found something 'moving' in the calendar. Finally I saw that in the docker version of dashticz V3 the 'all day' events have a 02:00 time after the date, where the normal version doesn't have that.
Again, equal config file, so that doesn't explain.
Yesterday I indeed released beta 3.0.1. Thanks for confirming that your garbage issue is solved.

The 02:00 time issue sounds like an incorrect timezone setting, probably inside the Docker container. I'm afraid I don't have the time to look into this in the coming 3 weeks (holiday). I'll create an issue on Github. Maybe someone else is willing to pick this up.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest