Page 1 of 1

Re: Do not trigger action if...

Posted: Wednesday 02 August 2017 1:14
by sion
Have a read through here: https://www.domoticz.com/forum/viewtopic.php?t=8495

And also here
https://www.domoticz.com/forum/viewtopi ... 28&t=15822

They are talking about updating the status of a virtual switch without triggering it the events linked to it.

If you use:


commandArray["UpdateDevice"] = "54|0|Off"

commandArray["UpdateDevice"] = "54|1|On"

where 54 = IDx of the switch
where 0 is the N value
where "Off" is the S value

It should update the status of the switch without triggering any events.

Re: Do not trigger action if...

Posted: Wednesday 02 August 2017 9:42
by dannybloe
This is quite interesting. I'll add a silent argument to the switchOn() and switchOff() methods:

Code: Select all

myDevice.switchOn(true) -- will not trigger events
In the meantime you can do this:

Code: Select all

mySwitch.update(0, 'Off') 
mySwitch.update(1, 'On') 
Do NOT fiddle directly with commandArrays in dzVents as it most certainly will give you nasty side effects! Always use the api (domoticz.sendCommand() or device.update())

Re: Do not trigger action if...

Posted: Sunday 06 August 2017 19:17
by bimse
Will there be the same option with domoticz.devices('Security Panel').armAway()