UK Heating Automation Without Expensive Hive, Nest Tado etc

We have all invested in Smartthngs and no doubt most of you have some form of smart multi-sensor or a temperature sensor.

The central heating in most UK homes works by means of turning on and off power to diverter valves that also switch the pump and boiler on.

So here is the plan, use the temperature sensors I already have, add in a Z-wave relay, wire it to the correct diverter and with some SmartApp and Device Handler magic I can take control of my heating remotely for less than £40 of hardware.

If you are interested let me know and you can support the project by making a donation to my favourite charity: https://www.nowdonate.com/checkout/pv0j03m4s1o1x60o6bh2

Ideas for features and functions are welcome and I may well need help testing so do let me know.

Ideas and features could include:

  • Temperature set points for each schedule interval (e.g. set the temperature lower over night or when you are usuallu out)

  • Multiple heating zones

  • Anticipation during cold weather (e.g. bring on the heating early if the outside temperature is low)

  • Virtual Thermostat to control the heating from your mobile device.

  • Manual override switch (for when smart things is down) via existing thermostat so it is never cold in the mornings.

The initial plan is to develop this on a two zone S-Plan central heating system using a Fibaro FGS-223 or FGS-222 because that’s what I have. I will draw up an installation schematic as a guide, but take no responsibility for your indivdual installations.

2 Likes

So this is going to work for any system that needs to control up to two 2-position valves as in the image below. In my case though I’m going to leave the hot water to operate normally on the current timer, but I am going to use Smartthings to control two heating zones.


Okay so I have a plan for the wiring, what I’m planning is to place a double switch or relay between the ‘ROOM STAT’ and the terminal block.
I will wire pin 3* on the ROOM STAT to S1 on the FGS-223 and Q1 on the FGS-223 back to 5 on the terminal block in place of the current wire 3* to 5. Then do the same for the other zone on the second set of FGS-223 terminal. Wire up the Live and Neutral.

Doing it this way I can not only switch the valve remotely but when the current thermostat calls for heat I will get an event in Smartthings that I can handle in a device handler. I intend to override the current thermostat normally, but this will provide a backup should Smartthings be down (no one wants to get up in the cold).

I have prototyped the override code and it appears to work fine, I’m able to detect that the event originated from the switch and not the handler and toggle the switch back before the valve motor completes its travel and switches on the boiler and pump.

Smart App:

subscribe(switch1, "switch1.on", z1on)
subscribe(thermostat, "z1opState.idle", z1off)
subscribe(thermostat, "z1opState.heating", z1on)

def z1on(evt){ // handler for the z1 thermostat on event
log.debug ("In z1on")
def data = parseJson(evt.data)
if (data.sender== "VT"){
	log.debug "VT trying to turn on Zone 1"
    switch1.on1()
} else {
	log.debug "ST Switch or manual thermostat trying to turn on Zone 1"
    thermostat.manualdefeat(1,"heating")
}

Device Handler:

def heatz1() { 
log.debug "Executing 'heatz1'"
sendEvent(name: "z1opState", value: "heating", data: [sender: "VT", key2: "dummy"]) // sends event with event data VT = virtual thermostat. key2 is spare
}

def manualdefeat(zone,type){
log.debug("A thermostat triggered or someone used the heating device switch in the App")
log.debug("This will be defeated it the Virtual Thermostat for zone:${zone} is not in off mode")
log.debug("zone:${zone} was switched to ${type} defeating")
 sendEvent(name: "z${zone}opState", value: "${type}", data: [sender: "VT", key2: "dummy"]) // update tile with current state
setmaintilevalue(zone) //update the tile with manual status
heatcheck(zone) // try to change state straight away
}


def heatcheck(zone){  // compares setpoint to ambient and triggers heat/off commands
def Hist = getvalue("thermostatHysteresis")
def tempNow=getvalue("z${zone}Ambient")
	def tempSet=getvalue("z${zone}HeatingSetpoint")
	if (tempSet - tempNow > Hist){
		log.debug("Turning on Zone${zone} Heat")
    	"heatz${zone}"()
    }else{
    	log.debug("Turning off Zone${zone} Heat")
    	"offz${zone}"()
    }
    setmaintilevalue(zone)
}

I have a prototype GUI for the virtual dual zone thermostat device handler.


The top row of buttons is going to control the zone selection and modes of operation

  • Button 1: z1 or Z2 toggles between zone 1 and Zone 2 choice

  • Button 2: off, auto, and smart, toggles round three main modes:
    off - operates on the normal manual thermostats
    auto - overrides the manual thermostats and executes a defined schedule.
    smart - as auto but also allows the selection of the other buttons Opt, Skip, Hr+ and Hold

  • Button 3 Off, ant, mode and all, toggles round four options:
    off - option off
    ant - anticipate cold weather and bring on heating early
    mode - drop the set temperature when nobody home
    all - both ant and mode

  • Button 4 Skip on or off, toggles the Skip option off or on
    off - option off
    on - skips to the next scheduled set point (useful if you are heading out or off to sleep early)

  • Button 5 Hr+ on or off, toggles the Hr+ option off or on
    off - option off
    on - holds the set point for an hour interrupting the schedule useful if you want to add an hour to the end of schedule (ie going to bed or leaving home later)

  • Button 6 timer, allday and const, toggles the timer mode through schedule, allday, constant.
    timer - runs the schedule as intended
    allday - holds the day time temperature all day (useful for a day off without having to change your schedule)
    const - overrides the schedule holding the set point constantly (useful to turn off a zone or the heating when away for extended periods)

The middle portion will report the current temperature and humidity and allow the set point to be set.
The bottom row of buttons will report the heating status and provide a GUI refresh.

In order to provide integration with other Smart Apps , Alex etc I will implement the thermostat capabilities to allow control of zone 1 and define another device handler (slave) to implement the thermostat capabilities to allow control of zone 2. So it will be possible to say to Alex for example. "Set Zone 2 to 30 degrees."

Most of the Smart App is prototyped and tested.
Next is to wire in the dual switch and test it out.

Wired in and commissioned the hardware this weekend, the task was not as bad as I feared.
Here is a picture of the wiring box with the lid removed.
If you are following along don’t forget to turn off the power and check nothing is live.
First job was to find the connections to the diverter valves at terminal connectors 5 and 7.
In my case the installer had not followed the standard layout, but it was realatively simple to follow the wires back from the diverter valves.

Once disconnected these wires could be wired to the S1 and S2 terminals on the FGS-223.
I then wired Q1 and Q2 back to where I had taken the wires from.
The final connection was to connect the supply to pins N and L
I also moved the terminal block up to the top of the box to make space for the FGS-233 at the bottom.
Double check everything before you turn the power back on.

I tested the basic switching using the Andriod App and the device handler I had already installed, before putting the cover back on.

So now I’m in the testing phase with the Smart App
Anybody want to help out, just let me know.

Okay after a few months testing I have ironed out most of the bugs and this work well.
Relavively simple install just a device handler for a virtual thermostat and the physical CH switch + a smart App to control it all.

Whats the latest Lee? I can’t believe there’s been no obvious support for this.

Hi Vyke.

I know you would have though someone would be intrested. Maybe people don’t wan to trust a critical system like heating to DIY automation. Although I have that covered off with this olution as the SmartApp can be set to allow the central heating to operate as normal (ie as before).

Well I had this all working on the ST Classic App, for some reason I have not looked into the GUI is bust in the new ST App.

If you are intrested I can post the code. I’m up for a little support to get you going, but I have all but left the smatThings ecosystem for openHAB.