Page 1 of 1
2 hours heating after movement detection
Posted: Tuesday 27 December 2016 19:37
by Eremit
Hello,
at first... sorry for my english language.
In my kitchen I have a motion sensor and the heating system.
Now I need a way to make sure the heating system changes to 21°C two hours after the sensor detects a movement.
I know that it is possible but do you have a script for this kind of problem?
The sensor is connected as switch On/Off
Heating system is an floating number.
Can you send some examples?
Thank you.
Eremit
Re: 2 hours heating after movement detection
Posted: Saturday 31 December 2016 9:17
by Eremit
Anybody an idea how to change heating temperatur after two hours when there is no action in PIR sensor?
Eremit
Re: 2 hours heating after movement detection
Posted: Saturday 31 December 2016 9:37
by manjh
I did something similar with my ceiling lights. They switch on at movement, and slowly dim to zero over a period of 10 minutes. The effect is that as long as there is movement the light stays on at maximum. If no movement is detected any more, the light slowly turns off.
I used a user variable and two scripts.
The first script is triggered by the PIR sensor, and simply sets the user variable to a value of 10. It also checks the current state of the light, and switches it to "on" if it is currently "off".
The second script is time driven. It looks at the value of the user variable, if it is larger than 0 it decreases the value. It then calculates the required level of the dimmer and sets it.
I use LED ceiling lights, the effect is amazing.
Re: 2 hours heating after movement detection
Posted: Saturday 31 December 2016 10:04
by apt80
Look at the wiki example:
http://domoticz.com/wiki/Event_script_examples.
There is a 30 minute time out script that you can adapt for your purpose.
I'm not a LUA programmer but I managed to adapt it to my needs...
Re: 2 hours heating after movement detection
Posted: Saturday 31 December 2016 13:16
by havnegata
manjh wrote:I did something similar with my ceiling lights. They switch on at movement, and slowly dim to zero over a period of 10 minutes. The effect is that as long as there is movement the light stays on at maximum. If no movement is detected any more, the light slowly turns off.
I used a user variable and two scripts.
The first script is triggered by the PIR sensor, and simply sets the user variable to a value of 10. It also checks the current state of the light, and switches it to "on" if it is currently "off".
The second script is time driven. It looks at the value of the user variable, if it is larger than 0 it decreases the value. It then calculates the required level of the dimmer and sets it.
I use LED ceiling lights, the effect is amazing.
Sounds very interesting, maybe you can share these scripts?