Overriding a scheduler

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Patricen
Posts: 121
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Overriding a scheduler

Post by Patricen »

Hello,

I'm wondering about the way to override a heating scheduler that is pretty familiar
Capture.JPG
Capture.JPG (191.18 KiB) Viewed 297 times
Temp setpoint is 17°C except between 7:00 to 9:00 and 19:00 to 21:00 where the setpoint is 20°C.

As you mentioned it is the bathroom, I would like to add a pushbutton forcing the setpoint to 22°C for 1h whatever the current setpoint is.
When activating the pushbutton, it is pretty easy using dzVents to pick the current setpoint and store it, give a setpoint of 22°C ans restore the initial value to the setpoint once the 1h timer is over.
It is pretty simple if the button is pressed while the scheduler setpoint is stable (ie 7:30, the setpoint will be restored back to the initial value that is 20°C), but if the button is pressed at 8:30, the restored value 1h later will be set back to the initial 20°C setpoint that is not correct according the scheduler that had changed setpoint to 17°C at 9:00.

Is there a way picking the current setpoint value from the database so that if I push the button, the setpoint is 22°C for one hour, and once the countdown timer is over, I could get the value from the database?

Thanks!
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Overriding a scheduler

Post by waaren »

Patricen wrote: Monday 02 November 2020 22:20 I'm wondering about the way to override a heating scheduler that is pretty familiar Capture.JPG
Combining the domoticz scheduler with scripts is not a happy marriage. Although you can get the timers from the API;
<http://<domoticzIP: domoticzPort>/json.htm?type=schedules&filter=device
and also directly from the database; select * from timers , it would complicate the control of the schedule quite significant
My approach would be to create a separate timer plan for the override situation and use this to switch to the one you need to be active
Or.. move the schedule of devices that you want to override on a more or less regular base completely to a script.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Patricen
Posts: 121
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Overriding a scheduler

Post by Patricen »

Indeed, I was not sure it was a pain doing this, but you are confirming it!
I'm already using the timer plan switch method you are describing to change plan for heating system i.e. off, 16°, 18°, pgm, where the pgm timer plan is used for each room's setpoint.
To extract the setpoint value from timer plan, I had also an idea using a virtual thermostat that would be the room's master setpoint and use a script to set the room's real setpoint according to this virtual device's setpoint or any overriding value I would like to set.
It looks anyways there is no straight forward method!
Thanks waaren.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest