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.
Complex light setting
Moderator: leecollings
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Complex light setting
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
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
Re: RE: Complex light setting
Check the donoticz settings, there is a setting on how the doorbell should react.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.
-
- Posts: 9
- Joined: Saturday 15 October 2016 16:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Complex light setting
Thank you.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:
The following did the job:

What did you mean with variables?
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Complex light setting
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.avdl72 wrote:Thank you.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:
The following did the job:
What did you mean with variables?
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]
[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]
-
- Posts: 9
- Joined: Saturday 15 October 2016 16:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Complex light setting
Okay, thx anyway.
Who is online
Users browsing this forum: No registered users and 1 guest