I have a simple script that runs when my doorbell is pressed, but for the reason I want it, it's taking too long until it fires.
It's a simple script that sends a Pause command to my Sky HD box so that the TV is paused when the doorbell is pressed.
At the moment, it's just entered in the 'Script On' field when editing the doorbell switch.
And the contents of the script file look like this
In the log, the script is taking about 4-5 seconds until it fires, leaving the Skybox to pause when the doorbell sound has pretty much finished.
Is this natural behaviour of the 'On Script'? any ideas maybe with the contents of the script file?
'On Script' taking a bit too long to fire
Moderator: leecollings
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
- jvdz
- Posts: 2445
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: 'On Script' taking a bit too long to fire
Do you have other events being triggered by the change state of the doorbell switch?
For example: All script_device_xxx.lua are ran each time a device changes state.
Jos
For example: All script_device_xxx.lua are ran each time a device changes state.
Jos
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: 'On Script' taking a bit too long to fire
Nope, well not that I'm aware of. This is the only script I have, there are no scripts in blocky or anything else. I literally only have this doorbell, some weather station data, and one light switch set up at the moment.
So I don't think, it's like an overloading of anything.
Running on a Raspberry Pi also
So I don't think, it's like an overloading of anything.
Running on a Raspberry Pi also
- Siewert308SW
- Posts: 294
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: 'On Script' taking a bit too long to fire
I do notice something thats looks like this but it's caused by something else.
When i have a lua with the following if/else and otherdevices == then a switch is triggered right away.
But when i have the same lua otherdevices ~= then it takes up to 5 seconds before a switch is triggered.
When doing the same for a uservariable it even takes up to 8 seconds until a script/switch is triggered.
Looks like Domoticz freaks out on the ~= state.
I know for sure it aint a other script that's is running as it also happens with just one script available.
If i remember it well then this behaviour is here since Mar 23.
First thought where other scripts, second thought was me fiddling around with Bluetooth experiments.
So got a fresh system today but same happens again.
When i have a lua with the following if/else and otherdevices == then a switch is triggered right away.
Code: Select all
if (devicechanged['Dark'] == 'On' and otherdevices['Lights'] == 'Off')
then
commandArray['Scene:Lights']='On'
end
When doing the same for a uservariable it even takes up to 8 seconds until a script/switch is triggered.
Code: Select all
if (devicechanged['Dark'] == 'On' and otherdevices['Lights'] ~= 'On')
then
commandArray['Scene:Lights']='On'
end
Code: Select all
if (devicechanged['Dark'] == 'On' and uservariables['Lights'] ~= 'True')
then
commandArray['Scene:Lights']='On'
end
I know for sure it aint a other script that's is running as it also happens with just one script available.
If i remember it well then this behaviour is here since Mar 23.
First thought where other scripts, second thought was me fiddling around with Bluetooth experiments.
So got a fresh system today but same happens again.
Setup:
- DS923+ Docker
Domoticz Latest Stable
Mosquitto / ZwaveJSUI @ Aeotec Z-Stick Gen5+ / PiHole Unbound
P1 USB Gas/Power, HW watermeter
- A lot of Zwave switches, contacts, plugs, smoke/Co2 ect
- DiY 7.5kWh Solar Storage @ GitHuB
- DS923+ Docker
Domoticz Latest Stable
Mosquitto / ZwaveJSUI @ Aeotec Z-Stick Gen5+ / PiHole Unbound
P1 USB Gas/Power, HW watermeter
- A lot of Zwave switches, contacts, plugs, smoke/Co2 ect
- DiY 7.5kWh Solar Storage @ GitHuB
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: 'On Script' taking a bit too long to fire
Based on my original issue, this doesn't apply to me though does it? I'm not using any kind of script like that. All I'm doing is getting a terminal command to run essentially when the doorbell is pressed.
Could it possibly be that the doorbell push button, is actually sending out the RF command a few seconds after it's pressed? Is there any way I could tell this?
Could it possibly be that the doorbell push button, is actually sending out the RF command a few seconds after it's pressed? Is there any way I could tell this?
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: 'On Script' taking a bit too long to fire
Any ideas anyone? Would like to try and diagnose this to get the script firing as quickly as possible.
Who is online
Users browsing this forum: No registered users and 1 guest