# Connecting Smart Meters using wM-Bus

**URL:** <https://community.cumulocity.com/t/connecting-smart-meters-using-wm-bus/15271>\
**Category:** Water Utilities\
**Created:** [October 26, 2026, 4:21pm UTC](https://community.cumulocity.com/t/connecting-smart-meters-using-wm-bus/15271 "2026-10-26T16:21:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Raab](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/aaron_raab/32/32010_2.png) [@Aaron\_Raab](https://community.cumulocity.com/u/Aaron_Raab)\
**Post date:** [October 26, 2026, 4:21pm UTC](https://community.cumulocity.com/t/connecting-smart-meters-using-wm-bus/15271/1 "2026-10-26T16:21:48Z")

</div>

Wireless M-Bus is the dominant radio standard for water, heat and gas meters across Europe, but its meters can’t connect to the cloud on their own. Their encrypted, vendor-specific telegrams first have to be captured, decoded and mapped before they become useful data.

This article shows how to integrate wM-Bus meters into Cumulocity end to end, from the meter’s radio broadcast through a local gateway to structured measurements on the platform. The result is a reusable blueprint for bringing OMS-compliant meters into Cumulocity for real-time monitoring, leak detection and automated billing.

## Introduction

[Wireless M-Bus (wM-Bus)](https://interoperable-europe.ec.europa.eu/collection/ict-standards-procurement/solution/en-13757-42013-communication-systems-meters-and-remote-reading-meters-part-4-wireless-meter-readout) is the standardized European radio communication protocol (specified in EN 13757-4 & -3) designed specifically for the automated, wireless readout of utility consumption meters. Paired with the [Open Metering System (OMS)](https://oms-group.org/en/oms-home/) standard, wM-Bus establishes an open, vendor-agnostic specification that defines how water, gas, heat, and electricity meters package and transmit measurement telemetry over short-range radio frequencies.

Modern utility monitoring relies on bridging localized radio protocols into enterprise IoT ecosystems. In an end-to-end pipeline, wM-Bus acts as the field-level radio link: localized listening gateways capture meter broadcasts, encapsulate the frames into lightweight transport protocols (such as **LwM2M** or **MQTT** ), and forward them to cloud platforms like **Cumulocity** for centralized decoding, analysis, and billing.

## Benefits of wM-Bus

Deploying smart metering at scale requires overcoming harsh physical environments and eliminating costly cabling, all while ensuring decades of unattended operation. wM-Bus has become a widely used industry standard for automated utility readout by directly addressing these operational demands:

- **Extreme Battery Longevity:** Water, heat, and gas meters are predominantly battery-powered and deployed in locations without external power (such as basements, utility shafts, or underground meter pits). wM-Bus transmission modes—such as **Mode T** (frequent, short transmit-only bursts) and **Mode C** (compact frames)—are engineered for minimal duty cycles, enabling devices to operate continuously for **10 to 16+ years** on internal batteries.

- **Standardized Interoperability (OMS):** Proprietary wireless protocols create vendor lock-in. wM-Bus/OMS establishes standardized telegram structures using self-describing **DIF/VIF (Data Information Field / Value Information Field)** records. This allows multi-vendor hardware to interoperate seamlessly without custom radio stacks for each device brand.

- **Cost-Effective “First-Mile” Telemetry:** Retrofitting commercial, industrial, or residential buildings with physical wiring for bus communications (like wired M-Bus or Modbus) is often cost-prohibitive. Operating in license-free sub-GHz ISM bands (primarily **868 MHz** and **169 MHz** ), wM-Bus offers superior wall and floor penetration compared to 2.4 GHz protocols like Wi-Fi or Bluetooth, making it the industry standard for submetering and district utility monitoring.

- **Cryptographic Data Security:** Regulatory frameworks mandate end-to-end protection for consumption and billing data. wM-Bus incorporates native **AES-128 encryption** (notably OMS Security Mode 5 with dynamic CBC initialization vectors and Mode 7 with CTR/GCM), protecting sensitive telemetry from tampering or interception in transit.

## Integrating wM-Bus Devices into Cumulocity

In the following section, we will demonstrate how to connect a wM-Bus meter to Cumulocity. As described above, wM-Bus meters can’t directly connect to a cloud platform, but require a local gateway to establish the cloud connection. For this example, the following components have been used:

- **Gateway** : WEPTECH SWAN3
- **Gateway App** : WEPTECH NFC Configuraton
- **Meter** : Axioma QALCOSONIC W1
- **Meter Optical Head** : Axioma Optical Head OG-1-USB
- **Meter App** : Axilink
- **Head End System:** Cumulocity

## End-to-end Data Flow

The end-to-end data pipeline transforms raw, over-the-air radio broadcasts into structured, analytics-ready measurements in Cumulocity using a multi-tiered ingestion, decoding, and data transformation flow:

 ![mermaid-diagram-2026-10-16-173209](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/5/f5169c00d0803d090fe529c7e3f7055d832b7723.png)

**Over-the-Air Broadcast (Field Layer)**  
The Axioma QALCOSONIC W1 water meter periodically transmits wireless M-Bus / OMS telemetry frames over the 868 MHz ISM band in Mode T. These telegrams contain raw meter readings—such as total volume, flow rates, and diagnostic alarm flags—encoded in standard M-Bus DIF/VIF data records.

**Edge Ingestion & LwM2M Uplink (Gateway Layer)**  
The WEPTECH SWAN3 Gateway continuously listens for wM-Bus broadcasts according to a scheduled receive window and filters incoming traffic against an internal device whitelist. When a valid transmission is captured, the gateway packages the raw wM-Bus frames into LwM2M payload objects and transmits them over a secure IP uplink to the Cumulocity LwM2M endpoint.

**Protocol Identification & Payload Interception (Platform Layer)**  
Cumulocity receives the incoming LwM2M data stream and references pre-registered WEPTECH XML object definitions to interpret proprietary gateway objects and resource IDs. The Java-based Custom Decoder Microservice (oms-decoder-microservice-java), implementing Cumulocity’s DecoderService interface, intercepts the payload update and extracts the raw Hex/Base64 telemetry.

**High-Performance Parsing & Decryption (Data Processing)**  
To prevent platform bottlenecks under heavy telemetry loads, the Java decoder proxies the raw payload over an internal endpoint (/api/v1/parse) to the Rust-based OMS Parser microservice (c8y\_oms\_parser\_service). The Rust service executes:

- **Decryption:** Dynamically resolves initialization vectors and decrypts encrypted frames using OMS Security Mode 5 (AES-CBC) or Mode 7 (AES-CTR/GCM).

- **Bitwise Record Parsing:** Traverses the variable DIF/VIF stacks to parse metrics such as volume, flow rate, temperature, battery lifetime, and error states.

- **Driver Mapping:** Applies manufacturer-specific profiles (e.g., Axioma/Diehl drivers) with standard OMS fallbacks.

- **Metadata Extraction:** Attaches record-level metadata—including header\_raw, dib, vib, and storage numbers—to each parsed measurement before returning a structured JSON response.

**Data Mapping & Persistence (Cumulocity Data Model)**  
The Java decoder processes the structured JSON from the Rust parser and uses exact HeaderRaw string matching to differentiate metrics sharing identical physical units (e.g., distinguishing Forward Flow 04933B from Backward Flow 04933C). Finally, the microservice maps the values into standard Cumulocity measurement fragments and persists them directly against the corresponding Axioma meter child device.

## Integration Steps

### Configure the Axioma Smart Meter

1. Download and install the Axilink Application on your mobile from the Google Play Store (Android) or the Apple App Store (iOS).

2. Connect your mobile to the Axioma W1 using Optical USB Head .

3. Once the mobile is connected to the meter, the App will start the synchronization to detect new meters.

4. Once the synchronization is finished, the meter details will be shown on the screen.

 ![image7](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/4/e/4e08bad26f99ca6291368c36734d1321e36a63d8.jpeg)

1. In the main menu navigate to the Radio screen and make sure that the meter is broadcasting data.

 ![image5](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/e/ce3a1e77542516a0a7fbce3fc2e191741fc72d65.jpeg)

1. Now the Axioma W1 is ready to send wM-Bus messages to the WEPTECH SWAN3 Gateway.

### Configure the WEPTECH Gateway

1. Power on the WEPTECH SWAN3 Gateway and verify that the status LED illuminates blue during startup. If the LED turns red, the gateway has encountered an error, such as failing to establish an internet connection.

 ![image1](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/5/55f83c174e770d3c9ec9f5c396b9931f5d954e1e.jpeg)

1. Download and install the **WEPTECH NFC Configurator** app on your mobile device from the Google Play Store (Android) or the Apple App Store (iOS).

2. Ensure NFC is enabled on your mobile device, as the app communicates with the WEPTECH SWAN3 Gateway via NFC.

3. Open the application, tap **New Device** , and hold your phone over the gateway to establish the connection.

 ![image9](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/4/7/477215b82e4b4bfb04428fddb730f04f907501f9.jpeg)

1. Enter your Password if required.

2. Wait for the mobile app to read the WEPTECH SWAN3 Gateway’s information, ensuring your phone remains properly aligned over the gateway to maintain the NFC connection.

3. Once connected, the main configuration screen for the WEPTECH SWAN3 Gateway is displayed.

 ![image8](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/1/f1b80d94163832d450e65c101768b882dfda4942.jpeg)

1. Enable Expert Mode.

2. Click on “Config” button.

3. Tap **Upload** to configure the WEPTECH SWAN3 Gateway to transmit telemetry to the Cumulocity LwM2M endpoint and configure the following parameters:

- **Protocol:** LwM2M

- **Server:** Your Cumulocity LwM2M Gateway URL (e.g., [lwm2m.eu-latest.cumulocity.com](http://lwm2m.eu-latest.cumulocity.com))

- **Port:** 5783

- **Week of month (Prio 2):** Select all weeks

- **Weekday (Prio 2):** Select all days

- **Hour / Minute:** Set **Hour** to 0 and **Minute** to 10 (to send payloads at 10-minute intervals)

1. Return to the **Config** screen and select **Receive 1** to configure which meters the WEPTECH SWAN3 Gateway will monitor over the wM-Bus protocol. For the Axioma Smart Meter, apply the following settings:

- **wM-Bus Mode:** Mode T

- **Month:** Select all months

- **Week of month (Prio 2):** Select all weeks

- **Weekday (Prio 2):** Select all days

- **Repeats per hour:** 4 (schedules data transmission every 15 minutes)

- **Hours of Day:** Select all hours

1. Because the WEPTECH SWAN3 Gateway detects all nearby meters operating on the wM-Bus protocol, whitelist only the specific meters you want to monitor. From the NFC Configurator main screen, tap **Whitelist** , select the three-dot menu icon in the top-right corner, and choose **Add wM-Bus-Device**. In the **Add wM-Bus-Device** screen, enter the meter configuration details as follows:

 ![image6](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/c/5cb275b7a8368193e30b5186f22fb521f36dd5c2.jpeg)

1. Tap **Add** and confirm that the meter appears in the whitelist.

2. Once configuration is complete, write the settings to the physical gateway by navigating to the NFC Configurator main screen, tapping **Config** , and selecting **Write**.

 ![image3](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/8/a/8a21b9ff82017de14b9fd3bc0d54983b128cd0fd.jpeg)

1. Hold your mobile device over the WEPTECH SWAN3 Gateway to establish the NFC connection; the app will then automatically write the new configuration to the gateway.

## WEPTECH LwM2M XML object definitions

The WEPTECH SWAN3 Gateway communicates with Cumulocity IoT via the LwM2M protocol. In addition to standard specification objects, the gateway transmits vendor-specific LwM2M objects that are not natively recognized by Cumulocity. To ensure incoming payloads are correctly identified, decoded, and mapped to the Cumulocity data model, you must upload the corresponding WEPTECH XML object definitions to the platform’s Device Protocols.

Follow these steps to import the WEPTECH LwM2M object definitions:

1. Download and extract the[SWAN2&3-LwM2M-XML-Objectdescription-V1.7](https://www.google.com/search?q=https://github.com/tmazen/c8y-water-meter-integration/blob/main/weptech/LWM2M-XML-Files/SWAN2%25263-LwM2M-XML-Objectdescription-V1.7.zip) archive. Each XML file corresponds to an individual WEPTECH LwM2M object definition.

2. Log in to your Cumulocity IoT tenant and navigate to the **Device Management** application.

3. In the left navigation pane, select **Device Protocols**.

4. Click **Add Device Protocol** in the top-right corner and select **LwM2M** from the modal menu.

5. Upload an XML file from your extracted directory.

6. Repeat steps 4 and 5 for each remaining XML file in the package.

## OMS Parser Microservice

The OMS Parser is a high-performance, Rust-based microservice designed for Cumulocity IoT to process bitwise hex telemetry and cryptographic operations under high-throughput loads. It ingests Base64-encoded Wireless M-Bus (wM-Bus) and OMS frames, decrypts encrypted payloads using AES-128 Mode 5 (CBC) and Mode 7 (CTR/GCM) with dynamic IV resolution, and dynamically decodes DIF/DIFE stacks, standard/extended VIFs, and binary/BCD datatypes. Parsed records are resolved via manufacturer-specific drivers (with standard OMS fallbacks) and returned as structured measurement JSON.

For detailed deployment steps and configuration guides, refer to the[c8y\_oms\_parser\_service GitHub repository](https://github.com/tmazen/c8y-water-meter-integration/tree/main/weptech/c8y_oms_parser_service).

### Custom Decoder Microservice

The Custom Decoder is a Cumulocity microservice that implements the LwM2M Custom Decoder framework (com.cumulocity.microservice.customdecoders.api.service.DecoderService). Serving as the integration bridge between Cumulocity’s LwM2M endpoint and the underlying parsing microservice, it intercepts incoming LwM2M hex payloads received from the WEPTECH SWAN3 Gateway and proxies them to the Rust parser (c8y\_oms\_parser\_service) for DIF/VIF parsing. Upon receiving the parsed JSON, it differentiates metrics using exact HeaderRaw string identifiers and returns a structured DecoderResult directly to the Cumulocity LwM2M endpoint for persistence against the meter device.

For deployment instructions and setup details, refer to the[oms-decoder-microservice-java GitHub repository](https://github.com/tmazen/c8y-water-meter-integration/tree/main/weptech/oms-decoder-c8y-oms-parser/oms-decoder-microservice-java).
