Page 1 of 1

Delayed response

Posted: Sunday 14 August 2022 22:14
by ayasystems
I have a problem with the events, the events take time to be processed

I have an event that turns on a light when the door is opened, and sometimes it takes 5 minutes to perform the action

look at the log


2022-08-14 21:48:47.363 Status: User: Admin (IP: 192.168.3.241) initiated a scene/group command

The action is "Garage2" (Door Open)

2022-08-14 21:48:47.365 Activating Scene/Group: [Garage Button]
2022-08-14 21:48:49.735 Virtual: Light/Switch (Garage2)

2022-08-14 21:49:00.881 Status: Incoming connection from: 80.29.xxx.xxx
2022-08-14 21:49:00.907 Status: Incoming connection from: 80.29.xxx.xxx

The action is performed 5 minutes later:

2022-08-14 21:53:00.974 Status: Incoming connection from: 80.29.xxx.xxx
2022-08-14 21:53:09.416 Virtual: Light/Switch (FroniusState)

2022-08-14 21:53:09.961 Virtual: Light/Switch (Luz Rampa)
2022-08-14 21:53:09.979 Watts: Lighting 1 (Luz Garaje)

2022-08-14 21:53:18.516 Status: Set UserVariable rainLastTime = 2
2022-08-14 21:53:19.357 Virtual: Light/Switch (FroniusState)
2022-08-14 21:53:19.640 RFlink 433: Temp (Nevera)

Hardware is a raspberry pi 4 with SSD over USB
domoticz_error_dzvents.png
domoticz_error_dzvents.png (21.44 KiB) Viewed 2158 times
return {
on = {
--quien dispara el evento, en este caso un cambio en "Garaje2"
devices = { 'Garaje2' }

}, execute = function(domoticz, device)
--comprobamos que sea de noche isNightTime

if(domoticz.time.isNightTime)then
if(device.state=='Open')then
--Cambiamos el device a ON durante 5 minutos, pero comprobamos que no esté ya en ON con el checkFirst
domoticz.devices('Luz Rampa').switchOn().checkFirst().forMin(5)
domoticz.devices('Luz Garaje').switchOn().checkFirst().forMin(5)
else
domoticz.devices('Luz Rampa').switchOff().afterMin(2)
domoticz.devices('Luz Garaje').switchOff().afterMin(2)

end

end
end
}
Any idea?

Re: Delayed response

Posted: Monday 15 August 2022 9:12
by waltervl
Is Domoticz doing something else in the meantime? Perhaps another script is running blocking the complete installation?
Or is it just this script?
See https://www.domoticz.com/wiki/DzVents:_ ... d_handling and further for Asynchronous HTTP and Asynchronous shell command execution to prevent this.

Re: Delayed response

Posted: Monday 15 August 2022 22:53
by ayasystems
I have several scripts and nothing getting http request with high frequency. Some scripts make asynchronous request to send telegrams messages.

Yesterday I saw that one domoticz process is 100 CPU usage. So I need find what script is taking high resources. If dzvent is disable this high process is going down to normal values.

Re: Delayed response

Posted: Monday 15 August 2022 23:52
by ayasystems
I have 42 dzvents scripts, may be it is a lot of work to script engine??

Re: Delayed response

Posted: Tuesday 18 October 2022 17:59
by ayasystems
I solved my problem

I had undervoltage and cpu clock was fixed at 700mhz... Once undervoltage has been solved cpu is going 1.5ghz and all works fine.

Regards