Calculate live (current) cost and log daily cost

Can someone point me in the right direction i would like to calculate my live (current) actual cost and then log this daily so that i can keep a record of my costs and then compare this when my bill comes.

 

I have solar and so if my usage is negative ie im generating solar power then i get 8c feed in tariff but if im using power ie usage is plosive then im being charged 22.38c.

 

How do i go about adding this to my emoncms setup?  

 

Thanks.