emonPi to read and log Modbus as well as other power feeds from my Grid-Tied system and control power switches

I am a complete noob on actually USING the readings and control any solenoids or switches but have been able to build my own emonCMS dashboards.
I have two SMA inverters. Output is connected to incoming line of grid just after first breaker on the DB board.

Access power is pumped into the grid and shortages are pulled from the grid.

A dual direction power meter is installed by the power supplier. I get around 65% for electricity sold compared to what I pay for usage.
It is therefore beneficial to switch on my water heater (geyser is it called in South Africa) to USE power when I produce more that I use at that stage.

I have 3 geysers so would like to do the following:
If I feed back into the grid more than say 2 Kw, relay for geyser 1 must me switched on.
If feed into the grid is less than 1 Kw, switch off the relay.
If feed into the grid is more than 2Kw, and geyser 1 temp is > 45, then switch on geyser 2.
If feed into the grid is less than 1 Kw, switch off the relay.
If feed into the grid is more than 2Kw, and geyser 2 temp is > 45, then switch on geyser 3.
If feed into the grid is less than 1 Kw, switch off the relay.
After this I would repeat the cycle to take the geysers temp up to 55 and then 65.

I was thinking: if I can use a Modbus like this:

plus temp censors in the geysers and relays,
Oh yes and then create the dashboards needed to monitor all this!

It should be possible to achieve.
Any persons out there that would be willing and able to embark with me on this project?

Not sure if this may help:
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/interface-with-arduino

https://openenergymonitor.org/forum-archive/node/4283.html

Regards

Frits