How to calculate daily kWh Percent?

Thanks Bill !!

Now can i post images in the right place :slight_smile:

My emonPi + emonTx has several imputs and for each one has the followin process:

1 - if > 0, skip next
2 - x (-1) [1 & 2 modify negative values]
3 - Log to feed [real time electric input]
4 - Power to kWh/d [Daily kWhd device]
5 - / feed (General - Power to kWh/d)

The idea is that feed “General - Power to kWh/d” is the real time total value for my home general kW. So if i divide one device kWh/d (for instance “Horno” entry) between total home kWh/d “General” then i can get percent use of kW/d for each device.


Feed: Horno - Power to kWhd = 2 (x %)
Feed: General - Power to kWhd = 8 (100%)
Feed: Horno - Power to kWhd - Percent == 2/8 == 0,25 == 25%

Then the idea is get daily percent use of “Horno” relative to total energy use for my home. Finally, i would set this percent in a battery Dashboard.

When i create this model of feeds, “Percent” current feed configuration represents real time value percent, but my objective is get cumulative value percent of the day. So i have not real representation of total cumulative percent consuption for this device. Please ask me if my explanation is not very clear :frowning:

In another hand, if i represents Multigraph, i can see with bars percent values of each device but i have not the numeric value of daily percent.

In this example “Horno - Power to kWhd” has 1.43 and “General - Power to kWhd” has more or less 6. So (1.43/6)*100 = 24 %

I would like to have a feed with this value, to query daily percent use of each device (Horno, Lavadora, Aire Acondicionado, Enchufes, Lavavajillas…)

Can you lend me a hand to get these daily values in percent? Thanks in advance

1 Like

Hi Dan,

I’ve bumped your account up a notch. You should be able to post multiple images now.

Did you ever get a solution for this?

Hi Peter,

Not yet. I have no idea how to implement it. Do you have any suggestion? :slight_smile:

Since daily values are not passed on for further processing you will need to create a secondary processlist at the end of the existing processlist using a reset to zero and then use “+feed” processes to pull in the daily values for the calc’s you need.

For example if you have an input “A” that has the following processlist

log to feed A_Power
power to kWh A_kWh
power to kwh/d A_kWh/d

and the total daily consumption is being tallied somewhere as Total_kWh/d, then you might be able to do something like

log to feed A_Power
power to kWh A_kWh
power to kwh/d A_kWh/d
+feed A_kWh/d
/feed Total_kWh/d
x 100
Update feed at day A_percentage_of_daily_total

and “A_percentage_of_daily_total” should (hopefully) be overwritten each time the input updates, with the current percentage of daily total.

I say “hopefully” as I’ve never used that process and it seems to have changed name recently, it may be that you have “Upsert feed at day” instead and the function code style doesn’t match the other daily feeds, so it maybe that it has not evolved along with the other functions as it is less used.

I haven’t tried this myself so it may need tweaking, but please let us know if you try it as it’s an interesting subject.