Products/M-Center/Modbus TCP to MQTT

M-CenterApplication

Modbus TCP to MQTT: gateway with the EMU M-Center

The EMU M-Center reads devices with Modbus TCP and publishes their values via MQTT to your broker. No PC in between, in parallel with M-Bus meters and other interfaces.

Key facts

  • As a Modbus TCP client, the M-Center reads up to 20 devices on the network.
  • Per device: serial number, IP address, port, device address, byte and word order.
  • Own topic per device and register, by register number or OBIS code.
  • MQTT 3.1, 3.1.1 and 5, TLS, QoS 0, 1 or 2.
  • Required: M-Center base unit plus licence 210.200.03 and licence 210.300.03.
2885.6Professional II TCP/IP192.168.1.61 · SN 22230812
1412.3Professional II TCP/IP192.168.1.62 · SN 22230813
3207.9Professional II TCP/IP192.168.1.63 · SN 22230814
EMU M-CenterModbus TCP client · MQTT client · 10:2C:EF:02:6C:B9
EMU M-CenterModbus TCP client
Register 6000 · active energy import
.61SN 22230812–
.62SN 22230813–
.63SN 22230814–
MQTT brokerlocal or in the cloud
Topics
haus-a/emu/mcenter/10:2C:EF:02:6C:B9/meterreading/
Subscribers
Home AssistantNode-REDGrafana
In the dashboard
SN 22230812Import total–
SN 22230813Import total–
SN 22230814Import total–
Modbus TCP request

The M-Center queries each Professional II on the network: IP address, port 502, function code 03, register 6000. The meter replies with its meter reading.

Simplified illustration. Serial numbers, addresses and values are examples. In operation, the M-Center reads every 15 minutes by default.

How the gateway works

Inverters, charging stations, meters and controllers on the network often deliver their values via Modbus TCP. With the licence «Modbus TCP 20 Devices», the M-Center reads up to 20 such devices as a Modbus TCP client.

The M-Center then publishes the values to your MQTT broker, locally or in the cloud, with its own topic per device and register, optionally with TLS.

The values read are available via MQTT regardless of the storage setting. In addition, the M-Center stores the registers with «Save in database» enabled in its internal 16 GB memory.

How the devices get into the M-Center

  1. Clarify the network: the M-Center and the devices must reach each other. Agree IP addresses and ports with IT.
  2. Add the device in the web interface: enter serial number, IP address, port and device address (slave ID). For the EMU Professional II any number from 0 to 255 works.
  3. Set byte and word order to match the device.
  4. Apply a Modbus driver or create registers: start address (from 1), function code 03 or 04, data type, unit, divisor and OBIS code.
  5. Activate MQTT: enter broker, port, user and password, prefix, TLS and QoS.

Newly created Modbus registers are not saved automatically. First check that the value is correct, then enable «Save in database». Modbus drivers can be exported as JSON and transferred to other M-Centers.

How the topics are structured

<prefix>/emu/mcenter/<MAC M-Center>/meterreading/<serial number>/byregister/<register number>
<prefix>/emu/mcenter/<MAC M-Center>/meterreading/<serial number>/byobis/<OBIS code>

The serial number in the topic is the number you enter when creating the Modbus device, so choose it uniquely. For topics by OBIS code, enter the OBIS code for the registers; active energy import, for example, is then under the same topic ending for every device.

Check the messages with an MQTT client such as MQTT Explorer before processing them further.

Order numbers

Article numberDescriptionShop
210.000.00EMU M-Center for 20 M-Bus devicesShop: EMU M-Center 210.000.00 →
210.200.03M-Center | Licence Modbus TCP 20 devices
210.300.03M-Center | Licence MQTT

Order online in the EMU Metering shop.

Licences can be activated later at any time, without changing hardware. M-Bus, RS485, Modbus TCP and all output interfaces run in parallel.

Frequently asked questions


Is this the same licence as «M-Bus to Modbus TCP»?

No. Licence 210.200.03 makes the M-Center a Modbus TCP client that reads devices. Licence 210.300.04 makes it a Modbus TCP server from which other systems read values.

Do I need a cloud for MQTT?

No. The broker can run on the local network, for example on a server or in Home Assistant. The M-Center only needs a network connection to the broker.

Can I use M-Bus, RS485 and Modbus TCP at the same time?

Yes. All devices appear in the same device lists, and the M-Center provides their values simultaneously via all licensed interfaces, such as BACnet IP, MQTT, Modbus TCP or OPC UA.

How often does the M-Center read the devices?

Every 15 minutes by default. You can choose from 15 minutes to 28 days, also per device.

Read more


SEITEEMU M-CenterProduct SEITEM-Bus to MQTTApplication SEITEPower meter with Modbus TCPProfessional II TCP/IP SEITECommissioning the M-CenterGuide

Implementing Modbus TCP to MQTT?


Send us the device list with manufacturer and type. We check the registers and name the licences.

Phone
+41 (0)41 545 03 00

Technical support
helpdesk [at] emuag.ch
Support form →