1. Introduction
Wireless M-Bus (M-Bus) is a widely used communication protocol for remote meter reading in smart metering applications. The Open Metering System (OMS) standard ensures interoperability between different manufacturers' devices. When integrating Wireless M-Bus OMS data into an IoT ecosystem, MQTT (Message Queuing Telemetry Transport) is a preferred protocol due to its lightweight and efficient data transmission.
The STG series from REDZ provides a reliable gateway solution to bridge Wireless M-Bus OMS devices with an MQTT server. This article outlines the process of configuring and using the STG series to collect Wireless M-Bus OMS data and transmit it to an MQTT broker.
Prerequisites
Before starting, ensure you have the following:
• A Wireless M-Bus OMS-enabled meter
• An STG series gateway supporting Wireless M-Bus
• An MQTT broker (local or cloud-based, e.g., Mosquitto, HiveMQ, AWS IoT, etc.)
• A network connection (Ethernet, Wi-Fi, or cellular, depending on the STG model)
2.Step 1: Setting Up the STG Series Gateway
1. Connect to the STG Gateway
o Power up the STG series device.
o Connect to the device via a web interface.
2. Configure Wireless M-Bus Reception
o Navigate to the Wireless M-Bus settings.
o Select the correct mode (e.g., T1, C1, S1, or N1) according to your meter’s configuration.
o Set the encryption keys to match the meter’s settings.
3. Enable Data Parsing and Forwarding
o STG will Activate data logging for incoming Wireless M-Bus packets automatically.
o STG will Enable OMS protocol decoding for interpretation of received data automatically.
3. Step 2: Configuring MQTT Communication
1. Set MQTT Server Details
o In the network settings, enter the MQTT broker’s IP address or domain.
o Configure authentication credentials if required.
o Specify the MQTT topic where the data should be published (e.g., meters/wmbus/data).
2. Format and Publish Data
o Choose a payload format from list predefined in STG interface to match your IoT application.
o Define a publication interval.
4. Step 3: Testing and Monitoring
1. Verify Connection to MQTT Broker
o Use an MQTT client (e.g., Tago.io, MQTT Explorer, Mosquitto_sub) to monitor the topic.
o Confirm that messages are being received and properly formatted.
2. Validate Data Accuracy
o Compare the received MQTT messages with meter readings.
o Ensure correct parsing of OMS data fields such as consumption, timestamp, and battery status.
NOTE: You can visit User Manuel for Transmit Received and Parsed WMBus Packages to MQTT Server - Video Example : https://redz-sc.com/en/manuals/stg-series-wmbus-wireless-mbus-modbus-tcprtu-gateway-with-2-x-10100base-tx-ports-1-x-rs232-and-1-x-rs485-serial-ports-andor-bpl-broadband-power-line-link-user-manual
5.Conclusion
Integrating Wireless M-Bus OMS data with an MQTT server using the STG series gateway enables seamless remote monitoring and data analytics for smart metering applications. By following the setup steps outlined above, you can efficiently collect, format, and transmit meter data to any MQTT-compatible IoT platform, enhancing automation and decision-making processes.
For further customization, consider implementing data processing scripts on the MQTT subscriber end or integrating with cloud platforms like AWS IoT, Azure IoT Hub, or Google Cloud IoT