Wireless M-Bus Gateway V4 with Pressure Sensor
Description
Gateway for regular remote reading of pressure and temperature values via NB-IoT, LTE-M mobile radio or LoRaWAN to the Internet. Suitable for indoor and weather-protected outdoor installation.
Features
Todo
Product Components
This product is manufactured by Lobaro using the components listed below. Detailed information about the firmware and other components can be found in their respective descriptions. Please use the links provided to access comprehensive product details.
Component | Manual / Description | Additional note |
---|---|---|
Firmware | app-nrf91-origin | See here for available firmware updates |
Housing | LoCube | 122 mm (l) x 82mm (w) x 55mm (h) |
Sensor | KELLER Series 26X | Lobaro article: #3000701 |
Product Identification
Todo
- Name: Wireless M-Bus Gateway V4 Level Probe
- Type: LOB-GW4-PEGELSONDE
- MPN / Ordering code:
TBD
Accessories
Datasheet & Quickstart
Todo
Please contact our sales team.
Product specific details
Todo
Information provided in this chapter is only valid for the above product unless otherwise noted. In case of doubt, the information in this section takes precedence over the general description of any component.
LED signal patterns
The device has 3 three LEDs (B, G, R = Blue, Green, Red), labeled Status
on the PCB: 🔵🟢🔴.
Patterns during booting/restart
- 🔵⚪🔴 B and R on: Device is in Bootloader Mode (not actively running, remove config adapter press reset to leave Bootloader Mode).
- 🔵->🟢->🔴 Quick cycle B, G, R for ~0.5s: Device just booted, either after power on, reset b button or software, or after a hard failure.
- ⚪⚪🔴 R flashes repeatedly on and off in 1s interval: critical failure during boot (failed to start application).
Patterns during normal operation
- 🔵⚪⚪ B flashes 1s on and 1s off in loop: building LTE connection to mobile provider. Followed by:
- ⚪🟢⚪ Short G flash on success.
- ⚪⚪🔴 Short R flash after connection failed.
- ⚪🟢⚪ G flash during installation mode while collecting wireless M-Bus telegrams.
Exceptional patterns
- 🔵⚪🔴/🔵🟢⚪ Quickly changing between R & B and G & B every 5s in a loop: Modem is in connection restriction mode - keep device on power, will fix itself after 30min.
Configuration
The device is shipped with default configuration parameters. The configuration can be changed via the 6-pin config port using the Lobaro USB Configuration Adapter.
More information about the usage of the configuration tools can be found in our documentation.
Remote Configuration is also supported after initial network connection.
Default Values are the firmware defaults. Depending on the application the device may be delivered with different settings, see chapter below.
General Parameters
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
Uplink channel selection | WAN | String | lte or lorawan | lte |
Days without connectivity until device reset | LostReboot | Number | Any, e.g., 3 | 5 |
Detailed Description
WAN
Parameter
LPWAN technology is used for connection and data communication with the backend server. This can be either cellular LTE (NB-IoT, LTE-M) or LoRaWAN.
lte
: Utilizes cellular technologies, either NB-IoT or LTE-M.lorawan
: Employs LoRaWAN with OTAA (Over-The-Air Activation).
- LoRaWAN uplinks and downlinks are limited to 52–222 bytes, depending on the DataRate (connection quality):
- Uplinks containing longer wMBUS telegrams are split across multiple LoRaWAN messages.
- Uplinks with numerous wMBUS telegrams may take significant time due to LoRaWAN's duty-cycle limitations.
- Downlinks with large configuration values (e.g., long whitelists) must be split into multiple messages, which can be challenging to implement.
- Limited metadata:
- Status telegrams include less information due to reduced uplink channel capacity.
- No remote firmware update capabilities.
Wireless M-Bus Meter Reading
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
WMBUS Listen Cron [UTC+0] | listenCron | String | Any CRON String | 0 0 12 * * * |
WMBUS C1/T1 Listen Duration [s] | cmodeDurSec | Number | Number of seconds0 = Do not collect C1/T1Max Value= 36000 | 300 |
WMBUS S1 Listen Duration [s] | smodeDurSec | Number | Number of seconds0 = Do not collect S1Max Value= 36000 | 0 |
Sensus RF Listen Duration [s] | xmodeDurSec | Number | Number of seconds0 = Do not collect X-ModeMax Value= 36000 | 0 |
Müller-Funk Listen Duration [s] | umodeDurSec | Number | Number of seconds0 = Do not collect U-ModeMax Value= 36000 | 0 |
WMBUS ID Filter List | devFilter | String | List, e.g.88009035,13456035 | [not set] |
WMBUS Type Filter List | typFilter | String | List, e.g.08,07 | [not set] |
WMBUS M-Field Filter List | mFilter | String | List, e.g.DME,ITW,SEN,QDS | [not set] |
WMBUS CI-Field Filter List | ciFilter | String | List, e.g.8a,72 | [not set] |
WMBUS Telegram Upload Limit | maxTelegrams | Number | Any number of max. Telegrams0 = no limit. | 0 |
Detailed Description
listenCron
Parameter
The listen cron specifies when the device wakes up to receive data via enabled wireless M-Bus and other radio protocols. Each listening period is followed by data upload using the configured WAN technology. The ideal interval largely depends on the device's power supply (battery-powered vs. externally powered) and the application's need for new metering data. Typical intervals range from every 15 minutes to 14 days between consecutive readouts.
Learn more about CRON configuration parameters.
*modeDurSec
Parameters
Parameters: cmodeDurSec
smodeDurSec
xmodeDurSec
umodeDurSec
The duration, specified in seconds (e.g., 300
for 5 minutes), defines how long the device collects metering data for
each corresponding wireless protocol. Each listening period is executed sequentially based on the configured durations.
Once all listening periods are complete, the collected meter telegrams are transmitted using the configured WAN
technology.
The maximum duration that can be specified is 10 hours, i.e. 36,000 seconds. Please note that such long listening periods will drain the battery very quickly. If in doubt, please consult Lobaro.
*Filter
Parameters
Parameters: devFilter
ciFilter
mFilter
typFilter
Filters are applied to meters based on wireless M-Bus-related fields to determine which telegrams are collected and uploaded. These filters include:
mFilter
: Manufacturer filter – filters telegrams by the 3-letter manufacturer code included in every telegram ( e.g.,LOB
for Lobaro GmbH).typFilter
: Device Type filter – filters telegrams by the 2-hex-digit code that defines the type of sending device (e.g.,07
for water meters).devFilter
: Device filter – filters telegrams by the 8-digit ID that is mandatory for each sending device (e.g.,87654321
).ciFilter
: CI-Field filter – filters telegrams by the 2-hex-digit CI-Field included in every telegram. This field is a technical code that describes the purpose of the telegram (e.g.,8a
).
These filters help refine data collection to target specific devices or device types.
For a detailed explanation, read more about telegram filter parameterization.
Blacklist
Each filter parameter can be preceded with an exclamation mark (!
) to convert the whitelist into a blacklist.
This applies to the entire filter parameter, not to individual entries within the list. For example:
mFilter=LOB
will collect only telegrams from Lobaro GmbH (whitelist).mFilter=!LOB
will exclude telegrams from Lobaro GmbH (blacklist).
maxTelegrams
Parameter
Set a hard limit on the number of telegrams to be collected and uploaded. The firmware will stop collecting once this limit is reached, regardless of the elapsed time. This can help conserve battery life and data volume, especially if the device is located in an area with a high density of meters.
When filtering for a single telegram, the parameter can be set to 1
, causing the device to stop listening immediately
after the desired telegram is received.
LTE Connection
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
LTE Lobaro Platform Host | Host | IP / URL | List of various Endpoints | coaps://platform.lobaro.com |
LTE MCC+MNC Code | Operator | Number | e.g. 26201 (Dt. Telekom) | [not set] |
LTE Band | Band | Number | 3 or 8,20 or 3,8,20 | 3,8,20 |
LTE APN | APN | String | any APN | * |
LTE SIM Pin | PIN | Number | 4 digits pin, e.g. 1234 | [not set] |
LTE NB-IoT on/off | UseNbiot | Bool | true or false | true |
LTE M1 on/off | UseLtem | Bool | true or false | true |
LTE DNS Servers used | DNS | IP | List of DNS server IPs | 9.9.9.9,1.1.1.1 |
Plain UDP Host | UdpHost | IP | any, e.g 94.130.20.37 | [not set] |
Plain UDP Port | UdpPort | Number | any, e.g 3333 | [not set] |
Detailed Description
Host
Parameter
- Lobaro Platform CoAP
- MQTT
Hostname or IP of the Lobaro Platform instance CoAP endpoint to which the gateway communicates using UDP.
- Using DTLS:
coaps://platform.lobaro.com
- No DTLS:
coap://platform.lobaro.com
- Plain IP:
94.130.20.37
(platform.lobaro.com)
It's also possible to configure a list of URLs to implement a fallback mechanism. This is particulary helpful
for
combining DTLS and non DTLS connection attempts: coaps://platform.lobaro.com,coap://platform.lobaro.com
The device can communicate directly via MQTT. See MQTT → Host Parameter.
LTE Parameters
Parameters: APN
Operator
Band
, PIN
Basic parameters are required to configure the NB-IoT or LTE-M connection. These settings must align with the SIM card
and network provider used. Typically, the default parameters work well, as they enable the modem to automatically select
and join the network using SIM card information. However, if the APN
(Access Point Name) is known, it is recommended
to configure it for optimal performance.
Read more about LTE network configuration parameters.
UseNbiot
UseLtem
The modem supports both NB-IoT and LTE-M technologies. By default, both are enabled, allowing the cellular modem to
automatically select the most suitable network type based on the location. However, you can force the modem to use a
specific technology by setting one parameter to false
, ensuring the other remains enabled (set to true
). At least
one technology must always be active.
UdpHost
UdpPort
This feature is deprecated and not recommended for production use. Lobaro provides limited support for errors caused by using raw UDP upload.
Instead of sending metering data to the Lobaro IoT Platform, the data can alternatively be sent to an external UDP socket. This option is useful if you prefer to keep metering data off external servers while still using the Lobaro Platform to control your gateways.
UdpHost
: IP address to upload plain telegrams via UDP.[not set]
: Defaults to uploading data to the Lobaro IoT Platform using the configured Host parameter.UdpPort
: Port number to upload plain telegrams via UDP.- Only used if
UdpHost
is set.
Even when metering data is sent to an external server, the firmware typically still requires a connection to a Lobaro Platform instance to send status information, perform remote configurations, or handle firmware updates.
For solutions that allow all communication without the Lobaro Platform, such as direct MQTT to an external broker, contact Lobaro for potential options.
LoRaWAN Connection
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
DevEUI | DevEUI | byte[8] | any | Device EUI64 |
AppEUI / JoinEUI (1.1) | AppEUI /JoinEUI | byte[8] | any | random |
AppKey | AppKey | byte[16] | any | random |
NwkKey (1.1) | NwkKey | byte[16] | any | 00000000000000000000000000000000 |
Days between Timesync | TimeSync | Number | any | 3 |
Payload Format | PayloadFormat | Number | 0 , 1 , 2 | 0 |
use OTAA | OTAA | Bool | true or false | true |
Random TX Delay [s] | RndDelay | Number | any | 10 |
Spreading Factor | SF | Number | 7-12 | 12 |
Transmission Power | TxPower | Number | 2-14 | 14 |
Adaptiv Data Rate | ADR | Bool | true or false | true |
LoRaWAN max. Payload Length | loraPLMax | Number | 10 to 241 | 100 |
Detailed Description
LoRaWAN 1.1 is experimental and not certified. For production environments, we recommend using LoRaWAN 1.0.2.
Depending on configuration some parameters are not available.
NwkKey
Parameter
The Network Key (NwkKey) is used for LoRaWAN 1.1. If set to zeros (00000000000000000000000000000000
) or to the same value as the AppKey
, the device will stick to LoRaWAN 1.0.2 which is the recommended mode of operation.
PayloadFormat
Parameter
Used encoding of the wmBus LoRaWAN uplink payload packets.
0
= Encoding in ports with static message length1
= prefix bytes and time2
= prefix bytes, time, and rssi
For a detailed specification of the payload formats, please refer to the LoRaWAN Communication page.
Modbus Reading
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
Modbus address for internal | modbusInternalAddress | Number | 0..255 | 250 |
Number of readouts to be uploaded together (saves energy) | modbusAccumulate | Number | 1-10 | 1 |
Modbus configuration and list of commands | modbusCmdConf | String | R,9600,8N1:010300020002,010300060002,FA0400050001 | |
LoRaWAN Payload Format Modbus | loraFormat | Number | '1', '4', '5' | 5 |
Time to wait (in ms) before executing the commands | PowerOnDelay | Number | 0-60000 | 1000 |
Detailed Description
OneWire Multi-Temperature Sensor Reading
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
Number of readouts to be uploaded together (saves energy) | MTempAcc | Number | 1-600 | 1 |
List of sensor IDs or * for scanning | MTempIDs | String | * |
Detailed Description
MTempIDs
Parameter
The MTempIDs parameter specifies a list of sensor IDs separated by a ,
. If the string it empty, all sensor readings are disabled. If a *
is specified, a scan will be executed at boot and all new sensors added to the list.
MTempAcc
Parameter
The MTempAcc parameter specifies the number of readouts before the data is uploaded. When set to 1
the data is uploaded immediately.
The data may be uploaded earlier if not enough free memory is available to store the measurements.
Special
Description | Key | Type | Possible Values | Default |
---|---|---|---|---|
Verbose UART Log | verbose | Bool | true or false | false |
Addon RAM configuration | extRam | String | Lobaro Internal | [not set] |
Live Mode | liveMode | String | [not set] | |
Operation Mode | opMode | Number | Lobaro Internal | 1 |
Detailed Description
liveMode
Parameter
An empty string disables the live mode.
suppression=<seconds>
enable live mode with suppression of duplicate telegrams for seconds
Application specific non-default values
KELLER Series 26X
Name | Description | Value |
---|---|---|
modbusCmdConf | Reads Registers: 2+3 (Pressure) 8+9 (Temperature) Device battery voltage | R,9600,8N1:010300020002,010300080002,FA0400050001 |
cmodeDurSec | Do not collect C1/T1 mode | 0 |
WAN | Uplink technology | lorawan |
listenCron | Cron expression defining when to receive data | 0 0 * * * * |
PowerOnDelay | Battery variants only | 1500 |
KELLER Series 46X
Name | Description | Value |
---|---|---|
modbusCmdConf | Reads Registers: 2+3 (Pressure) 6+7 (Temperature) Device battery voltage | R,9600,8N1:010300020002,010300060002,FA0400050001 |
cmodeDurSec | Do not collect C1/T1 mode | 0 |
WAN | Uplink technology | lorawan |
listenCron | Cron expression defining when to receive data | 0 0 * * * * |
PowerOnDelay | Battery variants only | 1500 |
Lobaro Pressure and Temperature Sensor
Name | Description | Value |
---|---|---|
modbusCmdConf | Reads Registers: 22+23 (Pressure) 38+39 (Temperature) Device battery voltage | R,9600,8N1:010300160002,010300260002,fa0400050001 |
cmodeDurSec | Do not collect C1/T1 mode | 0 |
WAN | Uplink technology | lorawan |
listenCron | Cron expression defining when to receive data | 0 0/15 * * * * |
PowerOnDelay | Battery variants only | 1500 |
Upload Formats LoRaWAN
LoRaWAN Port | Uplink Message |
---|---|
1 | Status Message |
3-5 | Data Packet - Verbose |
20 | Data Packet - Compact |
200..223 | Data Packet - Compact (consecutive) |
For a detailed specification of the payload formats, please refer to the LoRaWAN Communication page.
Upload Formats LTE
CoAP Protocol
The protocol details of the CoAP implementation are not publicly disclosed and are intended for use exclusively with the Lobaro IoT Platform. For integration with third-party systems, MQTT is the preferred protocol.
If you require access to this and MQTT is not an option, please contact Lobaro directly.
MQTT Protocol
Needs to be written
Example JS Parser
Lobaro Platform / TheThingsNetwork (TTN) / ChirpStack
/**
* Parser for Lobaro Pressure Probe via LoRaWAN or LTE (V4 gateway).
* Usable for Pressure Probe or Pressure+Temperature Probe.
* Works with TTN, ChirpStack, or the Lobaro Platform.
*/
function signed(val, bits) {
// max positive value possible for signed int with bits:
var mx = Math.pow(2, bits-1);
if (val < mx) {
// is positive value, just return
return val;
} else {
// is negative value, convert to neg:
return val - (2 * mx);
}
}
function int16_BE(bytes, idx) {
bytes = bytes.slice(idx || 0);
return signed(bytes[0] << 8 | bytes[1] << 0, 2*8);
}
function uint16_BE(bytes, idx) {
bytes = bytes.slice(idx || 0);
return bytes[0] << 8 | bytes[1] << 0;
}
function uint32_BE(bytes, idx) {
bytes = bytes.slice(idx || 0);
return bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3] << 0;
}
function float32FromInt(asInt) {
var sign = (asInt >> 31) == 0 ? 1 : -1;
var exponent = ((asInt >> 23) & 0xFF) - 127;
var significand = (asInt & ~(-1 << 23));
if (exponent === 128)
return null;
if (exponent === -127) {
if (significand === 0) return sign * 0.0;
exponent = -126;
significand /= (1 << 22);
} else {
significand = (significand | (1 << 23)) / (1 << 23);
}
return sign * significand * Math.pow(2, exponent);
}
function float32_BE(bytes, idx) { return float32FromInt(uint32_BE(bytes, idx)); }
/**
* TTN decoder function.
*/
function Decoder(bytes, port) {
var vals = {};
if( port == 20 ){
if (bytes.length==5) {
// Pressure Probe without temperature sensor and Bridges internal Temperature
vals["error"] = !!(bytes[0]&0x80);
vals["pressure"] = int16_BE(bytes, 1)/1000;
vals["temperature"] = int16_BE(bytes, 3);
} else if (bytes.length==7) {
vals["error"] = !!(bytes[0]&0x80);
vals["pressure"] = int16_BE(bytes, 1)/1000;
vals["temperature"] = int16_BE(bytes, 3);
vals["vBat"] = uint16_BE(bytes, 5) / 1000;
} else if (bytes.length==9) {
vals["error"] = !!(bytes[0]&0x80);
// pressure in mH2O
vals["pressure"] = float32_BE(bytes, 1);
// temperature in Degree Celsius
vals["temperature"] = float32_BE(bytes, 5);
} else if (bytes.length==11) {
vals["error"] = !!(bytes[0]&0x80);
// pressure in mH2O
vals["pressure"] = float32_BE(bytes, 1);
// temperature in Degree Celsius
vals["temperature"] = float32_BE(bytes, 5);
vals["vBat"] = uint16_BE(bytes, 9) / 1000;
}
else if (bytes.length==13) {
vals["error"] = !!(bytes[0]&0x80);
// pressure in mH2O
vals["pressure"] = float32_BE(bytes, 1);
// temperature in Degree Celsius
vals["temperature"] = float32_BE(bytes, 5);
vals["vBat"] = uint16_BE(bytes, 9) / 1000;
vals["temperatureInt"] = uint16_BE(bytes, 11);
}
}
// Status hybrid gateway
if (port === 64 && bytes.length == 13) {
vals["Firmware Identifier"] = String.fromCharCode(bytes[0]) + String.fromCharCode(bytes[1]) + String.fromCharCode(bytes[2]);
vals["FirmwareVersion"] = bytes[3] + '.' + bytes[4] + '.' + bytes[5];
vals["status"] = bytes[6];
vals["reboot reason"] = bytes[7];
vals["final words"] = bytes[8];
vals["voltage"] = uint16_BE(bytes,9)/1000.0
vals["temperature"] = int16_BE(bytes,11)/10.0;
}
// Status Gateway4
if (port === 1 && bytes.length == 8) {
vals["FirmwareVersion"] = bytes[0] + '.' + bytes[1] + '.' + bytes[2];
vals["vBat"] = uint16_BE(bytes,3)/1000.0
vals["temperatureInt"] = int16_BE(bytes,5)/10.0;
vals["flags"] = bytes[7];
}
return vals;
}
function NB_ParseModbusQuery(input){
vals = {};
for( var i = 0; i< input.d.batch.length; i++ ){
if (input.d.batch[i].cmd == "AQMAFgAC"){
vals["pressure"] = float32_BE(bytes(atob(input.d.batch[i].rsp)),3);
}
if (input.d.batch[i].cmd == "AQMAJgAC"){
vals["temperature"] = float32_BE(bytes(atob(input.d.batch[i].rsp)),3);
}
// else: keller
if (input.d.batch[i].cmd == "AQMAAgAC"){
// convert to mH2O
vals["pressure"] = float32_BE(bytes(atob(input.d.batch[i].rsp)),3)*10.197442889221;
}
if (input.d.batch[i].cmd == "AQMACAAC"){
vals["temperature"] = float32_BE(bytes(atob(input.d.batch[i].rsp)),3);
}
// vbat
if (input.d.batch[i].cmd == "+gQABQAB"){
vals["vBat"] = int16_BE(bytes(atob(input.d.batch[i].rsp)),3)/1000.0;
}
// internal temperature
if (input.d.batch[i].cmd == "+gQABAAB"){
vals["temperatureInt"] = int16_BE(bytes(atob(input.d.batch[i].rsp)),3);
}
}
return vals;
}
/**
* TTN V3 Wrapper
*/
function decodeUplink(input) {
return {
data: {
values: Decoder(input.bytes, input.fPort)
},
warnings: [],
errors: []
};
}
function NB_ParseDeviceQuery(input) {
for (var key in input.d) {
var v = input.d[key];
switch (key) {
case "temperature":
v = v / 10.0;
Device.setProperty("device.temperature", v);
continue;
case "vbat":
v = v / 1000.0;
Device.setProperty("device.voltage", v);
continue;
}
Device.setProperty("device." + key, v);
}
return null;
}
function NB_ParseConfigQuery(input) {
for (var key in input.d) {
Device.setConfig(key, input.d[key]);
}
return null;
}
function NB_ParseStatusQuery(input) {
NB_ParseDeviceQuery(input);
return null;
}
/**
* ChirpStack decoder function.
*/
function Decode(fPort, bytes) {
// wrap TTN Decoder:
return Decoder(bytes, fPort);
}
/**
* Lobaro Platform decoder function.
*/
function Parse(input) {
if (input.i && input.d) {
// NB-IoT
var decoded = {};
decoded = input.d;
decoded.address = input.i;
decoded.fCnt = input.n;
var query = input.q || "data";
switch (query) {
case "config":
return NB_ParseConfigQuery(input);
case "device":
return NB_ParseDeviceQuery(input);
case "modbus":
return NB_ParseModbusQuery(input);
case "status":
return NB_ParseStatusQuery(input);
default:
}
return decoded;
}
var data = bytes(atob(input.data));
var port = input.fPort;
return Decoder(data, port);
}