Page 1 of 1
DzVents delayed response
Posted: Friday 20 October 2017 9:03
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
Re: DzVents delayed response
Posted: Friday 20 October 2017 9:07
by emme
do you have any external action? (like os.execute)
Re: DzVents delayed response
Posted: Friday 20 October 2017 9:49
by heggink
not for that script. It just has 1 if and 2x device().switchOn()
Re: DzVents delayed response
Posted: Saturday 21 October 2017 1:02
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.
Re: DzVents delayed response
Posted: Saturday 21 October 2017 20:39
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
Re: DzVents delayed response
Posted: Monday 23 October 2017 13:57
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?
Re: DzVents delayed response
Posted: Monday 23 October 2017 17:51
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.
Re: DzVents delayed response
Posted: Monday 23 October 2017 17:56
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.