dzVents and Fibaro switch event

Easy to use, 100% Lua-based event scripting framework.
Post Reply
Dols
Posts: 3
Joined: Friday 15 January 2016 15:22
Target OS: Windows
Domoticz version:
Contact:

dzVents and Fibaro switch event

Post by Dols » Wednesday 11 July 2018 23:10

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: 920
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzVents and Fibaro switch event

Post by waaren » Thursday 12 July 2018 10:11

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() ?
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Dols
Posts: 3
Joined: Friday 15 January 2016 15:22
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents and Fibaro switch event

Post by Dols » Friday 13 July 2018 23:45

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: No registered users and 3 guests