Category Archives: Smart Home

Contrasts in Smart Lighting

We recently enjoyed a week’s holiday at Pevensey Bay. The home that we rented, like our own, includes many smart features but there are some similarities and differences in approach. One area of difference in smart lighting.

The Studio, Pevensey Bay

Both our own home and The Studio have smart lighting but differ in approach. Our own smart lighting concentrates on smart bulbs, while The Studio (with the exception of the kitchen) concentrates on smart switches. So why choose one approach over the other?

At our home we have a handful of smart bulbs, with standard dumb switches. The bulbs incorporate functions like dusk-to-dawn lighting and colour change for status indication (open windows, movement in garage etc). At The Studio there are a large number of smart switches controlling an even larger number of standard dumb bulbs.

So let’s think about choices:

Cost.

If you are going to control multiple bulbs together on one circuit then it’s generally cheaper to have one smart switch than multiple smart bulbs.

4 gang Lightwave switch

Coloured smart bulb

Colour.

Smart switches can either control on/off or act as dimmers, but they don’t vary colour. Some smart bulbs can vary colour. If you want to control colour then you’re going to need some sort of remote control (like The Studio in the kitchen) or access via smart device like a phone or tablet.

Wiring.

Most smart light switches require a neutral wire. However many UK homes do NOT provide a neutral wire at the switch. A typical UK light switch has a live, switched live and earth only (I.e. no neutral) although there may be confusion as the switched live is commonly blue (or black in older homes) like a neutral would be.

Adding a neutral can be relatively costly as it requires a new cable between the ceiling rose and the switch. If having a re-wire it’s worth adding neutrals to the specification just in case.

Typical ceiling rose wiring UK.
Example automation

Automation.

Both switches or bulbs can be automated via a smart hub for on/off or brightness to respond to time-of-day, movement, door or window opening etc; so that’s not really grounds to chose between smart switches or smart bulbs.

What about combining smart switches and bulbs on the same circuit?

In short I don’t really know why you’d want to. Even if it worked properly you’d have incurred extra cost for the second smart device for limited benefit as you’ve duplicated the smart functions, but it’s likely not to work properly. Even with simple on/off functions the smart bulb will be missed by the hub when the power is off at the switch (although some ecosystems allow this error to be masked), but with dimmers it will probably be worse as the bulb may not function correctly when the dimmer is set to less than 100% brightness.

You might consider using the smart switch as an smart button without using the switched output, and feed the smart bulb from a permanent live, but that’s not combining them on the same circuit. This could be achieved physically by something as simple as moving the switched live output to the live input on a switch. However the two smart devices, switch and bulb, would then need to be linked entirely programmatically through the hub. That would be at least two automations in HomeKIt – an ‘on’ automation and an ‘off’ automation.

Conclusion

There isn’t a right answer whether smart switches or smart bulbs are best. The best choice will depend on your situation.

Assault and battery

Like many households we actively embrace recycling, sorting our routine household waste into (i) garden and kitchen waste (i.e. uneaten food), (ii) glass (jars, bottles etc), (iii) other recyclables (paper, card, tins, some plastics) and (iv) non-recyclables. Other sorts of waste can be returned to the recycling centre including (I) electrical and electronic (WEEE), (ii) batteries, (iii) used oil and (iv) wood. This post concerns batteries.

The 3Rs: Reuse, Reduce and Recycle

Like many households with small children we have many batteries in use in toys as well as in items like TV remote controls, burglar alarm sensors, and the doorbell. However we also have dozens in smart home devices like radiator valves and sensors including window, movement and environmental. Of the 3Rs of Reuse, Reduce and Recycle we are clearly far from Reduce.

Recycle is clearly possible with many supermarkets adding bins to collect used alkaline batteries which at least prevents that material going to landfill, but does involve energy and other inputs for recycling.

The alternative that I’ve been exploring for some time is Reuse. The closure of the Maplin chain in early 2018 prompted me to acquire some discount Nickel Metal Hydride (NiMH) batteries in both AA and AAA sizes and a suitable charger from my local store’s clearance sale. These batteries are the same size as the mostly commonly used alkaline batteries but have a slightly lower voltage being 1.2 Volts rather than 1.5 Volts.

Different battery sizes compared

I’ve been running these NiMH cells of AA size in Eve smart home devices for two and a half years gradually replacing alkaline batteries as they became exhausted. My only issue has been that the low battery warnings on the Eve devices are almost always set since the batteries have a lower voltage even when full, even though the batteries have plenty of power to run the device. One thus cannot rely on the low battery warning to flag the need to change the batteries, and so I have adopted a pattern of swapping freshly recharged batteries for part-discharged batteries on a quarterly basis. Over the first weekend of the first quarter I work my way around the house room by room swapping and recharging batteries.

After two and a half years I’ve acquired multiple types of rechargeable NiMH batteries from different brands or of different capacities. I make a habit of charging and using only like cells together.

So far I’ve had no failures of rechargeable batteries.

The latest change is that I managed to locate a rechargeable replacement for the 1/2AA non-rechargeable lithium batteries used in the door/window sensors. These 1/2AA batteries are half the length of a regular AA battery, but are 3.7 Volts rather than the 1.5 Volts of an alkaline cell. The voltage of these rechargeable cells is the same as the standard non-rechargeable equivalents so hopefully the near-continuous low voltage warnings can be avoided.

1/2AA batteries with Lithium-based chemistries are commonly described as being of size 14250 – that is a diameter of approximately 14 mm and a height of 250 1/10ths of a millimetre (I.e. 25 mm).

Next time a door or window sensor battery requires changing I’ll be able to put these to the test.

Tapping the Admiral

I was recently amused to see a smart home feature in a television advertisement for Admiral Insurance. In that advertisement George the householder meets The Admiral outside the local bistro and, as the day is set to be warm, decides to turn down his smart heating from his smart phone.

George and The Admiral

Unfortunately George manages to hit the wrong button on his smartphone and instead of turning off the heating manages to open the garage door.

An unfortunate chain of events

The opening garage door hits George’s red car, which hits the yellow car, and pushes down the boundary wall onto the road. George witnesses all this as it turns out that the bistro is on the opposite side of the road to his home, so has a go with another button.

Sprinklers on

George’s second attempt at adjusting the heating is no more successful as he manages to turn the fire sprinklers on which floods the house. Hopefully George has more than just multi-car Insurance.

So, besides amusement, what else might we gain from George’s issues?

  1. Firstly, I’ll observe that in my home you can put the whole heating system into summer which disables heating completely (such as in the summer), or vacation which disables the schedules but which continues to heat as necessary to maintain a minimum temperature (such as winter frost protection), or turn off the radiators in individual rooms, or turn down the temperature until such time as the schedule turns them back up.
  2. You don’t always get many characters to label a device or scene, but it does need to be clear what function will be achieved by pushing the button. (I find rules particularly frustrating in the Apple Home app as you can’t name rules and it becomes hard to distinguish between them, although Eve’s app which edits the same rules does allow naming and is much clearer for programming rules generally. The WIFIPLUG app also allows the button to be customised with a photograph of the appliance which is quite neat.)
  3. Devices like garage door openers can be linked to safety interlocks. I don’t have one myself but you can have a light beam, for example, across the doorway so you can’t close the door when obstructed by a car. I haven’t come across an interlock which ensures that the car is far enough from the door to allow opening, although in reality I think that a domestic car door opener would likely stop when it touched the car, detect an over torque / current condition, and then automatically reverse.
  4. Finally I think that smart home systems would benefit from a configurable ‘Are you sure?’ question to double-check that the user really wanted to perform some potentially damaging action such as open or unlock a door.
Click to play the advertisement

(Tapping the Admiral is a nautical expression referring to being prepared to drink anything alcoholic rather than be without a drink, notably including drinking the contents of the barrel in which the body of a recently deceased and pickled admiral was being carried.)

Too smart by half

One of the challenges in the smart home world is to distinguish between a group of functions associated with remote control of devices in the home for aesthetic or convenience reasons versus automation associated with the management of electricity costs, carbon management, or smart grid integration. I thus choose to differentiate using the terms Smart Home and Energy Smart.

Smart Home and Energy Smart

Smart Home

Functions within my Smart Home space include:

Space heating. In many homes space heating is controlled by a central thermostat and timer, possibly in combination with Thermostatic Radiator Valves (TRVs). In my home thermostats and timers are commonly pushed down to room level with individual rooms set points and schedules. General advice to reduce heating costs is to reduce heat loss through insulation and lower temperature set points, which I have but also add only heating rooms in which heat is required.

Window management. On occasions household members were known to go out leaving windows open. We now monitor the most commonly left open windows (plus the garage door) and use their status to illuminate and colour a smart bulb in the hall near the burglar alarm panel. The same window sensors can also be used to disable heating in rooms while the window is open.

Lighting control. We automate dusk-to-dawn external and internal lighting by the front door and in the downstairs hall. There’s overlap in bulbs between Window Management and Lighting Control.

Watchdog. To improve the robustness of all the rules operating the above functions, I have a smart plug that cycles on and off automatically at regular intervals and is used to trigger re-evaluation of the rules.

Energy Smart

Energy Smart functions include:

Battery Storage. Storing surplus output from my solar panels for later use, or buying energy from the grid when the price is low to avoid buying later when the price is higher.

Car charging. Managing my car charger to absorb surplus solar energy or buy energy from the grid when most cost-effective.

Water heating. Managing my immersion heater similarly. My immersun manages self-consumption of the surplus from my solar panels by diverting a proportional amount of power to the immersion heater, while the HEMS can boost the immersun at full power when the bought electricity price is suitably low.

Both Smart Home and Energy Smart

Wet goods. Controlling dishwasher and washing machine for lowest energy cost at the boundary of Smart Home and Energy Smart in both the Apple HomeKit ecosystem and with API integration for HEMS.

The Smart Home group of devices is managed via various user-friendly interfaces within apps like Apple’s Home or the Eve app where rules can be created of the form if {any trigger(s)} and {all conditions} then set {scene(s)}. These are processed by a hub which in my case is an Apple TV (or two).

On the other hand the Energy Smart devices are managed via the HEMS and are controlled by more fundamental programs (strictly in my case scripts) which are executed on my HEMS (which is based on a Raspberry Pi with HEMS-specific programming of my own creation.

In summary then, the Apple HomeKit ecosystem provides a smart home environment with a comparatively wide variety of supported devices managed from Apple’s own Home app or companion apps from the device manufacturers; while the Energy Smart side is in its relative infancy and (at least as far as my integration goes) quite a lot of bespoke software.

For me the need for much bespoke software is because I had the majority of the devices first with no thought when acquired of doing a HEMS-like project. They were originally bought or developed to maximise self-consumption of the output of my solar panels, so I had to develop the software to interface to what equipment I had. However for the Apple HomeKit, having settled on Apple HomeKit largely because we were iPad users, it becomes relatively easy to add additional devices that are sold as compatible with the HomeKit ecosystem.

Works with Apple HomeKit

The ‘Appiest Days of My Life

One of the consequences of integrating a smart home is the large number of different apps, web portals and potentially sources of APIs involved. The ones I use include:

TitleAppPortalAPIPurposeComment
BrightYNYReads and stores consumption from smart meter.No price data for my tariff due to smart meter limitations.
EveY /3NNEve’s alternative to Home for all HomeKit accessories with additional functionality for Eve’s own devices.I prefer this to Home for editing rules.
I use Eve products mostly for central heating control.
HomeY /3NNApple’s own app for the HomeKit smart home ecosystem.Need to refer to device manufacturers own apps (such as Eve or WIFIPLUG) for some configuration and data.
HEMSNYN My own web portal to view HEMS schedule and status via Apache web-server on Raspberry Pi.
MyImmersunYYY /1Control of ImmerSUN power diverter.Available API provides some measurement and status data as per main screen of the app.
PowervaultNYY /2Control of Powervault storage system.Available APIs provide some user scheduling and status capability.
OctoWatchdogY /3YYFuture cost, and historic costs and consumption (30 prior days) from Octopus (electricity supplier).APIs provided by Octopus.
App developed by an enthusiast using Octopus APIs.
Octopus’s own web portal provides historic consumption but does not pair this with cost. Monthly statements show graph of consumption and cost for each day.
WIFIPLUGYNYControl and measurements from own brand smart plugs.Plugs also appear in Home and Eve apps.
I use for dishwasher and washing machine.

Notes to table:

  1. APIs not officially released. Reverse-engineered by an enthusiast and available on line.
  2. APIs not officially released. Used as part of a sponsored trial when I first got the battery and re-used by myself with some manufacturer support.
  3. iOS only. Not available for Android.

Some of these apps have similarities:

  • Both Bright and OctoWatchdog show whole of house energy consumption (and potentially cost) derived from the smart meter. However they have differences too. A smart meter sits on two networks: (i) the Wide Area Network (WAN) via which the meter communicates with the energy supplier and (ii) the Home Area Network (HAN) which links the devices in the home (electricity meter, gas meter, CADs/IHD and gateway). Bright connects to the HAN via small piece of hardware called a Glow Stick Wi-Fi CAD and collects its own data in real time and stores its own records of energy consumption in the cloud; while OctoWatchdog involves no extra in-home hardware, and takes data a day in arrears from Octopus not storing anything in the cloud itself. Bright’s USP is the real time consumption and current day’s data (neither of which OctoWatchdog supports), while OctoWatchdog’s USP is the availability of electricity price which isn’t available from the meter.
  • Both Eve and Home interact with all devices in the whole HomeKit ecosystem. Eve is best for creating rules and has more ability to configure Eve’s own devices, while Home is best for sharing access with family members. WIFIPLUG’s app is more limited only interacting with their own devices, and thus cannot see Eve or other HomeKit devices.
  • Both MyImmersun and WIFIPLUG apps, and the Powervault portal, allow configuration of their own manufacturer devices. They all have, for example, timer capability and data logging. MyImmersun is better for giving a whole-of-home view showing solar panel output and net input to house (so provides a more comprehensive energy monitor), Powervault shows no solar panel output but does give a view of whole-of-home, while WIFIPLUG provides only a view of the energy consumption of devices plugged in to the WIFIPLUGs.

And when the batteries go flat? (The previously unanswered question)

The height of summer is perhaps an odd choice of time for a post about heating, however we’ll get to that. Regular readers may recall that our smart heating controls enable the boiler when any radiator demands heat via its smart valve (eTRV) and disables the boiler when the last room is up to temperature. That rather begs the question what happens to the control logic when the batteries go flat. The HomekIt rules are not sufficiently sophisticated for the author to set that behaviour via the program, and I’ve seen no default behaviour described on-line.

Today the inevitable happened and a battery did go so low as to stop operation. The behaviour of the heating was to force the boiler on. Most rooms did not heat up as their own eTRVs recorded them already being sufficiently hot, although the bathrooms and cloakrooms did heat up (they generally lack eTRVs) as indeed did the room with the flat battery (my daughter’s playroom). Other symptoms included an icon in the Home app that would not grey out when disabled like other room eTRVs and the the boiler repeatedly being re-enabled even after manually disabled through the app.

Replacement with fresh batteries immediately restored normal operation.

Although any more heat input is unwelcome on a day as hot as today, we have at least demonstrated that the system is failsafe in a flat battery condition – I’d rather that the system heated up with a flat battery to prevent freezing damage in winter at the cost of some discomfort in summer due to excess heat.

It’s 265 days since my records indicate an earlier battery change, albeit for most of that time the heating hasn’t been on (so no power needed for valve movements). It’s over a year now that I’ve been using Ni-MH cells in these valves. The cells are slightly lower voltage than the recommended cells (1.2 versus 1.5 Volts) so do create spurious low battery warnings, but apart from that they seem to work well with adequate life before recharging. I thus anticipate continuing with their use of a means of reducing battery waste. I’ve had no cell failures to date.

The Big Picture

After a series of quite detailed posts, I think that the time has come for an updated high level overview of what we have.

Heat loss from the home

We moved to our early 1970s house almost 4 years ago bringing with us our electric vehicle. The house had already been refurbished with new double-glazed windows, had cavity insulation (although that wasn’t recorded on EPC so must have predated the prior owners), and a token level of loft insulation. The existing gas boiler was arthritic, couldn’t heat the whole house, but was quite good at heating the header tanks in the loft! We had gravity-fed gas hot water (i.e. no thermostat or pump on the cylinder) which was completely obsolete, the cylinder dated back to the building of the house and had no immersion heater (although we had the wiring for one). So what did we do?

Space heating:

Eve Thermo eTRV
  • We substantially increased the loft insulation to reduce heat loss.
  • We had a modern condensing gas boiler installed to improve efficiency.
  • We updated to smart controls using eTRVs to set both temperature set points and schedules at room level. I built a smart interface to the boiler so that heating can be enabled remotely. I programmed a series of rules into Apple Home allowing the smart thermostats to enable the boiler when any thermostat wants heat and disable it when no thermostat wants heat. Some rooms also have additional rules linking heating to open windows or movement sensors. All of this reduces heat losses by only heating rooms that are (or will be shortly be) in use.

Electricity supply:

Solar panels
  • We installed our own solar panels given 4 kWp generation. (I also own a small share of a solar farm although there’s no contract that I’m aware of between that farm and my home energy supplier)
  • I invested in an immerSUN to maximise self-use of our own solar by enabling loads when surplus solar is available.
  • We switched to a green electricity supplier so when we need to buy electricity it comes from renewable sources.
  • We bought a small storage battery 4 kWh to store some of our solar production for use later in the day. Subsequently I can also use it in winter to buy when the electricity price is relatively low to avoid buying when the price is relatively high.
  • We chose a dynamic smart tariff to buy electricity at the lowest price based on market prices established the day before. The prices change each half hour and are established in the late afternoon on the day before.

Water heating:

Hot water cylinder
  • We replaced the old hot water cylinder with a modern insulated one (to reduce heat loss) with a low immersion heater (to allow more of the water volume to be heated).
  • Our principal water heating is now by diverting surplus solar electricity proportionately to the immersion heater, that’s backed up by the gas boiler which is enabled briefly in the evening for water heating in case the water isn’t yet up to temperature, and when the electricity price falls below the gas price I can enable the immersion heater on full power.
  • All accessible hot water pipes are insulated.

Electric car charger:

Electric car charger.
  • I built my own electric car charger that takes an external radio signal to switch between four settings 0, 6, 10 and 16 Amps to help me adjust consumption to match to availability of output from my solar panels. (Subsequently such products were developed commercially with continuously variable current limits, but the limitations of my immersun and on/off radio signal don’t allow me to go quite that far. Having said that my car only does 0, 6, 10 and 14 Amps so I would gain no benefit from a continuously-variable charger paired with a 4-level car).

Smart electricity controls:

Smart controls
top: HEMS (to manage bought electricity) and junction box
mid: radio transmitter (to car charger)
bottom: immersun (to manage self-consumption)
  • We have two systems for smart control of electricity:
    1. The immersun to maximise self-use of our solar electricity by proportional control of loads.
    2. A HEMS to manage the purchase of electricity (when necessary) at the lowest price by maximising consumption when the price is lowest.
  • When both systems want to enable loads (because the bought price is low and we have a surplus from our own panels) then cost is prioritised, so we’ll buy from the grid any demand not being met from our own panels.
  • Both systems are linked to 3 devices:
    1. Battery storage. The immersun is configured to work alongside the battery storage with the battery storage as the top priority to receive surplus solar PV. The HEMS can switch the status of the battery as required to charge from the grid when the price is lowest, or to discharge when the price is highest, or indeed to revert to default behaviour.
    2. Car charger. Second priority for the immersun after battery storage.
    3. Immersion heater. Third priority for the immersun after car charging.

The future

I have no firm plans for the future. I’m toying with adding to the HEMS various features including:

  • Making the display switch between GMS and BST as appropriate (it’s all UTC at the moment).
  • Edit configuration via the web interface rather than a virtual terminal.
  • Control a domestic appliance. Our washing machine was replaced relatively recently, but the dishwasher is playing up a little and may be a candidate for HEMS integration where the optimum start time is selected to deliver lowest energy price.

Going through the (Eve) Motions

The other day I was involved in a discussion about how Eve Motions work. Some participants were concerned that Eve Motions always show motion for just the configured ‘on’ time and then go off until retriggered. The effect of this would be that if, for example, you were controlling a light, that light would always go off briefly before being triggered again which would be annoying and inconvenient.

However, this log (above) from my own lounge Motion, that is used to curtail the heating when the room is unused, shows ‘on’ events often being much longer that the 30 minutes that I have set (see below).  

My understanding therefore is that the Eve Motions trigger on first movement and continue to report ‘Motion’ until the delay time after motion ends.  I can’t otherwise explain Motion evens that last for variable lengths and, in some cases, multiple hours.

If I ruled the world..

At the last count my smart home system had eighteen rules, so I thought that some description might be appreciated. Those 18 rules run a combination of (i) a multi-zone heating system, (ii) warnings related to windows left open, and (iii) some interaction between the two where local radiators are disabled if a window is left open.

Area“On” Rules“Off” RulesAlarm RulesNotes
Outside light“After Sunset”“Daytime”NoneDusk-to-dawn timer
Inside warning light (plus Outside light sometimes)“After Sunset All Windows Closed”“All Windows Closed Early Hours“, “All Windows Closed Late Night” and “Daytime All Windows Closed”“Bathroom Window Opens”, “Cloakroom Window Opens” and “En-suite Window Opens”.Dusk-to-dawn with alarm override
Boiler“Any Master Rad Valve Opens” and “Any Slave Valve Rad Opens”“All Master Rad Valves Closed”, “Bedtime No Lounge Motion” and “Half Hourly Overnight No Lounge Motion”.NoneEnable heating boiler based on radiator valve demand.
Cloakroom Radiator“Cloakroom Window Closes”“Cloakroom Window Opens”NoneEnable/Disable local radiator valve based on window status.
Heating“Any Rads Below 10C”NoneNoneEnable heating system regardless of summer/vacation status.
Heating“Any Rads Below 5C”NoneNoneEnable boiler at low temperature regardless of summer or vacation setting.

Dog sitting in the smart home?

Regular readings will recall that our central heating is run by Apple HomeKit giving multiple zones with independent time and temperature schedules, we also monitor key windows to warn if they have been left open, and have some interaction between windows and radiators so local radiators are disabled while a window is left open.  Generally all of this works very well, but occasionally we find that the state of the window warning lamp is inconsistent with the physical position of the windows, or the boiler runs unexpectedly overnight (although it only heats the central core of hall, stairs and landing).  I suspect that the cause is intermittent lack of communication between the hubs and smart devices such the the hub misses the shut down of the last radiator valve at night, the last window to be closed, or the first to open.  Control rules are all triggered by changes of state, and if the change of state is missed then you’re sunk.

It occurred to me that what is required is a periodic check on the status of the imputs and appropriate changes to the outputs even if the change of state that should have triggered the rule was missed – I think of this as a watchdog.  In the ideal world it shouldn’t be needed but periodically it will correct the status of an output.

You could of course program multiple time-based triggers into every rule (remember that a rule is if any trigger and all conditions then set scenes), but this is time-consuming and far from elegant.

Elagto’s Eve app, which I prefer over Apple’s own Home app for writing rules, does offer a recurring timer function, but it only enables a scene directly and cannot itself be part of a trigger or condition in a wider rule.

My solution is to find a device for which I can both set and read the status.  In my case an Eve Energy which I can both turn on and then test to see if it is turned on.

This was handled as follows:

  1. Create two new scenes, one of which just turns the device on, and the other just turns it off.
  2. Create two new recurring timers; for me one sets the on scene on the hour, and every five minutes subsequently, and the other sets the off scene at two minutes past the hour and every five minutes subsequently.
  3. The device should now be cycling on and off continuously – two minutes on and three minutes off.
  4. Next I’ll test the on transitions as part of a series of rules.
  5. Each rule to be modified may need two steps of modification.  Firstly the existing triggers may need to be replicated as conditions – so for example an ‘at sunrise’ trigger may be to be replicated as conditions ‘after sunrise’ and ‘before sunset’ given that this rule will be retested throughout the day.  Secondly an extra trigger is added for if my watchdog turns on.
  6. The resulting rule should still work in the original manner if the ‘at sunrise’ trigger is detected, but if not within minutes (and every five minutes subsequently) the watchdog will trigger another evaluation of the rule.

My expectation is that this will improve the robustness of my system operation once I’ve changed all my rules suitably.