2 hours heating after movement detection

Moderator: leecollings

Post Reply
Eremit
Posts: 5
Joined: Thursday 22 December 2016 8:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

2 hours heating after movement detection

Post 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
Eremit
Posts: 5
Joined: Thursday 22 December 2016 8:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 2 hours heating after movement detection

Post by Eremit »

Anybody an idea how to change heating temperatur after two hours when there is no action in PIR sensor?

Eremit
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: 2 hours heating after movement detection

Post 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.
Hans
apt80
Posts: 4
Joined: Saturday 20 February 2016 12:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 2 hours heating after movement detection

Post 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...
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: 2 hours heating after movement detection

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest