Any way to speed up switching on/off?


I have two PIR security lights in my garden. They have a manual override feature where you can make the lights stay on for long periods, overriding the PIR etc.

To do this currently I have to manually turn OFF/ON/OFF/ON within 2 seconds using the fused spur switch in the house.

These PIR security lights are not currently Z-wave enabled. As a test I wired a plug on to the end of one of the lights and using an Everspring AN158 appliance plug, tried to do the OFF/ON/OFF/ON routine, but the switching of the Z-wave plug is much slower and I can’t get it to do it within the 2 seconds.

Also using code like this:

luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 93) luup.sleep(1100) luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 93) luup.sleep(1100) luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 93) luup.sleep(1100) luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 93)

Turns it OFF/ON/OFF/ON but in-order for it to work correctly, it seems my sleep delays have to be no less that 1100ms. Taking me over the 2 seconds the PIR light allows.

I guess one option is buying two new PIR lights that allow a longer window of seconds for you to send the manual override OFF/ON/OFF/ON routine. But I’d rather not have to replace them.


Also I planned on using one of those Fibaro relay switches behind the fuse spur to do the job, do they switch any faster?

I tested in the UI using one of my Leviton Switches and it is damn near instant. I can easily get the 2 cylces with-in 2 seconds. Actually, I could probably do it in 1. I even took your code and change it to my office closet device ID and change the sleep to 200 and it worked like a charm. Somethings to note though:

[ol][li]My switch is directly controlled by the Vera and has a strength of 5 (lower is better) out of I think 100.[/li]
[li]You have to understand that sometimes z-wave commands don’t fire as you’d like. They can get queued up and might mess with your expected results.[/li][/ol]

[li]Check your appliance module just to make sure it doesn’t default to “off” when you lose power. Might not be a big deal for you, but if I had PIR lights, I would want them to default to ON after a power outage.

I’m not sure if you want to replace the switch, but if you do, that might be the way to go if your switch is responsive enough. I can already tell you the Levitons are (it’s the leviton VRS15-1LZ that I tested with)

I hope that helps. I don’t have any appliance modules (inside or out), so I can’t check those for you. Seems like the everspring just might be slow to respond to commands.

Hi SirMeili

Thanks for the reply and further testing.

So it sounds like it maybe possible. I am in the UK so cannot use that same leviton VRS15-1LZ switch though.

Need to know if those Fibaro Relay switches can switch on/off quickly like this.

I tried another appliance plug module a TKB one this time and that is the same, slow at switching.


Most switches will be fast enough. But, as @SirMeili indicated, only when they are talking directly with Vera and have a strong signal.

Each Z-Wave command will take the form of;
Transmit command.
Wait for positive response.
If not positive by timeout, retransmit.
Wait for positive response.

If Vera can successfully reach the device directly, it can get a positive response in well under a second. But, if the command has to be routed through other nodes or the signal is weak intermittent, requiring a retransmit, then sub two second behavior for this code is unlikely.

Even if you get this working, it is not likely to be 100% reliable. Anything that interferes with the Z-Wave signal will cause the timing to be off.

I just stumbled on this old thread whilst searching for something else.

Well many years later I have recently installed two new 8W LED PIR security lights outside and connected them to a new Fibaro Double Switch relay module housed in an outdoor light switch.

I can now control the power to the PIR security lights via Vera and have power metering.

These new lights also have an override function to keep them turned on, which is the same routine OFF/ON/OFF/ON within 2 seconds.

I now also have a Vera Plus unit as well, was probably on a VeraLite when I started this thread.

However it is still not fast enough to toggle the relay module OFF/ON/OFF/ON within 2 seconds to turn on the override function of the PIR security lights.

Vera support said:

“The delays you encountered for the Fibaro FGS-223 switch when the scenes are running were reported to our development team and they are working on a fix patch, but for the moment I don?t have an ETA for when the fix would be released.”

In the UI7 web GUI if I manually turn Off / On the Fibaro relay module it says “Sending the Z-Wave command after 0 retries…” underneath and seems very slow at reacting to the button presses.

Likewise when using LUA code to turn Off / On the relay module it doesn’t react fast enough. ???

There is a known issue with the Fibaro Double Switch relay modules, so its not just affecting myself.,63352.0.html

Could do with a fix for this for tkbhome plug socket adapters too. The speed they update on vera is appalling, when trying to trap an on, off, on to keep a switch turned on under pleg. If anyone has an ideas on this, I?d love to hear them!