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 0 | Send once, do not ask again. For high-frequency instantaneous values where the next one follows right away. |
|---|---|
| QoS 1 | Deliver at least once. Duplicate messages possible, loss not. The usual case for meter readings. |
| QoS 2 | Exactly 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.