Blockly question

Moderator: leecollings

Post Reply
Adam
Posts: 3
Joined: Thursday 16 July 2015 11:25
Target OS: -
Domoticz version:
Location: Deutschland
Contact:

Blockly question

Post by Adam »

Hello,

First I want to apologize for my bad English :-(

I have a question, how can I use Blockly to get a socket turned on when a window is open for more than 15s?


Thanks and best regards, Adam
User avatar
Denny64
Posts: 53
Joined: Friday 03 February 2017 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Italy
Contact:

Re: Blockly question

Post by Denny64 »

I think you can do it with dummy switch.

First make a dummy switch and call it like you want. (Test in this case).
Make a second dummy switch to control time overruns, or use an existing one. (Check in this case)
Now you have three devices:
"Door" The switch to control
"Test" The dummy switch
"Check" The alarm switch

Than blockly:

IF Door=On AND Test=Off
SET Test=On After 15 seconds

ELSE IF Door=Off AND Test=ON
SET Test=Off

ELSE IF Door=On AND Test=On
SET Check=ON
SET Test=Off
Adam
Posts: 3
Joined: Thursday 16 July 2015 11:25
Target OS: -
Domoticz version:
Location: Deutschland
Contact:

Re: Blockly question

Post by Adam »

Great thank you. Will test it later.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest