Calculating Costs

Hi experts!

I'm struggling to find anything about input processing thats up to date specifically related to calculating cost per day /month/year and how to get that into graphs? There are several posts I've read and frankly I'm lost, I do understand I need to:

log feed from grid -> x by unit cost (19.7p) -> log to new feed (cost per day/week/month/year)

I'm getting confused with kWh feed or Grid feed and how to get the correct multiplier and how to display, has anyone here in the UK got it working and can share how they have done it?

 

Many TIA

 

Worth adding I tried following this post:

18 & 19  allow negative & allow positive resets the chain to zero

20         +input "grid" 

 -          allow positive (required to exclude export unless you have a net usage tariff)

21         x  0.023 (23 cents per kw/hr x 0.001 = 0.023 cents per w/hr)

22         log to feed "MyRunningImportCostPerHour" logged/displayed in cents varies & with load

23         x 1000 (this is to counteract the in-built w to kw conversion in the "power to KWh/d" function)

24         Power to KWh/d feed "MyImportCostToday" logged in cents

25         Power to Kwh feed "MyTotalImportCosts" logged in cents

 

And ended up with the following errors:

[Tue May 19 19:05:35 2015] [error] [client 127.0.0.1] PHP Notice:  Undefined offset: 0 in /var/www/emoncms/Modules/input/process_model.php on line 98

[Tue May 19 19:05:35 2015] [error] [client 127.0.0.1] PHP Fatal error:  Method name must be a string in /var/www/emoncms/Modules/input/process_model.php on line 100