Page 1 of 1

Blockly event does not get fired.

Posted: Saturday 20 January 2018 21:24
by misfit
This 'Device' event gets fired if one of my PIR sensors changes state to 'On' and security status is 'Armed Away'. I set a delay so i have time to disarm the system when entering home:
PIR_On_Device.jpg
PIR_On_Device.jpg (28.98 KiB) Viewed 992 times
The problem is that the following script (script type: 'Time') does not get fired after the value of 'disarm_delay_expired' changes to '1':
PIR_Alarm.jpg
PIR_Alarm.jpg (22.55 KiB) Viewed 992 times
What is the problem?

(The attachment handling of this forum is badly screwed...)

Re: Blockly event does not get fired.

Posted: Sunday 21 January 2018 7:56
by mrf68
As far as I know, the changing state of a variable does not trigger an event. Try making it an On/Off dummy switch and have that sending a message when it is turned on.

Re: Blockly event does not get fired.

Posted: Sunday 21 January 2018 9:18
by misfit
mrf68 wrote: Sunday 21 January 2018 7:56 As far as I know, the changing state of a variable does not trigger an event. Try making it an On/Off dummy switch and have that sending a message when it is turned on.
Yes but as its a timed event (script type: 'Time'), the state of the variable should be checked in every minute. Or did i miss something? Thank You.

Re: Blockly event does not get fired.

Posted: Sunday 21 January 2018 10:43
by jvdz
I think it needs a Time test to fire as time script like I also mentioned in this thread:
http://www.domoticz.com/forum/viewtopic ... 85#p166122

Jos

Re: Blockly event does not get fired.

Posted: Sunday 21 January 2018 15:03
by misfit
jvdz wrote: Sunday 21 January 2018 10:43 I think it needs a Time test to fire as time script like I also mentioned in this thread:
http://www.domoticz.com/forum/viewtopic ... 85#p166122

Jos
Indeed it helped. Thank you!

Re: Blockly event does not get fired.

Posted: Sunday 21 January 2018 23:20
by misfit
mrf68 wrote: Sunday 21 January 2018 7:56 As far as I know, the changing state of a variable does not trigger an event. Try making it an On/Off dummy switch and have that sending a message when it is turned on.
Then, what is the purpose of 'UserVariable' event type?