Heating.Timers.Presence Button=on

Post Reply
Posts: 16
Joined: Friday 11 November 2016 9:56
Target OS: NAS (Synology & others)
Domoticz version: 3.5877
Location: Germany

Heating.Timers.Presence Button=on

Post by TimH » Friday 02 December 2016 15:25


i have a question.
We have the follow timers for our Heaters:
05:45 on Weekdays = ON
07:30 on Weekdays = OFF
12:45 on Weekdays = ON
21:45 on Mon,Tue,Wed,Thurs = OFF

07:00 on Weekends = ON
22:30 on Fri.Sat.Sun = OFF

We have a good working presence detection,too.
Can we control by a script that if the Presence is on and it is between the switching times, the Domoticz put the heating on?
As an example, someone is at home on weekdays, Domoticz is to switch off the heating at 07:30 or not switch off.

I Hope you understand me what I want.

User avatar
Posts: 891
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy

Re: Heating.Timers.Presence Button=on

Post by emme » Monday 05 December 2016 11:30

you cannot interact with timers, but you can use the events to trigger a script:
a simple LUA example for a Device Event:

Code: Select all

if (devicechanged['HEATERS'] and otherdevices['HEATER'] == 'Off') and (otherdevices['PRESENCE DETECTION'] == 'On') then
    commandArray['HEATER'] = 'On AFTER 3'
the 'On AFTER 3' is a switch fault prevention... because it will move ON-OFF-ON in less than 1 sec... it's better to pause it for a while to prevent shocks...
so it will be ON->OFF->wait 3 secs->ON
The most dangerous phrase in any language is:
"We always done this way"

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests