Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Detect Phase Loss on a Three-Phase Supply

  • Calculated Field
  • 0 installs
  • v1.0.1
  • Nov 13, 2026
  • MIT license
  • v4.3+

Detect phase loss on a three-phase supply from L1, L2 and L3 voltages: count the phases below 10 % of nominal and name them. Catches phase failure, a missing phase or a blown fuse on switchboards, energy meters and the feeds of motors, pumps and compressors. A running motor can hide a lost phase, so pair it with a current imbalance alarm. Reports phases the meter cannot read (OFF, ERR) apart, so an alarm can tell them from a real loss.

Type
  • Script
Category
  • Energy
  • Custom Formula
Use Cases
  • Smart Energy
  • Smart Metering
  • Industrial Automation
  • Predictive Maintenance

Who it’s for

Electricians, maintenance engineers and facility managers asking “has a phase dropped out on this supply?”, “did a fuse blow on the motor or pump feed?”, “which phase is missing on this switchboard?” — when the meter reports three phase voltages and a lost phase is easy to miss until a machine trips or stops.

What it does

Reads the latest voltageL1, voltageL2 and voltageL3 telemetry (phase-to-neutral voltage, V) and two server-scope attributes, nominalVoltage and phaseLossThresholdPercent, and writes four keys:

detect-phase-loss

The 10 % default follows IEEE 1159, which calls a voltage below 0.1 pu (10 % of nominal) an interruption. On a US 120 V system, set nominalVoltage to 120, so the limit becomes 12 V.

A voltage exactly at the limit is not lost: it must be below it. A setting that is not a number counts as 230 V and 10 %.

The field waits until all three voltages have arrived at least once. The result gets the time of the newest input, not the time the server computed it, so it lines up with the voltages on a chart.

Dashboards, alarm rules and other calculated fields can read the four keys like any other telemetry key. Because the counts are separate, an alarm can tell a lost phase from a phase the meter cannot read, and give them different severities.

How to customize

  • To use this on your meter’s keys — change the Time series key on the phaseL1, phaseL2 and phaseL3 arguments (e.g. voltageL1 → voltageA).
  • To set the nominal voltage or the threshold for one device — add a server attribute nominalVoltage or phaseLossThresholdPercent on that device (e.g. 120 for a US 120 V supply).
  • To change the nominal voltage or the threshold used when no per-device attribute is set — change Default value on the nominal or thresholdPercent argument.
  • To count an unreadable phase as lost — in the Script, replace unknown.add(name); with lost.add(name);. unknownPhaseCount then stays 0.
  • To rename the outputs — open the Script and replace the four keys in the return object with your own keys.
  • To filter, transform, or forward the result to external systems — switch Strategy to Process via Rule Chains. Rule nodes then receive the result and can drop it, change it, save it conditionally, or push it to an external system.

See also

To raise an alarm as soon as a phase is lost, or when the meter cannot read a phase:

Three-Phase Phase Loss Alarm Dmytro Shvaika

A running three-phase motor can keep the lost phase at almost full voltage by itself, so a voltage check can miss a phase lost on the motor side. The phase currents show it clearly: the current of the lost phase falls and the others rise. To raise an alarm on that current imbalance:

Motor Phase Current Imbalance Alarm Dmytro Shvaika

Share 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.