Log running total of feed help

Hi I have a feed that calculates the live cost of power usage taking into account my solar generation.  Basically if my net power usage is positive it will multiply my usage by what my energy company charges me.  If my net usage is negative ie im generating more solar than i am using then it will multiply this by my rebate or feed in tariff my energy company pays me.

this is then logged to a feed value called "Export live amount".  This all appears to be working.

What i want to be able to do is calculate the daily amount and then graph this.  In other words i want to keep a running total of the live cost so that i can calculate what my electricity is costing me each day and track this each month so i can predict what my bill will be.

How do I take my live cost feed and turn this into a daily log.  Given the data is not power rather a mathematical formulae giving me a dollar value.

This is what i have tried in my input config but its not working:

16  Reset to ZERO
17  + feed  Node 10: Net Home Power Usage 
18  x  0.1 (convert to KW)
19  If <, skip next (if negative calculate rebate and skip next)
20  x  0.2238 (charge/KWh
21  If >, skip next (if using grid power skip next)
22  x  0.08 (feed in tariff rebate)
23  x  0.01 (convert to dollars)
24  Log to feed  Node 10: Export Live Amount 

How do i take process ID 24 to keep track of the instant amount and create a running total and a daily total.

thanks.

chaveiro's picture

Re: Log running total of feed help

A bit of an hack but try adding after 24:
-> x1000
-> "Wh increments to kWh/d"

pb66's picture

Re: Log running total of feed help

The "power to kWh" and "power to kWh/d" can still be used for generic "rate to quantity" counting, you just need to ignore the units and make allowances for the scaling

power x unit cost = cost per hr

cost per hour x 1000 (to offset the in-built watts to kW scaling) "power to kWh(/d)" = accumulating cost (daily)

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.