Community
OpenEnergyMonitor

Community

Help needed to understand feed calculation from inputs

emoncms
Tags: #<Tag:0x00007f13ef3e2768>

(Olav Kristiansen) #1

Hi, first post.
I have an IotaWatt up and running, uploading to emoncms. I try to understand how the input->feed calculations work, specifically the one calculation on Key 2.

What I try to do is:

  1. Sum the three phases on my main fuse to a total consumption. The result makes sense and is within 1% of my electricity meter.
  2. I measure many users, but not all. After summing the phases and creating “log to W” feed and “accumulated kWh” feed, I subtract all the CTs measuring individual users with aiming to get a “the rest”-calculation. Is that the way to do it?
    I get a result, but it seems to not subtract everything. Specifically, it seems not to subract my water heater, so I just wanted to ask if I have got it right.


(Robert Wall) #2

I think I would use “Reset to ZERO” after you have logged the sum of the 3 inputs and then start again, by adding the Inputs you want or (preferably, for reasons of timing) adding the Feeds that you want.


(Inactive) #3

You appear to have the right idea, but the devil is in the details. The screenshot doesn’t show the intermediate values, and it doesn’t show specifically which inputs are being added and subtracted. So there could easily be a mistake or omission there. If you click the little wrench at the right of the Key 2 line, you will see a detailed listing of the input processes, along with the latest values produced by each when the process list was last executed. If you post that, it would be possible to see, at least, if it’s a problem with the specification or how it is executed.

But stepping away from the stated solution, lets look at the problem from a different perspective. You are logging each of the 15 inputs to a power feed. After that, you are developing 6 additional power feeds by adding together some of those basic inputs, and also logging the energy from five of those to kWh feeds.

The 15 basic input feeds are easy and you have done that. The extra six calculated feeds might be easier in the IoTaWatt, sending the result to emoncms as additional inputs, that would be handled the same as the basic inputs with a Log to feed followed by a Power to kWh.

So your IoTaWatt inputs are something like this:

I’ve don’t have the phase information and you may have different CTs, but that’s not a critical detail here.

To send this to emoncms you would start with the basic default configuration:

So now lets add the additional outputs. I’ll click ADD and the script “calculator” pops up. I set the name to 16 which is the emoncms input key that I want to use, and then add the three mains together.

Click save:

You can now see that input key 16 to emoncms will be the sum of your three mains. Doing the same for the “all the rest” that you need:

and so on for the other three compound inputs that you want. When you save this away, the inputs will appear in emoncms on the next posting, and you can go there and name them for clarity. Then add the Log to feed and Power to kWh input processes. It takes all of the calculation out of Emoncms and moves it to the IoTaWatt.

But before doing this, try creating these same scripts as IoTaWatt outputs first, then go to the IoTaWatt graph display and look at the result. Unlike doing the calculations in Emoncms, the IoTaWatt outputs will work with your historic data as well, so you can look at yesterday, last week, whatever, and see if it looks right. Also, if you have a curiosity about some other function, you can just define a local output and look at the result without going through a configuration and data collection waiting period.

You might also consider which of your data needs to be accessible from emoncms and what could be considered just backup detail. If some of that power data is only of short term or occasional interest, maybe you want to just delete that output to emoncms and the associated feeds in emoncms which are billable. To be sure, the data is more accessible and potentially less volatile with emoncms, so you want to evaluate the cost of keeping it all in the cloud vs. using the 15 year datastore capability of the IoTaWatt for less important detail data.


(Olav Kristiansen) #4

Thanks a lot for the comprehensive reply! It turns out that my confusion was in one of the users (the water heater) was on the wrong phase, and was logged with about 50% of its actual power. So that’s sorted.

About setting up outputs on the IotaWatt itself, I was a bit worried about maxing the cpu capacity. Is there any rule of thumb on how many outputs and calculations it can handle? I find outputs on the Iotawatt more practical for the reason you point out - that it also calculates historic data. So that’s the way to go if it can handle the load, I think.

I will make sure to post detailed breakdowns of the calculations if I run into trouble.


(Robert Wall) #5

It might be useful to the user base of Iotawatt if this information were to be duplicated on The IoTaWatt forum


(Inactive) #6

The computational load on the IoTaWatt is trivial. You could not overwork it with script calculations.

The process of resolving phase assignment with derived reference is covered in the new readthedocs documentation at docs.iotawatt.com. A water heater is a textbook case given the unity power factor, and so should have been covered. Admittedly 5W capacitive droppers not so much.

The real problem is that the documentation in this site is more than a year old and is no longer accurate. What would make more sense would be to remove it all and provide a link to the documentation referenced above.