Complex light setting

Moderator: leecollings

Post Reply
avdl72
Posts: 9
Joined: Saturday 15 October 2016 16:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Complex light setting

Post by avdl72 »

Can someone please help me with the following?

My outdoor light turns on at 30% when Sunset is triggered and turns off when sunrise is triggered.
Now I want the outdoor light turned to 100% for 1 minute when the doorbel is pressed and after 1 minute turn back to 30%.

I have already tried a lot but te last step (back to 30%) is not working yet and I have no idea how to do this.
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Complex light setting

Post by tozzke »

I'm assuming the 'Doorbell' is the kind which turns on (according to Domoticz) for a short period of time when pressed and turns off when released

Then this should pretty much do the trick:

If [Time >= Sunset] or [Time <= Sunrise] and [Doorbell = Off] and [Outdoor light = Off]
Do [Set [Outdoor light = Level 30%]]
Else if [Time >= Sunset] or [Time <= Sunrise] and [Doorbell = On]
Do [Set [Outdoor light = level 100%]
Do [Set [Outdoor light = level 30% After 60 seconds]
Else if [Time >= Sunrise] and [Time <= Sunset] and [Outdoor light ≠ Off]
Do [Set [Outdoor light] = Off]]

You might want to add a variable to prevent retriggering of certain lines
jjnj

Re: RE: Complex light setting

Post by jjnj »

avdl72 wrote:Can someone please help me with the following?

My outdoor light turns on at 30% when Sunset is triggered and turns off when sunrise is triggered.
Now I want the outdoor light turned to 100% for 1 minute when the doorbel is pressed and after 1 minute turn back to 30%.

I have already tried a lot but te last step (back to 30%) is not working yet and I have no idea how to do this.
Check the donoticz settings, there is a setting on how the doorbell should react.
avdl72
Posts: 9
Joined: Saturday 15 October 2016 16:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Complex light setting

Post by avdl72 »

tozzke wrote:I'm assuming the 'Doorbell' is the kind which turns on (according to Domoticz) for a short period of time when pressed and turns off when released

Then this should pretty much do the trick:
Thank you.
The following did the job:
Image

What did you mean with variables?
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Complex light setting

Post by tozzke »

avdl72 wrote:
tozzke wrote:I'm assuming the 'Doorbell' is the kind which turns on (according to Domoticz) for a short period of time when pressed and turns off when released

Then this should pretty much do the trick:
Thank you.
The following did the job:
Image

What did you mean with variables?
check your log when it's between sunset and sunrise. You'll probably see a few lines stating this blockly is triggered because I think the 'Deurbelknop' will be 'On' for a few seconds. This means that your second line of this blockly will trigger multiple times (as long as that 'Deurbelknop' is 'On') because the result of this statement is true.
If you add a variable e.g. 'Deurbelknop_buitenlamp' and add that to the blockly, it won't trigger multiple times.
The seconds line will be something like this:

Code: Select all

Else if [Time >= [Sunset]] or [Time <= [Sunrise]] and [[Deurbelknop] = [On]] and [[Var Deurbelknop_buitenlamp] = [0]]
Do [Set [Buitenlamp] = [Level (%) 100]]
Do [Set Var [Deurbelknop_buitenlamp] = [1]]
Do [Set Var [Deurbelknop_buitenlamp] = [0] After [5*] seconds]
* Depends on how long the 'Deurbelknop' stays 'On' when pressed

[edit]
You can forget what I typed. Blockly won't let you check a variable in the 'if' statement and change that same variable in the output so this won't work
[/edit]
avdl72
Posts: 9
Joined: Saturday 15 October 2016 16:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Complex light setting

Post by avdl72 »

Okay, thx anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest