Why is this event not working

Moderator: leecollings

Post Reply
svinedyret
Posts: 3
Joined: Wednesday 12 April 2017 19:28
Target OS: Windows
Domoticz version:
Contact:

Why is this event not working

Post by svinedyret »

I have made this event, it must check if one of my door switches are left open - but it's only the last switch in the "IF" chain that will react -
Why does it do this?
Domoticz IF Error.PNG
Domoticz IF Error.PNG (13.24 KiB) Viewed 2582 times
kubrik
Posts: 47
Joined: Wednesday 30 November 2016 15:07
Target OS: Linux
Domoticz version: 2020.2
Location: Italy
Contact:

Re: Why is this event not working

Post by kubrik »

I don't use blockly events..but i think you would add the right comparisions...

if "Door Sw.." = On or Door SW WC Stuen.. = On etc..etc..
and not
If "Door Sw.." or Door SW WC Stuen..
Ubuntu 20.04 on ACEPC AK1 (previously RPi3b+)
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Why is this event not working

Post by tozzke »

You have to say for each switch what you need it to be before it triggers, so change it to:

Code: Select all

If [Door SW Entre] = [On] or [Door SW WC stuen] = [On] or [Door SW Terasse] = [On] or [Door SW Kitchen] = [On]
Do ...
svinedyret
Posts: 3
Joined: Wednesday 12 April 2017 19:28
Target OS: Windows
Domoticz version:
Contact:

HELP NOTHING WORKS

Post by svinedyret »

NOTHING WORKS
Please Help
I have two variables:
"Alarm State" which is = 2
and "Door SW State" which is = 3

The script stops here. This means that it does not accept the statement ???
What am I doing wrong with this "Event"
alarm state.PNG
alarm state.PNG (20.67 KiB) Viewed 2552 times
If anyone understands what I am trying to do.
How will it look like in LUA?

Best Regards Allan
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Why is this event not working

Post by tozzke »

with Blockly (or even Domoticz altogether) you can't set the same variable which you already use in the if-statement. I believe it was because of preventing loops.
Replace in this blockly the variables with dummy switches and you'll see it'll work just fine
svinedyret
Posts: 3
Joined: Wednesday 12 April 2017 19:28
Target OS: Windows
Domoticz version:
Contact:

Re: Why is this event not working

Post by svinedyret »

Thanks for help :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest