Configure the M-Bus Connector
Configure wired M-Bus instances, discover meters and data items, verify readings, and troubleshoot serial communication.
The M-Bus Connector reads data from wired M-Bus meters through a serial interface. Use it with heat, water, gas, electricity, and other meters that expose data using the wired M-Bus protocol.
This guide explains the physical and serial requirements, instance discovery, manual instance configuration, item discovery, polling behavior, and troubleshooting.
Before you begin
- Install and enable the M-Bus Connector.
- Connect the wired M-Bus network to SIA Connect through a suitable M-Bus-to-serial level converter.
- Confirm that the serial interface is available to SIA Connect.
- Identify the meter baudrate and its primary or secondary address.
- Make sure that every meter on the bus has a unique address.
The Connector uses 8 data bits, even parity, 1 stop bit, and no hardware or software flow control. The meter, level converter, and Connector must use the same baudrate.
Only one Connector operation can reserve a serial interface at a time. Do not configure another Connector or service to use the same interface while M-Bus discovery or polling is running.
Choose a setup method
| Method | When to use it | Result |
|---|---|---|
| Discover instances | Use this when you want the Connector to scan the serial bus for meters. | Creates selected meter instances with their detected address, interface, baudrate, and identification. |
| Create an instance manually | Use this when you already know the meter address and serial settings, or discovery cannot find the meter. | Creates one instance using the values you enter. |
After creating an instance, use Discover items to read the meter telegram and add its available data records.
Discover M-Bus instances
Instance discovery scans for meters on the selected serial interface. It searches secondary addresses first, then scans primary addresses from 0 through 250.
- Open Workspace > Instances.
- Select Discover instances.
- Select the M-Bus Connector.
- Select the serial interface connected to the M-Bus level converter.
- Select the baudrate used by the meters.
- Keep the default discovery timeouts unless the bus requires more time to respond.
- Select Search instances.
- Wait for the search to finish.
- Review the discovered meters and select the instances you want to add.
- Select Add selected.
- Review the import results.
A discovered instance uses the meter serial number as its UID when available. Its name is built from the manufacturer, address, and reported device type. The default polling interval is 60000 ms.
A complete secondary and primary address scan can take longer than the discovery window. If the available time expires, the Connector returns the candidates already found and reports that discovery stopped early. Select one serial interface, increase the scan duration, or adjust the reply timeouts when required.
Discovery parameters
| Parameter | Default | Description |
|---|---|---|
| Device interface | Detected interface | Serial interface connected to the wired M-Bus network. Selecting one interface avoids scanning unrelated serial ports. |
| Baudrate | 2400 |
Communication speed used during the scan. Available values are 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400. |
| Discovery wildcard timeout (ms) | 300 |
Time allowed for replies while scanning secondary address wildcards. |
| Discovery primary ACK timeout (ms) | 100 |
Time allowed for a meter to acknowledge a request during the primary address scan. |
| Discovery primary data timeout (ms) | 300 |
Time allowed for the data telegram after a meter responds on a primary address. |
| Scan duration (ms) | Portal default | Overall discovery window. The Connector stops shortly before this limit so it can return partial results instead of being terminated. |
Increase a reply timeout when meters respond slowly or the bus is long and heavily loaded. Larger values also make a full scan take longer.
Create an M-Bus instance manually
- Open Workspace > Instances.
- Select Create instance.
- Select the M-Bus Connector.
- Enter a descriptive name.
- Enter the meter's primary or secondary address in Address.
- Select the serial interface connected to the meter network.
- Select the meter baudrate.
- Set the response timeout.
- Select Save.
A primary address is a decimal value from 0 through 250. A secondary address is the meter's 16-character secondary identifier. Spaces are ignored and shorter secondary values are padded by the Connector.
Use a secondary address for normal polling in this Connector version. Discovery can identify meters that respond during the primary address scan, but the runtime polling path requests data through secondary selection.
Instance parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| Address | Yes | None | Primary or secondary M-Bus address of the meter. Use the secondary address for normal polling in the current version. |
| Device interface | Yes | Detected interface | Serial interface connected to the M-Bus level converter. The Connector prefers an interface identified as RS232, then a built-in serial interface, then the first available interface. |
| Timeout | No |
2000 ms |
Maximum time to wait for a meter response during normal polling and item discovery. |
| Baudrate | No | 2400 |
Serial communication speed. The selected value must match the meter and level converter. |
| Discovery wildcard timeout (ms) | No | 300 |
Discovery-only setting for secondary wildcard replies. It does not change normal polling. |
| Discovery primary ACK timeout (ms) | No | 100 |
Discovery-only setting for acknowledgements during primary address scanning. |
| Discovery primary data timeout (ms) | No | 300 |
Discovery-only setting for data replies during primary address scanning. |
Discover M-Bus items
The Connector creates items from the data records returned by the selected meter. Each item receives a stable UID derived from its M-Bus data record, along with the decoded name, unit, and a sample value.
- Open the configured M-Bus instance.
- Open its Items area.
- Select Discover items.
- Select Search items.
- Wait while the Connector selects the meter and reads its data telegrams.
- Select the items you want to add.
- Select Add selected.
- Review the import results.
The Connector follows the meter's more-data indication and can read up to 50 telegrams in one operation. Duplicate records with the same UID are returned once.
Important: M-Bus items are read-only. The current Connector does not write values or commands to meters.
Understand M-Bus items
| Item field | How it is assigned |
|---|---|
| Name | Decoded name of the M-Bus data record. |
| UID | Identifier generated from the record information. The Connector uses this value to match later telegrams to the item. |
| Unit | Engineering unit decoded from the M-Bus record. |
| Data type | Imported as a string value so the decoded record can be stored consistently. |
| Access | Read-only. |
| Sample value | Value returned by the meter during discovery. |
Use discovery instead of creating items manually. The item UID is generated from the decoded M-Bus record and cannot be entered as a user-defined Connector parameter.
Verify the configuration
- Enable the M-Bus Connector and instance.
- Confirm that the instance completes a read without an error.
- Enable at least one discovered item.
- Wait for the instance polling interval.
- Confirm that the item displays the expected value and engineering unit.
If discovery succeeds but normal polling does not, confirm that the imported instance uses the meter's secondary address and that the serial interface remains available.
Troubleshoot the M-Bus Connector
| Message or condition | Likely cause | Action |
|---|---|---|
| Error initializing serial port | The interface is missing, unavailable, or cannot be configured. | Check the physical connection and select the correct Device interface. Confirm that the interface is not in use by another Connector or service. |
| Unable to reserve serial interface | Another operation currently owns the interface. | Wait for the other discovery or polling operation to finish. Remove any duplicate instance or Connector configuration that uses the same interface incorrectly. |
| Error selecting on secondary address or Secondary address select failed | The meter did not acknowledge the secondary address selection. | Verify the full secondary address, baudrate, wiring, level converter, and response timeout. |
| Invalid address or Invalid primary or secondary address | The address is empty, malformed, or outside the primary range. | Enter a primary address from 0 through 250, or enter the meter's secondary address. Use the secondary address for normal polling. |
| Timed out or Timed out while reading data | The meter did not return a telegram before the configured timeout. | Check the address, baudrate, serial interface, bus power, polarity, cabling, and level converter. Increase Timeout when the meter responds reliably but slowly. |
| Invalid message. or Invalid M-Bus message received | The response does not contain a valid long-frame start and stop sequence. | Check the baudrate, parity requirements, wiring quality, and whether a non-M-Bus device is sharing the serial channel. |
| Checksum or length didn't match or Invalid checksum or length | The received telegram is incomplete or corrupted. | Inspect the bus wiring, polarity, cable length, electrical load, grounding, and level converter. The Connector retries invalid frames before reporting this error. |
| Writing read request or Error writing read request | The Connector could not send the request through the serial interface. | Reconnect the interface, confirm that it is not disconnected or reserved elsewhere, then restart the affected instance. |
| No wired M-Bus devices were discovered | No valid meter responded during the scan. | Select the correct interface and baudrate. Check bus power and wiring. Increase the scan duration or reply timeouts for slow devices. |
| Discovery stopped early to avoid worker timeout. | The overall scan duration expired before all address ranges were checked. | Limit discovery to one Device interface, increase Scan duration (ms), or reduce reply timeouts when the bus can respond faster. |
| No readable items were discovered for the selected M-Bus device | The meter returned no decodable data records. | Confirm the meter address and communication settings. Check whether the meter requires activation, a different telegram request, or a protocol mode not handled by the current Connector. |
| Sent and received data are identical | The serial adapter is echoing transmitted data or RX and TX are connected incorrectly. | Check the level converter mode and the RX and TX connections. Remove local echo if the converter provides that option. |
If communication still fails, enable the required Connector logging level and review the M-Bus messages in the system logs. Compare the selected address, interface, baudrate, and timeout with the meter documentation.