Event triggered automatically
Posted: Friday 25 September 2020 21:10
Hi,
I'm new in Domoticz/Blockly and I have a problem setting a push button acting as switch.
1. From "Learn Light/Switch" I created a "Push On Button" with name "BlackButton".
2. I created user variable "BlackButtonVariable", type = "String", default value = "on".
3. I created a Blockly script with name "BlackButtonScript" which should make push button acting as switch: If I click "BlackButton" in Domoticz or if I push physical button, It works as expected.
This is log:
The problem is, that script is periodically triggered by system after about each half minute which changes state of switch (I did not press button):
Thanks for your help.
I'm new in Domoticz/Blockly and I have a problem setting a push button acting as switch.
1. From "Learn Light/Switch" I created a "Push On Button" with name "BlackButton".
2. I created user variable "BlackButtonVariable", type = "String", default value = "on".
3. I created a Blockly script with name "BlackButtonScript" which should make push button acting as switch: If I click "BlackButton" in Domoticz or if I push physical button, It works as expected.
This is log:
2020-09-25 20:59:29.066 (RfxCom) Lighting 4 (BlackButton)
2020-09-25 20:59:29.079 EventSystem: Event triggered: BlackButtonScript_2
2020-09-25 20:59:29.037 Status: User: Admin initiated a switch command (2344/BlackButton/On)
2020-09-25 20:59:29.079 Status: EventSystem: Fetching URL http://192.168.1.11/relay/0?turn=off after 0.2 seconds...
2020-09-25 20:59:30.108 Status: Set UserVariable BlackButtonVariable = off
2020-09-25 20:59:31.540 (RfxCom) Lighting 4 (BlackButton)
2020-09-25 20:59:31.552 EventSystem: Event triggered: BlackButtonScript_1
2020-09-25 20:59:31.511 Status: User: Admin initiated a switch command (2344/BlackButton/On)
2020-09-25 20:59:31.552 Status: EventSystem: Fetching URL http://192.168.1.11/relay/0?turn=on after 0.2 seconds...
2020-09-25 20:59:32.583 Status: Set UserVariable BlackButtonVariable = on
The problem is, that script is periodically triggered by system after about each half minute which changes state of switch (I did not press button):
Is it a problem in my script?2020-09-25 21:02:26.520 EventSystem: Event triggered: BlackButtonScript_1
2020-09-25 21:02:26.520 Status: EventSystem: Fetching URL http://192.168.1.11/relay/0?turn=on after 0.2 seconds...
2020-09-25 21:02:27.559 Status: Set UserVariable BlackButtonVariable = on
2020-09-25 21:03:09.764 EventSystem: Event triggered: BlackButtonScript_2
2020-09-25 21:03:09.764 Status: EventSystem: Fetching URL http://192.168.1.11/relay/0?turn=off after 0.2 seconds...
2020-09-25 21:03:10.788 Status: Set UserVariable BlackButtonVariable = off
Thanks for your help.