Delay receive send rfxcom

Moderator: leecollings

Post Reply
sypher007
Posts: 3
Joined: Wednesday 19 September 2018 11:35
Target OS: Windows
Domoticz version: 4.10009
Location: Belgium
Contact:

Delay receive send rfxcom

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

Image

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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Delay receive send rfxcom

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
sypher007
Posts: 3
Joined: Wednesday 19 September 2018 11:35
Target OS: Windows
Domoticz version: 4.10009
Location: Belgium
Contact:

Re: Delay receive send rfxcom

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Delay receive send rfxcom

Post 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)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
sypher007
Posts: 3
Joined: Wednesday 19 September 2018 11:35
Target OS: Windows
Domoticz version: 4.10009
Location: Belgium
Contact:

Re: Delay receive send rfxcom

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Delay receive send rfxcom

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
SweetPants

Re: Delay receive send rfxcom

Post 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?
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Delay receive send rfxcom

Post 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 :D And use is similar way.
I use multiple RF-Link and RFXCom, due to coverage for every floor.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest