Optimising a Mixergy Boiler

Guy Lipman
8 min readAug 21, 2019

A post describing how I optimised a smart hot water tank (I have been informed it isn’t actually a boiler) using dynamic time-of-use electricity tariffs.

I recently needed to replace my old 180L electricity powered hot water tank, and got a new 150L Mixergy tank as part of a trial. I’m on a dynamic time of use electricity tariff, from Octopus, so a big part of the appeal was that the Mixergy tank would give me much better access to data, as well as easier ability to schedule (I was previously adjusting pins on a manual timer most nights). But for more normal users, I should also note that Mixergy’s stratification technology (allowing users to only heat the proportion of the tank they want to use) should reduce electricity demand and save money.

The Mixergy tank comes with some default options for generating a heating schedule, but I obviously wanted something slightly more sophisticated, so this blog post describes how I went about this. Please note that this approach will not be appropriate for all users, so please don’t blindly follow what I’ve done. Also, it is very much an initial exploration, and I’m sure as I better understand the Mixergy tank I’ll improve my approach.

As I see it, there are three components to a hot water optimisation process: electricity prices, how the tank gains/loses heat, and how much hot water you want. I will begin by looking at each of these in turn.

Electricity Prices

On the Octopus Agile time of use tariff, every day a bit after 4pm, you get the prices for each half hour the following day. For example, here are the rates for the 20th and 21st of August:

The cheapest periods are usually some time between midnight and 6am, with a secondary dip between 10am and 3pm. I try to avoid using electricity during the 4–7pm peak period.

One challenge with optimising between days is that I have to guess what the prices will be the following day. At the moment I do this by guessing that there will be at least 1 hour available on the following day at 6p/kWh (I will probably refine this over time by taking into account predicted wind levels).

Tank Heat Process

The Mixergy tank does its best to keep hot water at the top, and cold water at the bottom. Every minute, it calculates the temperature at the top, the temperature at the bottom, and what proportion of the tank is hot. I don’t totally understand how the tank works, presumably not the whole ‘hot’ section is at the exact same temperature, and all the ‘cold’ section is at the cold temperature. Mixergy want users to focus on the charge variable, which makes sense, but obviously you need to also think about the hot and cold temperatures if you’re going to understand how heating or losses affect the charge.

I first show a chart showing the tank heating fully, with 3kW power, over a 2 hour period, starting from a point at which the top temperature was 31 degrees, the bottom temperature was 22 degrees, and which it considered 3% charged:

You can see that the top temperature (the blue line) rapidly rises to 60 degrees and then plateaus. The bottom temperature (orange) doesn’t rise until the level of charge gets quite high. The level of charge (grey) rises fairly steadily, though slightly less when the top or bottom temperatures are rising fastest (at the start and the end). For the middle section, it was averaging a 12% increase in charge every 15 minutes.

Next, I looked at heat losses over time. I’ve currently got 2 periods of time, one starting from a high level of charge (99%) and one starting from a low level of charge (28%).

From these I am estimating that tank loses 1% charge per hour at high levels of charge, and 0.25–0.5 at low levels of charge. Interestingly, the top temperature drops by 0.25 degrees per hour at high levels of charge and also at low levels of charge, but by more like 1 degree per hour at moderate levels (I guess these correspond to periods when there is the biggest gap between the high and low temperature in the tank).

As I get more data, I’d like to fit a function to determine how charge changes with heating and losses. But for now, I’m going to use a rough approximation of:

  • Heating adds 12% charge per 15 minutes
  • The tank loses an amount of charge each hour equal to 0.5% scaling up to 1% as it gets to 100%.

Hot Water Demand

Firstly, I looked at the periods when I used my shower. The top temperature barely moves. The bottom temperature drops to around 20 degrees (as you’d expect with new cold water entering the tank). The level of charge drops by 5% per minute (a bit less when the temperature difference between the top and the bottom of the tank is smaller).

Next, I decided how much hot water I actually want to use. This varies quite a bit, as I sometimes have friends staying, and I’m looking to save money by wasting less heat, not by forcing my guests to have cold showers. (Also, I should note that the Mixergy tank is very good at letting you rapidly heat up extra hot water if you need it, eg a half hour boost will give an extra 6 minute shower, though I’d rather not heat at expensive times of the day, and certainly not between 4 and 7pm.)

I therefore decide how much I would like to use on the following two days. If it is just me, I would typically predict that I’d want 5 minutes of hot water in the morning, and 2 minutes of hot water in the evening. But I want to increase that when other people are staying — an extra minute of hot water typically costs less than 2 pence, so not a big deal. Note that I tend to think in terms of minutes of hot water (which Mixergy tracks) rather than litres of hot water (which will depend on the temperature), although I’m sure I’d be able to estimate the latter.

Also, there’s some level of uncertainty, so I also like to specify how much hot water I want there to be available at different times, in case I want it.

I therefore create a schedule for the two days:

Thursday 7am: I want there to be 15 minutes hot water, and I plan to use 10
Thursday 7pm: I want there to be 3 minutes hot water, and I plan to use 2
Friday 7am: I want there to be 10 minutes hot water, and I plan to use 5
Friday 7pm: I want there to be 3 minutes hot water, and I plan to use 2

Based on the knowledge of how charge drops as I use hot water, I can convert this schedule

Thursday 7am: I want there to be 75% charge, and I plan to use 50%
Wednesday 7pm: I want there to be 15% charge, and I plan to use 10%
Thursday 7am: I want there to be 50% charge, and I plan to use 25%
Thursday 7pm: I want there to be 15% charge, and I plan to use 10%

Optimising Heating

Now that I have my preferences for hot water, I am looking to finding the cheapest way to satisfy this. I created a table of half hourly prices for the two days, the first day being actual prices and the second being expected half hourly prices. I then adjust the half-hourly prices increasing each by a factor of 1.0025 from the next, to account for the loss incurred in heating earlier. Finally, the resultant level is the prior level, less losses, less usage, plus additions.

To determine the optimal additions for each half hour, I then look at the first time where I need a particular level — by the end of the half hour ending 6:30am, I need to have at least 75. The lowest adjusted price is the half hour at 4am, so I put the maximum of 24% charge there, and then an additional 6% charge in the half hour before which was the second highest.

For the second day, I needed some additional heat. Here, I had a choice, whether to heat more on the first day, at a price of 5.25p/kWh (and incurring losses), or to heat on the second day, at an expected price of 6p/kWh. In fact, after losses, the two prices were almost equivalent, so I decided to wait until the second day. I therefore scheduled 1 hour of heating from 4–5am (although the time may change once actual prices are available).

Using the app to schedule this heating

The Mixergy app (on the web or on your phone) allows you to schedule heating for particular days. (It also allows you to set it to automatically determine use based on your regular usage, but obviously this won’t take into account my dynamic time of use tariff or my irregular water usage.)

In this particular case, I have told it to start heating at 3:50am on Thursday, up to 75%. It allows you to tell it to maintain the heat, but I haven’t chosen that setting. I also told it start heating at 4am on Friday, up to 51%, though this latter instruction will be overwritten on Thursday evening once I know the best times to do it.

Next steps

I’m planning on building a webpage that reads in the Octopus electricity prices, allows me to enter my hot water preferences, and optimises, telling me what to schedule. I still have a bit of work to do to convert the knowledge of which half hours I want to heat, into the simplest schedule.

Obviously I would love to be able to also pull in my temperature data, and automatically submit my schedule to Mixergy via my webpage — unfortunately Mixergy do not currently make their api available to retail customers (something I really love about Octopus).

I also want to collect more of my hot water tankdata, in order to fine-tune my assumptions about loss rates and heating rates. Again, this would be much easier if I had access to the data via an api, rather than having to copy and paste it from the Mixergy website two hours at a time. But even without this, as I run with things over the next couple of weeks, I’ll be able to see if my assumptions about how much charge I need is sufficient, and will make adjustments.



Guy Lipman

Fascinated by what makes societies and markets work, especially in sustainable energy. http://guylipman.com. Views not necessarily reflect those of my employer.