Delayed response

Moderator: leecollings

Post Reply
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Delayed response

Post 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 1348 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?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Delayed response

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Delayed response

Post 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.
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Delayed response

Post by ayasystems »

I have 42 dzvents scripts, may be it is a lot of work to script engine??
ayasystems
Posts: 66
Joined: Tuesday 19 April 2016 23:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Delayed response

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest