Page 1 of 1

HTML error in domoticz.log

Posted: Saturday 11 April 2020 13:24
by DonLeo
Hi all,

I'm using in my lua script a [SendNotification] command to inform me by e-mail for activities that are started (i.e. send an email with inside and outside temperature when the Fan is activated)
Code:
commandArray['SendNotification']='Fan activity...activated # '..dag..' '..mnd..' Hier de temperaturen: temp binnen = '..temp_binnen.. ' en temp buiten = '..temp_buiten..''

I'm receiving the e-mail:
Subject: Fan activity ...activated
Text : Saturday 04/11/20 Hier de temperaturen: temp binnen = 24.5 en temp buiten = 12.6

but have for all my [SendNotification] messages a 'CANNOT GET ' error in the domoticz.log file. I really don't know where to look.

Log file output:
2020-04-11 09:42:02.858 Error: HTTP: <!DOCTYPE html>
2020-04-11 09:42:02.858 <html lang="en">
2020-04-11 09:42:02.858 <head>
2020-04-11 09:42:02.858 <meta charset="utf-8">
2020-04-11 09:42:02.858 <title>Error</title>
2020-04-11 09:42:02.858 </head>
2020-04-11 09:42:02.858 <body>
2020-04-11 09:42:02.858 <pre>Cannot GET /Tw6AM3tcNf/Fan%20activity...activated%20/%20Saturday%2004/11/20%20Hier%20de%20temperaturen:%20temp%20binnen%20=%2024.5%20en%20temp%20buiten%20=%2012.6</pre>
2020-04-11 09:42:02.858 </body>
2020-04-11 09:42:02.858 </html>

Unfortunately due to the extra Covid-19 quarantine time I'm looking to implement dzEvents, if I enable dzEvents in the dashboard setup, my Pi is crashing and restarting unexpected a lot. Where can i found crashing info? I only found in several log files 'Domoticz is starting up' (syslog, daemon.log, messages etc) but no reason for going down, unless the OS is rebooting without any message.

Hope someone can put me in the right direction.

Keep save and llok after each other!

Leo

I'm using a Raspberry Pi Model B Rev 2, Raspbian GNU/Linux 10 (buster) with the new Domoticz 2020.1 build 11875
AEOTEC ZStick and a home made RFLink / Arduino Gateway

Re: HTML error in domoticz.log

Posted: Saturday 11 April 2020 14:29
by waaren
DonLeo wrote: Saturday 11 April 2020 13:24 Where can I find crashing info? I only found in several log files 'Domoticz is starting up' (syslog, daemon.log, messages etc) but no reason for going down, unless the OS is rebooting without any message.
The domoticz logfile location and other settings are defined in /etc/init.d/domoticz.sh
the relevant settings are in set to the DAEMON_ARGS var.

with an editor of choice

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log" # or any other OS file 
#DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error, debug" # debug disabled for now 
DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error" # these loglevels will make it to the logfile
#DAEMON_ARGS="$DAEMON_ARGS -debuglevel normal,hardware,received,webserver,eventsystem,python,thread_id"

Code: Select all

sudo systemctl daemon-reload
sudo service domoticz stop
sudo service domoticz start
sudo tail -f  /var/log/domoticz.log

Re: HTML error in domoticz.log

Posted: Saturday 11 April 2020 14:59
by DonLeo
Thanxs Waaren,

I a have the domoticz.log file already configured, there's no information of the going down state. But I find out that:

Only Event Systeem Lua/Blockly/Scripts enabled: cpu load ~45%
Event Systeem (Lua/Blockly/Scripts) + dzVentz eanabled: cpu load ~100%

I'm running monit (http://www.domoticz.com/wiki/Monitoring_domoticz) to check presence and load of domoticz. This one restarts domoticz and after 5 tries performing a reboot.

/var/log/monit.log:
[CEST Apr 11 14:38:22] warning : Ping response for 192.168.2.49 2/3 timed out -- no response within 5 s
[CEST Apr 11 14:42:23] warning : 'domoticz' cpu usage of 71.4% matches resource limit [cpu usage > 70.0%]
[CEST Apr 11 14:44:28] warning : Ping response for 192.168.2.49 1/3 timed out -- no response within 5 s
[CEST Apr 11 14:44:33] warning : Ping response for 192.168.2.49 2/3 timed out -- no response within 5 s
[CEST Apr 11 14:44:33] warning : 'domoticz' cpu usage of 72.5% matches resource limit [cpu usage > 70.0%]
[CEST Apr 11 14:46:33] error : 'domoticz' cpu usage of 73.1% matches resource limit [cpu usage > 70.0%]
[CEST Apr 11 14:46:34] info : 'domoticz' trying to restart
[CEST Apr 11 14:46:34] info : 'domoticz' stop: '/etc/init.d/domoticz.sh stop'
[CEST Apr 11 14:46:43] info : 'domoticz' start: '/etc/init.d/domoticz.sh start'
[CEST Apr 11 14:48:44] info : 'domoticz' cpu usage check succeeded [current cpu usage = 69.9%]

The only question now is why domoticz using nearly 100% of the cpu and ofcourse my initial question about the html error.

Leo

Re: HTML error in domoticz.log

Posted: Saturday 11 April 2020 15:07
by waaren
DonLeo wrote: Saturday 11 April 2020 14:59 Event Systeem (Lua/Blockly/Scripts) + dzVentz eanabled: cpu load ~100%
Looks like one of the scripts in dzVents is in a loop or waiting for an external resource. Do you have many scripts to investigate ?

Re: HTML error in domoticz.log

Posted: Saturday 11 April 2020 16:01
by DonLeo
lol,

Just the first test script (and it works):

return {
on = {
devices = {
'dzEventz'
}
},
execute = function(domoticz, switch)
if (switch.state == 'On') then
domoticz.log('Hey! I am on!')
else
domoticz.log('Hey! I am off!')
end
end
}