I suggest you download the emonLibDB library zip package from this forum EmonLibDB - Version 1.0.2 and therein you’ll find working demonstration sketches for up to 3 current and 3 voltage channels (i.e. single phase, split phase or three phase but no temperatures), which are briefly described in the accompanying documentation.
You’ll need to add “trimmings” as necessary - i.e. I’m waiting for Trystan to specify what he wants by way of on-line calibration, then I can produce a “fully engineered” sketch which will fulfil your requirement of “programmable from the EmonPi”.