Evohome Temporary Override

I am an owner of a Honeywell Evohome system which i integrated in my openhab installation;
basically in BasicUI home i show (and allow to change) the current Evohome Preset runnng, and in every room i show (and allow change) the current temperature, set temperature, if there is an ovveride and so (all the basics coming from the sample from the biinding post by @jvanzuijlen (Evohome binding 2.0).
Some of my use case of the system includes things like “increase the studio temp by 1° for an hour” or “set bathroom temp to 22° for two hours” and other “one shot” actions like these.
I also leave often for the weekend, sometime on friday and sometimes on saturaday, so i set the system to away until i come back; one of the drawback on the main system (both in app and in wall mounted termina) is the fact that the temporary override its daily based (i can set an ovveride until midight of a day) so if i come back on sunday at 6pm, i have to manually revert it to Normal program before i come home or set the autorevert on midnight of saturday/sunday (in this case sunday will be normal even if im not home), also id like to centralize all my home appliance in a single app.
So i come up (afeter discussing a lot lots of solutions in the forum) with this setup.

All this require openHab and Evohome binding already working.
i added a new page on my BasicUI to manage all the heating new functions, inside it i added some “swtich” for fast settings and a more complex setup that allow me to choose program, for how many days it should run, and what time it should stop after that days (this is an improvement of the legacy app that did not let me select time)

evohome.items (besides the main controls that are suggested in the main topic i addded these):

Group HeatingCmd
//FUNCTIONS
Switch Studio_2_21 (HeatingCmd)
Switch Bath_1_22 (HeatingCmd)
Switch Bedroom_1_22 (HeatingCmd)

String EvohomeOverridePrg "Override [%s]" (HeatingCmd)
Number EvohomeOverrideDays 	(HeatingCmd)
Number EvohomeOverrideHours	 (HeatingCmd)
Number EvohomeOverrideMinutes (HeatingCmd)
String EvohomeOverrideEnabled	(HeatingCmd)

default.sitemap

Frame label="EvoHome" {
	    Text icon="warning_black" item=EvohomeOverridePrg visibility=[EvohomeOverrideEnabled==ON] //this allow me to show on main page if an ovveride is running
		
		Switch icon="heating" label="Presets" item=popland_SystemMode mappings=[
		  "Auto"="Normal",
		  "AutoWithEco"="Eco",
		  "Away"="Away"
		]
		
		Switch icon="" label="" item=popland_SystemMode mappings=[
		  "DayOff"="Day Off",
		  "HeatingOff"="Off",
		  "Custom"="Custom"
		]
		
		Group item=Heating {
            Frame label="Fast Settings" {
				Switch item=Studio_2_21 label="Studio 22° 2 hours"
				Switch item=Bagno_1_22 label="Bathroom 22° 1 hour"
				Switch item=Camera_1_22 label="Camera 22° 2 hours"
		
            }
			Frame label="Program Override" {
				//TEST
				Selection item=EvohomeOverridePrg label="Program" icon="heating" mappings=[
				  "Disabled"="Following Program",
				  "AutoWithEco"="Eco",
				  "Away"="Away",
				  "DayOff"="Day Off",
				  "HeatingOff"="Off",
				  "Custom"="Custom"]
				  
				Setpoint item=EvohomeOverrideDays icon="clock" label="Days [%d]" minValue=0 maxValue=15 step=1
				Setpoint item=EvohomeOverrideHours label="End at hour [%d]" minValue=0 maxValue=23 step=1
				Setpoint item=EvohomeOverrideMinutes label="End at minutes [%d]" minValue=0 maxValue=55 step=5
				
				Switch item=EvohomeOverrideEnabled label="Enable"
            }
		}
		
	}

evohome.rules

var Timer StudioTimer = null
var Timer BagnoTimer = null
var Timer CameraTimer = null
var Timer ProgramTimer = null

rule "Studio 22 2 ore" //set the studio temp to 22° for 2 hours
when
	Item Studio_2_21 received command
then
	if (receivedCommand == ON) {
		logInfo("evohome.rules", "timer started")
		StudioZoneSetPointOverride.sendCommand(21)
		if(StudioTimer === null || StudioTimer.hasTerminated) {
			StudioTimer = createTimer(now.plusMinutes(120)) [|
				Studio_2_21.postUpdate(OFF)
				StudioTimer = null
				StudioZoneCancelSetPoint.sendCommand(ON) //this trigger the cancel ovverride, it is a evohome binding "native" command
				logInfo("evohome.rules", "timer ended")
			]
		}
	} else if (receivedCommand == OFF) {
		logInfo("evohome.rules", "timer cancel")
		StudioTimer.cancel
		StudioZoneCancelSetPoint.sendCommand(ON)
		StudioTimer = null
	}
end
// i repeated it 3 times for all the fast settings i needed

rule "Program Override"
when
	Item EvohomeOverrideEnabled received command ON
then
	logInfo("evohome.rules", "Some changes "+EvohomeOverridePrg.state+" days: "+EvohomeOverrideDays.state)
	if (EvohomeOverridePrg.state !="Disabled" && EvohomeOverrideDays.state !=0) {
		var dopo = now.withTimeAtStartOfDay.plusDays(EvohomeOverrideDays.state).plusHours(EvohomeOverrideHours.state).plusMinutes(EvohomeOverrideMinutes.state)
		//var dopo =now.plusSeconds(30)
		var value=EvohomeOverridePrg.state.toString
		popland_SystemMode.sendCommand(value)
		logInfo("evohome.rules", "Timer Start")
		ProgramTimer = createTimer(dopo, [ |
			logInfo("evohome.rules", "Timer End "+EvohomeOverrideDays.state)	
			EvohomeOverridePrg.sendCommand("Disabled")
			EvohomeOverrideDays.postUpdate(0)
			EvohomeOverrideEnabled.sendCommand("OFF")
			popland_SystemMode.sendCommand("Auto")
			ProgramTimer=null
		])
	}
end


rule "Program Override end"
when
	Item EvohomeOverrideEnabled received command OFF
then
	logInfo("evohome.rules", "Received OFF "+EvohomeOverridePrg.state+" days: "+EvohomeOverrideDays.state)
	logInfo("evohome.rules", "Timer End "+EvohomeOverrideDays.state)	
	EvohomeOverridePrg.postUpdate("Disabled")
	EvohomeOverrideDays.postUpdate(0)
        ProgramTimer.cancel()
	ProgramTimer=null
	popland_SystemMode.sendCommand("Auto")
end

rule "Program Override end by master" //This will allow to revert to normal (or other programs) from the main swtich or official app, and cancel the override, both in function and in logic
when
	Item popland_SystemMode received command
then
	logInfo("evohome.rules", "master override")
	logInfo("evohome.rules", "timer "+ProgramTimer)
	if(ProgramTimer===null) {
		logInfo("evohome.rules", "master normal switch")
	} else {
		logInfo("evohome.rules", "master remove ovveride")
		ProgramTimer.cancel()
		ProgramTimer=null
		EvohomeOverridePrg.postUpdate("Disabled")
		EvohomeOverrideDays.postUpdate(0)
		EvohomeOverrideEnabled.postUpdate("OFF")
	}
end

im still missing some details, for example if i set the override to ON but it has selected 0 days it wont start, i need to set OFF and the ON again, other details are the revert for the “Fast settings” from other location (like the official app or from the room controller)

hope this could help as a base for other

1 Like

A number of years later, I was looking for this. Thanks for write up - it is really useful.