This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Presence sensor - Reset timer/delay
#6
Hi
I have another way of running this logic that works perfect for me.

Here is a resident script with 60 seconds interval.
My motion/door detector sends 70%( or 1 in case of on/off object) to the light output(Kjøkken Hvit) and sets timer lys kjøkken to 10(this is the wanted off delay)
Then the first script underneath checks if the object is greater than 1, if it is it subtracts one from the object each minute until the object is 1.
Then it turns of the light.
This script support retriggering as it sets the timer back to the wanted off delay.
In case you want a warning or two step off lightning you could on object =2 or 3 make the light dim down to for instance 20%.

You can put many different light object in same resident script. That is the reason I got three in this oneSmile

The first and the third script is only triggering when the house is in nightmode. It dims the light up and down automatically by night and works as a normal switch controlled Zone by daySmile

The second script is the garage that always is on motion detector.

Lykke tilSmile
Ruben

kjøkken = grp.getvalue('Timer Lys Kjøkken')
if kjøkken > 1 then
 grp.write('Timer Lys Kjøkken', kjøkken - 1)
elseif kjøkken == 1 then
 grp.write('Timer Lys Kjøkken', kjøkken - 1)
   if grp.getvalue('Scene Natt') == true then
   grp.write('Kjøkken Hvit', 0)
end
end

garasje = grp.getvalue('6/2/3')
if garasje > 1 then
 grp.write('6/2/3', garasje - 1)
elseif garasje == 1 then
 grp.write('6/2/3', garasje - 1)
   grp.write('Bryter Rele 3 kanal 6', 0)
end


gang = grp.getvalue('6/2/1')
if gang > 1 then
 grp.write('6/2/1', gang - 1)
elseif gang == 1 then
 grp.write('6/2/1', gang - 1)
 if grp.getvalue('Scene Natt') == true then
   grp.write('Sluse 1 Etg Dim', 5)
   grp.write('Bad 1 etg Dim', 0)
end
end
Reply


Messages In This Thread
Presence sensor - Reset timer/delay - by Mr.D - 14.04.2017, 21:18
RE: Presence sensor - Reset timer/delay - by PassivPluss - 16.04.2017, 15:25

Forum Jump: