Blog/M-Center

M-Center4 August 20266 minutes

Getting meter data into the cloud: MQTT with the EMU M-Center

The meters are in the basement, the dashboard runs at a provider on the internet. Between them is a firewall, and that is exactly where it is decided which protocol makes things easy. The answer is almost always MQTT – for a reason that has nothing to do with data volumes.

Key points

  • MQTT opens an outgoing connection – no inbound firewall rule needed.
  • The broker decouples sender and receiver; new consumers need no change to the device.
  • For meter readings, QoS 1 is the usual compromise.
  • TLS should be switched on as soon as data leaves the building.

The firewall decides, not the technology

Modbus TCP and MQTT can both carry meter readings. The difference is the direction in which the connection is established.

With Modbus TCP, a client queries the meter. If that client sits on the internet, you need an inbound connection into the metering network – a port forwarding rule, an exception in the firewall and a conversation with IT that is rarely short.

With MQTT, the device connects to the broker. That is an outgoing connection, just like the one every browser makes. No inbound rule, no exposed ports, no permanent hole in the firewall. That is the real reason cloud connections run over MQTT.

Broker, topic, subscription

MQTT works with a broker in the middle. The M-Center publishes values under a topic – a hierarchical path – and whoever needs them subscribes to that topic. Sender and receiver never know each other; they only know the broker.

This brings the second practical advantage: another consumer – a second dashboard, an analytics platform, a research project – simply subscribes as well. Nothing changes on the device in the basement. With Modbus TCP, that would be one more client polling on top.

QoS: how reliable does delivery need to be?

QoS 0Send once, do not ask again. For high-frequency instantaneous values where the next one follows right away.
QoS 1Deliver at least once. Duplicate messages possible, loss not. The usual case for meter readings.
QoS 2Exactly once. Highest effort, rarely needed when the message carries a timestamp anyway.

For billing data, QoS 1 combined with a timestamp in the payload is the pragmatic way: a message that arrives twice can be discarded by its timestamp; a lost one cannot be recovered.

Topics that survive a device replacement

A topic scheme seems minor during setup and then determines for years how usable the data is. The rule is simple: structure by location and function, not by device number.

More on this, with a concrete scheme, in Planning MQTT topics.

Clarify before commissioning

  • Broker address, port and whether TLS is required
  • Credentials or certificate, and who manages them
  • Topic scheme, agreed with the receiving system
  • Publishing interval – and whether it matches the reading cycle on the fieldbus
  • What happens if the broker is unreachable for an hour

The last question is the important one. A device with local storage – the M-Center has 16 GB – bridges an outage and delivers the missed values afterwards. Without buffering, the gap is permanent. The MQTT function requires a licence and is TLS-encrypted.

Frequently asked questions


Why does MQTT get through the firewall more easily than Modbus TCP?

Because MQTT opens an outgoing connection to the broker, while Modbus TCP needs an inbound connection into the metering network. Outgoing connections work in most networks without a special rule.

Which QoS level suits meter readings?

Usually QoS 1: the message is delivered at least once, duplicates are possible. Together with a timestamp in the payload, duplicates can be discarded, whereas a loss could not be recovered.

What happens if the MQTT broker fails?

Local buffering is what counts. The EMU M-Center stores readings in 16 GB of internal memory and can deliver them afterwards. Without buffering, the gap in the data stays permanent.

Read more


TXTMQTT for energy data: broker, topics and QoS explainedBlog post SEITETCP/IP interfaceInterface SEITEEMU M-CenterProduct

Questions about your project?


Send us your meter list and the target system. We will tell you what works together – and what does not.

Phone
+41 (0)41 545 03 00

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