---
title: "Carlo Gavazzi EM24"
description: "Carlo Gavazzi EM24 on RS-485 Modbus RTU in TapHome: per-phase energy, T1/T2 tariffs and import/export totals. Use application E, F or H for export."
url: "https://taphome.com/en/compatibility/carlo-gavazzi-em24/"
language: en
lastmod: 2026-10-08
generator: hugo
ai:
  topics: ["modbus-rtu","electric-meter","rs485","3-phase","energy-metering","din-rail"]
  questions: ["How to integrate Carlo Gavazzi EM24 with TapHome?","What does the Carlo Gavazzi EM24 TapHome template measure?","How to connect Carlo Gavazzi EM24 via RS-485 to TapHome?","How to configure Modbus address and baud rate on EM24?","How to monitor import and export energy with Carlo Gavazzi EM24?","What is the difference between EM24 application types A through H?"]
---

# Carlo Gavazzi EM24

Communication: Modbus RTU

- [Carlo Gavazzi Official Website](https://www.gavazziautomation.com)

## Integration guide

The Carlo Gavazzi EM24 is a DIN-rail mounted 3-phase energy analyzer that communicates via Modbus RTU over RS-485. The TapHome template provides 7 devices covering per-phase energy metering (L1/L2/L3), dual-tariff energy counters (T1/T2), and bidirectional import/export totals. Each per-phase meter includes service attributes for voltage, current, apparent power, and reactive power.

The EM24 is available in direct connection variants (AV2, AV9 — up to 65 A) and CT connection variants (AV5, AV6 — for higher currents via 5 A secondary CTs). All register values are INT32 with LSW-first word order (Little Endian word swap), read via Modbus function codes 03h or 04h (interchangeable).

## Hardware connection

### RS-485 wiring

The EM24 has a 2-wire RS-485 serial interface. Connect using a daisy-chain topology:

- **A** (line A) to A+/D+ on TapHome RS-485
- **B** (line B) to B-/D- on TapHome RS-485
- **GND** — connect a third wire for ground reference, grounded only at the host side

> [!WARNING]
> The RS-485 bus **must** be terminated at both ends with a **120 ohm** resistor (1/2 W, 5%) between lines A and B. Termination is required even for point-to-point connections or short cable runs. For distances over 1000 m or more than 160 instruments, a signal repeater is required.

**Cable specification:**

- Type: AWG24 balanced pair with third wire for GND (shielded recommended)
- Topology: Daisy-chain only (no star or stub/tee)
- Max cable length: **1000 m** (without repeater)

## Configuration

### Communication parameters

The default Modbus settings match the TapHome template:

| Parameter | Default | Options |
|-----------|---------|---------|
| Baud rate | 9600 | 9600, 4800 |
| Data bits | 8 | Fixed |
| Parity | None | Fixed |
| Stop bits | 1 | Fixed |
| Slave ID | 1 | 1-247 |

Communication parameters can be changed via the front panel settings menu or via Modbus write commands to holding registers (H:4362 for slave ID, H:4363 for baud rate).

### Changing settings via the front panel

1. Press the joystick for 3+ seconds to enter the password page
2. Enter the password (default: **0**, change password range: 0-9999)
3. Navigate with left/right to the desired setting page (e.g., **AddrESS** for slave ID, **bAudrAtE** for baud rate)
4. Press the joystick to enter edit mode, use up/down to change the value
5. Press to confirm, then scroll to **End** to exit settings

### Application type

The EM24 supports 8 application types (A through H) that determine which measurements are available. Application **H** provides the most comprehensive set, including separate import/export energy, per-phase details, tariff registers, and totalizers. Applications **E**, **F**, and **H** operate without "easy connection", meaning import and export energy are tracked separately — this is required for bidirectional metering in solar PV installations.

| Application | Key Features | Easy Connection |
|-------------|-------------|-----------------|
| A | Basic: voltages, frequency, total kWh(+), power demand | Yes |
| B | A + reactive energy, apparent power demand | Yes |
| C | A + tariff energy, totalizers 1/2/3 | Yes |
| D | Single-phase: kWh(+), voltage only | Yes |
| E | Import + export kWh, run hours, power, PF | No |
| F | Full: all measurements, totalizers, per-phase details | No |
| G | Like F with easy connection, per-phase, tariffs | Yes |
| H | Like F without easy connection, per-phase, tariffs | No |

> [!TIP]
> For solar PV installations where bidirectional metering is needed, select application **E**, **F**, or **H** (without easy connection). With easy connection enabled (applications A-D, G), import and export energy are combined into a single total, making it impossible to distinguish grid consumption from grid feed-in.

### Slave ID

When connecting multiple EM24 meters on the same RS-485 bus, each meter must have a unique Slave ID (range 1-247). After importing the TapHome template, adjust the Slave ID in the module connection settings to match the meter.

## Device capabilities

The template creates 7 devices organized into three groups: per-phase energy meters, tariff counters, and bidirectional totals. All devices are read-only and polled at 15-second intervals.

### Per-phase energy metering

Three ModbusElectricityMeter devices provide per-phase energy and power readings:

- **Energy L1** — phase 1 import active energy (kWh) and active power (kW). Service attributes: voltage L1-N (V), current L1 (A), apparent power L1 (VA), and reactive power L1 (VAR).
- **Energy L2** — phase 2 import active energy (kWh) and active power (kW). Service attributes: voltage L2-N (V), current L2 (A), apparent power L2 (VA), and reactive power L2 (VAR).
- **Energy L3** — phase 3 import active energy (kWh) and active power (kW). Service attributes: voltage L3-N (V), current L3 (A), apparent power L3 (VA), and reactive power L3 (VAR).

### Tariff energy counters

Two ModbusVariable devices track energy consumption by tariff period:

- **Tariff 1 Energy** — import active energy accumulated during tariff T1 period (kWh). Includes reactive energy T1 (kvarh) as a service attribute.
- **Tariff 2 Energy** — import active energy accumulated during tariff T2 period (kWh). Includes reactive energy T2 (kvarh) as a service attribute.

Tariff switching can be controlled via digital inputs on the meter or via Modbus command (register H:4327). The EM24 supports up to 4 tariffs (T1-T4) natively, but the TapHome template tracks T1 and T2.

### Bidirectional energy totals

Two ModbusVariable devices provide system-wide import and export energy counters:

- **Total Import Energy** — total import (grid consumption) active energy across all phases (kWh). Includes total import reactive energy (kvarh) as a service attribute.
- **Total Export Energy** — total export (grid feed-in) active energy across all phases (kWh). Includes total export reactive energy (kvarh) as a service attribute.

> [!TIP]
> The export energy counter is only meaningful when the EM24 is configured with an application type that supports bidirectional metering (E, F, or H — without easy connection). With easy connection enabled, the export register remains at zero.

### Module-level service attributes

The template also provides three module-level service attributes:

- **Frequency** — grid frequency (Hz)
- **Keypad** — front panel lock status (Locked / Unlocked)
- **Measuring System** — configured wiring system (3Pn, 3P1, 2P, 1P, 3P)

### Additional capabilities

The EM24 also exposes registers for line-to-line voltages (L1-L2, L2-L3, L3-L1), system-level totals for active/apparent/reactive power, per-phase and system power factor, phase sequence indicator, power demand with peak tracking, tariffs T3 and T4, per-phase export energy counters, operating hours, and partial (resettable) energy counters. These can be added in a future template update.

## Troubleshooting

### No communication

1. Verify the RS-485 wiring is daisy-chained (not star topology)
2. Check A/B terminal connections — swap A and B if communication fails
3. Confirm bus termination: 120 ohm resistor at each end of the bus
4. Ensure the TapHome baud rate matches the meter setting (default 9600, 8N1)
5. Verify the Slave ID in TapHome matches the meter (default 1)

### Maximum registers per request

The EM24 supports a maximum of **11 registers per read request**. The TapHome template is designed within this limitation, but custom configurations should respect this constraint to avoid communication errors.

### Incorrect readings

1. Confirm the application type supports the expected measurements — export energy requires application E, F, or H
2. Verify the measuring system (3Pn, 3P1, 2P, 1P) matches the actual wiring installation
3. For CT-connected models (AV5, AV6), verify the CT ratio is correctly configured — incorrect ratios cause proportionally wrong energy and power readings

### Register word order

The EM24 uses Little Endian word order (LSW first, MSW second) for all 32-bit registers. The TapHome template uses `LittleEndianInt32`, which matches the meter's native format. If readings appear as extremely large or small numbers, this typically indicates a byte order mismatch.

## Available devices 7

These devices appear in TapHome after import.

Carlo Gavazzi EM24 Module

Service Attributes

|                  |                                                                           |
|------------------|---------------------------------------------------------------------------|
| Frequency        |                                                                           |
| Keypad           | Front panel lock status — Locked or Unlocked                              |
| Measuring System | Configured wiring system — 3Pn (3-phase with neutral), 3P1, 2P, 1P, or 3P |

Service Attributes

Frequency

```taphome
MODBUSR(H, 55, Int16) / 10 + " Hz"
```

Keypad

```taphome
IF(MODBUSr(H, 772, Uint16) = 3, "Locked", "Unlocked");
```

Measuring System

```taphome
SWITCH(MODBUSR(H, 4354, Uint16), 0, "3Pn",
1, "3P1",
2, "2P",
3, "1P",
4, "3P",
"Error"
);
```

Energy L1 Electricity Meter Read-only

Phase 1 energy and power — import active energy (kWh) and instantaneous active power (kW), with service attributes for voltage, current, apparent power, and reactive power

Register: H:70 (readtotalconsumption), H:18 (readdemand) LittleEndianInt32 Unit: kWh / kW numeric

Service Attributes

|                   |
|-------------------|
| Current L1        |
| Apparent Power L1 |
| Reactive Power L1 |
| Voltage L1 - N    |

Read total consumption

```taphome
MODBUSR(H, 70, LittleEndianInt32) / 10
```

Read demand

```taphome
MODBUSR(H, 18, LittleEndianInt32) / 10000
```

Service Attributes

Current L1

```taphome
MODBUSR(H, 12, LittleEndianInt32) / 1000 + " A"
```

Electrical power L1

```taphome
MODBUSR(H, 24, LittleEndianInt32) / 10 + " VA"
```

Reactive Power L1

```taphome
MODBUSR(H, 30, LittleEndianInt32) / 10 + " VAR"
```

Voltage L1 - N

```taphome
MODBUSR(H, 0, LittleEndianInt32)/10 + " V"
```

Energy L2 Electricity Meter Read-only

Phase 2 energy and power — import active energy (kWh) and instantaneous active power (kW), with service attributes for voltage, current, apparent power, and reactive power

Register: H:72 (readtotalconsumption), H:20 (readdemand) LittleEndianInt32 Unit: kWh / kW numeric

Service Attributes

|                   |
|-------------------|
| Current L2        |
| Apparent Power L2 |
| Reactive Power L2 |
| Voltage L2 - N    |

Read total consumption

```taphome
MODBUSR(H, 72, LittleEndianInt32) / 10
```

Read demand

```taphome
MODBUSR(H, 20, LittleEndianInt32) / 10000
```

Service Attributes

Current L2

```taphome
MODBUSR(H, 14, LittleEndianInt32) / 1000 + " A"
```

Electrical Power L2

```taphome
MODBUSR(H, 26, LittleEndianInt32) / 10 + " VA"
```

Reactive Power L2

```taphome
MODBUSR(H, 32, LittleEndianInt32) / 10 + " VAR"
```

Voltage L2 - N

```taphome
MODBUSR(H, 2, LittleEndianInt32)/10 + " V"
```

Energy L3 Electricity Meter Read-only

Phase 3 energy and power — import active energy (kWh) and instantaneous active power (kW), with service attributes for voltage, current, apparent power, and reactive power

Register: H:74 (readtotalconsumption), H:22 (readdemand) LittleEndianInt32 Unit: kWh / kW numeric

Service Attributes

|                   |
|-------------------|
| Current L3        |
| Apparent Power L3 |
| Reactive Power L3 |
| Voltage L3 - N    |

Read total consumption

```taphome
MODBUSR(H, 74, LittleEndianInt32) / 10
```

Read demand

```taphome
MODBUSR(H, 22, LittleEndianInt32) / 10000
```

Service Attributes

Current L3

```taphome
MODBUSR(H, 16, LittleEndianInt32) / 1000 + " A"
```

Electrical power L3

```taphome
MODBUSR(H, 28, LittleEndianInt32) / 10 + " VA"
```

Reactive Power L3

```taphome
MODBUSR(H, 34, LittleEndianInt32) / 10 + " VAR"
```

Voltage L3 - N

```taphome
MODBUSR(H, 4, LittleEndianInt32)/10 + " V"
```

Tariff 1 Energy Variable Read-only

Tariff T1 energy counter — accumulates import active energy (kWh) when the tariff input selects T1

Register: H:76 (readstate) LittleEndianInt32 Unit: kWh numeric

Service Attributes

|                   |
|-------------------|
| Reactive Power T1 |

Read

```taphome
MODBUSR(H, 76, LittleEndianInt32)/10
```

Service Attributes

Reactive power T1

```taphome
MODBUSR(H, 84, LittleEndianInt32)/10 + " kvarh"
```

Tariff 2 Energy Variable Read-only

Tariff T2 energy counter — accumulates import active energy (kWh) when the tariff input selects T2

Register: H:78 (readstate) LittleEndianInt32 Unit: kWh numeric

Service Attributes

|                   |
|-------------------|
| Reactive Power T2 |

Read

```taphome
MODBUSR(H, 78, LittleEndianInt32)/10
```

Service Attributes

Reactive Power

```taphome
MODBUSR(H, 86, LittleEndianInt32)/10 + " varh"
```

Total Export Energy Variable Read-only

Energy exported to the grid (feed-in) — total export active energy across all phases (kWh), only active with application types E, F, or H

Register: H:92 (readstate) LittleEndianInt32 Unit: kWh numeric

Service Attributes

|                |
|----------------|
| Reactive Power |

Read

```taphome
MODBUSR(H, 92, LittleEndianInt32)/10
```

Service Attributes

Reactive Power

```taphome
MODBUSR(H, 94, LittleEndianInt32)/10 + " kvarh"
```

Total Import Energy Variable Read-only

Energy imported from the grid (consumption) — total import active energy across all phases (kWh)

Register: H:62 (readstate) LittleEndianInt32 Unit: kWh numeric

Service Attributes

|                       |                                                        |
|-----------------------|--------------------------------------------------------|
| Total Reactive Energy | Total import reactive energy across all phases (kvarh) |

Read

```taphome
MODBUSR(H, 62, LittleEndianInt32)/10
```

Service Attributes

Total (+)

```taphome
MODBUSR(H, 64, LittleEndianInt32)/10 + " kvarh"
```

**Connection:** Modbus RTU • 9600 baud• 8N1 • Slave ID: $\[SlaveId]

Possible improvements (21)

- H:6 V L1-L2 — Line-to-line voltage L1-L2, INT32 V×10
- H:8 V L2-L3 — Line-to-line voltage L2-L3, INT32 V×10
- H:10 V L3-L1 — Line-to-line voltage L3-L1, INT32 V×10
- H:36 V L-N sys — System average line-to-neutral voltage, INT32 V×10
- H:38 V L-L sys — System average line-to-line voltage, INT32 V×10
- H:40 W sys — Total system active power, INT32 W×10
- H:42 VA sys — Total system apparent power, INT32 VA×10
- H:44 var sys — Total system reactive power, INT32 var×10
- H:46 PF L1 — Phase 1 power factor, INT16 PF×1000
- H:47 PF L2 — Phase 2 power factor, INT16 PF×1000
- H:48 PF L3 — Phase 3 power factor, INT16 PF×1000
- H:49 PF sys — System power factor, INT16 PF×1000
- H:50 Phase sequence — Phase sequence indicator: 0=L1-L2-L3, 1=L1-L3-L2, INT16
- H:52 kWh (+) TOT — Total import active energy (non-resettable), INT32 kWh×10. Template uses H:62 (partial/resettable) instead
- H:54 kvarh (+) TOT — Total import reactive energy, INT32 kvarh×10
- H:56 kW dmd — Power demand, INT32 W×10
- H:58 kW dmd peak — Peak power demand, INT32 W×10
- H:60 kWh (+) PARTIAL — Partial import active energy counter (resettable), INT32 kWh×10
- H:88 kWh (-) L1 — Phase 1 export active energy, INT32 kWh×10. Only available on ET series or EM24 with bidirectional metering
- H:90 kWh (-) L2 — Phase 2 export active energy, INT32 kWh×10. Only available on ET series or EM24 with bidirectional metering
- H:96 kWh (-) L3 — Phase 3 export active energy, INT32 kWh×10. Only available on ET series or EM24 with bidirectional metering

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| Slave ID         | `1`           |
| IP address       | `192.168.1.0` |

## Sources

- EM24-DIN Communication Protocol V2 Rev0
  
  [www.ccontrols.com](https://www.ccontrols.com/support/dp/CarloGavazziEM24.pdf) 2026-03-25
  
  [PDF](https://taphome.com/compatibility/devices/carlo-gavazzi-em24/manufacturer/EM24_DIN_CP.pdf)
- EM24 IS-R2-O2-XX User Manual
  
  [www.gavazziautomation.com](https://www.gavazziautomation.com/fileadmin/images/PIM/MANUALS/ENG/EM24_IS_R2_O2_XX_IM_USE.pdf) 2026-03-25
  
  [PDF](https://taphome.com/compatibility/devices/carlo-gavazzi-em24/manufacturer/EM24_DIN_IM.pdf)
- Carlo Gavazzi EM24 in Home Assistant via Modbus
  
  [verkoyen.eu](https://verkoyen.eu/2025/05/carlo-gavazzi-em24-in-home-assistant-via-modbus/) 2026-03-25

Manufacturer documents are © their respective owners. They are provided as published by the manufacturer, for reference only.

## Related Documentation

- [Modbus Integration](https://taphome.com/en/compatibility/modbus-guide/)
- [Modbus](https://taphome.com/en/docs/integration/modbus/)
- [Simple configuration using templates](https://taphome.com/en/docs/integration/modbus/templates/)
- [Modbus scripts and prefetch](https://taphome.com/en/docs/script/modbus-scripts/)
- [Modbus functions](https://taphome.com/en/docs/script/modbus/)
- [Modbus data types](https://taphome.com/en/docs/script/modbus-data-types/)

