M-Bus to LoRaWAN
Integration manual for the ACRIOS Systems converters ACR-CV-1xxL-M-D and ACR-CV-1xxL-M-EAC.
Introduction
This is the documentation for the ACRIOS Systems M-Bus to LoRaWAN concentrator. The documentation refers to the default Lua script and covers possible configuration options.
Typical Use-Case
Efficient monitoring and management of heat meters and other M-Bus devices plays a key role in optimization of energy and resource consumption. The integration of the M-Bus to NB-IoT converter presents a solution that allows for quick deployment and seamless connectivity, real-time insights and efficient control.
Key benefits of our devices:
- Time and Cost Savings: The quick installation process eliminates extensive configuration and wiring efforts, reducing installation time and associated costs.
- Seamless Integration: The plug-and-play nature of the solution simplifies the integration of heat meters into the district heating network, minimizing disruption to residents.
- Reliable Communication: The external antenna ensures reliable signal propagation, maintaining consistent communication even in complex urban environments.
- Real-Time Insights: The solution provides real-time heat consumption data, enabling accurate billing and informed decision-making for energy optimization.
What Is M-Bus?
M-Bus (Meter-Bus) is a European standard (EN 13757-2 physical and link layer, EN 13757-3 application layer) for the remote reading of water meter, gas or electricity meters. M-Bus is also usable for other types of consumption meters. The M-Bus interface is made for communication on two wires, which is very cost-efficient. There is also a radio variant of M-Bus (Wireless M-Bus), specified in EN 13757-4.
Data on the M-Bus is transferred in telegrams which consist of one or more frames, there must not be any pauses within telegrams, not even after stop bits. M-Bus uses four different telegram formats with following structures:
| Single Character | Short Frame | Control Frame | Long Frame |
|---|---|---|---|
| E5h | Start 10h | Start 68h | Start 68h |
| C Field | L Field = 3 | L Field | |
| A Field | L Field = 3 | L Field | |
| Check Sum | Start 68h | Start 68h | |
| Stop 16h | C Field | C Field | |
| A Field | A Field | ||
| CI Field | CI Field | ||
| Check Sum | User Data (0-252 Byte) | ||
| Stop 16h | Check Sum | ||
| Stop 16h |
When communicating with more meters on the same M-Bus line, it is crucial to provide each slave unit with individual address (A Field). Meter can be addressed by its primary address or by its secondary address.
Primary Addressing:
| Address | Function |
|---|---|
| 0 | Factory default address. |
| 1-250 | Addresses that can be assigned to slaves. (Primary addresses) |
| 251-252 | Reserved for future use. |
| 253 | Indicates that addressing is performed at the network layer instead. (Secondary addressing procedure) |
| 254 | Broadcast, meters reply with their addresses. (This causes collision, used for test purposes only.) |
| 255 | Broadcast, meters do not reply. |
The secondary address consists of 4 parts:
- 4 bytes is the device ID (serial number)
- 2 bytes is the manufacturer’s identifier
- 1 byte is the device version
- 1 byte is the device media
The benefit of secondary addressing is that there is no need to reconfigure meter’s primary addresses and the installation can be navigated only by modifying the converters’ addressing mechanism.
Keep in mind that older M-Bus meters lack secondary addressing because early standards and hardware did not support it. Secondary addressing became widely supported post-2010 as the M-Bus standard evolved and systems scaled in complexity - thus it is safe to assume all models from 2015 and later are compatible. If you encounter issues with older meters, you may need to consider retrofitting or upgrading your network to accommodate modern addressing methods.
Feel free to contact us for possible solutions.
Converter Integration
Functions
- Configurable payload length (default size: 48B)
- Configurable acknowledged messages with 3 retransmission. If no ACK ⇒ retransmission.
- Configurable reading period (default interval: 2h 30min)
- Configurable initial M-bus delay (default length: 2,000 ms)
- Configurable M-Bus parameters
- Configurable port
- Configurable VIF DIF filtering
Out of the Box Behavior
After connecting the meter to the converter, the device sends a broadcast query by default to address 254 and received data are forwarded to the LoRaWAN network in its original format.
If the meter is not responding, the payload “NO DATA RECEIVED” in its HEX format "4E 4F 20 44 41 54 41 20 52 45 43 45 49 56 45 44" is received in the transmission.
To avoid sending longer payloads than allowed by the network depending on the current Spreading Factor, the converter splits the received data by default into the 51B blocks, where the first byte identifies the specific payload and the second byte identifies the total number of payloads. The rest contains the transmitted data.
For example if the whole payload is 240 bytes long, 5 separate LoRaWAN messages are going to be sent:
01 05 XX XX XX…
02 05 XX XX XX…
03 05 XX XX XX…
04 05 XX XX XX…
05 05 XX XX XX…
Read-Out Example Using Engelmann SensoStar U
From M-Bus meter
00 : 68 B3 B3 68 08 00 72 98 53 85 30 C5 14 00 0A 8D
10 : 10 00 00 04 78 E6 D0 D6 01 04 06 00 00 00 00 04
20 : 13 00 00 00 00 04 2B 00 00 00 00 14 2B 00 00 00
30 : 00 04 3B 00 00 00 00 14 3B 00 00 00 00 02 5B 18
40 : 00 02 5F 18 00 02 61 C9 FF 02 23 B9 00 04 6D 08
50 : 2A FC 28 44 06 00 00 00 00 44 13 00 00 00 00 42
60 : 6C 00 00 01 FD 17 10 03 FD 0C 05 00 00 84 20 06
70 : 00 00 00 00 C4 20 06 00 00 00 00 84 30 06 00 00
80 : 00 00 C4 30 06 00 00 00 00 84 40 13 00 00 00 00
90 : C4 40 13 00 00 00 00 84 80 40 13 00 00 00 00 C4
A0 : 80 40 13 00 00 00 00 84 C0 40 13 00 00 00 00 C4
B0 : C0 40 13 00 00 00 00 95 16
Packet 1 out of 4
00 : 01 04 68 B3 B3 68 08 00 72 98 53 85 30 C5 14 00
10 : 0A 8D 10 00 00 04 78 E6 D0 D6 01 04 06 00 00 00
20 : 00 04 13 00 00 00 00 04 2B 00 00 00 00 14 2B 00
30 : 00 00
Sending Packet 2 out of 4
00 : 02 04 00 04 3B 00 00 00 00 14 3B 00 00 00 00 02
10 : 5B 18 00 02 5F 18 00 02 61 C9 FF 02 23 B9 00 04
20 : 6D 08 2A FC 28 44 06 00 00 00 00 44 13 00 00 00
30 : 00 42
Sending Packet 3 out of 4
00 : 03 04 6C 00 00 01 FD 17 10 03 FD 0C 05 00 00 84
10 : 20 06 00 00 00 00 C4 20 06 00 00 00 00 84 30 06
20 : 00 00 00 00 C4 30 06 00 00 00 00 84 40 13 00 00
30 : 00 00
Sending Packet 4 out of 4
00 : 04 04 C4 40 13 00 00 00 00 84 80 40 13 00 00 00
10 : 00 C4 80 40 13 00 00 00 00 84 C0 40 13 00 00 00
20 : 00 C4 C0 40 13 00 00 00 00 95 16
M-Bus Payload Parsing
The payload itself is in a form of typical M-Bus frame, including the header. Any M-Bus parser can be used but we recommend using one of the parsers below. Please always check for a possible licensing model.
Here is an example using docker to run libmbus service.
Hardware Used
- ACR-CV-1xxL-M-D - M-Bus to LoRaWAN converter, battery powered
- ACR-CV-1xxL-M-EAC - M-Bus to LoRaWAN converter, externally powered
The converter allows connection to any meter or other device equipped with an M-Bus communication.
Hardware Limitations
- The hardware allows you to connect up to 5UL. 1UL equals to 1.5mA. Please note that 1UL is not always a representation of 1 meter because some meters may require 2UL or even more. This information can be found in the documentation of the M-Bus meter itself.
- Do not connect 2 M-Bus masters at once.
This is a battery consumption for a device with no VIF/DIF filters, single meter unit, default preheat time of 2 seconds and using a single D-cell battery (double D-cell is also possible, doubling the capacity).
| Reading and Sending Interval | Estimated Battery Lifetime |
|---|---|
| 15 min | 1.7 years |
| 30 min | 3.9 years |
| 60 min | 5.2 years |
The longer initial delay on the M-Bus line means higher power consumption. This should not affect externally powered version but battery operated versions may suffer from increased power consumption.
In case of a longer M-Bus connection (approximately 380 meters between the meter and converter), a termination resistor (5.5 kohm) is required. This applies only to new generation (NG) of M-Bus converter (the device that allows up to 16 UL), low amount of UL and long connection (for example 380m).
Application Limitations
- M-Bus communication has to address individual meters separately when more than one device is connected, either via primary or secondary addressing.
- LoRaWAN communication requires shortening of payload. Single M-Bus frame can be up to 240 bytes long and you can transfer only up to 222 bytes while using SF7 or SF8. This can be achieved either by filtering VIF DIF values on the hardware level or by splitting an entire telegram into multiple smaller ones.