Domoticz: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 92: Line 92:
At systemctl restart monit;tail -f /var/log/monit.log
At systemctl restart monit;tail -f /var/log/monit.log


you will see it has attached the webserver and where it is listening to. There are more security options, but I haven't used them here. It takes a while for the webserver to start up, but you can find it with ss -lp | grep 2812.
you will see it has attached the webserver and where it is listening to. There are more security options, but I haven't used them here. It takes a while for the webserver to start up (becausee of the start delay parameter!), but you can find it with ss -lp | grep 2812.


Once it has started up you can visit it using http://domoticz.edgarbv.int:2812
Once it has started up you can visit it using http://domoticz.edgarbv.int:2812
Line 115: Line 115:
systemctl restart monit
systemctl restart monit


view the website for more details
view the monit website for more details, or using monit summary / monit status
 
[https://www.howtoforge.com/tutorial/how-to-install-and-configure-monit-on-debian-9/ How to Install and Configure Monit on Debian 9]


= Evohome=
= Evohome=

Latest revision as of 10:06, 12 April 2019

Domoticz Homepage

Install

When installing there are two choices

  1. hand compile
  2. use curl (for the "easy" way)

Curl

Domoticz from binary comes with a static openssl1.0.0 dependency, which Debian no longer offers. So first

cd /usr/local/src
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u11_amd64.deb
dpkg -i libssl1.0.0_1.0.1t-1+deb8u11_amd64.deb
apt-mark auto libssl1.0.0
apt install libpython3.5 libpython3.5-dev
curl -sSL install.domoticz.com | bash
cd /opt/domoticz/
./updatebeta

(NB I install to /opt/domoticz)

Check if everything is running ok

journalctl -full -u domoticz.service

In the web interface go to Setup -> Log and check more

if links don't work, look here and choose the one with your architecture. Unstable only works on ARM

by hand

There is some flag about not using staticssl


when visiting the SSL site, you may need to remove the port number the installer gives you and just go to https://ip

fixing the system crashes

Sometimes when you visit your site, it will tell you the daemon is offline. Using /etc/init.d/domoticz.sh status you won't see much about why it's stopped:

/etc/init.d/domoticz.sh status
● domoticz.service - LSB: Home Automation System
   Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2019-04-10 11:36:53 CEST; 21h ago
     Docs: man:systemd-sysv-generator(8)

Apr 10 11:36:53 domoticz systemd[1]: Stopped LSB: Home Automation System.
Apr 10 11:36:53 domoticz systemd[1]: Starting LSB: Home Automation System...
Apr 10 11:36:53 domoticz domoticz.sh[19243]: 2019-04-10 11:36:53.511  Status…Cuz
Apr 10 11:36:53 domoticz domoticz.sh[19243]: 2019-04-10 11:36:53.511  Status…:19
Apr 10 11:36:53 domoticz domoticz.sh[19243]: 2019-04-10 11:36:53.512  Status…cz/
Apr 10 11:36:53 domoticz domoticz.sh[19243]: domoticz: Domoticz is starting …...
Apr 10 11:36:53 domoticz domoticz[19251]: Domoticz is starting up....
Apr 10 11:36:53 domoticz systemd[1]: Started LSB: Home Automation System.
Apr 10 11:36:53 domoticz domoticz[19252]: Domoticz running...
Apr 11 09:11:18 domoticz domoticz[19252]: Domoticz stopped...

You can restart it using /etc/init.d/domoticz.sh restart and in /var/log/messages you will see something like the following:

Apr 11 09:11:18 domoticz domoticz: Domoticz stopped...
Apr 11 09:29:07 domoticz domoticz: Domoticz is starting up....
Apr 11 09:29:07 domoticz domoticz: Domoticz running...

In order to monitor the process you use monit, as described Monitoring domoticz

   apt install monit
   vi /etc/monit/monitrc

(note - get rid of any leading spaces!)

with start delay 240
set mailserver mail.edgarbv.com port 587
set alert robin@edgarbv.com

To check if mailing works, do

service monit restart; tail -f /var/log/monit.log

and it should send you a status notification by mail.

Once you have this running, it's time to start up the webserver. In /etc/monit/monitrc

set httpd port 2812 and
allow admin:monit

At systemctl restart monit;tail -f /var/log/monit.log

you will see it has attached the webserver and where it is listening to. There are more security options, but I haven't used them here. It takes a while for the webserver to start up (becausee of the start delay parameter!), but you can find it with ss -lp | grep 2812.

Once it has started up you can visit it using http://domoticz.edgarbv.int:2812

To add monitoring for the domoticz service: vi /etc/monit/conf-available/domoticz-sw

check process domoticz-sw with pidfile /var/run/domoticz.pid
start program = "/etc/init.d/domoticz.sh start"
stop  program = "/etc/init.d/domoticz.sh stop"
if failed
   url http://127.0.0.1:8080/json.htm?type=command&param=getversion
       and content = '"status" : "OK"'
   for 2 cycles
   then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"

ln -s /etc/monit/conf-available/domoticz-sw /etc/monit/conf-enabled/

monit -t #to test

systemctl restart monit

view the monit website for more details, or using monit summary / monit status

How to Install and Configure Monit on Debian 9

Evohome

Evohome in wiki

Go to Setup -> Hardware. Next to Type, select Evohome via Web API

Under username / pass, fill in your mytotalconnectcomfort.com credentials. Make sure Synchronise, show schedule and location are all on. You may either lower or raise the poll intervall to anything you like but if you set it to less than ten seconds it will automatically reset itself to 60 seconds.

After pressing the 'Add' button to add the hardware device, the rest of the configuration will occur automatically and you should see your Evohome heating zones (and Hot Water device if you have one) appear in the devices list after about ten seconds. If you like you can now disable 'Synchronize installation'.

You then go to Setup -> Devices.

Click on the green import button on the right of each device.

Changing the short graph

The temperature graphs only have day, month and year. You can change the day to 7 days for a more week like list:

Domoticz forum

[SETUP] -->>[SETTINGS] -->> [LOG HISTORY] -->> [SHORT LOG SENSORS] -->> choose between 1 - 7 days

Dashboard

To get the graphs on the dashboard you have to use an extension, Dashticz

Dashticz v2 wiki page

Dashticz - Show your dashboard and how-to's!