Calculate Total Three-Phase Power from Phase Readings
Add up L1, L2 and L3 active power into one total for three-phase energy meters, power analyzers, motors, chillers, EV chargers and switchboards. Gives one key for load dashboards, peak demand alarms and energy reports instead of three.
Who it’s for
Energy managers, facility engineers and electricians asking “what is the total load on this three-phase meter?”, “how much power does the whole motor or chiller draw?”, “what is the building’s demand right now?” — when the meter reports each phase on its own and every dashboard, alarm and report has to add the three readings again.
What it does
Reads the latest powerL1, powerL2 and powerL3 telemetry, adds them, and writes the sum as totalPower:
The result keeps the unit of the inputs: watts in, watts out. When the inputs are active power per phase, totalPower is the total active power of the three-phase load.
The field waits until all three keys have arrived at least once, so a missing phase never shows up as a total that is a third too low. With Use latest timestamp on, totalPower gets the time of the newest phase reading rather than the time the server computed it, so the total lines up with the phase values on a chart.
Once totalPower is published, dashboards, alarm rules and other calculated fields can read it like any other telemetry key.
How to customize
- To use this on your meter’s keys — change the Time series key on the
phaseL1,phaseL2andphaseL3arguments (e.g. powerL1 → activePowerA). - To rename the output — change the output Time series key from
totalPowerto your own key (e.g. totalActivePower). - To add up energy per phase instead of power — set the three Time series key values to your per-phase energy keys, rename the output to a key such as totalEnergy, and set Decimals by default to
2. - To add up phases that your meter reports in kW — set Decimals by default to
2, so the total keeps its decimals (4.21 + 4.15 + 4.31 shows 12.67, not 13). - To publish the total in kW — change the Expression to
(phaseL1 + phaseL2 + phaseL3) / 1000and set Decimals by default to2. - To timestamp the result with server time — turn off Use latest timestamp.
- To filter, transform, or forward the result to external systems — switch Strategy to Process via Rule Chains. Rule nodes then receive the value and can drop it, change it, save it conditionally, or push it to an external system.
See also
If your meter reports voltage, current and power factor for each phase but not its power, install the template below once per phase. After each install, give the copy its own name (for example Phase L1 power), use that phase’s input keys, and rename the outputs in the script so the phase writes its own keys (for example powerL1). Then add the three results with this field:
Active and Reactive Power CalculationShare Your Calculated Field with the Community
Built a useful data transformation? Export it as a JSON from ThingsBoard and publish it to the IoT Hub. Share it with thousands of ThingsBoard developers worldwide.