Blockly event does not get fired.

Moderator: leecollings

Post Reply
misfit
Posts: 18
Joined: Wednesday 29 November 2017 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly event does not get fired.

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

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

Re: Blockly event does not get fired.

Post 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.
misfit
Posts: 18
Joined: Wednesday 29 November 2017 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post 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.
User avatar
jvdz
Posts: 2333
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Blockly event does not get fired.

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
misfit
Posts: 18
Joined: Wednesday 29 November 2017 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post 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!
misfit
Posts: 18
Joined: Wednesday 29 November 2017 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly event does not get fired.

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest