Creating an Event - Variable Outcome

Moderator: leecollings

Post Reply
Jzjr
Posts: 14
Joined: Monday 05 October 2015 15:00
Target OS: Linux
Domoticz version: 4.10717
Location: UK
Contact:

Creating an Event - Variable Outcome

Post by Jzjr »

Hi,

I have a door contact and a virtual switch within Domoticz. I am trying to create an event which starts a scene if the door opens while the virtual switch is off and does nothing if the door opens but the virtual switch is on.

So far I have tried using Blockly but haven't had any success so far.

I have tried:
Screen Shot 2016-11-10 at 20.31.41.png
Screen Shot 2016-11-10 at 20.31.41.png (23.72 KiB) Viewed 1290 times
I have also tried adding 'or else' if Door=Open + Goodbye(Virtual)=On
and left the 'Do' block empty.

At the moment I am looking for an implementation in Blockly - I have never used Lua before and would like a quick solution before I embark on the adventure of learning and writing a script in Lua.

If anyone has any suggestions it would be greatly appreciated.

Many thanks,
Fred.
-
Fred Boniface

- Dell Optiplex 390 - Ubuntu Linux 18.04.01 LTS - Aeotec Z-Wave USB - RFXtrx433 - Hue Hub 2 - LGTV Plugin -
Hue Bulbs in every room, Temp Sensors on each floor, Temp-Monitoring Fridge, LightWaveRF 'Mood Switches'
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Creating an Event - Variable Outcome

Post by Egregius »

Use a simple if block instead of a if/else block
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Creating an Event - Variable Outcome

Post by Derik »

it's looks that some things are not implement in blockley
The thermostat is not working also...
perhaps you can write?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Jzjr
Posts: 14
Joined: Monday 05 October 2015 15:00
Target OS: Linux
Domoticz version: 4.10717
Location: UK
Contact:

Re: Creating an Event - Variable Outcome

Post by Jzjr »

Thanks for your replies;

I have tried a single if block as in the above image, can it be made simpler?


Sent from my iPhone using Tapatalk
-
Fred Boniface

- Dell Optiplex 390 - Ubuntu Linux 18.04.01 LTS - Aeotec Z-Wave USB - RFXtrx433 - Hue Hub 2 - LGTV Plugin -
Hue Bulbs in every room, Temp Sensors on each floor, Temp-Monitoring Fridge, LightWaveRF 'Mood Switches'
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: RE: Re: Creating an Event - Variable Outcome

Post by StanHD »

Jzjr wrote:Thanks for your replies;

I have tried a single if block as in the above image, can it be made simpler?


Sent from my iPhone using Tapatalk
Yes, as @Egregius suggests, use the "If" block without the blue symbol.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Jzjr
Posts: 14
Joined: Monday 05 October 2015 15:00
Target OS: Linux
Domoticz version: 4.10717
Location: UK
Contact:

Re: Creating an Event - Variable Outcome

Post by Jzjr »

Thanks for your replies, using the 'If' block without the symbol worked. I wasn't aware there was any difference unless using an 'else' statement.

Cheers all,
Fred.
-
Fred Boniface

- Dell Optiplex 390 - Ubuntu Linux 18.04.01 LTS - Aeotec Z-Wave USB - RFXtrx433 - Hue Hub 2 - LGTV Plugin -
Hue Bulbs in every room, Temp Sensors on each floor, Temp-Monitoring Fridge, LightWaveRF 'Mood Switches'
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest