dzVents and Fibaro switch event

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Dols
Posts: 27
Joined: Friday 15 January 2016 14:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

dzVents and Fibaro switch event

Post by Dols »

Hello,

Question:
Is there a way in an dzVents script to differentiate the source of an switch on/off event comming from a z-wave device? I want the have the script to have a different behaviour when it's done manually with the wall switch, or by a z-wave command.

Background story:

I have an Fibaro Double Switch 2 an z-wave device. I use the switch input not only for switching on/off the attached lamp, but also as an input to my dzEvent script. I use this to initiate an blanking period for my motion sensor, so the lamp is not turned on, when i walk away from the switch.

So far not a problem. Even turning on/off the lamp from within the dzEvent script does not fire this event, this is what i want but....

using "domoticz.devices(LampName).switchOff().afterSec(LampOnDuration)" does fire event to notify my script that the lamp is turned off. This is the exact same event as the lamp is turned off manually with the switch. In this case i don't want the script starts the blanking period.

Regards,
Richard Dols
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzVents and Fibaro switch event

Post by waaren »

Dols wrote: Wednesday 11 July 2018 23:10 ....
using "domoticz.devices(LampName).switchOff().afterSec(LampOnDuration)" does fire event to notify my script that the lamp is turned off. This is the exact same event as the lamp is turned off manually with the switch. In this case i don't want the script starts the blanking period.

Regards,
Richard Dols
Did you try to use the extra option .silent() ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Dols
Posts: 27
Joined: Friday 15 January 2016 14:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents and Fibaro switch event

Post by Dols »

waaren wrote: Thursday 12 July 2018 10:11 Did you try to use the extra option .silent() ?

No i did not. Looking at the .silent() function, this may do the trick for me. I will test this.

Thanks.

Regards,
Richard
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest