PIR Sensors for Lighting Control in the Outbuildings

The house has PIR sensors to control lighting in the hallways / landings and bathrooms. These are Danlers PIR Occupancy Switches; model CEFL PIR in dry locations and CEFL PIR SEALED in bathrooms. These take a 230V live input and switch that with a relay for the output. They’re intended to directly switch 230V lighting (and are rated for 6A of resistive load) but they’re wired to a KNX ‘Binary Input’ bank which senses the switched 230V and is configured to control the relevant (DALI-dimmable) lights.

A key reason for adopting this approach was the limit of 20 KNX devices within an installation imposed by the (relatively) affordable KNX ‘ETS Lite’ software license used to program the home automation system – there’s only one KNX device (the Binary Input sensor), whereas there would have been 12 if these had been native KNX presence sensors. The Danlers sensors are about £45 each, whereas native KNX presence sensors are getting on for double that.

In the Ground Floor Hallway, which is relatively long and thin and is typically approached from the Front Door / Living Room (at one end) or the Kitchen / Family Room (at the other end) there are two sensors – about 1/4 the way from each end. These effectively operate ‘in parallel’ and the first one to trigger switches the lights on. This configuration works well.

While they function as intended, slight niggles with using the 230V Danlers PIR switches include:

  • Despite the Danlers units being a well-regarded, British-made product (with a 5-year warranty) roughly 1/3 of them have failed. Two were repaired under warranty – but failed again (and were then replaced under warranty) and two more failed outside warranty.
  • They operate with a very distinct ‘click’ from the 230V relay, which in some cases is A Good Thing – e.g. visitors using the windowless downstairs bathroom hear the ‘click’ as soon as they open the door, while they’re looking for the light switch – but it can be annoying in other rooms.
  • Since there’s no manual switch to choose to press (or not), the sensors always trigger when they sense movement – whether or not that’s intended or desirable
    • In en-suite bathrooms it’s annoying to have the lights come on at full brightness in the middle of the night – but they need to be bright at other times of day
    • The basic sensors can’t do anything different at night, so there’s an Automation rule in Home Assistant which reacts to the Binary Input sensor and does different things depending on whether it’s considered ‘night’ or not – which means some of the lighting is reliant on Home Assistant working correctly and is hence less robust than native KNX operation would be

For the Outbuildings, there’s a rather more modest requirement for automated lighting control than in the House – just the Shower Room and the Plant Room, both of which receive no natural light and which have Switched (rather than Dimmable) lights. Now the KNX device limit is higher (up to 64 devices in a single installation, using the ‘ETS Home’ license tier), using native KNX presence sensors seemed a better way to go – avoiding the need for a ‘Binary Input’ module (which have a high cost-per-input in small sizes). Since the Shower Room sensor needs to operate in a humid environment that needs to be ‘sealed’ to some extent, which limits the choice of MDT-brand sensors to pretty much just the MDT SCN-P360L2.03 which provides 360-degree coverage with two PIR sensors and is IP44-rated. (The Plant Room sensor is identical, even though it doesn’t need the IP44 rating.)

These sensors offer a range of additional flexibility:

  • They can take an input to specify Day versus Night, and do different things depending on the setting, without needing to rely on an Automation rule in Home Assistant
  • They can be adjusted in terms of their sensitivity threshold for presence / occupancy
  • They can provide logic to maintain overall lighting levels, taking advantage of natural light where that is available (and running artificial lighting at reduced brightness) then adding more artificial light when the natural light level reduces
  • They can provide an output to a HVAC system, with different configuration settings from the lighting outputs
    • For example, in the Shower Room, this could be used to change the fan speed on the MVHR system – either via a switched output or a ‘dimmable’ 0-10V controller

It remains to be seen how well the KNX PIR sensors operate in practice but so far I’m impressed by their specification, their small size, and the configuration options available. While it would be difficult to retro-fit these into the House (since the existing sensors use 230V Twin&Earth cabling, which would need replacing with KNX Bus cabling) I’d be inclined to use native KNX sensors in the House if starting again.

Stored Hot Water Heating Economics

With the 5.4kWp solar PV installation on the House, receiving 2017-baseline Feed In Tariff payments with 50% “Deemed Export”1 it made sense to use the immerSUN intelligent solar PV diverter to drive the hot water cylinder’s immersion heater with “excess” solar generation – i.e. what would otherwise have been exported to the grid. This provided zero-cost hot water throughout the Summer and for most of Spring and Autumn, enabling the heat pump to be turned off at the mains for half of the year (saving on its standby power consumption).

The immerSUN works by using a CT clamp to measure the flow of electricity to and from the main electricity meter and treating the immersion heater like a dimmable light, feeding that with just enough power to maintain a small (configurable) export to the grid. The thermostat on the immersion heater is set to cut out at 60°C so on sunny days the hot water cylinder has been heated to 60°C by the end of the day.

The heat pump is configured to only heat hot water between 00:00 and 06:00 (to coincide with the low-rate electricity tariff period) and is set with a tank temperature target of 50°C, which works well in conjunction with the immerSUN:

  • If there has been enough sunshine to let the immerSUN do its thing, the hot water is already over 50°C at 00:00 so the heat pump does nothing
  • If there has not been enough sunshine and the hot water cylinder is below 50°C the heat pump will run a DHW cycle overnight, ensuring there’s enough hot water for showers in the morning

Mostly this works fine without any intervention, but moving into Autumn there are times when there’s not enough excess solar generation to heat the hot water cylinder – and if the heat pump is still switched off at the mains (because there’s no need for space heating) it can’t kick-in overnight and the hot water cylinder can cool to 30°C or less, making for cold showers.

A complication is that the ‘best’ monitor of the temperature of the hot water cylinder is the heat pump, which has one temperature sensor in the middle and another nearer the top – but if the heat pump is switched off at the mains those don’t work. As mitigation, there’s a second temperature sensor in the middle pocket which is independent of the heat pump – a DS18B20 which is connected to the OneWire interface on a Raspberry Pi that also reports the temperatures in the MVHR ducts (using some more DS18B20 sensors). This additional sensor is visible to Home Assistant (via MQTT) so it would be possible to create an alert if the hot water cylinder is too cold – or automatically ‘boost’ the immerSUN or something.

With the construction of the Outbuildings, it’s time to review whether to retain the current approach or to change to something different, given that:

  • The Feed In Tariff “Deemed Export” arrangement has already been replaced with “Negotiated Export”, where the energy supplier pays for exported electricity as measured by the Smart Meter
    • The payments depend on the selected Export Tariff but Octopus Energy’s “Outgoing Octopus” pays a flat rate of 15p per kWh exported
  • The immerSUN’s CT clamp is actually measuring the electricity flow to and from the House, rather than to and from the Meter – and when the Outbuildings are connected to the same Meter those readings will no longer match
    • In principle the CT wiring could be further extended to measure at the actual Meter – but that would require roughly an additional 75m of cabling to be routed to and through the Outbuildings
  • The Outbuildings will add a further 11kWp of solar generation capacity – as well as about 30kWh of battery storage capacity
    • On the one hand, that means there will be a lot more “excess solar generation” available to power the immersion heater – but on the other hand, using any excess to charge the batteries would be a “better” use for that energy than directly driving an immersion heater
    • The battery charging algorithm will be doing the same thing as the immerSUN is trying to do – using up “excess” solar generation (to charge the batteries) – so the two algorithms will be “competing” for this excess and might end up interfering with each other, setting up some sort of oscillation perhaps
      • Both algorithms have a configurable “minimum export” setting though, which could (actually, should) be used to deliberately give one unit priority over the other
      • Just to further complicate matters, the Outbuildings will also have two Zappi EV charge points, which can also be configured to send excess solar PV generation to an EV, so the “minimum export” setting for those needs to be considered too

From a purely financial standpoint, giving up 15p per kWh of export payments during the daytime in order to heat water at 100% efficiency versus paying 7p per kWh to import electricity overnight and heat water with the heat pump at 330%2 efficiency (i.e. effectively 2.2p per kWh of hot water) is not cost effective. However, it does guarantee the water heating is zero-carbon. The addition of battery storage will enable zero-carbon energy generated on-site during the daytime to be used overnight though.

In summary, on the current electricity tariff (with 15p per kWh of export and 7p per kWh of overnight import) it will be best to stop using the immerSUN and swap to using the heat pump overnight to heat stored hot water. The main exception to that will be in perfect solar generation conditions when the theoretical maximum of 16kW is being generated, resulting in curtailment of solar generation – because of the limits on site export (6kW) and battery charging (8kW3) – in which case that power will again be “free” since it’s not possible to be paid for exporting it. To do that ‘properly’ implies:

  • Relocating the immerSUN unit’s CT clamp to measure the overall site export
  • Raising the ‘minimum export’ limit on the immerSUN to something much higher – close to the maximum permitted 6kW

In the interim, simply raising the immerSUN’s ‘minimum export’ limit (and not relocating the CT clamp) will probably be sufficient – taking advantage of the fact that the solar array on the Outbuildings is also facing due South and will typically generate twice as much as the solar array on the House. If the House is exporting more than 4kW then the solar array on the House must be generating about 4.65kW which implies the solar array on the Outbuildings is generating about 9.3kW – i.e. about 13.95kW in total, which is approaching the ‘curtailment’ point (14kW). It turns out the maximum configurable ‘minimum export’ limit for the immerSUN is exactly 4kW anyway.

  1. The assumption that 50% of generated electricity will be consumed on-site and 50% will be exported to the grid ↩︎
  2. The actual, measured Seasonal Performance Factor when using the heat pump to heat DHW to 50°C (rather than for space heating) ↩︎
  3. It’s not entirely clear whether the 8kW limit specified for charging the Tesla PowerWall 3 – with an expansion battery pack – applies to charging from the Grid (AC) or charging from Solar (DC) ↩︎