Skip to main content

Getting Started

This how-to guides you through the necessary steps to get MQTT up and running on a Lobaro Gateway V4.

The goal is to configure a Lobaro Gateway V4 such that it reads out meters and transmits the received wM-Bus telegrams to a custom MQTT broker.

Prerequisites

To complete the how-to, the following is necessary:

Configuring a MQTT broker in the gateway

Here, we are configuring a MQTT broker using the USB Config Adapter.

  1. Open the gateway and make sure that the battery is connected. Then, connect the gateway to your computer using the config adapter.

  2. Create the Host configuration parameter for your broker using the MQTT Host Parameter Generator.

  3. Start the Lobaro Config Tool and connect it to your gateway. The current gateway configuration should show up after clicking on Reload config.

    Click the edit button next to the Host parameter and enter the host parameter for your MQTT broker, as generated in the previous step.

  4. Save the changed configuration by clicking onto Save config. The gateway should automatically restart and start publishing messages via MQTT after a while.

Receiving wM-Bus telegrams using MQTT

After initial configuration, the gateway should be in wM-Bus Installation Mode. While in this mode, the gateway is continuously listening for wM-Bus telegrams.

To receive and decode the wM-Bus telegrams using MQTT, you can proceed as follows:

  1. Connect to your broker using a MQTT client, e.g. MQTTX. Then, subscribe to LOB/# to receive all gateway messages. When still in install mode, you should see wM-Bus telegrams coming in after at maximum two minutes.

  2. To decode a wM-Bus telegram, open the Lobaro Platform and go to Tools → wM-Bus Parser API. Copy and paste the telegram from MQTTX and click Parse wM-Bus Telegram to decode it.

  3. When the installation mode has finished, the gateway will continue normal operation and is transmitting received wM-Bus telegrams based on the configured schedule.

    To change the schedule, connect to the gateway using the USB Config Adapter again and change the wM-Bus Meter Reading configuration parameters as needed using the Lobaro Config Tool.

Where to go from here

Troubleshooting

If the gateway is not connecting to the broker, proceed as follows:

  1. Connect to the gateway using the USB Config Adapter and go to the Logs tab of the Lobaro Config Tool.

  2. Look for the log lines starting with LTE| waiting for connection. After some time, the gateway should report a successful LTE connection, e.g. LTE| connected after 13s.

    If the LTE connection is failing, fix this problem first.

  3. Look for the log line starting with NW: Host list. Make sure that following this line, the Host parameter is successfully parsed, and the hostname is correctly resolved.

    If the hostname is not correctly resolved or the Host parameter is erroneous, fix this problem.

  4. Look for the log line starting with MQTT| Connecting. Following this line, the gateway is reporting whether the connection to the broker is successful.

    If connecting to the broker is not successful, fix the problem according to the reported error. For example, in the screenshot, the credentials are not correct:

If after troubleshooting the gateway is still not connecting to your broker, reach out to Lobaro Support.