Page 1 of 1

Timer Delay using Blocky

Posted: Monday 02 December 2013 21:06
by simon_rb
Hi all, just wondered if this is possible:- I have 3 main activities.. Sky, Films and Xbox. I select one of them (dummy switch) and a device to watch it on like living room TV. And its does its magic and all is good. Now to turn things off I only turn the activity off (same dummy switch). So....

Sky dummy switch
Film dummy switch
Xbox dummy switch.

I have a blocky event setup that when all 3 are not on then turn off all TVs and projector if its on which works well until say we are watching sky and then decide to watch a film. Sometimes the Sky dummy switch turns off before the film one comes on which results with all TVs turning off. I was wondering if there is a way in blocky to say if these 3 activities are off for 30 seconds then turn all TVs off? And if one of the above switches comes on then cancel the turn TV off event.

Hope this makes sense to someone.

Cheers
Simon

Re: Timer Delay using Blocky

Posted: Wednesday 09 December 2015 6:43
by d4nh
im looking for something like this as well

Re: Timer Delay using Blocky

Posted: Wednesday 09 December 2015 7:18
by alfred_j_kwak
How about on more dummy switch. Something like AllOff.
In this dummy got to edit and set Off delay 30 sec.
In your blocky when check that all equipment is off - instead of switching tv off turn AllOff on.
After 30 sec AllOff goes off and you can use it in another blocky to check that if all equipmet is still off AND AllOff is off, then switch tv off.

Any sense?

Re: Timer Delay using Blocky

Posted: Wednesday 09 December 2015 8:02
by Egregius
Isn't stuff like that the basics of automation?
Can easily be achived in php:

Code: Select all

if($STPIR_Inkom<$time-120&&$STPIR_Hall<$time-120&&$STLicht_Inkom<$time-120&&$STLicht_Hall<$time-120&&$SLicht_Hall_Auto=='On') {
	if($SLicht_Inkom=='On') Schakel($SILicht_Inkom,'Off');
	if($SLicht_Hall=='On') Schakel($SILicht_Hall,'Off');
}
Lights are only switch off when last switch time and last motion is more than 2 minutes ago on 2 switches and 2 pirs.

Re: Timer Delay using Blocky

Posted: Wednesday 09 December 2015 8:23
by alfred_j_kwak
Hmm... One lesson more for me.
Off timer in Domoticz is not similar Off timer as in PLC. Instead it is a pulse.