Need a little help with this Piston..... Energy Reporting for my Pool Pump


#1

1) Give a description of the problem
I want to make the “Current Cost” to stop on a certain day to mirror when my “month” is over (when power meter is read) and also keep a rolling cost for annual usage/cost. I borrowed this piston from the examples page and it has worked great so far.
image

2) What is the expected behavior?
see above
4) Post a Green Snapshot of the pistonimage


#2

If I’m reading your piston correctly, the “current cost” is a theoretical cost if your usage continues at its current rate for a period of time. It’s instantaneous, not a rolling accumulation.

In other words, I don’t think your current piston tracks consumption over time, just shows an ‘cost’ if you were to keep using the same level of power you are right this second. Is that right?


#3

Not really. The cost is the highest cost on the cost schedule and it is coded here:
image
at just under .10¢ a KWH.

The amount of Power that it has consumed so far since I started using this piston is:
image

When the pump is running it shows the amp load here:
image

and this imageis the total of
image X image

I was looking for a way for this piston to give me a “rolling” total like
“Last Months Energy Cost is X”
"This Months energy (so far) is X " which is currently displayed as image
and
Finally, “Annual Total Energy Cost” Which this will do if left alone image but this will need to reset on December 20 of each year. Because that is the end of Georgia Power Companys billing year. The Billing cycle runs to the 20th of every month.

I hope this makes sense to you.


#4

Here is what the whole Piston looks like while the pump is running:

image


#5

Ok, that’s the piece I was missing then. So [hem : power] is cumulative and resets every so often? Is it daily at midnight? With that, I think I can pull together what you’re trying. Basically what I just did in this thread but with a different ‘reset’ frequency for the variables:


#6

It never resets. that is part of my issue, I need one to reset monthly and one to reset annually.


#7

Ok, so your current 507Kwh will increase indefinitely? Seems like there would have to be a reset option in the device type handler (DTH) somewhere. Otherwise in a few months that data would be completely useless for energy monitoring.

Can you do me a favor and go to the box where you can select actions with your HEM, click on the dropdown list, and let me see what’s available on there? For example, with a switch:


#8

Not sure where to get that information. The only Do’s are with Location.


#9

Can you select your HEM from that first drop down list, click add task, then see what is available? That’s what I wanted to see.

Unless someone with an HEM can post up how they reset consumption. There has to be a way.


#10














#11

Ok, later tonight I’ll post something up that stores your work energy consumption daily and gives you a monthly summary.

Someone with a hem will need to let us know how you reset consumption though. It has to be possible.


#12

Awesome! Thanks for your help. Webcores Community is so cool!


#13

Just got in and it’s late here, I’ll post something up in the morning! Glad to help!


#14

Working on this now and after importing, the first thing I realized is your hem is actually Outlet 1. Can you try the same thing we did before to list the tasks, but select whatever device is you “outlet 1” in the sample piston you posted? I’d like to see what actions are available for it.

Thanks!


#15

It’s not for a hem, but a couple different styles of aeotec. I have a simple monthly reset for my Grafana energy graphs. Resets at the end of every month. Could easily re-populate variables at the same time. Just curious if the hem works the same way as this energy meter capability.

My approach would be to capture the value for the last month and update the cumulative. The live cumulative value would be cumulativevariable + current value. Update the variables, then reset. Then your dashboard could should last months cost and total, cumulative cost.


#16

Correct! It is actually a Aeotec Heavy Duty Smart Switch wired between the breaker and the pump.

. I’m not even sure how it is reporting. I stumbled upon the original piston and just plugged in my devices and away she went! it is actually spot on as we have put a Fluke meter on it and the readings were exactly the same.


#17

This should accomplish what you’re after. It’s set for the billing cycle to reset on the 20th now, but you can change that in the variables at the top if you necessary.

This piston stores a sliding window of 1 month of consumption. It does this by storing the energy value off your HEM daily, and then subtracting the previous days energy level to get an increase for today.

The first block in the “every day at 11:59pm” section sets a “previous day” variable. This is needed to do the math that determines daily use in an array.

The first IF statement checks to see if tomorrow is the 1st of the month, meaning today is the last day of the month. If it is the last day of the month, any data previously stored in the array will be set to zero. This won’t serve any purpose for a while… but in June when there are only 30 days, it will zero out the energy stored in your array for May 31st.

The second IF statement takes the entire month and calculates consumption on the day your billing cycle ends.

I’ve tested this as much as I can by building up bogus arrays (harder than actually writing the piston!)… it should be a good start. Let it run for a bit and let me know if you’re seeing anything odd… or if you want something added to it. With the data stored in variables you should have the ability to put all kinds of stuff in your Piston State if you’d like.


#18

WOW!! Thanks for all the hard work! It is much appreciated. You are way smarter than I ! :wink: I’ve got it installed and will let you know what happens tomorrow.

Thanks again! you sir are a wealth of knowledge and a valuable community resource!


#19

Glad to help man! lol, probably not smarter, but definitely like trying to find solutions in this system! :slight_smile:

Looking forward to seeing how it works tomorrow - just to know what to expect, tomorrow you should see this in your variables:

CumulativeEnergy [“2”: ???] - where the ??? is the energy reported by your hem
DailyEnergy [“2”: 0]

Tomorrow at 11:59 when the piston executes again, you’ll get a new energy for CumaltiveEnergy and a Daily value other than zero.


#20

Good Stuff! If I ever get to Chicago, I’ll buy you a beer and a slice!