Skip to main content

Modbus/TCP - Read/Write Access

Your SOLIO as a data source for other systems

Via Modbus/TCP, other devices in your network can query your SOLIO's values directly, for example a building management system, a controller or a visualisation system. With write access, an external system can also specify how strongly your battery charges or discharges.

For professionals

This page is intended for installers, electricians and system integrators. As a homeowner you usually do not need this interface.

What do I need this for?​

Modbus/TCP is a widely used standard for exchanging data between devices in a local network. Typical uses:

  • A building management system or PLC displays or evaluates the state of charge, grid purchase and generation.
  • A higher-level energy management system or a direct marketer specifies the charging and discharging power of the battery.
  • Your own visualisation or smart home system reads the values regularly.

Requirements​

  • The accessing device, for example a PC or a controller, is in the same network as the SOLIO and can reach its IP address directly.
  • You know the IP address of the SOLIO, for example from your router's device list.
  • Up to five connections are possible at the same time.
Only in trusted networks

Modbus/TCP has no login. Any device that can reach your SOLIO in the network can read the values and, if write access is enabled, send setpoints. Therefore never open port 502 to the internet.

Read access​

Read access is included as standard. The Modbus/TCP reading app is installed in the App Center for this.

ParameterValue
Device addressIP address of the SOLIO, e.g. 192.168.178.30
Port502
Unit ID1
Function codes03 (Read Holding Registers), 04 (Read Input Registers)
AddressingBase address 0
Byte orderBig endian

By default, the interface provides the system's sum values (component _sum). Further components, for example individual batteries or meters, can be enabled for specific projects.

Downloading the register table​

The registers depend on which components are enabled. You can get the right table for your system directly from the portal:

Open the system profile

Open Profile → System Settings in the menu and click Open next to System profile.

Find the interface

Scroll through the list of components to the entry for the Modbus/TCP interface.

Download the table

Click Download protocol. You will receive an Excel file with all registers.

Important registers (excerpt)​

The following table shows the most important sum values. The table for your system is always authoritative.

AddressNameTypeDescriptionUnit
0Hash of “OpenEMS”uint16Identifier 0x6201
2–4OpenEMS Version Major/Minor/Patchuint16Software version
5Manufacturerstring16Manufacturer
200Component-IDstring16_sum
222_sum/Stateenum160: Ok, 1: Info, 2: Warning, 3: Fault
302_sum/EssSocuint16Battery state of charge%
303_sum/EssActivePowerfloat32Battery power AC, negative = charging, positive = dischargingW
315_sum/GridActivePowerfloat32Grid power, negative = feed-in, positive = purchaseW
327_sum/ProductionActivePowerfloat32Total generationW
331_sum/ProductionAcActivePowerfloat32Generation ACW
339_sum/ProductionDcActualPowerfloat32Generation DCW
343_sum/ConsumptionActivePowerfloat32ConsumptionW
351_sum/EssActiveChargeEnergyfloat64Battery charge energyWh
355_sum/EssActiveDischargeEnergyfloat64Battery discharge energyWh
359_sum/GridBuyActiveEnergyfloat64Grid purchase energyWh
363_sum/GridSellActiveEnergyfloat64Grid feed-in energyWh
367_sum/ProductionActiveEnergyfloat64Generation energyWh
379_sum/ConsumptionActiveEnergyfloat64Consumption energyWh
391–395_sum/EssActivePowerL1 … L3float32Battery power per phaseW
397–401_sum/GridActivePowerL1 … L3float32Grid power per phaseW
403–407_sum/ProductionAcActivePowerL1 … L3float32Generation AC per phaseW
409–413_sum/ConsumptionActivePowerL1 … L3float32Consumption per phaseW
415_sum/EssDischargePowerfloat32Actual discharge power AC, negative = chargingW
417_sum/GridModeenum161: On-Grid, 2: Off-Grid

A float32 occupies two registers, a float64 four.

Example: reading the state of charge with QModMaster​

The free program QModMaster is well suited for a first test. The state of charge is read from register 302 (_sum/EssSoc, uint16).

Set the base address to 0

QModMaster starts at address 1 by default. Set the Base Address to 0, otherwise all addresses are shifted by one.

Set up the connection

Under Modbus TCP Settings, enter the SOLIO's IP address as Slave IP and 502 as TCP Port.

Read the register

Select Read Input Registers (0x04) as Function Code, 302 as Start Address and 1 for Number of Registers. Click Read/Write. The value appears in the lower area.

QModMaster: setting the base address to 0
Set the base address to 0
QModMaster: the state of charge read
The state of charge read

You can compare the value with the state of charge in the portal.

Write access​

With write access, an external system can set the active and reactive power of the battery. It is not included as standard but can be enabled at any time with the Modbus/TCP write access app. Please contact us.

ParameterValue
Device addressIP address of the SOLIO
Port502
Unit ID1
Function codes03, 04 (read), 06 (Write Single Register), 16 (Write Multiple Registers)
Timeout60 seconds (default)

Writable registers​

The registers belong to the battery's block (ess0). The addresses below apply to a typical system. Check them in the register table for your system.

AddressNameTypeMeaningUnit
706ess0/SetActivePowerEqualsfloat32Active power setpointW
708ess0/SetReactivePowerEqualsfloat32Reactive power setpointvar
710ess0/SetActivePowerLessOrEqualsfloat32Maximum discharge power setpointW
712ess0/SetReactivePowerLessOrEqualsfloat32Maximum reactive power setpointvar
714ess0/SetActivePowerGreaterOrEqualsfloat32Maximum charge power setpointW
716ess0/SetReactivePowerGreaterOrEqualsfloat32Minimum reactive power setpointvar
  • Sign: negative values charge the battery, positive values discharge it.
  • Timeout: a setpoint only applies for the duration of the timeout, 60 seconds by default. Send the value again regularly. If no new setpoint arrives, normal control takes over again.
  • Actual value: the battery's limits still apply. The actual power may therefore differ from the setpoint.

Display in the portal​

Once write access is set up, you will find a separate entry for the interface in the menu under Storage system. It shows the Current status (External specification is taken into account or No external specification available), the last setpoint written and the Actual value. You can also get the register table there via Download protocol.

Example: setting the discharge power with QModMaster​

In this example the battery should discharge at 4,000 W. ess0/SetActivePowerEquals is written to register 706 (float32, two registers).

Check the basic settings

Base Address is set to 0, Endian to Big.

Write the value

Select Write Multiple Registers (0x10) as Function Code, 706 as Start Address, 2 for Number of Registers and Float as Data Format. Enter 4000 and click Read/Write.

Check the result

In the portal under Storage system you can see that the battery is discharging. After 60 seconds without a new setpoint it ends.

QModMaster: settings for write access
Settings for write access
QModMaster: writing the float value 4000
Writing the value 4000 as a float