"Boost" a thermostat Target Temperature - but only for an hour

Hi all,

Some of you may be familiar with My Central Heating Solution using Thermal Actuators (which has my current Items/Rules listed, rather than re-list it here), and I’m also happily using both Alexa and Google Assistant to allow voice-based changes to the current Target Temperature.

This works great, and they “reset” when a Cron rule triggers to change a Target Temperature.

However, I’d like to limit the timescale for which these “manual” changes to the Target Temperature are applied if there’s a big time gap between a scheduled Cron job.

For a simple example, lets say I have rules set to change the target at 6am, 2pm and 10pm, thus, a change to a Target at 1pm will be applied for 1 hour. But a change at 3pm will be applied for 7 hours.

(but also, a change made at 1:58pm will only be applied for 2 minutes, but for now lets say that I’m happy with that!)

I’m hopefully not going to fall into the typical XY problem trap and ask for just help with what I think is the solution - if I’ve overcomplicated this, please, please let me know! (And hence why I’ve tried to add more information above to try to indicate what problem I’m trying to solve)

So, with all that said, I think that I’d need to trigger a Timer when my TargetTemperature item is changed - but I think I would want this to ONLY be applied if it’s not been changed by the Rule (otherwise I’m spawning lots of timers every time my temperatures change on their schedule). Then, when the timer expires, it will reset this to its Normal Target temperature.

However, I’m not entirely sure if this is the correct answer, and if so, how I’d go about it.

As a basic, this works, but does create a timer for each room every time the target changes (including from my scheduled Cron rules), which can be a few times a day:

createTimer(now.plusMinutes(60)) [|
    val String GroupName = triggeringItem.name.substring(0, 4)
	val target = ScriptServiceUtil.getItemRegistry.getItem(GroupName + "Heating_PresetTempNormal")
	triggeringItem.sendCommand(target.state as Number)
]

Thanks all!

Do you want the item to just override the automatic set temperature for a set period and ignore you automated ones or do you want them to be overridden for a set period unless the auto changes it?

I have a ‘boost temperature’ function in my setup, but I only have a single thermostat.

I have defined a bunch of static number Items which hold the desired temperatures for particular times or events - a night time Item set to 16C, a daytime Item set to 20C etc.

I have a dummy target temperature Item. This Item is only changed via rules.

I also have a real target temperature Item, connected to my actual heating. This Item can be changed either via rules, or via the physical thermostat.

I have rules setup for particular times of day or events which will grab the appropriate static number Item and dump it’s temperature into the dummy target temperature Item. When this dummy target temperature Item is changed, I also have a rule to change the real target temperature Item.

The temperature boost feature gets triggered when the real target temperature is changed and only if the target temperature is now higher than the dummy temperature Item (which is the temperature that should apply at that time of day, or for that event). If we’re higher, a timer starts, and at the end the real target temperature will be set back to the dummy target temperature.

I also added a little extra smarts to ensure that if something else happens, such as the house becoming empty, or the thermostat is manually dropped, the timer is silently cancelled so that the heating won’t effectively come back on later.

I hope that made sense! I basically have a list of allowable temperatures for specific times or events; a dummy Item which holds the allowable temperature for the current time or event; a real target temperature Item which is connected to my heating, which is usually set by rules to the value of the dummy Item; and a timer function which triggers if the real target temperature becomes greater than the dummy Item (usually because someone fiddled with the manual thermostat!)

Uuum, simples!

Mine also know the weather forecast and only comes on if its also likely to get hot in the room if I am on my way home from work :slight_smile:

Simples

Ah, yes, I live in a country where that side of the temperature scale is not an issue! I guess that simplifies it a little for me - I can only worry about heating!