DzVents delayed response

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

Moderator: leecollings

Post Reply
User avatar
heggink
Posts: 989
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

DzVents delayed response

Post by heggink »

After updating to the latest beta (3.8590), scripts seem to execute in a delayed way. When starting, I get a warning:

Code: Select all

EventSystem: Warning!, lua script /home/pi/domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
but the system works fine.
From then onwards, scripts sometimes take more than 5 seconds to initiate.
Example: I have 2 PIRs in my garage that trigger a GarageLights script. 5 seconds of darkness whilst waiting for the lights to turn on is not helpful.

Syslog has no errors, domoticz has no errors. I can see the 5s delay between PIR and script activation in the domoticz log.
Scripts used to trigger instantaneous (and often still do) before so not sure what the problem is. Nothing changed on the RPI3 in terms of loads so no other programme creating cpu contention.

Anyone else seeing this?

H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents delayed response

Post by emme »

do you have any external action? (like os.execute)
The most dangerous phrase in any language is:
"We always done this way"
User avatar
heggink
Posts: 989
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: DzVents delayed response

Post by heggink »

not for that script. It just has 1 if and 2x device().switchOn()
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: DzVents delayed response

Post by dannybloe »

But when dzVents is triggered it loads all script modules and if you have code outside the execute function it will be executed
When the module is loaded.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
User avatar
heggink
Posts: 989
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: DzVents delayed response

Post by heggink »

I must be thick since I am not understanding. I never had any issues and nothing changed in my scripts. I only have stuff in the execute loop so nothing else. With the previous beta (just updated to the last so no idea if things are back to normal) my garagelights script just took more than 5 seconds to get executed. I used to run fine before so not understanding why this delay is occurring all of a sudden.
Thx so far!
H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: DzVents delayed response

Post by dannybloe »

Is this always the case? Can you put dzVents in debug mode and see in the logs what commands are send back to Domoticz? How long does the script take to execute? If dzVents just takes a couple of ms to finish and sends back the command to Domoticz then it may be something totally not dzVents/events related. Note that dzVents doesn't do any switching.. it only sends some commands back to Domoticz when it is done.
Also, when you use the GUI to do the same switching.. is it instant then or is there also a delay?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
User avatar
heggink
Posts: 989
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: DzVents delayed response

Post by heggink »

dannybloe wrote:Is this always the case? Can you put dzVents in debug mode and see in the logs what commands are send back to Domoticz? How long does the script take to execute? If dzVents just takes a couple of ms to finish and sends back the command to Domoticz then it may be something totally not dzVents/events related. Note that dzVents doesn't do any switching.. it only sends some commands back to Domoticz when it is done.
Also, when you use the GUI to do the same switching.. is it instant then or is there also a delay?
Hi Danny, it seems like everything is behaving again and scripts get executed straight away. Previously, a device (PIR) would trigger but the script acting on that device would not trigger until 5 seconds later (according to the logs). Anyways, if it appears again I will do some more thorough testing.

Thx so far.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: DzVents delayed response

Post by dannybloe »

Occasionally I have the same with my zwave devices. Usually a pir immediately triggers a light through an event script and sometimes it takes 10s or more.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest