Problem With Simple Blocky

Moderator: leecollings

Post Reply
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Problem With Simple Blocky

Post 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 3642 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 3642 times
I do not understand why not work, it seems easy!
TyzzyT
Posts: 32
Joined: Saturday 11 March 2017 11:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Contact:

Re: Problem With Simple Blocky

Post 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>
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post 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 3629 times
TyzzyT
Posts: 32
Joined: Saturday 11 March 2017 11:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Contact:

Re: Problem With Simple Blocky

Post 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.
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post by ilpier »

Yes,NOW,perhaps, i've understand!
Bagno.JPG
Bagno.JPG (46.57 KiB) Viewed 3620 times
TyzzyT
Posts: 32
Joined: Saturday 11 March 2017 11:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Contact:

Re: Problem With Simple Blocky

Post 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).
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post by ilpier »

Ok,if i understanf now it's the best way for my goal?
Bagno.JPG
Bagno.JPG (39.54 KiB) Viewed 3597 times
TyzzyT
Posts: 32
Joined: Saturday 11 March 2017 11:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Contact:

Re: Problem With Simple Blocky

Post by TyzzyT »

Looks good to me!
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post by ilpier »

later I try but thanks to you I am sure that it works!
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post 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 3592 times
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Problem With Simple Blocky

Post 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)
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
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post by ilpier »

Yessssss all Work!THX a lot to @StanHD and @TyzzyT!!
ilpier
Posts: 31
Joined: Friday 24 February 2017 12:01
Target OS: Windows
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post 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"?
Lebo2d9
Posts: 139
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version: L stab
Location: Belgium
Contact:

Re: Problem With Simple Blocky

Post by Lebo2d9 »

You can create a dummy switch containing an on delay and that switch turns off all your equipment
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
mattia81
Posts: 8
Joined: Friday 01 September 2017 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Problem With Simple Blocky

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests