Solar Diverting exported energy for multiple uses

I am just updating my 4kw solar system to 10kw. And am wondering if anyone has developed scripts to divert the exported energy to multiple devices under rules?

I am considering MQTT controlled relays and sensors to decide if that device could benefit form the free energy

IE

Is the hotwater tank up to tempt IF NOT and I am exporting 1kw the switch on the immersion heater

I then have electric heating of an out building (instead of OIL!)

And Dehumidifying and heating a in door swimming pool 

 

I have seen systems that control ONE dump source like hot water but not rule based ones for multiple?