Page 2 of 2

Re: Daikin airco makes Domoticz crash

Posted: Saturday 20 February 2021 20:49
by waaren
Bospieper wrote: Saturday 20 February 2021 18:56 After that I restart domoticz and its now up and running.
Unfortunately there's no domoticz.log in the /var/log/
What command do you use to restart domoticz?
Please share any output and the current content of /etc/init.d/domoticz.sh between code tags ( </> on the forum ) and not as screen prints.

Re: Daikin airco makes Domoticz crash

Posted: Saturday 20 February 2021 21:42
by Bospieper
waaren wrote: Saturday 20 February 2021 20:49
Bospieper wrote: Saturday 20 February 2021 18:56 After that I restart domoticz and its now up and running.
Unfortunately there's no domoticz.log in the /var/log/
What command do you use to restart domoticz?
Please share any output and the current content of /etc/init.d/domoticz.sh between code tags ( </> on the forum ) and not as screen prints.
The reason for the screenshots was that there was no data added , it showed only that.
The command I gave to restart was: sudo service domoticz start as you mentioned in a earlier message.

Code: Select all

#! /bin/sh
### BEGIN INIT INFO
# Provides:          domoticz
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Home Automation System
# Description:       This daemon will start the Domoticz Home Automation System
### END INIT INFO

# Do NOT "set -e"

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/home/pi/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
#DAEMON_ARGS="$DAEMON_ARGS -loglevel normal,status,error, debug"
#DAEMON_ARGS="$DAEMON_ARGS -loglevel normal,status,error"
DAEMON_ARGS="DAEMON_ARGS -debuglevel normal, hardware,received,webserver,eventsystem,python,thread_id"

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

pidof_domoticz() {
    # if there is actually a domoticz process whose pid is in PIDFILE,
    # print it and return 0.
    if [ -e "$PIDFILE" ]; then
        if pidof domoticz | tr ' ' '\n' | grep -w $(cat $PIDFILE); then
            return 0
        fi
    fi
    return 1
}

#
# Function that starts the daemon/service
#
do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --chuid $USERNAME --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
        # Return
        #   0 if daemon has been stopped
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        # Wait for children to finish too if this is a daemon that forks
        # and if the daemon is only ever run from this initscript.
        # If the above conditions are not satisfied then add some other code
        # that waits for the process to drop all resources that could be
        # needed by services started subsequently.  A last resort is to
        # sleep for some time.
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
        [ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        rm -f $PIDFILE
        return "$RETVAL"
}

case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
  reload)
        log_daemon_msg "Reloading $DESC" "$NAME"
        PID=$(pidof_domoticz) || true
        if [ "${PID}" ]; then
                kill -HUP $PID
                log_end_msg 0
        else
                log_end_msg 1
        fi
        ;;
  restart)
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload}" >&2
        exit 3
        ;;
esac

:

Re: Daikin airco makes Domoticz crash

Posted: Saturday 20 February 2021 21:51
by Bospieper
Log Dzevents:

Code: Select all

2021-02-20 19:04:28.269 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL private key file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2021-02-20 19:04:34.786 Error: (Plugin Manager) Git ErrorNo:2
2021-02-20 19:04:34.791 Error: (Plugin Manager) Git StrError:No such file or directory: '//plugins'
2021-02-20 19:05:51.836 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:05:51.837 Error: Spotify hardware (21) thread seems to have ended unexpectedly
2021-02-20 19:06:05.841 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:06:19.847 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:12:37.226 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:12:59.263 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:13:49.417 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:14:48.027 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:15:06.514 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:21:05.745 Error: CheckAuthToken(85b21c5585f80da8884fd708fc0359c5_NDAzNTRlY2UtOTQ0Yi00MzIwLWExMDktMTVhOTlmNTViZjRl) : auth token mismatch
2021-02-20 19:21:05.997 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:36:32.680 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:36:46.684 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:47:16.007 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 35.204.38.102)
2021-02-20 19:47:16.028 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 35.204.38.102)
2021-02-20 20:06:58.307 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:07:12.312 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:15:03.801 Error: OpenZWave: Value_Changed: Tried adding value, not succeeded!. Node: 22 (0x16), CommandClass: SENSOR MULTILEVEL, Label: Unknown, Instance: 1, Index: 143
2021-02-20 20:37:21.123 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:37:35.126 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:07:46.945 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:08:00.948 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:38:09.895 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:38:23.898 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly

Re: Daikin airco makes Domoticz crash

Posted: Saturday 20 February 2021 21:58
by Bospieper
Bospieper wrote: Saturday 20 February 2021 21:51 Log Dzevents:

Code: Select all

2021-02-20 19:04:28.269 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL private key file ./server_cert.pem!
2021-02-20 19:04:28.270 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2021-02-20 19:04:34.786 Error: (Plugin Manager) Git ErrorNo:2
2021-02-20 19:04:34.791 Error: (Plugin Manager) Git StrError:No such file or directory: '//plugins'
2021-02-20 19:05:51.836 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:05:51.837 Error: Spotify hardware (21) thread seems to have ended unexpectedly
2021-02-20 19:06:05.841 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:06:19.847 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:12:37.226 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:12:59.263 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:13:49.417 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:14:48.027 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:15:06.514 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:21:05.745 Error: CheckAuthToken(85b21c5585f80da8884fd708fc0359c5_NDAzNTRlY2UtOTQ0Yi00MzIwLWExMDktMTVhOTlmNTViZjRl) : auth token mismatch
2021-02-20 19:21:05.997 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 10.8.0.2)
2021-02-20 19:36:32.680 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:36:46.684 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 19:47:16.007 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 35.204.38.102)
2021-02-20 19:47:16.028 Error: [web:8080] Failed authentication attempt, ignoring client request (remote address: 35.204.38.102)
2021-02-20 20:06:58.307 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:07:12.312 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:15:03.801 Error: OpenZWave: Value_Changed: Tried adding value, not succeeded!. Node: 22 (0x16), CommandClass: SENSOR MULTILEVEL, Label: Unknown, Instance: 1, Index: 143
2021-02-20 20:37:21.123 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 20:37:35.126 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:07:46.945 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:08:00.948 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:38:09.895 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
2021-02-20 21:38:23.898 Error: Plugin Manager hardware (6) thread seems to have ended unexpectedly
Ignore the web errors, I am currently at work using VPN

Re: Daikin airco makes Domoticz crash

Posted: Saturday 20 February 2021 22:28
by waaren
Bospieper wrote: Saturday 20 February 2021 21:42 The command I gave to restart was: sudo service domoticz start as you mentioned in a earlier message.
The content of your /etc/init.d/domoticz.sh is not what I suggested.

Try with below

Code: Select all

#! /bin/sh
### BEGIN INIT INFO
# Provides:          domoticz
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Home Automation System
# Description:       This daemon will start the Domoticz Home Automation System
### END INIT INFO

# Do NOT "set -e"

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/home/pi/domoticz/$NAME
DAEMON_ARGS="-daemon"
DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
DAEMON_ARGS="$DAEMON_ARGS -loglevel normal,status,error, debug"
#DAEMON_ARGS="$DAEMON_ARGS -loglevel normal,status,error"
DAEMON_ARGS="DAEMON_ARGS -debuglevel normal, hardware,received,webserver,eventsystem,python,thread_id"

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

pidof_domoticz() {
    # if there is actually a domoticz process whose pid is in PIDFILE,
    # print it and return 0.
    if [ -e "$PIDFILE" ]; then
        if pidof domoticz | tr ' ' '\n' | grep -w $(cat $PIDFILE); then
            return 0
        fi
    fi
    return 1
}

#
# Function that starts the daemon/service
#
do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --chuid $USERNAME --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
        # Return
        #   0 if daemon has been stopped
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        # Wait for children to finish too if this is a daemon that forks
        # and if the daemon is only ever run from this initscript.
        # If the above conditions are not satisfied then add some other code
        # that waits for the process to drop all resources that could be
        # needed by services started subsequently.  A last resort is to
        # sleep for some time.
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
        [ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        rm -f $PIDFILE
        return "$RETVAL"
}

case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
  reload)
        log_daemon_msg "Reloading $DESC" "$NAME"
        PID=$(pidof_domoticz) || true
        if [ "${PID}" ]; then
                kill -HUP $PID
                log_end_msg 0
        else
                log_end_msg 1
        fi
        ;;
  restart)
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload}" >&2
        exit 3
        ;;
esac

:
[/quote]

Re: Daikin airco makes Domoticz crash

Posted: Tuesday 23 February 2021 14:42
by Bospieper
Hi Waaren,
Despite I am not been able to deliver data from the domoticz logfile because it stays empty, I can tell you that the system now is running for several days without any freezing. Perhaps was the adjustment in the Dzevent script sufficient to do the tric. I'am continuing the monitoring of domoticz en when it freezes again I send you the syslog instead. Thanx for now.
Gr. Piet