It's the Open Energy Monitor EmonTx using what's known as the PLL diverter (code from 2012 by a very smart chap named Martin) - the TX does all the sampling using a CT on the meter tail (household power) and one for Solar, I added an extra CT for the battery. The code works on the principle of an 'energy bucket' whereby as long as the import meter doesn't see a net change of 1Wh in either direction it won't notice (greater in my case as I have an old spinning type) so when the bucket is 'full' based on energy export (rather than power) it then triggers a triac circuit for the immersion (this was an additional piece of homebrew electronics which is the triac driver and triac itself on a chunky heatsink) - it can do this at 50Hz as the triac turns off at a zero crossing of the AC waveform - when I was trying to stop it draining my battery when I had the LAs, I had to fudge in some conditions using the readings from the battery otherwise the code was 'seeing' export and the Solis happily kept supplying more and more power so they were fighting each other! I think I have that sorted though it's a bit crude - it kills the diverter if it sees a battery discharge plus some other conditions like the diversion power being more than the solar. Fortunately it also means it has prioritised in way I want which is battery charge first then DHW as it just picks up the excess
When the daily PV gets to over 7-8kWh I should have a continuosly topped up HW tank as usually 4-5kWh is enough to keep it ticking over until the next day
https://learn.openenergymonitor.org/pv-diversion/pll/pll
We went over 24hrs on solar+battery the other day from a full charge, I am yet to get a running 2 day charge/discharge/charge cycle but I think the 4.8kWh Pylon was the right starting point - as you say using something like the oven smashes the SoC but we use it maybe once or twice a week so it's a win if it's up to 100% - I'm already toying with the idea of a US2000 or 3000 but the price point per kWh means I may as well jump and get another 5000 but that's then another £2k so we'll see!