Using Arduino as Phase Angle Controller

 Has anyone considered this as a viable option?

A number of board members are building the energy monitors to control solar generated power, and divert unused power to immersion heaters, and one option being discussed is to use a Phase Angle Controller to ensure that even small amounts of spare energy can be used, especially during the winter months, when solar power is minimal. See link openenergymonitor.org/emon/node/176

I see Trystan and Glyn have detailed emon,  which utilises voltage monitoring via a AC/AC transformer, and software which appears to detect zero crossing, and thereby phase angle, so surely it must be possible to provide an output pulse (say 5ms) to one of the pins which could drive a opto-isolator to trigger a Triac.
We know that the mains is 50hz, so could time the trigger pulse to coincide with the desired phase angle.

I've  only had my Arduino for a few days now, and have only managed it to turn LED's on and off so far, but I am sure that the more experienced  board members will tell me if this is a non-starter, or offer advice.

 

Paul