How many outputs can be defined?



I guess it depends on the complexity of the expressions entered in the calculator, but I would like to know if there’s any reasonable limit for the number of outputs that can be defined. This what I have now. This is the mains breaker box. I still would like to add total amps and watts, which is the sum of the 3 circuits, so it would include the expression:

(AiresFAh x 8.245) + (AiresFBh x 7.78) + (AiresFCh x 8.94) + (CFEFAh x 2.0253) + (CFEFBh x 1.7127) + (CFEFCh x 1.7022) + ModFA + ModFB + ModFC

Maybe it’s better to simply add wCFE, wAires and wMod at the Grafana query.

Additional question:

A phase of one of the circuits is missing the PF status at the inputs (although it is being shown as an output). Any ideas?

The constant factors are used because we’re measuring circuits that have several conductors per phase (in parallel) and we’re measuring only one conductor of each phase. BTW, we’re now using the 3-phase voltage sensing in direct mode.



There is no limit imposed, but you’re right, resources are not limitless. Without getting into the nitty-gritty of what constrains outputs, I’d say it looks safe for you to add some more outputs. The scripts that are stored in memory are actually very small. The use of a lot of constants burns it faster, but you have a lot of heap left. Where you will probably start to see trouble first is maybe you won’t be able to update the config because the json file will be huge (it probably already is). A few months ago I recoded that with a divide and conquer approach that seems to be working. Let me know if it breaks. Most of those outputs are trivial.

Yea, I don’t put out pf under 60 Watts. The CTs are not accurate down there and the ADCs are barely registering. It’s folly to pretend to have an accurate PF. In the 230V world, the cutoff should probably be 120 Watts.

I’ll be interested in any observations you have about that vs derived. I see that your voltages are pretty close, which is encouraging. If you want to try something out, you can do both at the same time and compare the readings of the direct and derived real-time.

Edit: One interesting thing is that I see the AC cycle sample rate is a little low at 32.9. That could just be the status refresh with all those outputs, or a big influx upload, but keep an eye on it. 33 is fine, that’s all 50Hz users get anyway, and that’s at least 2 per second, but I’m interested in the impact that direct reference has on that. It changes the timing of the sampling because it has to sync into a different voltage each sample, which could take more or less time. With a single voltage reference, when I finish sampling a 60Hz cycle, I know I’ve got 8.3 ms until another zero crossing. With direct reference, that’s a moving target. So I’m interested in whether it really sags. If so, it would make sense to group the sampling by phase.


Sure I will. But I’m confident it won’t. It’s working great so far.

Got it. But actually I have a few more questions regarding negative power (See the image below). Note that for this particular breaker box the mains is TPrinC (with the postfixes FA, FB, FC for the phases). Also, ERen is a subcircuit of the mains but connected to a group of solar panels (so that’s why power is negative). This Iota is (so far) connected as “derived reference”.

  • It looks like by not by not displaying pf for power under 60 the pf is also missing for large negative power. Probably there should be some abs(power) < 60 somewhere in the code?
  • Negative watts in the input are very informative. The color is a plus. [The solar panels are btw connected to phases A,B, a 220 V system, but not to phase C, so you see an imbalance.] Question: Have you considered output currents as negative for negative power? That way we could add the currents from every circuit and get the same total current at the main circuit. (The system has a few more circuits, with only the main and the solar panels wired at this point).

Sure. We’ll let you know of any findings. So far our only observation is that when using derived mode is that the single voltage input is named as A. In our facilities, the available power outlets are taken from phase C, so CTs for phases A, B, C at the breakers were referenced to CBA when configured at the inputs.

We may try it once me make more progress with the installation at more breaker boxes.

Interesting. I had not noticed that. One thing tough, I believe the board was not yet uploading to influx. Now it is uploading, but not all the outputs, and the Iota is at 32.1 AC cycles sampled/second. This is the influx config

Actually this other Iota with the solar panels has much fewer outputs and is not uploading (the service is stopped) and the samples are just below 40/s. Is that OK? See the image below.


Thanks !!!


You got me there. I can fix that. Most folks setup their solar so that it reads positive. But no problem, I’ll make that change.

How does that work? Are you using an inverter for split-phase systems? The phase difference is 120 rather than 180, 208V vs 240V. I see that the power on each leg is not the same, but the current is, so the pf is also different, and it looks like phase B takes the hit, probably the inverter is syncing a split-phase output to phase A. Is there a way to add some capacitors to better balance that phase B?

I have not considered output currents as negative numbers for negative power. The Amps output is RMS amps, which is always positive by definition.

Yea, I was considering using roman numerals to avoid confusion.:smile:

The way it works is that it samples a cycle and then digests the samples. Then it does other stuff as needed (posting to influx, responding to webserver requests, etc. Then it waits for the next zero crossing to sample another full cycle. So the theoretical limit is one sample every three half cycles. In a 60Hz world, the limit is therefore 40 cycles sampled per second (33.3 in a 50Hz world). Three-phase changes that a little, but it should be pretty close.

I love the beating you are giving these things. Carry on.


thanks !!!

I’m not directly responsible for that installation but I can investigate. We also have a power quality analyzer that we’ll soon use for calibration of the whole installation and we’ll find out about the phase angles too. So far what I know is that the inverters are two-phase and that each phase syncs independently to whatever phase they’re connected to (A-B, A-C, C-A, etc) so it makes sense they’re split-phase, but my experience is more related to electronics than to power systems so I can’t really tell right now. Capacitors may be added but I suspect there may be bigger issues there. For starters, I’m now wondering if the neutral wire is correctly specified, considering the load imbalance.

Can you possibly reconsider? Please? After all, in AC systems negative energy can only come from a current flowing in the opposite direction (as actually detected by the CTs). Then again, square roots have always two roots, one positive, one negative :slight_smile:

Now that I see, I made it worse trying to explain my point, haha. Sorry about that.

We will. :slight_smile: