Page 1 of 1

Problem With Simple Blocky

Posted: Thursday 30 March 2017 12:33
by ilpier
Hi to all,
GOAL:use two presence sensor for set ON a Light and set OFF if both sensor are off.
i've create this blocky for light ON and that work well,if both or only one sensor finds presence set the lights ON.
Auto ON Bagno.jpg
Auto ON Bagno.jpg (50.93 KiB) Viewed 3744 times
Now,i've create another blocky for set light OFF when BOTH sensor are OFF but this don't work and the light remain ON forever
AutoOFF Bagno.jpg
AutoOFF Bagno.jpg (18.7 KiB) Viewed 3744 times
I do not understand why not work, it seems easy!

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 12:41
by TyzzyT
First: you better create one Blocky for it and make a second 'Else if'. Not necessary, but may give you some more overview.
Second: You can't make two sensors 'and' without an condition. So you have to create IF <Sensore Bagno 1 = Off> and <Sensore Bagno 2 = Off> SET <Bagno = Off>

By the way, you may also check if Bagno is already on/off. This way Domoticz won't send an On or Off signal every second. So IF <Sensore Bagno 1 = Off> and <Sensore Bagno 2 = Off> and <Bagno = On> SET <Bagno = Off>

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 14:53
by ilpier
thanks a lot, really very useful tips not only for this solution!
I am away from home so I do not know if it works but I think it is correct now!
Bagno.JPG
Bagno.JPG (41.76 KiB) Viewed 3731 times

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 15:08
by TyzzyT
Looks good to me, but maybe you can add <Bagno = Off> to the first two rows. Because right now Blocky is constantly setting Bagno = On, where it is only needed to set Bagno = On while Bagno = Off.

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 15:23
by ilpier
Yes,NOW,perhaps, i've understand!
Bagno.JPG
Bagno.JPG (46.57 KiB) Viewed 3722 times

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 16:11
by TyzzyT
This seems correct, you may also simplify it to have only one row for setting Bagno = On.
You can create:
If <<Sensore Bagno 1 = On> OR <Sensore Bagno 2 = On>> AND <<Time >Sunset> or <Time <Sunrise>> AND <Bagno = Off>
Do Set Bagno = On

Make sure you nest Sensore Bagno 1 & 2 in ONE block. And to nest Time in ONE block (like you already have).

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 16:38
by ilpier
Ok,if i understanf now it's the best way for my goal?
Bagno.JPG
Bagno.JPG (39.54 KiB) Viewed 3699 times

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 16:48
by TyzzyT
Looks good to me!

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 17:00
by ilpier
later I try but thanks to you I am sure that it works!

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 17:18
by ilpier
Sorry...i've another problem and i try to explain,it's not simple in my bad english!
In DomoticZ i've add Logitech Harmony Control and all work fine BUT there is one switch "poweroff" for PowerOff all activity.
I wish that turning off a switch, for example, the "XBOX" switch became active the "POWEROFF" switch in automatic.
i've create that blocky but if i change activity,for example,XBOX to AppleTV,that blocky active PowerOFF before of AppleTV!
The solution for me is "IF (all activity = OFF for 3 second) -> SET -> (PowerOFF = ON)" but i can't add function "FOR 3 SECOND"!
Harmony.JPG
Harmony.JPG (51.67 KiB) Viewed 3694 times

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 18:32
by StanHD
Do you want power off when all other switches are off? If yes then you just need something like:

If ([AppleTV]=Off) and ([Netflix]=Off) and ([PC]=Off) ........ etc.
Do Set ([PowerOff]=On)

Re: Problem With Simple Blocky

Posted: Thursday 30 March 2017 23:31
by ilpier
Yessssss all Work!THX a lot to @StanHD and @TyzzyT!!

Re: Problem With Simple Blocky

Posted: Monday 03 April 2017 10:09
by ilpier
Hi to all,my problem with Harmony Remote still alive!!
With this blocky sometime the new activity start in delay and the blocky active PowerOFF before.
There is no way for add "For X Second"?

Re: Problem With Simple Blocky

Posted: Monday 03 April 2017 10:23
by Lebo2d9
You can create a dummy switch containing an on delay and that switch turns off all your equipment

Re: Problem With Simple Blocky

Posted: Monday 25 September 2017 10:14
by mattia81
Can I resume this old post? :)

ilpier, I am very interested to integrate appletv to domoticz. Can you control AppleTV status?

ps. I'm italian...i'm looking for some italian tutorials if exists