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.