Daikin airco makes Domoticz crash

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Daikin airco makes Domoticz crash

Post by Bospieper »

Hello,
I have hopefully a small problem regarding the use of a Daikin airco with Dzvents. The airco is on our bedroom and is active between 22.45 and 07.00
When active the program looks at the bedroom temperature, when above 19 degrees Celsius the airco start cooling until the temperature is below 18 degrees. The problem is when the airco at 22.45 becomes active soon after that Domoticz crashes. Sometimes whitin 10 minutes, sometimes after hours. There's not a pattern in the crashes. When I stop the Daikin plugin and the script in Dzvents then Domoticz works as it should be so it's pretty sure that the problem is the plugin or the script. The plugin is the latest version. Here's the script:

Code: Select all

return {
	on = {
		timer = {
			'between 22:45 and 07:00',
			'between 07:00 and 22:45'
		        },
	    },
	    logging = {
	        level = domoticz.LOG_ERROR,
	        marker = 'Daikin airco',
	 },
	execute = function(dz, timer)
	    local airco = dz.devices('Slaapkamer - airco on/off')
	    local fan = dz.devices('Slaapkamer - airco Fan Rate')
	    local temp = dz.devices('Slaapkamer - airco Temp IN')
	    
	    if dz.time.matchesRule('between 22:45 and 07:00') then
	        if temp.temperature >= 19 then
	            airco.switchOn()
	            fan.setLevel(20)
	            dz.log('Airco staat aan', dz.LOG_INFO)
	         end
	            
	         if temp.temperature < 18 then
	            airco.switchOff().checkFirst()
	            dz.log('Temperatuur is onder de 19 graden', dz.LOG_INFO)
	         end
	       
	     elseif dz.time.matchesRule('between 07:00 and 22:45') then
	           airco.switchOff()
	        
        end	         
	end
}
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Wednesday 17 February 2021 21:56 I have hopefully a small problem regarding the use of a Daikin airco with Dzvents. The airco is on our bedroom and is active between 22.45 and 07.00
When active the program looks at the bedroom temperature, when above 19 degrees Celsius the airco start cooling until the temperature is below 18 degrees. The problem is when the airco at 22.45 becomes active soon after that Domoticz crashes. Sometimes within 10 minutes, sometimes after hours. There's not a pattern in the crashes. When I stop the Daikin plugin and the script in dzVents then Domoticz works as it should be so it's pretty sure that the problem is the plugin or the script. The plugin is the latest version. Here's the script:
Do you have the domoticz log from just before the crash?

If you replace the script with the version below it will show some extra info in the log.

Code: Select all

return
{
    on =
    {
        timer =
        {
            'every minute',
        },
    },

    logging =
    {
        level = domoticz.LOG_DEBUG,
        marker = 'Daikin airco',
    },

    execute = function(dz)
        local airco = dz.devices('Slaapkamer - airco on/off')
        local fan = dz.devices('Slaapkamer - airco Fan Rate')
        local temp = dz.devices('Slaapkamer - airco Temp IN')

        if dz.time.matchesRule('at 22:45-07:00') then
            if temp.temperature >= 19 then
                airco.switchOn().checkFirst()
                if fan.level ~= 20 then fan.setLevel(20) end
                dz.log('Airco staat aan', dz.LOG_INFO)
            elseif temp.temperature < 18 then
                airco.switchOff().checkFirst()
                dz.log('Temperatuur is onder de 19 graden', dz.LOG_INFO)
            end
        else
            airco.switchOff().checkFirst()
        end
    end
}
You can start logging to disk using below procedure

The domoticz logfile location and other settings are defined in /etc/init.d/domoticz.sh
the relevant settings are in 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Thanx Waaren,I've made the modifications and come back to you with some logfiles.
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Hi Waaren, this morning Domoticz freezes. I've copied the relevant data in to a word document so the file size is not exceeding the 400 kb.
Gr. Piet
Attachments
Domoticzlog.docx
(19.12 KiB) Downloaded 127 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Thursday 18 February 2021 15:53 Hi Waaren, this morning Domoticz freezes. I've copied the relevant data in to a word document so the file size is not exceeding the 400 kb.
Gr. Piet
I see in this log that the crash started at 12:14:31
The dzVents script starts every minute on the minute so I guess we can rule that one out.

But from this log I cannot tell what triggered it. Do you have something in the log from the minute before this hang?
It could also be helpful to see what is send from your airco to domoticz. If it is send via MQTT you can inspect what is send with

Code: Select all

mosquitto_sub -F "%U - %t - %p" -v -p 1883 -t "#"
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

I've made a lager selection in time, strange thing is in the log. There is a gap in time between 12:23 and 12:39 as you can see.
I send you the MOTT asap.
Attachments
Domoticzlog.docx
(23.17 KiB) Downloaded 155 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Thursday 18 February 2021 18:20 I've made a lager selection in time, strange thing is in the log. There is a gap in time between 12:23 and 12:39 as you can see.
I send you the MOTT asap.
There seems to be a dzVents script blocked. From this log I cannot see if this is the cause or a result of the hang.

Can you please switch on dzVents debug mode in the settings ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Hi Waaren, the only MOTT client who's exchange data with Domoticz is my EMS/ESP module for my heatpump. ( see attachment)
Attachments
Mosquitto.JPG
Mosquitto.JPG (205.94 KiB) Viewed 2338 times
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Hi Waaren, the logfile from the moment Debug is active
Attachments
Domoticzlog.docx
(52.13 KiB) Downloaded 183 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Thursday 18 February 2021 19:47 Hi Waaren, the only MOTT client who's exchange data with Domoticz is my EMS/ESP module for my heatpump.
Ok lets see what the dzVents debug shows just before a domoticz hang.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

I let you know :)
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Well it freezes at 11.31. I'll send you logfile from 11.00 when everything was normal.
Attachments
Domoticzlog.docx
(45.13 KiB) Downloaded 108 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Friday 19 February 2021 19:33 Well it freezes at 11.31. I'll send you logfile from 11.00 when everything was normal.
I see a couple of strange things (in the P1 area and pluginmgr) but cannot pinpoint it to one particular cause.
You first could try to switch on full domoticz debug.

in /etc/init.d/domoticz.sh (see earlier post for procedure)

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 enabled
# 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"
Please note this will produce a sh#$%$ load of logmessages but it might show some useful information. If that does not lead to a clear insight what happens, the only other way forward I can advise here is to switch off all Python plugins, dzVents, Blockly and classic Lua scripts and if that will lead to a system without freezes start them one after the other until the freeze hits you again. I understand it is not a nice approach but I don't know how to get to the bottom of this in another way.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Hi Waaren,
I've made the adjustments as earlier stated. I thought that is what in the domoticz.log appears. Is there another logfile I should send to you?
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Spoiler: show

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

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Friday 19 February 2021 21:19 Hi Waaren,
I've made the adjustments as earlier stated. I thought that is what in the domoticz.log appears. Is there another logfile I should send to you?
Yes it is but my latest post contain some other settings for /etc/init.d/domoticz.sh that will cause domoticz to log (much) more.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

I see my mistake, will adjust it now. :o
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

Hi Waaren, in a effort to start debugging with a clean logfile something went wrong. I could not empty the file in the linux enviroment (not enough knowledge) so I stopped the domoticz service and copied the logfile to my windows pc, emptied the file and try to transfer it back to domoticz.
I have now a 0 Kb logfile. After that I started the deamon and domoticz services and then tried sudo trial -f var/log/domoticz.log. I see the cursor hangs and when I check the status of the domoticz service it says "killed". So I restart the domoticz service and it is up and running but my logfile remains empty.
Is this something witch can be fixed? I feel really stupid right now because this frustrates the proces in hopefully retrieving the main problem. :oops:
Piet
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Daikin airco makes Domoticz crash

Post by waaren »

Bospieper wrote: Saturday 20 February 2021 10:33 Is this something witch can be fixed? I feel really stupid right now because this frustrates the proces in hopefully retrieving the main problem. :oops:
Did you try below commands?

Code: Select all

sudo service domoticz stop
sudo rm /var/log/domoticz.log
sudo service domoticz start
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Bospieper
Posts: 168
Joined: Thursday 07 November 2019 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: NL
Contact:

Re: Daikin airco makes Domoticz crash

Post by Bospieper »

no I didn't and yes I did now with the results in the attachment. At first nothing happend after the stop, rm and start. The cursor stayed at the left corner for at least 5 minutes then I interrupted the process with CTRL+C. After that I restart domoticz and its now up and running.
Unfortunately there's no domoticz.log in the /var/log/
Piet
Attachments
domoticz3.JPG
domoticz3.JPG (106.21 KiB) Viewed 2256 times
domoticz2.JPG
domoticz2.JPG (105.37 KiB) Viewed 2256 times
domoticz1.JPG
domoticz1.JPG (14.75 KiB) Viewed 2256 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest