Stairs

Moderator: leecollings

Post Reply
Ronnyboy
Posts: 10
Joined: Monday 25 January 2016 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Stairs

Post by Ronnyboy »

Who can help me?
I got 2 motion sensors
1 on top of the stair and one downstair
I have leds on each step.
Now i wil turn them on
from 17:00 til 06:00 at 20% (nightguide) but if i walk on it, it must be 100% for 1 minute,til 24:00. And if the one downstair is active,the one upstair may not response for that minute.
I hope that someone can help me with blockly because lua i don't understand.
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Stairs

Post by remb0 »

have you searched the forum already? and have you tried some simply blockys already?
User avatar
Siewert308SW
Posts: 290
Joined: Monday 29 December 2014 15:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Stairs

Post by Siewert308SW »

Not that hard to create, Have the same setup only in lua.
As in blocky nine times out of then it doesn't work due te down stairs sensor.
Our coats hang in sight of the sensor down stairs.
So the sensor is activated when someone hangs his coat and triggers the light.
There for i had to create several variables to out rule someone not walking on the stairs.
In blocky it didn't work but lua it works like a charm.

You could create something like this in blocky but nor sure if it will work in your situation.

- Walking downstairs: (with timed led OFF)


if [motion sensor upstairs] = On and [motion sensor downstairs] = Off and [time > 17:00] and [time < 23:59] then
set [led] = 100% FOR 1 minute
end

or

- Walking downstairs: (with motion led OFF when you are downstairs)

if [motion sensor upstairs] = On and [motion sensor downstairs] = Off and [time > 17:00] and [time < 23:59] then
set [LED] = 100%

elseif [motion sensor downstairs] = On and [LED] = On then
set [LED] = Off
end

- Walking upstairs: (with motion led OFF when you are downstairs)

if [motion sensor downstairs] = On and [motion sensor upstairs] = Off and [time > 17:00] and [time < 23:59] then
set [LED] = 100%

elseif [motion sensor upstairs] = On and [LED] = On then
set [LED] = Off
end

As mentioned earlier, in blocky it hard to trigger it right without a bunch of variables.
Why? As Blocky doesn't work as LUA does and i mean in devicechanged.
Hope i explain it right.

If you for example say in a blocky if [motion up] = On and [motion down] = Off
Then a blocky will trigger the event if for example the down sensor is turning off earlier then up sensor due to rf noise while you already are upstairs.
Thats why i like LUA is a devicechanged command will prevent that.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest