Page 1 of 2
.silent() seems not to work anymore
Posted: Friday 10 May 2019 10:29
by poudenes
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.6.4 (default, Oct 10 2018, 09:47:26) [GCC 6.3.0 20170516]
It seems that the silent() function in dzVent is not working anymore.
When I turn on a bulb with this setting:
Code: Select all
domoticz.devices(BulbDressoirAll).switchOn().silent()
domoticz.helpers.Disco(domoticz,BulbDressoir1,nil,1,1)
domoticz.helpers.Disco(domoticz,BulbDressoir2,nil,1,2)
domoticz.helpers.Disco(domoticz,BulbDressoir3,nil,1,3)
BulbDressoirAll are the 3 bulbs BulbDressoir1,2,3 in 1 device
All 3 bulbs go on and after that the Disco part fires. Disco coded in global_data.
Re: .silent() seems not to work anymore
Posted: Friday 10 May 2019 10:39
by waaren
poudenes wrote: ↑Friday 10 May 2019 10:29
It seems that the silent() function in dzVent is not working anymore.
Sorry but I don't understand with the information you shared here. If you give the command switchOn() it should turn the device On. The option silent() is to be used to suppress any subsequent event triggering.
Maybe I understand better if you show the complete script(s) and relevant loglines ?
Re: .silent() seems not to work anymore
Posted: Friday 10 May 2019 10:50
by poudenes
-- switch on but do not trigger follow up events device.switchOn().silent()
silent(): Function. No follow-up events will be triggered: mySwitch.switchOff().silent().
This is what wiki say about it.
It will turn on the device without actual action
Re: .silent() seems not to work anymore
Posted: Friday 10 May 2019 14:32
by waaren
poudenes wrote: ↑Friday 10 May 2019 10:50
-- switch on but do not trigger follow up events device.switchOn().silent()
silent(): Function. No follow-up events will be triggered: mySwitch.switchOff().silent().
This is what wiki say about it.
It will turn on the device without actual action
No that is what silent() does. A 'follow up event' in the event system is not the same as the action. What you do here is ask he event system (via dzVents) to switch the device Off but prevent that action to become a trigger for a next event.
You were the OP from
this thread where you asked for a method to change the state of a device in domoticz without doing the physical switch.
In that thread is was concluded that it can be done using an API but that it will trigger a subsequent event. That conclusion has not changed.
Re: .silent() seems not to work anymore
Posted: Friday 10 May 2019 17:18
by poudenes
So when I use this command it will turn on or off in my situation the bulb but no other events will react on the state change?
What I want is turn state of bulb on or off without turn it on for real.
Re: .silent() seems not to work anymore
Posted: Friday 10 May 2019 18:28
by waaren
poudenes wrote: ↑Friday 10 May 2019 17:18
So when I use this command it will turn on or off in my situation the bulb but no other events will react on the state change?
Yes. If it is device controlled by domoticz and not by a plugin.
What I want is turn state of bulb on or off without turn it on for real.
for Off use:
Code: Select all
local idx = xxxx
local Off = dz.settings['Domoticz url'] .. "/json.htm?type=command¶m=udevice&nvalue=0&svalue=0&idx=" .. idx
dz.openURL(Off)
for On use
Code: Select all
local idx = xxxx
local On = dz.settings['Domoticz url'] .. "/json.htm?type=command¶m=udevice&nvalue=1&svalue=1&idx=" .. idx
dz.openURL(On)
Re: .silent() seems not to work anymore
Posted: Saturday 11 May 2019 9:34
by poudenes
Thanks. I will add this into my Notes for archiving
maybe a feature idea to create a nice dzVents command for it.
//Keep up the good work!
Re: .silent() seems not to work anymore
Posted: Saturday 11 May 2019 10:12
by waaren
poudenes wrote: ↑Saturday 11 May 2019 9:34
maybe a feature idea to create a nice dzVents command for it.
Pull request
#3203 is in the process of being reviewed.
Re: .silent() seems not to work anymore
Posted: Saturday 11 May 2019 12:03
by poudenes
Re: .silent() seems not to work anymore
Posted: Monday 13 May 2019 19:38
by poudenes
Did a test and quietOn quietOff work fine !!

Re: .silent() seems not to work anymore
Posted: Monday 13 May 2019 19:57
by waaren
poudenes wrote: ↑Monday 13 May 2019 19:38
Did a test and quietOn quietOff work fine !!
Thanks for testing. Good to hear that it works for you !
Re: .silent() seems not to work anymore
Posted: Monday 13 May 2019 21:28
by poudenes
waaren wrote: ↑Monday 13 May 2019 19:57
poudenes wrote: ↑Monday 13 May 2019 19:38
Did a test and quietOn quietOff work fine !!
Thanks for testing. Good to hear that it works for you !
Hope more people can use this command

other wise I feel flattered

Re: .silent() seems not to work anymore
Posted: Tuesday 21 May 2019 11:29
by cherowley
I'm using virtual devices and lua scripts - anyway to do quiet updates for this combo?
Re: .silent() seems not to work anymore
Posted: Tuesday 21 May 2019 15:23
by waaren
cherowley wrote: ↑Tuesday 21 May 2019 11:29
I'm using virtual devices and lua scripts - anyway to do quiet updates for this combo?
Yes, but remember quiet is not the same as silent
- quietOn(), quietOff() ==>> status in domoticz will change but command is not send to physically attached device. Subsequent events are triggered.
- silent() ==>> status in domoticz will change and command is send to physically attached device. Subsequent events are not triggered
For a virtual device, I cannot think of a usecase for quietOn() or quietOff() so you might want to use silent().
In standard domoticz Lua this will translate to leave out something as ["_trigger"]=true
You might want to have a look at
dzVents
Re: .silent() seems not to work anymore
Posted: Wednesday 02 December 2020 10:38
by samourai47
Hello
I have a problem with .silent() who send order when is in action. So i try with json and it seem's to work
BUT
my garage gate who is actionned whith rfxcom. I don't have return of the position
I put a door sensor and i want, if the door is open (senseor open), modify the Garage Gate device wwithout sending action
My Garage Gate is Idx : 150
I try this
Code: Select all
return {
on = {
devices = {
'Garage Sensor'
}
},
execute = function(dz, device)
if (device.active) then
local idx = 150
local Off = dz.settings['Domoticz url'] .. "/json.htm?type=command¶m=udevice&nvalue=0&svalue=0&idx=" .. idx
dz.openURL(Off)
else
local idx = 150
local On = dz.settings['Domoticz url'] .. "/json.htm?type=command¶m=udevice&nvalue=1&svalue=1&idx=" .. idx
dz.openURL(On)
end
end
}
It work's but the order are inverted. When the sensor is closed he send Open to the Gate
And when the sensor is open he send Closed to the gate
I try mamny and many change but i don't arrive at the good result
Thank's for your help
Re: .silent() seems not to work anymore
Posted: Wednesday 02 December 2020 11:51
by waaren
samourai47 wrote: ↑Wednesday 02 December 2020 10:38
I have a problem with .silent() who send order when is in action. So i try with json and it seem's to work
It work's but the order are inverted. When the sensor is closed he send Open to the Gate
Can you try below script?
Code: Select all
return
{
on =
{
devices =
{
'Garage Sensor',
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to domoticz.LOG_ERROR when all is OK
marker = 'quiet gate',
},
execute = function(dz, item)
local gate = dz.devices(150)
dz.log('State of ' .. item.name .. ' is ' .. item.state, dz.LOG_DEBUG)
if item.active then
gate.quietOn() -- change to gate.quietOff() if action is reverted
else
gate.quietOff() -- change to gate.quietOn() if action is reverted
end
end
}
Re: .silent() seems not to work anymore
Posted: Wednesday 02 December 2020 15:53
by samourai47
Thank's for your help
It work's fine.
I complete my configuration in this direction
Thank's a lot
Re: .silent() seems not to work anymore
Posted: Friday 04 December 2020 21:50
by samourai47
Hello
I have a little problem. My device is recognised as a blinds with open/stopped/closed
The dzvent script work's fine with "on" who send the "open" command
But with "off" the device is notified as "Stopped" and not as "closed"
So domoticz and other interface think it is always "open"...
Have you an idea?
Thank's for your help
Re: .silent() seems not to work anymore
Posted: Saturday 05 December 2020 1:01
by waaren
samourai47 wrote: ↑Friday 04 December 2020 21:50
I have a little problem. My device is recognised as a blinds with open/stopped/closed
Is this issue with the same device as was used in the earlier question and with the quietOn() and quietOff() methods or is this about something else?
What is the deviceType and deviceSubtype of the device as shown on the device tab?
Re: .silent() seems not to work anymore
Posted: Saturday 05 December 2020 9:09
by samourai47
Thank's for your help
It's the same configuration as used in the earlier question.
The device that i wan't have position is a rfxcom somfy garage gate who is recognised as a blind with 3 positions Open/ Closed / Stopped. I can actionned with domoticz button or with a telecommande or with google voice. In this case domoticz dont' see the change.
My idea is to add a door sensor on the gate.
-> If the gate is open door sensor it open and send "on" on the garage gate who chage to open.
-> if the sensor is closed it send Off on the garage gate who change to closed. . In this case, it change to stopped and domoticz do not recognize the position.