Help needed blocklyscript doorsensor toilet

Moderator: leecollings

Post Reply
yazoo
Posts: 11
Joined: Tuesday 19 March 2019 16:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Help needed blocklyscript doorsensor toilet

Post by yazoo »

i have a door sensor
what i want is is the door is open light goos on. but then when the door is kloos and goos open witin 7 minutes from het first time the door is open it me not sent that the light goos on

what i have now is

if-->sensor1=Alarm
do set-->WC lamp=on

who can help me finist this script if it dont can with blockly then with an another script.
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by Gerwin »

more info is more than welcome
wich sensor are you using only open state or open and close
picture of your blockly

gerwin
yazoo
Posts: 11
Joined: Tuesday 19 March 2019 16:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by yazoo »

Gerwin wrote: Thursday 04 April 2019 11:13 more info is more than welcome
wich sensor are you using only open state or open and close
picture of your blockly

gerwin
this a simpel door magneet kerui state normal/alarm (same as open and close)
the script what if have works only it isnt finnist en that i dont no how to do.

if-->sensor1=Alarm
do set-->WC lamp=on
sensor1.png
sensor1.png (6.38 KiB) Viewed 1044 times
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by kuifje »

Yazoo,

You have to use a user variable.
When sensor1 is alarm and sensor1 is 0
Set sensor1 to 1
Set wclamp to on
If sensor1 is no alarm and sensor1 is 1
Set wclamp off

Use the if else blockly. The one with the blue shizzle.
Mabey this will get you in the right direction

Kuifje
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by Gerwin »

Make a dummy switch and make them a timer and set the time you want that the light must go out
And use the block and
Like : if sensor 1 =alarm and timer is off
Set timer on
Set wc lamp on
yazoo
Posts: 11
Joined: Tuesday 19 March 2019 16:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by yazoo »

kuifje wrote: Thursday 04 April 2019 12:08 Yazoo,

You have to use a user variable.
When sensor1 is alarm and sensor1 is 0
Set sensor1 to 1
Set wclamp to on
If sensor1 is no alarm and sensor1 is 1
Set wclamp off

Use the if else blockly. The one with the blue shizzle.
Mabey this will get you in the right direction

Kuifje
hello kuifje can you please help me i try to make what you are writen ,but i am a biginner i do somting not goed. this is wat i have.
test1.png
test1.png (42.18 KiB) Viewed 1016 times
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Help needed blocklyscript doorsensor toilet

Post by kuifje »

Yazoo,

you have to use 1 if do blockly en put the else under the if. ( example )
Knipsel.JPG
Knipsel.JPG (23.58 KiB) Viewed 1004 times
The user variable has to be integer. ( Example )
Knipsel1.JPG
Knipsel1.JPG (18.52 KiB) Viewed 1004 times

Kuifje
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest