Page 1 of 1
Json update switch no trigger
Posted: Tuesday 19 May 2020 12:56
by djdevil
Hello i used this code for On and Off a switch with IFTT without trigger event but from the new version Version: 2020.2 Build Hash: b63341bc0 seems to activate the trigger and then activate the dzvents script connected to the key maybe it's a bug i'm wrong to use this json call? thx
Code: Select all
OFF
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=0
ON
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=1
Re: Json update switch no trigger [Solved]
Posted: Tuesday 19 May 2020 14:45
by waaren
djdevil wrote: ↑Tuesday 19 May 2020 12:56
I used this code for On and Off a switch without trigger event but from the new version Version: 2020.2 Build Hash: b63341bc0 seems to activate the trigger and then activate the dzvents script connected to the key.
If you don't want to trigger the event system when sending this command you need to add
So the complete JSON's become
Code: Select all
OFF
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=0&parsetrigger=false
ON
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=1&parsetrigger=false
This option was added in version V4.11656 and since then the default behavior for calls with param=udevice changed.
Re: Json update switch no trigger
Posted: Wednesday 20 May 2020 10:22
by djdevil
waaren wrote: ↑Tuesday 19 May 2020 14:45
djdevil wrote: ↑Tuesday 19 May 2020 12:56
I used this code for On and Off a switch without trigger event but from the new version Version: 2020.2 Build Hash: b63341bc0 seems to activate the trigger and then activate the dzvents script connected to the key.
If you don't want to trigger the event system when sending this command you need to add
So the complete JSON's become
Code: Select all
OFF
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=0&parsetrigger=false
ON
/json.htm?type=command¶m=udevice&idx=<IDX>&nvalue=1&parsetrigger=false
This option was added in version V4.11656 and since then the default behavior for calls with param=udevice changed.
Perfect it works, I wasn't aware of it thank you very much
Re: Json update switch no trigger
Posted: Wednesday 20 May 2020 22:32
by hestia
&parsetrigger=false
Does it work also for commands like
Code: Select all
/json.htm?type=command¶m=switchlight&idx=<IDX>&switchcmd=Toggle
Re: Json update switch no trigger
Posted: Thursday 21 May 2020 0:33
by waaren
hestia wrote: ↑Wednesday 20 May 2020 22:32
&parsetrigger=false
Does it work also for commands like
Code: Select all
/json.htm?type=command¶m=switchlight&idx=<IDX>&switchcmd=Toggle
No
Re: Json update switch no trigger
Posted: Thursday 09 July 2020 9:37
by Nautilus
Could this be added? Now I cannot find a way to update the position of a "blinds percentage" device wihtout triggering the associated scripts.
Re: Json update switch no trigger
Posted: Wednesday 16 February 2022 10:31
by Hencor
In my validation it turns out that &parsetrigger=false doesn't apply to the action set in the selector switch settings. Am I right or I'm doing something wrong?
My attempt: /json.htm?type=command¶m=switchlight&idx=IDX&switchcmd=Set%20Level&level=LEVEL&parsetrigger=false
So my goal is that the selector switch action is only triggered when the user push the button on the interface and not triggered when the status is changed via json. Is there another possiblity without dzvents scripting?
Re: Json update switch no trigger
Posted: Wednesday 16 February 2022 19:24
by waltervl
Hencor wrote: ↑Wednesday 16 February 2022 10:31
In my validation it turns out that &parsetrigger=false doesn't apply to the action set in the selector switch settings. Am I right or I'm doing something wrong?
My attempt: /json.htm?type=command¶m=switchlight&idx=IDX&switchcmd=Set%20Level&level=LEVEL&parsetrigger=false
So my goal is that the selector switch action is only triggered when the user push the button on the interface and not triggered when the status is changed via json. Is there another possiblity without dzvents scripting?
As already mentioned in the wiki:
To update in Domoticz only without running it's device actions use
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=[0,1]&svalue=LEVELNR