Blockly event does not get fired.

Post Reply
misfit
Posts: 15
Joined: Wednesday 29 November 2017 12:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Blockly event does not get fired.

Post by misfit » Saturday 20 January 2018 22:24

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 642 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 642 times
What is the problem?

(The attachment handling of this forum is badly screwed...)
Attachments
Alarm_.jpg
Alarm_.jpg (22.55 KiB) Viewed 651 times
PIR_On_Device.jpg
PIR_On_Device.jpg (28.98 KiB) Viewed 651 times

User avatar
mrf68
Posts: 270
Joined: Monday 23 February 2015 13:45
Target OS: Windows
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Blockly event does not get fired.

Post by mrf68 » Sunday 21 January 2018 8: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.

misfit
Posts: 15
Joined: Wednesday 29 November 2017 12:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post by misfit » Sunday 21 January 2018 10:18

mrf68 wrote:
Sunday 21 January 2018 8: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.

User avatar
jvdz
Posts: 1443
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Westland/Netherlands
Contact:

Re: Blockly event does not get fired.

Post by jvdz » Sunday 21 January 2018 11: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

misfit
Posts: 15
Joined: Wednesday 29 November 2017 12:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post by misfit » Sunday 21 January 2018 16:03

jvdz wrote:
Sunday 21 January 2018 11: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!

misfit
Posts: 15
Joined: Wednesday 29 November 2017 12:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post by misfit » Monday 22 January 2018 0:20

mrf68 wrote:
Sunday 21 January 2018 8: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?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest