Skip to content

Energy meters, CT clamps and smart plugs ​

This page is about the hardware side of measuring electricity: what to buy, how to fit it, how its readings reach Omaya, and how to tell Omaya which meter feeds which. What the readings look like afterwards, and who uses them, is the Energy Monitoring app.

Three kinds of hardware ​

KindMeasuresTypical use
Metering at the board: a DIN-rail meter with CT clamps on each circuit, read by an edge gatewaykWh, kW, voltage, current per circuit or per phaseThe main incomer, each floor's board, the chiller, a server-room board
A CT clamp energy monitor paired with a hub (for example a Wi-Fi or Zigbee clamp monitor in Home Assistant)Current, and with a voltage reference, power and kWhOne circuit you want to watch without a full meter: an aircon, a water heater
A smart plugPower, kWh, often current and voltage, of one applianceA fridge, a coffee machine, a printer, an EV charger on a plug

How the readings reach Omaya ​

A device becomes an energy meter in Omaya as soon as one of its readings carries energy (kWh) or power (W) (or, for a LoRaWAN CT clamp, current (A)). It then writes one reading a minute and appears in the Energy app after its first one. Four routes deliver that today:

RouteUse it forFields Omaya keeps
An edge or metering gateway over MQTT that reads your meters (often over Modbus) and publishes the valuesBoard meters, PDUs, anything on Modbusenergy_kwh, power_w, voltage_v, current_a, from names such as kwh, kw, watts, voltage, current. See MQTT gateways
Home AssistantSmart plugs and clamp monitors that Home Assistant already knowsenergy_kwh, power_w, current_a, voltage_v (units converted: Wh to kWh, kW to W, mA to A)
A LoRaWAN network server (for example a Milesight gateway)Milesight CT clamps (CT101, CT103, CT105, CT303, CT305, CT310 and their -V2) and smart sockets (WS523, WS525, WS513, WS515, WS558)energy_kwh, power_w, voltage_v, current_a, power factor. See Milesight CT clamps and sockets below
Your own decoder in New sensor typesA Bluetooth meter that broadcasts its readingsthe reading names energy_kwh, power_w, voltage_v, current_a

The same four fields are what a rule sees with Sensor reading (any field), and the Power Draw Now and Energy Used Today rule measures add them up per zone or floor.

Milesight CT clamps and sockets over LoRaWAN ​

What each one gives the Energy app:

DeviceCurrentPowerkWhVoltage
WS523, WS525 portable sockets, WS513, WS515 wall socketsYesYesYesYes
WS513-V3, WS515-V3Only in an over-current alarmYesYesYes
WS558 light controllerNoYesYesYes
CT101, CT103, CT105 (one clamp)YesNoNoNo
CT303, CT305, CT310 (three clamps)Yes: the three added together, and each clamp on its own for rulesNoNoNo
CT101-V2 … CT310-V2YesNoYesNo

A CT clamp measures current only. It has no connection to the supply voltage, so it cannot know the power, and Omaya does not guess it: a clamp gives the Energy app its amps, and its Today kWh stays a dash. The -V2 clamps work out kWh themselves from a supply voltage and power factor you set on the clamp with Milesight's ToolBox app; Omaya records that kWh as the clamp reports it, so set them to match the circuit before relying on it. If you need power and kWh from a circuit, use a -V2 clamp, a socket, or a meter.

On a three-clamp CT303, CT305 or CT310, the current is the three clamps added together. That is the circuit's total when the clamps are on the three phases of one supply, or on three circuits you want counted as one; register one device for the three.

The temperature these devices report is their own electronics, so it is kept with the energy reading and not shown in the Environment report as the room's temperature. A socket's supply voltage is never shown as a battery.

Register each one with its own model (for example WS523 Smart Portable Socket, CT101-V2 Smart Current Transformer): the -V3 sockets report kWh where the older ones report Wh, and the model is one of the ways Omaya tells them apart.

Plan the meters before you fit anything ​

Draw the electrical single-line diagram (or ask the building's electrician for it) and mark which meter sits where. Omaya adds up energy the same way: each unit of electricity counted once.

Main meter, sub-meters and a generating meter: what Omaya adds up The main incomer is a top-level meter and is counted in the total. It feeds three sub-meters: the HVAC board, a floor's lighting and power board, and the server room board. Each sub-meter is set to Fed by the main incomer and is not added again. A rooftop solar meter is marked Generates power, and what it produces is subtracted, so the total is net: main incomer minus solar. UTILITY SUPPLYMain incomertop-level · countedFed by: noneHVAC boardsub-meter · not added againFed by: Main incomerLevel 2 lighting & powersub-meter · not added againFed by: Main incomerServer room boardsub-meter · not added againFed by: Main incomerRooftop solarGenerates power · subtractedno parent, feeds nothingTotal energy (net) = Main incomer − Rooftop solar. The boards are shown under their parent, never added twice.
Set this once, under Your Apps → Energy → Meter hierarchy: each sub-meter is Fed by the meter upstream of it, and solar or a generator is ticked Generates power. Without it, the total adds the main meter and its boards together.
MeterWhat it is in OmayaCounted in the total?
Main incomerA top-level meter (no parent)Yes
A floor or plant board fed by the incomerA sub-meter, Fed by the incomerNo: it is already inside the incomer. It is listed under its parent
A circuit on that boardA sub-meter of the boardNo
Solar, a generatorGenerates powerSubtracted, so totals are net
A meter on a supply nothing else measures (a separate landlord supply)Top-levelYes

Fitting a CT clamp ​

A CT (current transformer) clamp measures the current in the conductor that passes through its jaw.

Electrical work

Fitting CTs inside a distribution board is work for a licensed electrician, following local wiring rules and the meter vendor's manual. The steps below are what to ask for and check, not instructions for working live.

Fitting a CT clamp: one live conductor, arrow towards the load On the left, the right way: a supply feeds a load through a live and a neutral conductor. The CT clamp is closed around the live conductor only, with the arrow on the clamp pointing from the supply towards the load. On the right, two wrong ways: a clamp around the whole cable, where the currents in live and neutral cancel and it reads close to zero, and a clamp on the live conductor with the arrow pointing back to the supply, which reads negative power. ✓ Live conductor only, arrow to the loadsupplyloadL (live)N (neutral)CT ARROW POINTS TO THE LOADThe arrow (or K→L, P1→P2) points from the supplyside to the load side. Close the jaw fully.Three-phase: one CT per phase, each on thephase its voltage input measures.✕ Around the whole cableL and N cancel: reads ≈ 0✕ Arrow back to the supplySUPPLYLOADreads negative power
A CT measures the current through its jaw. Clamp the live conductor alone, arrow towards the load, jaw closed. Work inside a distribution board is for a licensed electrician; follow the meter vendor's manual for the marking on your CT.
  1. Pick the CT for the circuit. Its rated current must cover the circuit's breaker rating; a 100 A CT on a 16 A circuit reads coarsely, a 50 A CT on a 100 A feeder saturates. Check the jaw opening fits the cable.
  2. One conductor through the jaw. Clamp the live (phase) conductor only. Around a whole cable, live and neutral cancel and the CT reads close to zero. On a three-phase circuit, one CT per phase.
  3. Arrow towards the load. Most CTs are marked with an arrow or with K→L / P1→P2. Point it from the supply side to the load side, as the vendor's manual says. A CT the wrong way round reads negative power, or (on a meter that cannot show negative) the wrong value.
  4. Close the jaw fully, until it clicks. A gap in the core reads low.
  5. Match each CT to its voltage reference. Power is current × voltage; a meter computes it from the voltage of the phase the CT is on. A CT on L2 paired with the L1 voltage input reads nonsense power.
  6. Label both ends: the CT, and the meter input it goes to, with the circuit name you will use in Omaya.
  7. Note the CT ratio (e.g. 100/5 A) and set it in the meter.

Fitting a smart plug ​

  1. Use a plug rated for the appliance's current: a kettle or heater can exceed a 10 A plug.
  2. Pair it with your Home Assistant, and name it after the appliance, not the socket.
  3. Check in Home Assistant that it shows power and energy entities. A plug with only power gives a live draw but no daily kWh.

A Milesight LoRaWAN socket (WS523, WS525) needs no Home Assistant: add it to the LoRaWAN gateway like any other sensor and register it in Omaya, as below.

Register the meter in Omaya ​

Through an MQTT edge gateway ​

  1. Connect the gateway: MQTT gateways. The gateway itself is registered under Device → Gateway.
  2. Give every meter a stable identifier in the gateway (MAC form, six pairs, or a 16-character EUI).
  3. Device → Sensor → Add Sensor for each meter: Sensor Name (the circuit, e.g. HVAC — chiller & AHUs), MAC Address (the identifier from step 2), Brand / Vendor External, Sensor Model Power meter / PDU (edge telemetry), then Location, Venue and Zone (the room or floor the meter serves), Save.

Through a LoRaWAN gateway ​

  1. Add the clamp or socket to the gateway's network server with Milesight's codec for its model: Milesight gateways, step 7.
  2. Device → Sensor → Add Sensor: MAC Address is the DevEUI, Sensor Model its own Milesight model, then Location, Venue and Zone (the room or floor the circuit serves), Save.

Through Home Assistant ​

  1. Connectors → Smart Home Bridge → Entity mappings → Fetch entities from Home Assistant.
  2. Group the plug's or monitor's entities: energy, power and, where it has them, current and voltage. Activate as device…, name it, Create device.
  3. Device → Sensor: edit the new device and set Location, Venue and Zone. The zone is what the Energy app shows as the meter's place, and what a zone or floor rule adds up.

Tell Omaya how the meters connect ​

  1. Turn on the app: Your Apps → Energy Monitoring.
  2. Your Apps → Energy → Meter hierarchy: for each sub-meter, choose Fed by (parent meter); leave top-level meters as none (top-level).
  3. Tick Generates power for solar or a generator. A generating meter cannot have a parent or feed another meter.
  4. Set Rate per kWh and Currency if you want costs.

Until the hierarchy is set, the total is the sum of every meter, and the app says so.

Check it works ​

  1. View the meter under Device → Sensor. Latest reading shows power_w and (if the meter has a counter) energy_kwh within a minute of the gateway or the bridge's next poll.
  2. Switch the load on and off (or ask the electrician to): power_w follows. Negative power on a consumption circuit means a CT is reversed.
  3. Energy Monitoring → Meters lists the meter after its first reading, under its parent if you set one. Today kWh is a dash until it has a kWh counter.
  4. Check the arithmetic once: the sub-meters of a board should add up to a little less than the board (the difference is circuits nobody metered), never more.

First rules ​

GoalMeasureRecipe
Switch off a room when it emptiesa presence sensor, then a Home Assistant switchSwitch off a room when it empties
Power left on out of hoursPower Draw Now after closingPower left on out of hours
A floor using more than usualEnergy Used TodayA floor using more than usual
A cold room's circuit drops to zeroPower Draw Now below 100 W, held for 10 minutesKeeping the building running

Questions and problems ​

The meter is registered but not in the Energy app. It has sent no reading with energy or power yet. Check Latest reading. For Home Assistant, check that the plug's power or energy entity is in the device's group.

Power is negative on a circuit that only consumes. A CT is the wrong way round, or on the wrong phase for its voltage input.

Power looks right, Today kWh is a dash. The meter sends power but no counter. Omaya does not integrate power into kWh. Add the energy entity (Home Assistant) or the kwh value (MQTT).

The total is about double what the bill says. The hierarchy is not set, so a main meter and its sub-meters are both added. Set Fed by on the sub-meters.

The sub-meters add up to more than their parent. One of them is on the wrong parent, a CT is on the wrong circuit, or two CTs are on the same cable.

A Milesight CT clamp shows current but no power or kWh. That is all a clamp measures; see Milesight CT clamps and sockets. A -V2 clamp's kWh appears once it reports its first kWh total.

A Milesight socket shows online but no energy. Check that the gateway runs Milesight's codec for that model: without it there are only raw bytes.

Last updated:

Omaya platform documentation