Page 1 of 1

solution for stair hallway

Posted: Saturday 19 November 2016 23:42
by qbic2007
Hello

Need some help with the following scenario, can't seem to figure it out on my own.
My stair hallway has 2 circuits, i connected both to their own fibaro double switch (output 1 and sw1 (pulse button) on both modules)

So now I can switch each circuit with its own button, but I wanna switch on both together by triggering either the upper or lower button.
I also want to have the light switch off automatically after a minute. (this is standard functionality in the fibaro double switch)

Is there a solution to have this done with groups or slave functionality? I tried with groups but currently the best I got was alternating light (very fancy but not practical) ;)

If really required I can do a blocky script for this, but I'd rather solve it with basic the network func. :idea:

Thx for reading, thanks a lot for helping out 8-)

Re: solution for stair hallway

Posted: Saturday 19 November 2016 23:50
by Egregius
In my pass2php script that would be:

Code: Select all

function lighthalldown(){
  global $a,$s,$i;
  if($a=='On'){
    if($s['lighthallup']=='Off')sw($i['lighthallup'],'On');
  }else{
    if($s['lighthallup']=='On')sw($i['lighthallup'],'Off');
  }
}
function lighthallup(){
  global $a,$s,$i;
  if($a=='On'){
    if($s['lighthalldown']=='Off')sw($i['lighthalldown'],'On');
  }else{
    if($s['lighthalldown']=='On')sw($i['lighthalldown'],'Off');
  }
}
 
With that, the lights will follow each other, no mather wath switch is used.

Re: solution for stair hallway

Posted: Sunday 20 November 2016 9:56
by qbic2007
thx Egregius, certainly helpful.

anybody has an idea for solving this without the controller/scripting?

Re: solution for stair hallway

Posted: Sunday 20 November 2016 9:58
by Egregius
What's wrong with scripting?
Oh, in case domoticz is down? How many times does that happen?

Re: solution for stair hallway

Posted: Sunday 20 November 2016 11:12
by qbic2007
:mrgreen: Lets account it to previous experiences, but I must admit Domoticz is pretty stable lately. 8-)

I put a blocky script in place for the moment.