Page 1 of 1
Delay receive send rfxcom
Posted: Friday 28 September 2018 9:54
by sypher007
Hello,
I have an issue with a lua script I created to switch my living room lights on & off. Here's the situation:
The script to determine the previous state and switch the lamp goes as follows:
Code: Select all
commandArray = {}
if (devicechanged['$Living zitgedeelte V1'] == 'On' or devicechanged['$Living zitgedeelte V1'] == 'Off' or devicechanged['$Living zitgedeelte V2'] == 'On' or devicechanged['$Living zitgedeelte V2'] == 'Off') then
if(otherdevices['Living zitgedeelte'] == 'On') then
commandArray['Living zitgedeelte']='Off'
else
commandArray['Living zitgedeelte']='On'
end
end
return commandArray
The problem is that the script works as expected but there is a delay of about 3-4 seconds between the switch and the lamp turning on/off. Is this a known issue with 433 mhz devices?
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 10:11
by waaren
sypher007 wrote: ↑Friday 28 September 2018 9:54
I have an issue with a lua script I created to switch my living room lights on & off. Here's the situation:
The problem is that the script works as expected but there is a delay of about 3-4 seconds between the switch and the lamp turning on/off. Is this a known issue with 433 mhz devices?
No, 3-4 seconds is way too long.
I have similar setups and usually it takes < 1 second for the sequence [switch -> Lua -> light].
One area that can influence the delay is other event scripts. Because the domoticz event system is single threaded it can only execute one script at a time. So if this event (the switch) or another just before that triggers one or more scripts, this script "has to stand in line" and wait until the others are finished.
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 10:19
by sypher007
In the logging I can see domoticz respond immediately (within the same second) and send the switch command. The delay only occurs when I use the physical switch. If I test it for example by switching "$Living zitgedeelte V1" the lamp immediately switches.
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 10:31
by waaren
sypher007 wrote: ↑Friday 28 September 2018 10:19
In the logging I can see domoticz respond immediately (within the same second) and send the switch command. The delay only occurs when I use the physical switch. If I test it for example by switching "$Living zitgedeelte V1" the lamp immediately switches.
What do you see in the log when you use the physical switch ?
I log to /var/log/domoticz.log and can follow it real time using tail -f. When I use a physical switch I immediate see this in the log. (hard to time exact but certainly much less than 0.5 second)
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 15:52
by sypher007
I wil check the logs when I get home. In the meantime: I found that the switches I use (KAKU AWMT-003) have a burst delay. Could this be the problem?
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 18:51
by waaren
sypher007 wrote: ↑Friday 28 September 2018 15:52
I wil check the logs when I get home. In the meantime: I found that the switches I use (KAKU AWMT-003) have a burst delay. Could this be the problem?
Could well be. When timing the delay between switching and entry in the log that will become clear.
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 20:19
by SweetPants
Just out of curiosity, why do you have 2 RFXcom's and how do you configure one to receive and one to send?
Re: Delay receive send rfxcom
Posted: Friday 28 September 2018 20:33
by sincze
SweetPants wrote: ↑Friday 28 September 2018 20:19
how do you configure one to receive and one to send?
Learn the devices on both
rfxcom
And use is similar way.
I use multiple RF-Link and RFXCom, due to coverage for every floor.