An Approach to Diversion for Pool Heating

I’ve set up a newly acquired emonTx/emonBase which will come into service once a large (30 KWp) solar PV system is installed and an ASHP is installed for heating an outdoor pool.
I’ve successfully followed the Solar PV Type 2 System Setup guidance. The visualizations look great – and as expected at this stage, Solar is shown as zero.
I created the suggested import_kwh feed at 10 secs intervals and another feed import_kwh_5mins at 5 mins intervals. Comparing the exported CSV’s for each shows them to be consistent.
Question 1 – how to create a further feed that just shows the incremental change between each 5 mins interval?
Depending whether or not that incremental change was +/- would indicate import/export. Were it export then I envision using that condition to turn on the pool ASHP via an additional Raspberry Pi (how? TBD). The site has wireless coverage.
Alternatively given that the pool ASHP RPi would need to access the emoncms database then perhaps it could make the incremental change calculation.
Question 2 – how can a second Raspberry Pi access specific values in the emoncms database?
This is, of course, an approximate method as exporting during the past 5 mins does not necessarily mean there will be export during the next 5 mins. And there will also need to be a condition depending on whether or not the pool ASHP was on during the past 5 mins, etc.
Any suggestions or comments – most welcome.

Rather than use the (historical ?) data in your Pi, have you looked at the possibility of real-time diversion control using one of the designs published here?

Thx for the suggestion.

The pool is open May – Sep. The pool ASHP I have in mind would consume 6.4kW (3 phase) when on or approx 7.5 kW with the circulation pump. And it would need to run 7 hours per day to maintain pool temperature. It is capable of being remotely controlled (2 terminals connected or not) which I’m thinking could be controlled by a Pi.

Intuitively I don’t think it good to cycle the ASHP more frequently than every 5/10 mins.

Also using the most recent 5/10 mins export/import history will smooth the effect of passing clouds, a kettle switched on in the house, etc. Whereas an instantaneous export/import reading might be misleading.

My (limited) understanding of the diversion solutions detailed on the website is that they monitor & switch much more frequently plus I’m not comfortable with DIY stuff on the high voltage side.

Having spent quite a few hours trawling the website regarding feeds & virtual feeds, I can see how to access the most recent value of a feed but not the previous one … Question 1

And how to get a feed value from emoncms to a Pi for subsequent processing defeats me at present … Question 2

Thx again

I wasn’t thinking of cycling the heat pump, but of using electric heating to supplement it and absorb your excess generation, assuming of course that there is any after the heat pump has drawn what it needs. It’s not necessary to build the mains switch yourself, you can use a commercially available solid state relay (or relays) provided that they can accept the appropriate control input.

I can’t answer the emonCMS questions, but I’ve no doubt somebody can.

I have supplied a 3-phase diverter for use in a similar situation. As Robert suggests, surplus power is diverted in real time via a £5 triac to a standard 3kW immersion heater that gradually raises the temperature of a large thermal store.

If the thermal store’s temperature ever drops below a pre-set level, the 3-phase heat-pump starts up which consumes a fixed amount of power, some of which may be chargeable. The background action of the real-time diverter saves money because the 3-phase pump needs to spend less time in the ‘on’ state.

Thx for that …

The pool doesn’t have a thermal store (apart from the pool water itself) so a 3kw immersion heater is not possible/applicable.

However the house does – a large tank feeding hot water and under-floor heating. This tank already has a single immersion heater fitted. So I’ll head over to mk2pvrouter.co.uk before too long.

I’m still hoping for guidance from the emoncms guys re …

Having spent quite a few hours trawling the website regarding feeds & virtual feeds, I can see how to access the most recent value of a feed but not the previous one … Question 1

And how to get a feed value from emoncms to a Pi for subsequent processing defeats me at present … Question 2