We use cookies to optimize site functionality and provide the best possible experience.
View our new Privacy and Protection of Personal Data here.
Accept Settings
INDEX

LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT (and LoRaWAN Connectivity), 2 x 10/100Base-T(x) Ports, 1 x RS232 and 1 x RS485 Serial Ports and/or BPL (Broadband Power Line Link) User Manual

1. About LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT (and LoRaWAN Connectivity)

existing product photo from the live manual - no new screenshot

This manual describes the LKM Series gateways with firmware version 3.00.02. The firmware version, the build date and the MAC address are shown in the header of every web page, under the product name.

LKM154, header of the web page: product name "REDZ LKM Series IEC62056-21 Meter to Modbus TCP Gateway", "Version: 3.00.02", "-built: ..." and "MAC: ..."

The LKM Series Electricity Meter Protocol to Modbus Protocol Gateways read electricity meters with the IEC 62056-21 (Mode C) and DLMS/COSEM protocols and convert the meter data to Modbus registers. A standard model reads up to 32 meters. A Lite model reads up to 10 meters. LKM615 and LKM616 read the one meter they are plugged into. The OBIS codes to read are set by the user: up to 48 OBIS codes for each meter profile ("IEC 62056-21", "Landis+Gyr DLMS", "Actaris/Itron", "Iskra DLMS", "Cewe DLMS" and "Generic DLMS"). LKM615 and LKM616 show only the "IEC 62056-21" and "Generic DLMS" profiles.

The gateway works in one of two modes, selected with "Device Function" on the "Operating Mode" page:

"Device Function"MetersMeter data is given out as
"Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)"on the RS232 or RS485 portModbus TCP (and MQTT)
"TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)"on the network (IP address and TCP port of each meter)Modbus RTU on the RS232 or RS485 port (and MQTT)

NOTE:

LKM615 and LKM616 offer only "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)".

In both modes the meter data can also be sent to an MQTT broker at the same time.

The REDZ Broadband Power Line (BPL) link option allows the device to communicate with full transparent TCP/IP over low voltage power lines and allows easy connection between TCP/IP based terminals without extra cables.

Typical applications: automated meter reading, telemetry, energy management.

LKM Lite models are a cost effective solution for the same tasks. A Lite model has one Ethernet port and one RS485 port, reads up to 10 meters and sends its log only to a UDP server. See 2.4 "LKM - Lite Model Differences" and chapter 20 "Product Selection".

1.1 LoRaWAN Meter Reader Models

existing LoRaWAN model photo from the live manual - no new screenshot

The LKM Series 868 MHz LoRaWAN Meter Reader models (LKM354, LKM454, LKM755, LKM354-Lite and LKM616) do everything the models above do and, in addition, send the meter data to a LoRaWAN network server through a LoRaWAN gateway. The send interval is set by the user on the "LoRa Settings" page. These models have the same Modbus and MQTT settings as the other models; the LoRaWAN settings are added to them.

1.2 Direct Connection to Meter Models

existing LKM615 / LKM616 photos from the live manual - no new screenshot

LKM615 and LKM616 are designed for EMH LZQJ-XC meters and are direct replacements for Variomod XC modules. They read the EMH LZQJ-XC meter with IEC 62056-21 (Mode C) or DLMS/COSEM, convert the data to Modbus TCP and send it to an MQTT broker. LKM616 also sends the meter data to a LoRaWAN network server through a LoRaWAN gateway. On these two models a DLMS/COSEM meter is always read with the "Generic DLMS" profile.

1.3 Product names shown by the device

The web header shows the product name of the firmware in the unit. Use it to check that the unit runs the firmware of its model.

ModelProduct name in the web header
LKM154, LKM254REDZ LKM Series IEC62056-21 Meter to Modbus TCP Gateway
LKM655REDZ LKM Series IEC62056-21 Meter to Modbus TCP Gateway with BPL
LKM154-LiteREDZ LKM Series IEC62056-21 Meter to Modbus TCP Gateway - Lite Model
LKM615REDZ LKM Series IEC62056-21 Meter to Modbus TCP Gateway - EMH Model
LKM354, LKM454REDZ LKM Series Meter to Modbus TCP Gateway and LoRaWAN EUROPE 868MHz Meter Reader
LKM755REDZ LKM Series Meter to Modbus TCP Gateway and LoRaWAN EUROPE 868MHz Meter Reader with BPL
LKM354-LiteREDZ LKM Series Meter to Modbus TCP Gateway and LoRaWAN EUROPE 868MHz Meter Reader - Lite Model
LKM616REDZ LKM Series Meter to Modbus TCP Gateway and LoRaWAN EUROPE 868MHz Meter Reader - Lite Model

NOTE:

LKM616 and LKM354-Lite show the same product name. To tell them apart, look at the "Operating Mode" page: LKM616 has one meter row and only one "Device Function" entry, LKM354-Lite has 10 meter rows and two "Device Function" entries. LKM616 also shows only two OBIS profile tabs ("IEC 62056-21" and "Generic DLMS").

1.4 What is new in firmware 3.00.02

Firmware 3.00.02 also contains the changes of 3.00.01. The table lists the changes against 3.00.00; the full list is in 16.1 "What is new in 3.00.02 and 3.00.01".

AreaFirmware 3.00.02
Meter valuesNegative values keep their sign (IEC 62056-21 and the signed DLMS integer types). A value too large for the 32-bit register gives a fixed limit value instead of a wrong number.
Meter readingWith several IEC meters on one RS485 line, a read-out from another meter than the one asked is not stored, when the "IEC Address:" of the row holds the meter serial number. A failed reading ends with "READING FINISHED S:<s> R:<row> ERROR: <reason>", shown in red on "Meter Reading Status".
ModbusA save of "Gateway Settings" no longer moves the registers of the DLMS OBIS codes. A read for an odd number of registers or for more than 125 registers gets no answer; a master that reads one register must now read two. In the Modbus RTU function, the traffic of other slaves on the same RS485 line no longer restarts the unit.
MQTTWhen only the MQTT broker cannot be reached, the unit no longer restarts; it restarts only its MQTT connection.
LoRaWANWhile the radio module is still sending a message, its busy answers no longer restart the unit. With "Data Transmission with ACK" a message that gets no ACK is sent again a limited number of times, then counted as lost. The EUI and key fields need all digits.
Web interfaceOverview cards on "Device Status", readable status colours, an amber window when the unit did not take some values of a save, and "REBOOT REQUIRED" after a change of "Device Function".
Configuration fileA backup of another model with the same settings layout is refused with "Rejected: product mismatch (file '...', device '...')."; nothing is changed. A meter row value that the unit cannot use is replaced by the factory value of that field.
NetworkIn DHCP client mode a unit without a lease uses its stored address without a gateway. When it loses its lease and gets no new one, it first restarts its network interface and, if there is still no lease, restarts.

NOTE:

An update from 2.x to 3.00.02 resets every setting to the factory settings. Read 16.6 "Upgrade from firmware 2.x" before you upgrade.

2. Hardware Features

LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT have versions with and without BPL (Broadband Power Line) link.

2.1 Features

  • 2 x 10/100Base-T(X) ports
  • 1 x RS232 and 1 x RS485 serial port
  • Embedded web interface
  • Reads electricity meters with IEC 62056-21 (Mode C), DLMS/COSEM, and DLMS/COSEM with IEC 62056-21 opening
  • Meter side: "Start Baud Rate:" selectable from 300 to 115200 baud for each meter
  • Modbus RTU side ("Serial Settings" page): "Baud rate" selectable from 300 to 460800 baud, "Line Control" 8_NONE_1, 9_NONE_1, 8_EVEN_1, 8_EVEN_2, 8_ODD_1, 8_ODD_2, 8_NONE_2 or 9_NONE_2
  • 2 device functions:
    • "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)"
    • "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)"
  • Up to 32 meters (IEC 62056-21 and DLMS/COSEM), data converted to Modbus TCP or Modbus RTU
  • Up to 48 OBIS codes per meter profile, 6 profiles ("IEC 62056-21", "Landis+Gyr DLMS", "Actaris/Itron", "Iskra DLMS", "Cewe DLMS", "Generic DLMS"), all set from the web interface
  • Modbus TCP server with up to 10 clients at the same time ("Maximum Number of Clients", factory setting 2)
  • MQTT publisher with two data formats: "OBIS VALUES AS OBJECTS" and "OBIS VALUES AS MODBUS FRAME"
  • Meter reading, Modbus communication and OBIS-to-Modbus mapping status on the web interface ("Gateway Status", "Meter Reading Status", "Device Status")
  • Meter read-out data on the web interface
  • DHCP server
  • White list or black list IP filter with up to 20 IP addresses (in the Modbus TCP function)
  • Firmware update over the web interface
  • 2 firmware banks in the device (1 active); the previous firmware can be started again (see chapter 16 "Firmware Update and Upgrading")
  • Configuration backup and restore as a file
  • AC or DC wide range power options
  • Wide operating temperature range from -25 to 70 deg C (AC power input versions, including the BPL models LKM655 and LKM755 with AC power input) and -40 to 85 deg C (DC power input versions, including LKM655-PP-DC and LKM755-PP-DC)
  • Rugged metal IP-40 housing (LKM615 and LKM616: ABS housing, see 2.5 "LKM615 and LKM616 - Direct Connection to Meter Model Features")
  • DIN-rail mounting (not LKM615 and LKM616)
  • No battery for the clock: after a power cut set the time again, from an NTP server or with "Set Device Time"

New in firmware 3.00.02 (details in 16.1 "What is new in 3.00.02 and 3.00.01"):

  • Negative meter values keep their sign (signed DLMS integer types and IEC 62056-21 values).
  • A value too large for the 32-bit register gives a fixed limit value instead of a wrong number.
  • Saving "Gateway Settings" no longer re-sorts the DLMS OBIS lists: unchanged codes keep their place, an unchecked code is removed and the codes after it move up.

New in firmware 3.00.01 (also in 3.00.02):

  • Several IEC meters on one RS485 line: a read-out that comes from another meter than the one asked is not stored (meter identity check, see 9.1 "Scenario 1 - Meter on a direct cable, read over Modbus TCP").
  • In the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)", an IEC session that ended without an answer is closed with the IEC break message before the next meter is asked.
  • When only the MQTT broker cannot be reached, the device no longer restarts; after its DHCP refresh steps it restarts only its MQTT connection.

2.2 Extra Features for Models with LoRaWAN Meter Reader

  • Radio band: EU 868 MHz (Europe), LoRaWAN RF communication
  • LoRaWAN send interval set by the user ("Minimum Send Interval for a Parsed Data (in seconds)")
  • Built-in LoRaWAN duty cycle check
  • Built-in LoRaWAN payload size check: the device splits the data by the maximum payload size and the duty cycle block times, so the meters can be read at any interval
  • "End-Device Activation Over-the-Air (OTAA)" or "End-Device Activation by Personalization (ABP)"
  • User defined "LoRaWAN Port"
  • "Adaptive Data Rate"
  • Selectable "Uplink Data Rate"
  • Selectable "Tx Power Level (EIRP)"
  • "Class A" and "Class C"
  • "Data Transmission without ACK" or "Data Transmission with ACK"
  • Device and LoRaWAN status on the "LoRa Status" page, including the latest LoRaWAN messages

2.3 Extra Features for Models with BPL

  • 2 x 10/100Base-T(X) ports + 1 x BPL link
  • Wide range 3 phase AC input, 110 - 240 V, 50 - 60 Hz (versions -PN-AC and -PP-AC), or 9 - 36 V DC input (version -PP-DC)
  • Three versions: -PN-AC (three-phase AC power, phase to neutral BPL data connection), -PP-AC (three-phase AC power, phase to phase BPL data connection), -PP-DC (9 - 36 V DC power, phase to phase BPL data connection); see chapter 19 "Ordering Information"
  • Operating temperature from -25 to 70 deg C (AC versions) and -40 to 85 deg C (DC version)
  • Up to 30 Mbps PHY rate on BPL with up to 10 hops and 1000 nodes
  • Up to 432 sub-carriers from 2 to 28 MHz analog bandwidth
  • LDPC-C FEC with 128-bit AES core
  • Plug and play; master or node selected on the web interface ("BPL Operating Mode": "MASTER" / "NODE")

WARNING:

Connect an LKM655 or LKM755 to a network over one path only: over the power line or over an Ethernet cable. If it reaches the same network over both, the network has a loop; packets are lost and firmware uploads are cut.

2.4 LKM - Lite Model Differences

  • 1 x 10/100 Ethernet port
  • 1 x RS485 port; no RS232 for the meters and for the Modbus RTU output
  • 9-36V DC (max 40V) power input
  • No console connection for logs; the log goes to a UDP server ("Log Output": "UDP SERVER")
  • Up to 10 meters (IEC 62056-21 and DLMS/COSEM), data converted to Modbus TCP or Modbus RTU

2.5 LKM615 and LKM616 - Direct Connection to Meter Model Features

  • 1 x 10/100 Ethernet port
  • Plug and play design for EMH LZQJ-XC meters
  • Direct replacement for Variomod XC modules for EMH meters
  • ABS housing, IP51, 105 x 45 x 27 mm (h x w x d)
  • Gets power directly from the meter (isolated, isolation voltage up to 1500 VDC)
  • Serial interface directly connected to the meter (isolated, up to 5000 VRMS isolation rating, up to 10 kVPK surge capability, overload and short-circuit protection, thermal shutdown)
  • Reads 1 meter; Modbus TCP function only ("Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)"); the "Serial Settings" page is not shown
  • Only the "IEC 62056-21" and "Generic DLMS" OBIS profiles; DLMS/COSEM meters are read with the "Generic DLMS" profile
  • LKM616 supports LoRaWAN connectivity with the features listed in 2.2 "Extra Features for Models with LoRaWAN Meter Reader"

3. Installation

Each device has a Din-Rail kit on rear panel. The Din-Rail kit helps device to fix on the Din-Rail. Slant the switch and mount the metal spring to Din-Rail.

Then Push the switch toward the Din-Rail until you heard a “click” sound.

Direct Connection to Meter Models can directly fit into EMH LZQJ-XC meter. It is direct replacement for Variomod XC modules. Simply plug in LKM615 or LKM616 into meter.

 

4. Front Panel Description

4.1 LKM154 & LKM254

 

  1. Micro USB or USB Type-C Console port for LOG in 115200 baud
    Console Tx and Rx Blink when data transmission occurs
  2. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  3. ETHERNET Activity LEDs for port 1, 2 and LKM device itself. Blink during Ethernet activity
  4. 5 pin Terminal Block
    RS232: Tx, Rx and GND pins
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  5. 10/100Base-T(X) Ethernet ports

 

4.2 LKM655

 

  1. Micro USB or USB Type-C Console port for LOG in 115200 baud
    Console Tx and Rx Blink when data transmission occurs
  2. Device Status LEDs
    STATUS: Blinks based on device operation
    -When TCP line used blinks during no connection and keeps ON after TCP connection
    -When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  3. ETHERNET Activity LEDs for port 1, 2 and LKM device itself. Blink during Ethernet activity
  4. 5 pin Terminal Block for Serial Line
    RS232: Tx, Rx and GND pins
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  5. BPL Status LED
    ACTIVITY: Blinks during BPL Ethernet activity
    LINK: LED Turns ON if the link can be established over BPL
    MASTER INDICATION: LED Turns ON if the device is configured and powered as “BPL Master” device
  6. 10/100Base-T(X) Ethernet ports


4.3 LKM154 - Lite

  1. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  2. ETHERNET Activity LED for Ethernet Connection. Blinks during Ethernet activity
  3. 2 pin Terminal Block
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  4. 10/100Base-T(X) Ethernet port


4.4 LKM354 & LKM454

 

  1. Standard SMA female Antenna interface, 50 ohm
  2. Micro USB or USB Type-C Console port for LOG in 115200 baud
    Console Tx and Rx Blink when data transmission occurs
  3. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  4. ETHERNET Activity LEDs for port 1, 2 and LKM device itself. Blink during Ethernet activity
  5. 5 pin Terminal Block
    RS232: Tx, Rx and GND pins
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  6. 10/100Base-T(X) Ethernet ports


4.5 LKM755

  1. Standard SMA female Antenna interface, 50 ohm
  2. Micro USB or USB Type-C Console port for LOG in 115200 baud
    Console Tx and Rx Blink when data transmission occurs
  3. Device Status LEDs
    STATUS: Blinks based on device operation
    -When TCP line used blinks during no connection and keeps ON after TCP connection
    -When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  4. ETHERNET Activity LEDs for port 1, 2 and LKM device itself. Blink during Ethernet activity
  5. 5 pin Terminal Block for Serial Line
    RS232: Tx, Rx and GND pins
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  6. BPL Status LED
    ACTIVITY: Blinks during BPL Ethernet activity
    LINK: LED Turns ON if the link can be established over BPL
    MASTER INDICATION: LED Turns ON if the device is configured and powered as “BPL Master” device
  7. 10/100Base-T(X) Ethernet ports


4.6 LKM354 - Lite

  1. Standard SMA female Antenna interface, 50 ohm
  2. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  3. ETHERNET Activity LED for Ethernet Connection. Blinks during Ethernet activity
  4. 2 pin Terminal Block
    RS485: A, B and GND pins
    Can be activated over web interface and baud rate/data type configurable
  5. 10/100Base-T(X) Ethernet port

 

4.7 LKM615

  1. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  2. ETHERNET Activity LED for Ethernet Connection. Blinks during Ethernet activity

4.8 LKM616

  1. Standard SMA female Antenna interface, 50 ohm
  2. Device Status LEDs
    STATUS: Blinks based on device operation
    - When TCP line used blinks during no connection and keeps ON after TCP connection
    - When Serial line used keeps ON
    Device Tx and Rx Blink when data transmission occurs
    SERVER: Keeps ON after selecting Server from Server-Client Operating Modes. Keeps OFF if Client operating mode is selected
  3. ETHERNET Activity LED for Ethernet Connection. Blinks during Ethernet activity

5. Top/Bottom Panel Description

5.1 LKM154 & LKM354

  1. Power Input DC: 5-48V DC (max. 60V). Polarity protected so that the power input can be connected in any direction
  2. Power LED: Turns ON when there is power in device
  3. Reset Buttons
    RESET TO SERVER or RESET TO CLIENT: Resets the device to factory settings.
    Reset can be done at any time by pushing any of the buttons for more than 5 seconds.


5.2 LKM254 & LKM454

  1. Power Input AC: 100 - 240V AC (120 – 370V DC), 50Hz to 60Hz AC input
  2. Power LED: Turns ON when there is power in device
  3. Reset Buttons
    RESET TO SERVER or RESET TO CLIENT: Resets the device to factory settings.
    Reset can be done at any time by pushing any of the buttons for more than 5 seconds.

 

5.3 LKM655 & LKM755

  1. Power Input Options: 
    AC Power Input 110V–240V/50-60Hz
    9-36V DC Power Input

  2. Data Connectivity Options:
    Phase to Phase AC Power Line
    Phase to Neutral AC Power Line
    DC Power Line

  3. Reset Buttons
    RESET TO SERVER or RESET TO CLIENT: Resets the device to factory settings.
    Reset can be done at any time by pushing any of the buttons for more than 5 seconds.

 

NOTE :

Power Connection

Powering up device is only done over Terminal pins 1 and 2.

Can be purchased in 2 versions:

1. AC Powered version: Device can be powered up with AC input, this option is available in both PN and PP models. It accepts, 110V–240V/50-60Hz. (Power Input can also be used for data transmission in PN Models.)

2. DC Powered version: Device can be powered up with 9-36V DC power. Data transmission only done through terminal pins 3 and 4. This model can be used if DC power source will be used in the field and available with PP or DC model.

Data Connection

Can be purchased in 3 versions:

1. PP Model: Phase to phase model (Standard Model).

Data transmission is only done through terminal pins 3 and 4. AC Phase to phase connection should be done to data transmission pins for better performance. If phase to phase connection is not available then phase and neutral can still be connected for data transmission over terminal pins 3 and 4.

(Ex: L1-L2, L2-L3, L1-L3 or L1-2-3 to N can be used as data connection)

2. PN Model: Phase to neutral model. That version gets power from terminal pins 1 and 2 from phase and neutral and it can also transmit data from that pins (pins 1 and 2). Remaining (pins 3 and 4) pins usage is optional.

(Ex: Master can be connected to all phases and slaves can be connected to relevant phases)

(Ex: L1-N, L2-N, L3-N or L1-2-3 and N can be used as data connection)

3. DC Model: DC data line model. Uses DC Power Line for data transmission. (Ex: 24V+ and GND as data connection)


5.4 LKM154 - Lite & LKM354 - Lite


  1. Power Input DC: 9-36V DC (max. 40V). Polarity protected so that the power input can be connected in any direction
  2. Reset Button: Restores to Factory Default Settings.
    Reset can be done at any time by pushing the button for 5 seconds.

 

5.5 LKM615


  1. 10/100Base-T(X) Ethernet port
  2. Reset Button: Restores to Factory Default Settings.
    Reset can be done at any time by pushing the button for 5 seconds.

 

5.6 LKM616


  1. 10/100Base-T(X) Ethernet port
  2. Reset Button: Restores to Factory Default Settings.
    Reset can be done at any time by pushing the button for 5 seconds.
  3. Standard SMA Antenna interface, 50 ohm

 

6. Ethernet Cables

LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT have standard Ethernet ports. According to the link type, the switches use CAT 3, 4, 5, 5e UTP cables to connect to any other network device (PCs, servers, switches, routers, or hubs).

6.1 Cable Type and Specifications

Cable Type Max. Length Connector
10BASE-T Cat. 3, 4, 5 100-ohm UTP 100 m (328 ft) RJ-45
100BASE-TX Cat. 5 100-ohm UTP UTP 100 m (328 ft) RJ-45

6.2 ETH Cable Pin Assignments

With 100BASE-TX/10BASE-T cable, pins 1 and 2 are used for transmitting data and pins 3 and 6 are used for receiving data.

Pin Number Description
1 TD+
2 TD-
3 RD+
4 Not Used
5 Not Used
6 RD-
7 Not Used
8 Not Used

7. System Comparison Between CAT5 and BPL Links

  CAT5 Based System BPL Link Based System
Media CAT5 Power Line
Bandwidth 100Mbps Up to 30Mbps
Re-Wire Yes No, Using existing Power Line
Span <100m <600m
Multiple Nodes N/A Up to 10 hops/1000 nodes
Encryption Yes, but difficult to configure Yes, Plug & Play
Installation Difficult Easy, simply uses existing power line
Installation Cost High Low
Total Cost High Low

 

NOTE :

Power Connection

Powering up device is only done over Terminal pins 1 and 2.

Can be purchased in 2 versions:

1. AC Powered version: Device can be powered up with AC input, this option is available in both PN and PP models. It accepts, 110V–240V/50-60Hz. (Power Input can also be used for data transmission in PN Models.)

2. DC Powered version: Device can be powered up with 9-36V DC power. Data transmission only done through terminal pins 3 and 4. This model can be used if DC power source will be used in the field and available with PP or DC model.

Data Connection

Can be purchased in 3 versions:

1. PP Model: Phase to phase model (Standard Model).

Data transmission is only done through terminal pins 3 and 4. AC Phase to phase connection should be done to data transmission pins for better performance. If phase to phase connection is not available then phase and neutral can still be connected for data transmission over terminal pins 3 and 4.

(Ex: L1-L2, L2-L3, L1-L3 or L1-2-3 to N can be used as data connection)

2. PN Model: Phase to neutral model. That version gets power from terminal pins 1 and 2 from phase and neutral and it can also transmit data from that pins (pins 1 and 2). Remaining (pins 3 and 4) pins usage is optional.

(Ex: Master can be connected to all phases and slaves can be connected to relevant phases)

(Ex: L1-N, L2-N, L3-N or L1-2-3 and N can be used as data connection)

3. DC Model: DC data line model. Uses DC Power Line for data transmission. (Ex: 24V+ and GND as data connection)

 

8. Serial Cables

LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT have 1 x RS232 and 1 x RS485 port . The serial line can be connected to electricity meters directly or over a REDZ KMK114 RS485 Optical Probe. Both IEC 62056-21 (Mode C) and DLMS/COSEM meters are supported.

 

NOTE:  Lite Models have only 1 x RS485 serial port.

Direct Connected to Meter Models have no RS232 or RS485 port at all.

 

8.1 RS232 Cable Pin Assignments

1. Terminal connector for 3 wire Tx-Rx-GND RS232 data transmission

Pin Number Description
1 GND
2 Rx
3 Tx

8.2 RS485 Cable Pin Assignments

1. Terminal Connector for 2 wire RS485 connection and GND (if needed)

Pin Number Description
1 A
2 B
3 GND (Suggested to use)

 

9. Usage Scenarios and Connection Diagrams

LKM Series gateways can be used in many scenarios. The examples below are not the only ones; you can build your own.

A standard model reads up to 32 meters on its RS485 and RS232 ports and converts up to 48 OBIS codes of each meter to Modbus registers. The LoRaWAN Meter Reader models can also send the meter data to a LoRaWAN network server.

NOTE:

Lite models read up to 10 meters and use the RS485 port only. LKM615 and LKM616 read only the meter they are plugged into.

9.1 Scenario 1 - Meter on a direct cable, read over Modbus TCP

Select "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)". Connect the gateway to the RS485 or RS232 port of the meters. The gateway reads them with IEC 62056-21 (Mode C) or DLMS/COSEM. A local or remote data acquisition server reads the meter data over Modbus TCP.

Connection diagram 9.1: LKM154 in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)", meters on RS485 / RS232, data acquisition server and Modbus TCP client over WAN / LAN (drawn)

NOTE:

Several IEC 62056-21 meters on one RS485 line: from firmware 3.00.01 the gateway checks that the read-out came from the meter it asked. Enter the meter serial number as "IEC Address:" (6 digits or more). When the read-out carries another meter identity (in OBIS 0.0.0, C.1.0 or 96.1.0), the values are not stored for that meter row and "Meter Reading Status" shows:

ID MISMATCH R:<row> got <identity in the read-out> (addr <IEC Address of the row>) - values dropped

When the read-out was complete, the reading of that row then ends with "READING FINISHED S:<s> R:<row> ERROR: ID MISMATCH". The row number counts from 1. The identity is shown as the meter sends it and can contain letters. Only the digits are compared: letters and leading zeros are ignored, and a number that is part of the other one counts as a match (for example "MSY0300270516" and "300270516"). The check is made only for rows with the protocol "IEC62056-21 (Mode C)".

NOTE:

When an IEC 62056-21 meter does not finish its session (no answer to the acknowledgement), the gateway sends the IEC break message on the same line and waits until the line is quiet for 2 seconds before it asks the next meter. "Meter Reading Status" then shows:

IEC: previous session ended without ACK - break sent, line quiet 2 s, row: <row> (n=<count>, +<lines not shown>)

<row> is the row whose session was left open. This line is shown at most once a minute; "+<lines not shown>" counts the lines left out. If the line does not become quiet within 10 seconds, the text is "IEC: previous session ended without ACK - break sent, line NOT quiet in 10 s, row: <row> (n=<count>)". For rows with the protocol "IEC62056-21 (Mode C)" the gateway waits at least 5 seconds for an answer, even when "Time Out (s):" of the row is smaller. The stored value is not changed; "Meter Reading Status" shows once for that row:

IEC: TimeoutInterval <t> s below minimum - using 5 s, row: <row>

LKM154, "Meter Reading Status" page with the line "ID MISMATCH R:2 got 5061906 (addr 5061905) - values dropped", the following "READING FINISHED S:1 R:2 ERROR: ID MISMATCH" line and a "break sent" line

9.2 Scenario 2 - Meter on an optical probe, read over Modbus TCP

The gateway can be connected to the optical interface of a meter and read it with IEC 62056-21 (Mode C) or DLMS/COSEM. The baud rate is changed automatically during the IEC 62056-21 opening (for "IEC62056-21 (Mode C)" and "DLMS/COSEM with IEC62056-21 Opening"). A local or remote data acquisition server reads the meter data over Modbus TCP.

Connection diagram 9.2: LKM154 on the optical interface of a meter, data acquisition server over WAN / LAN (drawn)

9.3 Scenario 3 - Meter on the network, read over Modbus RTU

Select "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)". The gateway connects to TCP/IP meters ("TCP IP Address:" and "TCP Port:" of each meter row) and reads them with IEC 62056-21 (Mode C) or DLMS/COSEM. Local field devices read the meter data over Modbus RTU on the RS232 or RS485 port, set on the "Serial Settings" page.

NOTE:

In this function the "Security Settings" page (white list / black list) is not shown. Lite models give out Modbus RTU on RS485 only. LKM615 and LKM616 do not offer this function. The IEC break message and the 5 second minimum answer wait of 9.1 "Scenario 1 - Meter on a direct cable, read over Modbus TCP" do not apply to TCP/IP meters; the "Time Out (s):" value of the row is used as it is.

Connection diagram 9.3: LKM154 in the function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)", TCP/IP meters over LAN / WAN, local field devices on RS485 or RS232 (drawn)

9.4 Scenario 4 - Meter data to an MQTT server

The gateway reads the meters with IEC 62056-21 (Mode C) or DLMS/COSEM and sends the data to an MQTT broker for web based applications.

Connection diagram 9.4: LKM154 sends the meter data to an MQTT broker for web based applications (drawn)

NOTE:

The gateway can read the meters, give the data out over Modbus and send it to the MQTT broker at the same time. One gateway can serve a Modbus client and an MQTT broker together.

NOTE:

From firmware 3.00.01, when the network gateway answers but the MQTT broker cannot be reached, the gateway keeps reading the meters and keeps serving Modbus and the web interface. It does not restart the device because of the broker. When the unit is a DHCP client it first refreshes and then re-discovers its DHCP address (a re-discover can change the IP address or drop it for a moment). Then it restarts only its MQTT connection: the first time after roughly 15 to 20 minutes without delivery, then about every 5 minutes, until the broker answers again. When the network gateway itself cannot be reached, the network check of a unit in DHCP client mode can still restart the unit.

9.5 Scenario 5 - Meter data to a LoRaWAN network server

The LoRaWAN Meter Reader models read the meters with IEC 62056-21 (Mode C) or DLMS/COSEM and send the data to a LoRaWAN network server through a LoRaWAN gateway.

Connection diagram 9.5: LKM354 sends the meter data through a LoRaWAN gateway to a LoRaWAN network server (drawn)

NOTE:

Sending data to LoRaWAN applies only to the LoRaWAN Meter Reader models (LKM354, LKM454, LKM755, LKM354-Lite and LKM616). These models have the same Modbus and MQTT settings as the other models; LoRaWAN is added to them.

9.6 Scenario 6 - LKM615 directly connected to an EMH LZQJ-XC meter

LKM615 is designed for EMH LZQJ-XC meters and is a direct replacement for Variomod XC modules. LKM615 reads the EMH LZQJ-XC meter, converts the data to Modbus TCP and sends it to an MQTT broker.

Connection diagram 9.6: LKM615 plugged into an EMH LZQJ-XC meter, Modbus TCP client and MQTT broker over WAN / LAN (drawn)

9.7 Scenario 7 - LKM616 directly connected to an EMH LZQJ-XC meter

LKM616 is designed for EMH LZQJ-XC meters and is a direct replacement for Variomod XC modules. LKM616 reads the EMH LZQJ-XC meter, converts the data to Modbus TCP and sends it to a LoRaWAN network server and to an MQTT broker.

Connection diagram 9.7: LKM616 plugged into an EMH LZQJ-XC meter, LoRaWAN network server (through a LoRaWAN gateway) and MQTT broker (drawn)

10. Configuration via WEB Interface

All LKM Series gateways are configured with a web browser. This chapter describes the web interface of firmware 3.00.02, page by page, in the order of the menu on the left side of the screen.

Some pages and fields exist only on some models. The firmware of each model decides what is shown; the page does not offer settings that the model cannot use. The table below lists the differences. Model names are the names of the firmware images.

Model groupFirmware variantWhat is different in the web interface
LKM154, LKM254standardReference set. Up to 32 meter rows.
LKM655standard + BPLAs standard, plus "BPL Operating Mode" on the Network Settings page.
LKM154-LiteLiteUp to 10 meter rows. RS485 only (RS232 options are hidden). Log output to UDP server only.
LKM615EMH (Lite + EMH)1 meter row. Only the serial device function. No "Serial Settings" menu. OBIS tabs only "IEC 62056-21" and "Generic DLMS". Meter Type only "Standard DLMS". No "Show OBIS Values For" selector. RS485 only. Log output to UDP server only.
LKM354, LKM454LoRaWAN EU868As standard, plus "Device ID", the "LoRa Settings" and "LoRa Status" menus and LoRa counters on the Device Status page.
LKM755LoRaWAN EU868 + BPLAs LKM354 / LKM454, plus "BPL Operating Mode".
LKM354-LiteLoRaWAN EU868 + LiteLoRaWAN items as LKM354, Lite limits as LKM154-Lite.
LKM616LoRaWAN EU868 + EMHLoRaWAN items as LKM354, EMH limits as LKM615.

Two menu items also depend on the "Device Function" selected on the Operating Mode page:

  • "Serial Settings" is shown only when "Device Function" is "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)".
  • "Security Settings" is shown only when "Device Function" is "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)".

The menus follow the saved "Device Function" at once, also before the unit is restarted.

10.1 Connecting to the Web Interface

10.1.1 Finding the IP address

On delivery the unit is a DHCP client: it asks the DHCP server of the network for an IP address. Find the address the unit received with the abcZ Network Tool, as below.

Find the address with the abcZ Network Tool

The abcZ Network Tool lists the LKM units of a network with their address, MAC address, product and firmware version, so the unit can be found without knowing its address.

  1. Connect the PC to the same network as the unit. Start the abcZ Network Tool and open the "Discovery" tab.
  2. Type the network in "IP range", for example 192.168.10.0/24 for the addresses 192.168.10.1 to 192.168.10.254. Leave "User" and "Password" at the factory values (admin / admin) unless the password of the unit was changed.
  3. Click "Scan (HTTP)". Each unit that answers appears as a row, with its address in "IP" and its "MAC", "Product" and "Version".
  4. Find your unit by its MAC address and double-click the row: the web interface of the unit opens in the browser. The same MAC address is shown in the header of every page (10.1.3 "Screen layout").

abcZ Network Tool 1.1.0, Discovery tab after "Scan (HTTP)": the row of one LKM unit with IP, MAC, Product and Version 3.00.02

A unit with another password is listed with "auth required (password?)": type its password and scan again. "Discover (UDP)" is a faster alternative inside the same subnet. The tool is described in full in chapter 17 "Software - abcZ Network Tool".

NOTE:

If no DHCP server answers, the unit waits about 1 minute after start-up and then works with the address stored in its configuration. On a unit with factory settings this is IP address 192.168.1.1, net mask 255.255.255.0 and DNS 192.168.1.1. Without a DHCP lease the unit uses no gateway (0.0.0.0): it can be reached only from its own subnet (for example from a PC with the address 192.168.1.10 and net mask 255.255.255.0). The unit then serves on that address and does not restart when a lease arrives later; with the lease it takes the address and the gateway given by the DHCP server. If another device on the same network already uses 192.168.1.1 (many routers do), the two addresses conflict. Connect such a unit directly to a PC, or to a network without other 192.168.1.1 devices, set a free static address or enable DHCP on the network, and save.

NOTE:

To use a fixed address, enable "Use Static Address for Device" on the Network Settings page (10.3.3 "Device Network Settings").

10.1.2 Logging in

Type the IP address of the unit into the address bar of the browser (for example http://192.168.1.50). The browser asks for a user name and a password.

FieldValue
User nameadmin (fixed, cannot be changed)
Default passwordadmin

The password can be changed on the Management page (10.12.4 "Change Password"). It can have up to 15 characters.

Browser login dialog of an LKM154/254 - read-only

10.1.3 Screen layout

Every page has the same frame:

  • Top: the product name, then "Version:", "-built:" (firmware build date and time) and "MAC:".
  • Left: the menu. On a narrow screen the menu opens with the menu button at the top.
  • Centre: the selected page.

When the unit still runs with factory settings, a red band under the version line says "FACTORY DEFAULTS - device is not configured". On LoRaWAN models the band adds "(factory LoRaWAN identity: address collision risk)". When only the LoRaWAN keys are still at their factory values, an orange band says "FACTORY LoRaWAN IDENTITY - DevEUI/AppKey/DevAddr still factory: two recovered devices collide". The band disappears as soon as a setting is saved (and, on LoRaWAN models, the LoRaWAN identity is set).

Main screen of an LKM354-Lite, Operating Mode page; the orange "FACTORY LoRaWAN IDENTITY" band is shown under the version line

10.1.4 How saving works

Each settings page has a "Save Configuration" button. The button is grey until a value on the page is changed. After saving, a window shows the result:

  • A confirmation in blue (for example "Network Settings Changed.") means the unit stored the settings.
  • A confirmation in amber (yellow) with the line "Warning: <k> of <n> value(s) were rejected by the device and kept their previous value; the other values were saved." means that the unit did not take some of the values (for example a number outside its range). These values keep their previous setting; all other values were stored. Press "OK": the page is loaded again from the unit and shows the values it really uses. Correct the values and save again.
  • When the window shows "REBOOT REQUIRED" (next point), "OK" does not reload the page.
  • If the setting is used only at start-up, the window adds: "REBOOT REQUIRED: this setting is applied only at boot - the device keeps running with the previous value until you reboot it." Restart the unit with "Reboot Device" on the Management page (10.12.6 "Restore / Reboot") when all changes are done.
  • If the unit restarts by itself, the window adds: "The device is restarting now - please wait."
  • A red text means that nothing was saved. The reason given by the unit follows in brackets, for example "(Rejected: reboot in progress - settings NOT saved. Retry after device restarts.)".
Page / actionEffect of saving
Operating Mode: "Device Name"Applied at once (MQTT, LoRaWAN status message, configuration file name). The network host name of the unit changes after the next restart; when the new name changes the host name (its first 15 characters, upper and lower case not counted), the window shows "REBOOT REQUIRED".
Operating Mode: "Device Function"Used after the next restart; the window shows "REBOOT REQUIRED" (10.2.5 "Saving the Operating Mode page").
Operating Mode: meter rows (Scheduler Settings)Applied at once, no restart
Network SettingsStored; "REBOOT REQUIRED"
Serial Settings"RS232" / "RS485" choice applied at once; "Baud rate" and "Line Control" after the next restart (10.4 "MENU: Serial Settings")
Gateway Settings (Modbus address, OBIS codes)Applied at once, no restart
LoRa SettingsStored; "REBOOT REQUIRED"
Security SettingsApplied at once to connections opened after the save, no restart
Management: "Set Device Time"Applied at once, no restart
Management: "Change Password"Applied at once, no restart
Management: "Change Log Level and Reboot"The unit restarts by itself (only when a log setting changed)
Management: "Upload Configuration File", "Restore Factory Configuration", "Reboot Device", "Reboot Alternative Firmware"The unit restarts by itself

NOTE:

Only one request runs at a time. If you press a button while another request is still running, the window "The Device is not ready, please retry later." appears. A request that gets no answer within 15 seconds ends with "Request timed out." (settings) or "Status request timed out." (status pages).

NOTE:

The page checks most values when you leave a field: a value outside the range given in this chapter is refused with a message, and the field is set back. Enter whole numbers only. A number with a decimal point (for example "502.5") is refused in the same way.

10.2 MENU: Operating Mode

This page selects what the gateway does and lists the meters it reads.

LKM154/254, Operating Mode page, Device Function = serial, one meter row enabled

10.2.1 Device fields

FieldDescription
"Device ID"LoRaWAN models only. Unique ID of the unit, read-only (hexadecimal, for example 0x1A2B3C). The same ID starts every LoRaWAN message.
"Device Name"Name of the unit. It is sent in every MQTT message ("LKMNme") and in the LoRaWAN status message, and it is part of the file name of a configuration download. 1 to 19 characters. Factory value: "LKM_SERVER" (LoRaWAN models: "LKM_LW_SERVER").

10.2.2 Device Function

"Device Function" (in the "Energy Meter Connection Settings" card) has two options:

OptionMeters are read fromData is offered on
"Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)"RS232 and / or RS485Modbus TCP (and MQTT, LoRaWAN on LoRaWAN models)
"TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)"TCP/IP network (meter IP address and port)Modbus RTU on RS232 or RS485 (and MQTT)

Both options read IEC 62056-21 (Mode C) and DLMS/COSEM meters. The factory setting is the serial option. EMH models (LKM615, LKM616) offer only the serial option.

10.2.3 Scheduler Settings (meter list)

The "Scheduler Settings" list has one row per meter. The number of rows depends on the model: 32 (standard, BPL and LoRaWAN models), 10 (Lite models), 1 (EMH models). The rows are loaded after the page; "Loading Scheduler Settings..." is shown meanwhile. If the list cannot be loaded, a line in red bold type on a dark background says "Meter settings could not be loaded - retrying automatically; values below are placeholders, DO NOT SAVE". Wait until the line disappears, or reload the page.

LKM154/254, Scheduler Settings list, row 1 enabled (IEC62056-21) with its summary line under it, the other rows empty

ColumnDescription
(number)Row number. The row number is also the meter number in Modbus, MQTT ("MtrNmr") and LoRaWAN.
"Location Name or Serial Number"Free text to identify the meter, 1 to 31 characters. Shown on the status pages and sent in MQTT as "MtrAdr".
"Meter Protocol""IEC62056-21 (Mode C)", "DLMS/COSEM" or "DLMS/COSEM with IEC62056-21 Opening".
"Protocol Settings"Opens the "Meter Protocol Settings" window of the row (10.2.4 "Meter Protocol Settings window").
"Enable"The row is read only when this box is checked. At least one row must stay enabled ("At least one of the line must be enabled!").

Under every enabled row a summary line shows the protocol settings of the row, for example Interface: RS485, Baud: 300, Line: 7E1, IEC Addr: 12345678, Table: 0, Send Init: 0, Init String: ABCDEFGH, Query(s): 10, Timeout(s): 10. Enabled rows are highlighted.

On a unit with factory settings, row 1 is enabled with the name "Test", protocol IEC 62056-21, RS485, start baud rate 300; all other rows are disabled.

10.2.4 Meter Protocol Settings window

The window title is "Meter Protocol Settings" with "Settings For Row: n" under it. The fields depend on "Meter Protocol" and on "Device Function":

  • "IEC62056-21 (Mode C)": connection fields and IEC fields.
  • "DLMS/COSEM": connection fields and DLMS fields.
  • "DLMS/COSEM with IEC62056-21 Opening": connection, IEC and DLMS fields.

"Save Settings" closes the window and keeps the values on the page; the values reach the unit only with "Save Configuration". "Cancel" (or a click outside the window) discards them. Exception: a changed "IEC Meter Line Control:" is sent to the unit at once when "Save Settings" is pressed (see below).

LKM154/254, Meter Protocol Settings window of an IEC row (connection + IEC columns) - read-only

LKM154/254, Meter Protocol Settings window of a "DLMS/COSEM with IEC62056-21 Opening" row (three columns) - read-only

LKM154/254 with Device Function = TCP/IP, Meter Protocol Settings window showing "TCP IP Address" and "TCP Port" - WRITE (Device Function change + restart) or a second unit already in that mode

Connection fields

FieldShown whenValuesDescription
"Serial Interface:"serial device function"RS232", "RS485"Port the meter is connected to. Lite and EMH models: RS485 only.
"Start Baud Rate:"serial device function300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200Baud rate of the first IEC request. The unit changes to the baud rate offered by the meter. IEC 62056-21 Mode C meters normally start at 300.
"TCP IP Address:"TCP/IP device functionIPv4 addressAddress of the meter (or of its TCP/IP modem).
"TCP Port:"TCP/IP device function1 to 65535TCP port of the meter. Default 502.
"Query Interval (s):"always1 to 65535 sShortest time between two readings of this meter. The unit reads the enabled meters one after the other, so the real interval can be longer when many meters or long read-out lists are configured. Default 10.
"Time Out (s):"always1 to 30 sTime the unit waits for an answer from the meter. Default 10.

NOTE:

For "IEC62056-21 (Mode C)" rows on RS232 / RS485 the unit always waits at least 5 seconds for the answer, even when "Time Out (s):" is set lower. At 300 baud the identification of the meter alone takes about 1.5 seconds. When a lower value is set, the Meter Reading Status page shows once per row: IEC: TimeoutInterval 2 s below minimum - using 5 s, row: 1. The stored value is not changed. "DLMS/COSEM" and "DLMS/COSEM with IEC62056-21 Opening" rows use the value as set.

IEC 62056-21 fields

FieldValuesDescription
"IEC Address:"up to 15 characters: letters, digits, "." and "/"; may be emptyDevice address of the meter used in the request message (/?address!). With more than one meter on the same RS485 line, every row must have the address of its meter. Leave empty only for a single meter on the line.
"Reading Table Code:"0 to 9Table requested from the meter in the option select message. 0 is the normal read-out list. Other values request other tables (for example a service table), if the meter supports them.
"Send Init String:"0 to 4Number of times the init string is sent before the request, to wake up the meter. 0 = do not send.
"IEC Meter Line Control:""7_EVEN_1", "8_NONE_1", "8_EVEN_1"Character format of the IEC line. Used only for meters on RS232 / RS485 (serial device function). This is one shared setting for all IEC rows of the unit. It is saved at once when "Save Settings" is pressed (window "IEC line control applied (shared - all IEC meters)."), without "Save Configuration" and without restart. Factory value: 7_EVEN_1, the format of IEC 62056-21 meters. DLMS communication always uses 8 data bits, no parity.
"Init String (ASCII):"up to 15 characters: letters, digits, "." and "/"; may be emptyText sent as init string. Default "ABCDEFGH".

DLMS/COSEM fields

FieldValuesDescription
"Meter Type:""Standard DLMS", "Itron", "Landis+Gyr", "Iskra", "Cewe"DLMS profile of the meter. Selecting a type fills the other DLMS fields with the usual values of that make (table below); they can be changed afterwards. The type also selects the OBIS tab used for this meter (10.6.2 "OBIS Code Settings"). EMH models: "Standard DLMS" only.
"DLMS Address:"number, up to 5 digitsServer (meter) address.
"Address Size:""1 Byte", "2 Bytes", "4 Bytes"Length of the server address.
"Client Type:""Management", "DataCollection", "Electricity", "End Customer", "Public", "ManufacturerSpecific_32"Client address (association) used to log in.
"OBIS Reference:""Short Names", "Long Names"Short name or logical name referencing.
"Authentication:""Low Security", "No Security"Authentication level.
"Password:"up to 8 charactersPassword for "Low Security".
"Meter Type:"DLMS AddressAddress SizeClient TypeOBIS ReferenceAuthenticationPassword
Standard DLMS163834 BytesEnd CustomerLong NamesLow Security12345678
Itron174 BytesEnd CustomerLong NamesLow SecurityABCDEFGH
Landis+Gyr10004 BytesPublicShort NamesNo Security12345678
Iskra163834 BytesDataCollectionLong NamesLow Security12345678
Cewe11 ByteManufacturerSpecific_32Long NamesLow SecurityABCD0001

NOTE:

The DLMS password is shown in clear text in the window and in the summary line of the row. Do not leave the page open on a shared screen.

10.2.5 Saving the Operating Mode page

Press "Save Configuration". The window "Saving Operating Mode..." stays open while the page sends the device fields and then the meter rows (two rows per request). The rows are written to the memory of the unit only with the last request, so an interrupted save leaves the stored list unchanged. At the end the window shows "Operating Mode Changed." or "Operating Mode Change Failed!" with the reason.

  • Changes of the meter rows and of "Device Name" are used at once. No restart is needed, except for the network host name (10.1.4 "How saving works").
  • A change of "Device Function" is used only after a restart. Until then the unit keeps working in the previous mode. The window then shows "REBOOT REQUIRED: this setting is applied only at boot - the device keeps running with the previous value until you reboot it." Restart the unit with "Reboot Device" (10.12.6 "Restore / Reboot").
  • "REBOOT REQUIRED" is shown as long as the saved "Device Function" or host name differs from the one the unit runs with, also when you save the page again without a restart. When you set the value back to the running one, the note is not shown.
  • If the unit did not take some values of the device fields or the meter rows, the window is shown in amber with the "Warning: ..." line (10.1.4 "How saving works").

LKM154/254, "Operating Mode Changed." confirmation window after a meter row change (no note) - WRITE (meter row change)

LKM154/254, "Operating Mode Changed. REBOOT REQUIRED: ..." window after a "Device Name" change - WRITE (Device Name change, set back at once)

10.3 MENU: Network Settings

This page holds the time server, the MQTT publisher and the network settings of the unit.

LKM154/254, Network Settings page with the default values: NTP server "pool.ntp.org", MQTT disabled, DHCP client mode

10.3.1 NTP Settings

FieldValuesDescription
"NTP Server IP or URL"IP address or host name, up to 63 charactersTime server used to set the clock of the unit. Default "pool.ntp.org".

How the clock is set:

  • Models without LoRaWAN: after start-up the unit asks the NTP server every 10 seconds until it gets the time, then it keeps the time itself. The time is used for the "Time" field of MQTT messages.
  • LoRaWAN models: the clock is kept by the LoRaWAN radio module. From 10 minutes after start-up the unit compares it with the NTP time every hour and corrects it when the difference is 5 seconds or more (no restart). The clock can also be set from the Management page (10.12.1 "Set Device Time").

10.3.2 MQTT Settings

"Enable MQTT Publisher for Enabled Obis Codes": when checked, the unit publishes the values of the enabled OBIS codes of every meter to an MQTT broker, and the following fields are shown. A worked example is given in chapter 13 "MQTT Communication Example" "MQTT Communication Example".

Network Settings page with MQTT enabled: all MQTT fields visible, example broker values, the password shown as dots with the eye button at the right end of the field (masked in the picture)

FieldValuesDescription
"MQTT Broker IP or URL"IP address or host name, up to 64 charactersAddress of the MQTT broker.
"MQTT Broker Port"1 to 65535, not a TLS portTCP port of the broker, normally 1883. For a value outside 1 to 65535 the page shows "MQTT Broker Port should be a number between 1 and 65535". The unit does not support MQTT over TLS: ports 443, 465, 563, 587, 636, 989, 990, 992, 993 and 8883 are refused with "Port n is a TLS port. The device does not support MQTT over TLS - use a plain MQTT port (for example 1883)." In both cases the field returns to its last saved value.
"Client ID"1 to 31 charactersMQTT client ID. Default "MQTT_LKM_Client".
"User Name"1 to 63 charactersUser name given by the broker. The field cannot be left empty.
"Password"up to 48 charactersPassword given by the broker. The field shows the stored password as dots. Click the eye button at the right end of the field (tooltip "Show password") to show the password in clear text, and click it again (tooltip "Hide password") to hide it. Type a new password to replace the stored one. A field left empty returns to the stored password when you leave it, so a stored password cannot be deleted from this page.
"Publish Topic"1 to 31 charactersTopic of the published messages. Default "MQTT_LKM_Publish_topic".
"Subscribe Topic"1 to 31 charactersTopic the unit subscribes to. Default "MQTT_LKM_Subscribe_topic".
"Minimum Send Interval for a Parsed Data (in seconds)"0 to 65535 sShortest time between two messages of the same meter. Messages are sent only after a new reading, so the real interval can be longer. Default 60.
"Data Format""OBIS VALUES AS OBJECTS", "OBIS VALUES AS MODBUS FRAME"Layout of the "Data" part of the message (below).

NOTE:

The warning windows of "Client ID", the topics and "User Name" mention "less than 33" or "less than 65" characters. The real limits are 31 and 63 characters.

NOTE:

The page holds the stored MQTT password: the eye button shows it, and it is also in the source of the page. Like the configuration file (16.7.1 "Download the configuration"), it can be read by anyone who can log in to the web interface. Protect the web password (10.12.4 "Change Password") and do not leave the page open on a shared screen.

Every message is a JSON object with these fields:

FieldContent
"LKMNme""Device Name" of the unit
"Time"UTC time as Unix seconds. Only present when the unit has the time from NTP.
"MtrAdr""Location Name or Serial Number" of the meter row ("-" when empty)
"MtrNmr"Row number of the meter
"Data"The values (see the two formats below)

"OBIS VALUES AS OBJECTS": "Data" holds one pair per enabled OBIS code of the profile of the meter: the OBIS code and the value as text. The value "-" means that no value has been received for this code since the unit started. Otherwise the last value received is sent, also when a later reading did not deliver this code. Example:

{"LKMNme":"LKM_SERVER","Time":"1781868557","MtrAdr":"EMH IEC","MtrNmr":"1","Data":{"F.F":"-","0.9.1":"165043","1.8.0":"302367"}}

"OBIS VALUES AS MODBUS FRAME": "Data" holds one field "ModFr" with the values in hexadecimal, as in a Modbus response: the first byte is the number of data bytes, then 4 bytes (2 registers) per OBIS position, 48 positions, 192 data bytes (C0 hexadecimal). The word order follows "Modbus Word (Register) Swap" (10.6.1 "Modbus settings"); the register layout is described in chapter 11 "Modbus Register Map and Data Types" "Modbus Register Map and Data Types". Example (start of the frame): "ModFr":"C0000000000002857C..." - C0 = 192 bytes, 00000000 = position 1 (F.F, not read), 0002857C = position 2 (0.9.1 = 165244).

NOTE:

When the broker cannot be reached, the unit keeps reading meters and serving Modbus and the web pages. It restarts only its MQTT connection and tries again; the unit itself does not restart because of MQTT.

10.3.3 Device Network Settings

FieldShown whenValuesDescription
"BPL Operating Mode"BPL models (LKM655, LKM755)"NODE", "MASTER"Role of the unit in the BPL (broadband power line) network. Only one unit in a BPL network may be MASTER.
"Server Listening Port"serial device function1 to 65535TCP port for Modbus TCP clients. Default 502. For another value the page shows "The Server Port should be a number between 1 and 65535" and the field returns to its last saved value.
"Maximum Number of Clients"serial device function1 to 10Number of Modbus TCP clients that can be connected at the same time. Default 2.
"DHCP Server Enabled"alwayson / offThe unit gives IP addresses to devices connected to it. The unit itself then uses the static address below.
"Use Static Address for Device"alwayson / offThe unit uses the static address below instead of asking a DHCP server.
"Server IP Address", "Server Net Mask", "Server Gateway Address"static address or DHCP server enabledfour numbers 0 to 255 eachStatic address of the unit. The gateway must be correct for access from other networks.
"DHCP Server Range Start Address", "DHCP Server Primary DNS Address", "DHCP Server Secondary DNS Address"DHCP server enabledfour numbers 0 to 255 eachFirst address given to clients and the DNS servers announced to them. Defaults 192.168.1.100, 192.168.1.1, 192.168.1.1.

LKM154/254, Device Network Settings with "Use Static Address for Device" checked - read-only on a unit with a static address, otherwise WRITE

LKM154/254, Device Network Settings with "DHCP Server Enabled" checked, range and DNS fields visible - page state only, do not save (WRITE if saved)

LKM655 v3.00.02, Network Settings page: Device Network Settings with "BPL Operating Mode" (NODE)

NOTE:

When all client places are in use, a further Modbus TCP client is refused at once (it does not hang until its own timeout). If a client closes its connection, the waiting client takes the free place.

Press "Save Configuration". The window shows "Network Settings Changed." with "REBOOT REQUIRED". The network settings, including "Server Listening Port" and "Maximum Number of Clients", are used after the next restart; until then the unit keeps the previous values.

LKM154/254, "Network Settings Changed." window with the REBOOT REQUIRED note - WRITE

10.4 MENU: Serial Settings

This menu is shown only when "Device Function" is "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)". It sets the serial port on which the unit answers Modbus RTU requests. EMH models do not have this menu.

LKM154/254 in TCP/IP mode, "Modbus Serial Settings" page - WRITE (Device Function change + restart) or unit already in that mode

FieldValuesDescription
"RS232" / "RS485"one of the twoPort used for Modbus RTU. Checking one unchecks the other. Lite models: the two boxes are not shown; the port is always RS485.
"Baud rate"300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800Baud rate of the Modbus RTU line. Default 115200.
"Line Control""8_NONE_1", "9_NONE_1", "8_EVEN_1", "8_EVEN_2", "8_ODD_1", "8_ODD_2", "8_NONE_2", "9_NONE_2"Data bits, parity and stop bits.

"Baud rate" and "Line Control" are hidden while the unit does not use its serial port.

The character format of IEC meters is set in the Meter Protocol Settings window ("IEC Meter Line Control:", 10.2.4 "Meter Protocol Settings window"), not here.

Press "Save Configuration". The window shows "Serial Settings Changed.". The "RS232" / "RS485" choice is applied at once. A new "Baud rate" or "Line Control" is used only after the next restart: restart the unit with "Reboot Device" (10.12.6 "Restore / Reboot"), even if the window does not show "REBOOT REQUIRED". Save a new "Device Function" before you change the Serial Settings: while the change of "Device Function" is not saved, "Line Control" is not stored.

10.5 MENU: Device Status

This page shows the state of the unit, its counters and the state of every meter and Modbus connection. The data is read when the page opens and when "Refresh Status" is pressed. "Last update: hh:mm:ss" under the title is the time of the last read (clock of the PC).

LKM154/254 with the v3.00.02 image, Device Status page, serial mode: overview cards "Meters" (red dot, "No successful read since start-up"), "Modbus TCP" (grey, "No client connected"), "MQTT" (grey, "Off"); one meter row enabled and being read ("->NOW READING")

At the top of the page, under "Last update", up to four cards give a short overview: "Meters", "Modbus TCP" (or "Modbus RTU" in the TCP/IP device function), "MQTT" and, on LoRaWAN models, "LoRaWAN". The cards are updated with every read of the page. Each card has a coloured dot before its title: green = normal, amber = needs a look, red = problem, grey = not in use or no data yet. The texts of the cards are always in the normal colours; a line that needs attention is marked with an amber bar on its left side. Read the texts; the colour is only an aid. On a narrow screen the cards are shown two per row.

Ages are shown as seconds ("s"), minutes ("min"), hours ("h", below 48 hours) or days ("d"). A meter row is named "R<row>" (its row number in the meter list of the "Operating Mode" page, which can differ from the line number of "Meter Communication Status") followed by its "Location Name or Serial Number".

CardLinesDot
"Meters""Last read <age> ago (R<row>)": age of the last successful reading and its row; "No successful read since start-up"; "No meter enabled". Under it the number of successful and failed readings since start-up ("<n> reads OK", "<m> failed"). Extra lines: "App state: <App Status>" when the unit is not in normal operation; "Last failed: R<row> <name>, <age> ago"; "HOST UNREACHABLE: <rows>" (up to three rows, then "+<k> more").Green: the last successful reading is not older than 2 x "Query Interval (s):" + "Time Out (s):" of its row. Amber: not older than 6 x "Query Interval (s):", or no successful reading yet. Red: older, or the unit is not in normal operation ("App Status" does not start with "SERVING_CONNECTIONS"), or a row is "HOST UNREACHABLE", or the last failed reading is newer than the last successful one. Grey: no meter row is enabled ("No meter enabled").
"Modbus TCP" (serial device function)"Last query <age> ago", "Not queried yet" or "No client connected". Under it the Modbus counters ("<n> received", "<m> sent"). Extra lines: "last: <IP address>:<port>" of the client asked last, with the number of registers of its last answer (or "exception <code>"); "clients: <IP address>:<port>, ..." (up to three, then "+<k> more") or "clients: none".Green: last query 1 minute ago or less. Amber: 10 minutes or less. Red: older. Grey: no query yet.
"Modbus RTU" (TCP/IP device function)As above, without the client lines. Extra line: port, baud rate and the number of registers of the last answer, for example "RS485 115200 baud" followed by "2 registers".As "Modbus TCP".
"MQTT""Connected", "Not connected" or "Off" ("Publisher disabled"). Under it "<n> messages published". Extra lines: broker address and port with the client ID; when not connected, the state of the MQTT client (for example "state: NET_CONNECT").Green: connected. Amber: enabled but not connected. Grey: MQTT disabled.
"LoRaWAN" (LoRaWAN models)The "Network Status" of the LoRa Status page, or "Network state not read yet". Under it the numbers of messages sent, lost and pending. Extra lines: "Last duty-cycle wait <n> s" (when not 0) and "Last uplink <time>" (the "Device Time" of the last message sent, as on the LoRa Status page).Green: "ACTIVE ...". Amber: "JOINING ...". Red: "DEVICE INACTIVE". Grey: not read yet or another state.

NOTE:

The reading totals and ages of the "Meters" card count from the last start-up; "Reset Logs" does not reset them. The "Modbus" card takes its age from "Last Query Time", which counts within 24 hours: a last query that is older than 24 hours is shown with a shorter age.

LKM615 (EMH model), Device Status overview cards: "Meters" green ("Last read ... ago (R1)", reads OK, 0 failed), "Modbus TCP" grey, "MQTT" amber ("Not connected", broker line, "state: ..." line)

10.5.1 Device state

FieldDescription
"IP Address"Current IP address of the unit.
"App Status"State of the application. "SERVING_CONNECTIONS" is normal operation. During start-up other states are shown (for example "WAIT_FOR_NET_READY"); before a restart "CLOSING_CONNECTIONS". A text in brackets after the state reports a protection that is active, for example "(NET PARKED - web reboot to retry)", "(SERIAL NOISE PARKED - check line/baud)" or, on LoRaWAN models, "(LORA DEAD - running without LoRa; power-cycle to retry)".
"Configuration""Configured" (normal type), "FACTORY DEFAULTS - not configured" (red bold type on a dark background) or "Factory LoRaWAN identity - not individualized" (amber bold type on a dark background); see 10.1.3 "Screen layout". Read the value text; the colour is only an aid.

10.5.2 Communication Counters

CounterShown whenDescription
"Log Status"Log Level is not NONEState of the log output. "LOG_STATE_TRYWRITELOG" is normal.
"Log Counter"Log Level is not NONENumber of log lines sent.
"MQTT Sent Messages"MQTT enabledNumber of MQTT messages published.
"MQTT Status"MQTT enabledState of the MQTT client. "APP_MQTT_STATE_SUBSCRIBED" and the publish / wait states that follow it mean that the client is connected.
"N. of TCP Output Full Errors"alwaysTimes the unit could not send to a TCP partner because its send buffer was full. After more than 5 such errors on one meter connection the unit closes that connection and opens it again.
"N. of TCP Disconnections"alwaysNumber of closed TCP connections.
"N. of Serial UART Errors"alwaysErrors on the RS232 / RS485 port.
"N. of Modbus Incorrect Characters"alwaysReceived characters that did not belong to a valid Modbus request. In the TCP/IP device function, frames for other slave addresses on a shared RS485 line are not counted. The value is not the restart limit and can grow above 500 (11.3 "Modbus RTU slave").
"N. of Serial UART Input Overflow Errors"alwaysTimes the receive buffer of the serial port was full.
"N. of TCP Input Back-Pressure Events"alwaysTimes the unit had to slow down data received over TCP.
"N. of Modbus Messages Received Correctly"alwaysValid Modbus requests received.
"N. of Modbus Messages Sent Correctly"alwaysModbus responses sent.
"N. of Meter Messages Received Correctly"alwaysData packets received from meters.
"N. of Meter Messages Sent Correctly"alwaysRequests sent to meters.

LoRaWAN models show these additional counters:

CounterDescription
"N. of Module UART Errors"Errors on the internal line to the LoRa radio module.
"N. of Module UART Input Overflow Errors"Times the receive buffer of that line was full.
"N. of CRC Errors on LoRa Input Messages"Messages from the radio module with a wrong checksum.
"N. of Incorrect LoRa Characters Received"Characters from the radio module that did not belong to a valid message.
"N. of LoRaWAN Messages Lost"Messages that were dropped: a message sent with "Data Transmission with ACK" that got no ACK (14.5 "Messages sent to the network server"), a message the radio module refused, a package too small for one value (14.6 "Messages longer than the maximum payload"), a status or OBIS details message whose start step was skipped (14.5 "Messages sent to the network server"), or a message that did not fit into the send queue. If this number grows, increase the query intervals or the minimum send interval.
"N. of LoRa Messages Sent Correctly"Messages sent to the LoRaWAN network.
"N. of LoRa Messages Received Correctly"Messages received from the LoRaWAN network.
"Last LoRaWAN Message Duty Cycle Block Time (s)"Time the unit had to wait after the last message because of the duty cycle limit.
"N. of LoRaWAN Messages Pending"Messages waiting in the queue: at most one per meter row, plus the status message and the OBIS details message.

NOTE:

The LoRaWAN queue holds one message per meter row. A meter data message is built when it is sent, from the values the row has at that moment (the same values as in the Modbus registers). While it waits, new readings of that row change these values; they do not add a second message (14.5 "Messages sent to the network server").

LKM354/454 with the v3.00.02 image, Device Status page after joining: four overview cards incl. "LoRaWAN" (green, "ACTIVE (OTAA)", one message sent, none lost or pending), the LoRa counters; "Configuration" shows "Configured"

10.5.3 Meter Communication Status

Only enabled meter rows are listed. In the TCP/IP device function an enabled row can be missing from the list for a while when the unit is opening the connection to its meter.

ColumnDescription
"Name / Serial""Location Name or Serial Number" of the row.
"Protocol""IEC", "DLMS" or "DLMS+IEC".
"Last Query Time"Time of the last reading attempt, counted from the start of the unit (hh:mm:ss), or "N.A." before the first attempt.
"Last Serial Package"Last identification or login answer received from this meter.
"Status"State of the row (table below).
"Status" textDevice functionMeaning
"->NOW READING"bothThe meter is being read now.
"WAIT FOR READING"serialThe meter waits for its turn.
"WAITING"bothThe row waits for its next query interval.
"CONNECTED & WAIT FOR READING"TCP/IPTCP connection to the meter is open; the meter waits for its turn.
"WAIT FOR CONNECTION"TCP/IPThe unit is connecting to the meter.
"OPENING CONNECTION"TCP/IPThe unit is checking the meter address (ping) before it opens the connection.
"HOST UNREACHABLE"TCP/IPThe meter address does not answer. Check "TCP IP Address:" and the network.

10.5.4 Modbus Communication Status

In the serial device function the number of rows equals "Maximum Number of Clients" (10.3.3 "Device Network Settings") as saved. After a change of this value, the table has the new number of rows when the page is loaded again, but the unit uses the new number only after the restart. In the TCP/IP device function the table has one row: the Modbus RTU line.

Column (serial device function)Column (TCP/IP device function)Description
"Ip Address""Serial Port"Address of the connected Modbus TCP client / port of the Modbus RTU line ("RS485" or "RS232").
"Port Number""Baud Rate"TCP port of the client / baud rate of the line.
"Last Query Time""Last Query Time"Serial device function: time of the last Modbus request. TCP/IP device function: time the last Modbus RTU answer was sent; 00:00:00 before the first answer. Both counted from the start of the unit (hh:mm:ss).
"Last Modbus Received Package""Last Modbus Received Package"Last request received, in hexadecimal.
"Last Modbus Sent Package""Last Modbus Sent Package"Last response sent, in hexadecimal.

LKM154/254 in the TCP/IP device function, Device Status: "Modbus RTU" card and one row in Modbus Communication Status - unit already in that mode or WRITE (Device Function change + restart)

10.5.5 Buttons

  • "Refresh Status" reads the data again without reloading the page. The button is grey while the request runs.
  • "Reset Logs" sets the counters of this page to zero ("Logs have been reset."), except "N. of Modbus Incorrect Characters" and "N. of Incorrect LoRa Characters Received" (they are cleared by a restart), the last duty cycle time and the totals of the overview cards.

10.6 MENU: Gateway Settings

This page sets the Modbus address of the gateway and the OBIS codes that are read from the meters.

LKM154/254, Gateway Settings page: Modbus address 1, no word swap, the six profile tabs, "IEC 62056-21" tab with the factory code list, counter "24 / 48 enabled"

10.6.1 Modbus settings

FieldValuesDescription
"Gateway Modbus Address"1 to 247Modbus unit address of the gateway. Default 1. For another value the page shows "Modbus Address should be a number between 1 and 247" and the field returns to its previous value.
"Modbus Word (Register) Swap"on / offOrder of the two 16-bit registers of every 32-bit value. Off: high word first. On: low word first (value "1234 ABCD" is sent as "ABCD 1234"). The setting also applies to the MQTT Modbus frame and the LoRaWAN data message.

10.6.2 OBIS Code Settings

The OBIS codes are kept in six profiles, one per tab: "IEC 62056-21", "Landis+Gyr DLMS", "Actaris/Itron", "Iskra DLMS", "Cewe DLMS" and "Generic DLMS". Each profile holds up to 48 codes. A meter row uses the profile of its protocol and meter type:

Meter rowProfile (tab)
"IEC62056-21 (Mode C)""IEC 62056-21"
DLMS, "Meter Type:" "Landis+Gyr""Landis+Gyr DLMS"
DLMS, "Itron""Actaris/Itron"
DLMS, "Iskra""Iskra DLMS"
DLMS, "Cewe""Cewe DLMS"
DLMS, "Standard DLMS""Generic DLMS"

EMH models show only the "IEC 62056-21" and "Generic DLMS" tabs; their DLMS meters always use "Generic DLMS".

The position of a code in the profile is its position in the Modbus registers (chapter 11 "Modbus Register Map and Data Types" "Modbus Register Map and Data Types"), in the MQTT Modbus frame and in the LoRaWAN data message.

"IEC 62056-21" tab: 48 numbered boxes. Type the OBIS code as it appears in the read-out list of the meter (for example 1.8.0, F.F, C.1.0), up to 12 characters (digits, letters, ".", "*" and "("), and check the box after it to read the code. At least one code must stay enabled. The factory list starts with F.F, 0.9.1, 0.9.2, 1.8.0, 1.8.1 ... (24 codes enabled).

LKM154/254, Gateway Settings, "Generic DLMS" tab: the first groups of the code list ("Date & Time", "Device Info", "Total Energy", "Tariff Rates") with checkboxes, counter "48 / 48 enabled"

DLMS tabs: a list of the known OBIS codes, grouped as "Date & Time", "Device Info", "Total Energy", "Tariff Rates", "Demand", "Instantaneous" and "Other", each with a short description. Check the codes to read. The counter next to the button shows "n / 48 enabled"; more than 48 codes cannot be enabled ("Maximum 48 OBIS codes can be enabled per profile."). On saving, the stored order of the list is kept: a code that stays checked keeps its position, an unchecked code is removed and the codes after it move up one position, and newly checked codes are added at the end. The order on the screen is not the stored order; 11.7 "Default OBIS lists" explains how to read it.

"Suggest Obis Codes" fills the selected tab with the default set of codes for that meter make. The codes can then be changed one by one.

NOTE:

An easy way to match the codes to a meter is to open the unit in two browser windows: "Gateway Settings" in one, "Meter Reading Status" in the other. For IEC meters the read-out lines of the meter show which codes it sends.

10.6.3 Saving

Press "Save Configuration". The page sends the Modbus settings and the six tabs one after the other ("Saving Gateway Settings..."). The window then shows "Gateway Settings & OBIS Profiles Saved Successfully." If the unit did not take some values in any of the tabs, this window is shown in amber with the "Warning: <k> of <n> value(s) were rejected ..." line (10.1.4 "How saving works"); the numbers add up over the tabs that had a rejected value. The new codes are used from the next reading on; no restart is needed. If a tab fails, the window shows "Gateway Settings Change Failed at Tab n!".

LKM154/254, "Gateway Settings & OBIS Profiles Saved Successfully." window - WRITE

10.7 MENU: LoRa Settings

This menu exists only on LoRaWAN models (LKM354, LKM454, LKM755, LKM354-Lite, LKM616). The values are loaded when the menu is opened. All shipped LoRaWAN models are EU868 models; this section describes the EU868 page. The LoRaWAN messages are described in chapter 14 "LoRaWAN Communication Example" "LoRaWAN Communication Example".

LKM354/454, LoRa Settings page of a unit that has joined the network, Activation Method OTAA, EU868 band 1, ADR on, Class C, without ACK; the App Key is masked in the picture

LKM354/454, LoRa Settings page with Activation Method ABP selected: Device Address, Network Session Key and Application Session Key

10.7.1 LoRaWAN Main Settings

FieldValues (EU868)Description
"LoRaWAN Operating Mode"read-onlyOperating mode of the radio module ("Standard / Application Mode"). Shown for information.
"Band Selection""1: EUROPE 868MHz / Max. EIRP 16 dBm", "129: EUROPE 868MHz (Rx2:SF9) / Max. EIRP 16 dBm"Frequency plan. Option 129 uses SF9 in the second receive window (Rx2), as shown in its name. Default: 1.
"Activation Method""End-Device Activation by Personalization (ABP)", "End-Device Activation Over-the-Air (OTAA)"How the unit joins the network.

10.7.2 Device Activation Over the Air (OTAA)

FieldValuesDescription
"Device EUI"read-onlyUnique EUI of the radio module. "Copy" copies it for the registration on the network server.
"Application EUI"8 bytes, 16 hexadecimal digitsApplication (Join) EUI given by the network server.
"Application Key"16 bytes, 32 hexadecimal digitsApplication key given by the network server.

Type "Application EUI" as 16 and "Application Key" as 32 hexadecimal digits, without separators or with "-", ":" or a space between the bytes, for example "AABBCCDDEEFF1122", "0xAABBCCDDEEFF1122", "AA-BB-CC-DD-EE-FF-11-22" or "aa bb cc dd ee ff 11 22". The page shows the value as AA-BB-CC-... in capital letters. Any other entry, for example one with fewer digits, is refused with a message, for example "Application EUI should be an 8 Byte value (0xAABBCCDDEEFF1122)", and the field returns to its last saved value.

10.7.3 Device Activation By Personalization (ABP)

FieldValuesDescription
"Device Address"4 bytes, 8 hexadecimal digitsDevice address in the LoRaWAN network. Type the 8 digits with or without separators, for example "311A44D9", "0x311A44D9", "31-1A-44-D9", "31:1A:44:D9" or "31 1A 44 D9"; the page shows the address as AA-BB-CC-DD. Any other entry is refused with "Device Address should be a 4 Byte value (0xAABBCCDD)" and the field returns to its last saved value.
"Network Session Key"16 bytes, 32 hexadecimal digitsNetwork session key (message integrity).
"Application Session Key"16 bytes, 32 hexadecimal digitsApplication session key (payload encryption).

The two session keys are typed like the "Application Key" (10.7.2 "Device Activation Over the Air (OTAA)"): 32 hexadecimal digits, with or without separators. Any other entry is refused with a message, for example "Network Session Key should be a 16 Byte value (0xAABBCCDDEEFF1122AABBCCDDEEFF1122)", and the field returns to its last saved value.

NOTE:

The keys are shown in clear text on this page. Protect the web password (10.12.4 "Change Password").

10.7.4 Communication Settings

FieldValues (EU868)Description
"LoRaWAN Port"2 to 255Port of the meter data messages. Status messages always use port 1. Default 3.
"Adaptive Data Rate"on / offThe network server sets the data rate. When checked, "Uplink Data Rate" cannot be changed.
"Uplink Data Rate""LoRa SF12 / 125 kHz / 250 bps" ... "LoRa SF7 / 125 kHz / 5470 bps"Data rate of the uplink messages when ADR is off.
"Tx Power Level (EIRP)"0 to 16 dBmTransmit power.
"LoRaWAN Class""Class A", "Class C"LoRaWAN device class.
"Data Transmission Method""Data Transmission without ACK", "Data Transmission with ACK"Unconfirmed or confirmed uplinks.
"Data Format""OBIS VALUES AS MODBUS FRAME"Layout of the meter data message (chapter 14 "LoRaWAN Communication Example").
"Minimum Send Interval for a Parsed Data (in seconds)"0 to 65535 sShortest time between two data messages of the same meter. Default 60.
"Send OBIS Code Details as Status Message At Start"on / offThe unit also sends the list of its enabled OBIS codes as status messages. Default: off.

Factory settings: "Adaptive Data Rate" on, "Class C", "Data Transmission without ACK", 16 dBm, port 3, minimum send interval 60 s.

The unit sends a status message to port 1: device ID (4 bytes), message type 0x00, number of enabled meters, number of enabled OBIS codes of each of the six profiles, the data port, the time (4 bytes), the firmware version (3 bytes) and the "Device Name" (up to 21 bytes). With "Send OBIS Code Details as Status Message At Start" checked, one OBIS details message per profile in use follows. The message formats are described in chapter 14 "LoRaWAN Communication Example" "LoRaWAN Communication Example".

Press "Save Configuration". Of the two activation cards, only the one of the selected "Activation Method" is sent: with OTAA the "Application EUI" and "Application Key", with ABP the "Device Address", "Network Session Key" and "Application Session Key". The unit keeps its stored values of the other card. After the confirmation that card shows these stored values again; a value typed there is not saved. The window shows "LoRa Settings Changed." with "REBOOT REQUIRED". The radio settings are written to the radio module at the next start-up.

10.8 MENU: Gateway Status

This page shows the result of the last readings and the value stored for every OBIS code.

LKM615 (EMH model), Gateway Status page after a successful IEC reading of the meter: counters, "Last Meter Log" "READING FINISHED S:1 R:1", values of the enabled codes, "N.A." for the codes that are not enabled; no "Show OBIS Values For" selector

FieldDescription
"Meter Read Counter"Number of successful readings since start-up.
"Last Read Meter"Row number of the meter read successfully last.
"Last Login / Identification"The identification or login line of the last meter session (of any meter row). "IEC62056-21 (Mode C)" rows: the identification line of the meter, as received, for example "/XXX5METER123" (it starts with "/"). DLMS rows: the login result, "DLMS LOGIN OK, G:OK, S:..., R:..., W:..." or "DLMS LOGIN REJECTED". The field is updated each time the unit receives an identification line or a login answer; it keeps the last one until then. "-" is shown until the first one after a start-up.
"Last Meter Log"Newest line of the Meter Reading Status page, for example "READING FINISHED S:1 R:1".

"Show OBIS Values For" selects whose values are shown: "Last Read Meter" (default) or "Meter 1" ... "Meter n". Press "Set Show Meter Value" to apply the choice; the window "Gateway Status Show Meter Value Changed." confirms it. The choice is not stored and returns to "Last Read Meter" after a restart. EMH models do not have this selector.

"Reading OBIS Details" lists the codes of the profile of the selected meter, each with its value. A received value is shown in green bold type on a dark background; "N.A." and "-" are shown in normal type. The colour is only an aid; read the value. "N.A." means the code is not enabled. "-" means that no value has been received for this code since the unit started. Otherwise the last value received is shown, also when a later reading did not deliver this code; check "Meter Reading Status" (10.10 "MENU: Meter Reading Status") to see what the last reading returned.

"Refresh Gateway Status" reads the data again without reloading the page. The time of the read is shown as "Last update: hh:mm:ss".

10.9 MENU: LoRa Status

This menu exists only on LoRaWAN models. It shows the state of the LoRaWAN connection and the last messages. "Refresh LoRa Status" reads the data again; the time of the read is shown as "Last update: hh:mm:ss". A read of the "Device Status" page also reads this page again.

LKM354/454, LoRa Status page after joining: "Network Status" "ACTIVE (OTAA)" with the data rate, port, maximum payload size and device address given by the network; the first message after the start (the status message) in "Latest LoRaWAN Message Sent"

"LoRaWAN Network Status":

FieldDescription
"Network Status""ACTIVE (ABP)" or "ACTIVE (OTAA)" (green), "JOINING (OTAA)" (amber) or "DEVICE INACTIVE" (red), in bold type on a dark background. Read the value text; the colour is only an aid. The fields below are shown only when the unit is active.
"Data Rate"Data rate of the next uplink.
"LoRaWAN Port Number"Port of the data messages.
"Maximum Payload Size"Largest payload the network allows for the next uplink (bytes).
"Device Address"Device address in the network.
"Power Level (EIRP)"Transmit power reported by the radio module.

"Latest Tx Message Info (LoRa Side)": "Device Time" (time of the last uplink), "Channel", "Data Rate", "Nu. Of Transmitted Packages" (radio packets used for the message), "Transmit Power Level (dBm)", "RF Msg. Air Time (ms)".

"Latest Rx Message Info (LoRa Side)": "Device Time" (time of the last downlink), "Channel", "Data Rate", "RSSI (dBm)", "SNR (dB)", "RxSlot".

The values of "RSSI (dBm)" and "SNR (dB)" are shown in bold type on a dark background, in a colour that depends on the value:

FieldGreenAmberRed
"RSSI (dBm)"-95 or higher-110 to -96below -110
"SNR (dB)"-7 or higher-15 to -8below -15

When no value has been received, the field is shown in normal type. The value text and its colour show the same thing; read the number.

"Latest Rx - No Data Info (LoRa Side)": "No Data Received Counter" (receive windows without data) and, when the radio module reports one, "Error Code": "Wrong MType received", "Wrong Device Address received", "Wrong MIC received", "Unexpected FCnt received", "Wrong MAC commands received", "Wrong downlink received" or "Expected ACK missing".

"Latest LoRaWAN Message Sent": "Device Time", "Payload in Hex" and "Payload As ASCII" of the last message the unit sent (non-printable bytes shown as ".").

"Message Details - LoRa Side (debug)" is closed by default; click its title to open it. It shows the last message exchanged with the radio module ("Message Type", for example "SEND_UDATA_TX_IND", "RECV_UDATA_IND", "JOIN_NETWORK_IND", "OTAA_JOIN_NETWORK_RSP", "ABP_ACTIVATE_DEVICE_RSP", "RECV_NO_DATA_IND", "GET_NWK_STATUS_RSP") and its payload. This part is meant for REDZ support.

10.10 MENU: Meter Reading Status

This page shows the last 210 lines of the meter communication: the data received from IEC meters and the messages of the unit about the readings. It is the first place to look when values are missing. The lines are arranged in three columns, "Oldest -> newest, top to bottom per column". "Refresh Meter Reading Status" reads the lines again; the time of the read is shown as "Last update: hh:mm:ss".

LKM615 (EMH model), Meter Reading Status, IEC meter read correctly: the top of the page with the oldest read-out lines of the EMH meter (register and load profile lines); the line "READING FINISHED S:1 R:1" follows further down

LKM154/254, Meter Reading Status with an "ID MISMATCH R:2 ..." line followed by "READING FINISHED S:1 R:2 ERROR: ID MISMATCH", both in red on a dark background (two meters on one line, another meter answered the request of row 2)

LKM154/254, Meter Reading Status of a row whose meter does not answer: "READING FINISHED S:1 R:1 ERROR: Timeout WAIT_FOR_ACK" lines and "IEC: previous session ended without ACK - break sent, line quiet 2 s, row: 1 ..." lines, all red on a dark background, no read-out lines and no "--- READING COMPLETE ---" separator

Some lines are shown in colour, in bold type on a dark background. The page checks each line in this order and uses the first rule that fits:

LineShown in
contains "READING COMPLETE" (the separator --- READING COMPLETE ---)amber
starts with "A3: ", "BE: ", "ID MISMATCH ", "No OBIS in profile", "IEC: previous session ended without ACK", "IEC: TimeoutInterval ", "hdlc_parse_response_pdu status" or "dlms_parse_get_response_normal_pdu status"red
contains "REJECTED", "ERROR", "overflow", "Incorrect", "Mismatch" or "found no data"red
contains "READING FINISHED"green

The texts must match exactly, including upper and lower case. All other lines are shown in the normal colour and type.

In the table of 10.10.2 "Messages of the unit" these messages are therefore shown in red: "READING FINISHED ... ERROR: ...", "DLMS LOGIN REJECTED", all "A3: ..." lines, the "BE: ..." lines, "ID MISMATCH ...", both "IEC: previous session ended without ACK ..." lines, "IEC: TimeoutInterval ...", "<OBIS code>, ERROR_..." lines, "PDU SERVICE_ERROR", "No OBIS in profile - check GatewaySettings tab", "dlms_parse_object_list_extract found no data", "DATA reassembly overflow: n", "hdlc_parse_response_pdu status: n" and "dlms_parse_get_response_normal_pdu status: n". "DLMS LOGIN OK ...", "Updated OBIS ...", the DLMS value lines, "HDLC DISCONNECTING..." and "DLMS DISCONNECT OK" are shown in the normal colour.

NOTE:

The colour is only an aid. Always read the text of the lines (table in 10.10.2 "Messages of the unit"): a successful reading ends with "READING FINISHED S:<s> R:<row>" after the read-out lines of the meter; a failed reading ends with "READING FINISHED S:<s> R:<row> ERROR: <reason>". A red line is not always a fault that needs action; for example "IEC: TimeoutInterval ..." only reports that the unit uses 5 s.

10.10.1 Lines of the meter

For "IEC62056-21 (Mode C)" rows, the lines received from the meter are shown as they arrive, for example the IEC identification line (it starts with "/") and read-out lines such as 1.8.0(000302.367*kWh). The read-out ends with the line "!"; the check character (BCC) that the meter sends after it is not shown. If a reading of such a row shows no meter lines at all, the meter did not answer; the reading then ends with "READING FINISHED S:<s> R:<row> ERROR: Timeout WAIT_FOR_ACK".

For "DLMS/COSEM" and "DLMS/COSEM with IEC62056-21 Opening" rows the raw data of the meter is not shown; only the messages of the unit (table below) appear, including one value line per OBIS code read.

10.10.2 Messages of the unit

MessageMeaningWhat to do
--- READING COMPLETE ---Separator: a new reading starts. The lines before it belong to the previous reading. Shown only when the previous reading was successful: not before the first reading after start-up, and not after a failed reading (that reading ends with "READING FINISHED ... ERROR: ...").-
READING FINISHED S:s R:rThe reading of meter row r has ended successfully (s = internal connection number).Check that meter lines (or DLMS value lines) appear before this line.
READING FINISHED S:s R:r ERROR: <reason>The reading of meter row r has failed. <reason> tells where it stopped: "Timeout WAIT_FOR_ACK" (the meter did not answer the request with its identification within "Time Out (s):", or the answer was too short; also the IEC opening of "DLMS/COSEM with IEC62056-21 Opening" rows), "Timeout GET_READ_OUT" (the meter stopped sending during the read-out: no character for "Time Out (s):"), "ID MISMATCH" (see the next line), "READ FAILED (Disc OK)" (DLMS: the session was closed without values, for example after "DLMS LOGIN REJECTED"), "READ FAILED (Disc Timeout)" (DLMS: as before, and the meter did not answer the end of the session either, for example a meter that does not answer at all). "Timeout CONNECT_SEND", "Timeout HDLC_SEND_PASS", "Timeout HDLC_REQUEST_OBJECT_LIST", "Timeout HDLC_REQUEST_DATA" and "Timeout HDLC_DISCONNECT_SEND" mean that the unit could not send this step of the DLMS session.Check the lines before it. If no meter lines appear, see "no answer" below. For "Timeout CONNECT_SEND" and the "Timeout HDLC_..." texts contact REDZ support with the lines.
ID MISMATCH R:r got <id> (addr <address>) - values droppedIEC: the meter that answered for row r sent the identity <id> (from 0.0.0, C.1.0 or 96.1.0). This identity does not contain the digits of "IEC Address:" <address> of the row, and is not contained in them. The values of this reading are not used, so values of one meter never appear under another meter. Checked only when the address and the identity both contain at least 6 digits. When the read-out was complete, the reading then ends with "READING FINISHED S:s R:r ERROR: ID MISMATCH".Check "IEC Address:" of the row, and check whether another meter on the same line answers to this address.
IEC: previous session ended without ACK - break sent, line quiet 2 s, row: r (n=..., +...)IEC on RS232 / RS485: the previous reading of row r ended before it was complete, so the meter could still be waiting. Before the next IEC request on the same port the unit sends the IEC break message (end of session) and waits until the line has been quiet for 2 s. This keeps the late answer of one meter out of the reading of the next meter. Shown at most once a minute; "+..." is the number of breaks not shown.Occasional lines are normal (for example after a power cut of a meter). If the line appears for every cycle, the meter of row r does not answer (its readings end with "READING FINISHED ... ERROR: Timeout WAIT_FOR_ACK"): check address, baud rate, wiring and "Time Out (s):". Each such cycle costs about 2.5 s.
IEC: previous session ended without ACK - break sent, line NOT quiet in 10 s, row: r (n=...)As above, but the line did not become quiet within 10 s; the next request was sent anyway.Another device keeps sending on the line. Check the RS485 bus (other masters, wrong baud rate, noise).
IEC: TimeoutInterval t s below minimum - using 5 s, row: r"Time Out (s):" of IEC row r is below 5 s; the unit waits 5 s (shown once per row after start-up).No action needed. Set the value to 5 or more to remove the line.
DLMS LOGIN OK, G:OK, S:-, R:-, W:-DLMS login accepted; the letters show which services the meter allows (Get, Set, Read, Write).-
DLMS LOGIN REJECTEDThe meter refused the login. One of the following lines may give the reason.Check "Client Type:", "Authentication:", "Password:" and "DLMS Address:".
A3: LN/SN Context MismatchThe meter does not accept the selected "OBIS Reference:".Change "OBIS Reference:" (Short Names / Long Names).
A3: Password IncorrectWrong DLMS password.Correct "Password:".
A3: Authentication RequiredThe meter requires authentication.Set "Authentication:" to "Low Security" and enter the password.
BE: initiate, ... / BE: class=.. code=..The meter rejected the DLMS session parameters (code given by the meter).Check the DLMS settings; contact REDZ support with the line.
Updated OBIS xx.xx.xx.xx.xx.xx -> SN: xxxxDLMS with "Short Names": the short name the meter uses for this OBIS code.-
<OBIS code>, Value:<value> (also Demand:, DATE:, SVal:, Scale:)DLMS: value read for this OBIS code.-
<OBIS code>, ERROR_DATA_ACCESS (or ERROR_TYPE_UNSUPPORTED, ERROR_PDU_PARSE_FAILED, ERROR_WRONG_PDU)DLMS: the meter could not deliver this code.Disable the code in the DLMS tab or choose a code the meter supports.
PDU SERVICE_ERRORDLMS: the meter returned a service error; the session is closed.Check the meter type and the enabled codes.
No OBIS in profile - check GatewaySettings tabDLMS: no code is enabled in the profile of this meter.Enable codes in the matching tab (10.6.2 "OBIS Code Settings").
dlms_parse_object_list_extract found no dataDLMS (short names): the object list of the meter contained none of the enabled codes.Check the enabled codes and "OBIS Reference:".
DATA reassembly overflow: n, hdlc_parse_response_pdu status: n, dlms_parse_get_response_normal_pdu status: nDLMS frame could not be processed.Contact REDZ support with the lines.
HDLC DISCONNECTING..., DLMS DISCONNECT OKDLMS session closed.-

NOTE:

To get the protection of the ID check, enter the meter serial number (as the meter reports it in 0.0.0 or C.1.0) as "IEC Address:" of every IEC row on a shared RS485 line.

10.11 MENU: Security Settings

This menu is shown only when "Device Function" is "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)". It filters the Modbus TCP clients by IP address.

LKM154/254, Security Settings page, "White List Enabled" checked, "Black List Enabled" not checked, the IP address table visible

FieldDescription
"White List Enabled"Only clients with an address in the "White List Address Table" may connect.
"Black List Enabled"All clients may connect except those in the "Black List Address Table".
"White List Address Table" / "Black List Address Table"Up to 20 IPv4 addresses each. 0.0.0.0 = empty entry.

Only one list can be active; checking one unchecks the other. Press "Save Configuration". The window shows "Security Settings Changed."; the filter is applied at once to every connection opened after the save. A client that is already connected stays connected until it closes its connection.

10.12 MENU: Management

This page sets the clock, updates the firmware, saves and restores the configuration, changes the password and the log settings, and restarts the unit.

LKM154/254, Management page: time fields, "Live Firmware Update" card (the alternative bank holds the previous firmware), "Download / Upload Configuration", "Change Password", LOG card with log level NONE, "Restore Factory Configuration" and "Reboot Device"

10.12.1 Set Device Time

"Time At Start" shows the clock of the unit when the page was loaded; "Current Local Time" shows the clock of the PC. Press "Set Device Time" to copy the PC time into the unit. The window "Device time has been set." confirms it. The unit does not restart when the time is set.

NOTE:

The NTP server (10.3.1 "NTP Settings") sets the clock automatically when the unit can reach it.

10.12.2 Live Firmware Update

The unit keeps two firmware images: the running one and an alternative one. "Select Firmware File" and "Upload Firmware" load a new firmware file (name ending in .binimg, for example LKM154-254_v3.00.02.binimg) into the place of the alternative image; "Alternative Firmware Date" and "Alternative Firmware Version" then show it. "Reboot Alternative Firmware" restarts the unit with the alternative image. The complete procedure is described in chapter 16 "Firmware Update and Upgrading" "Firmware Update and Upgrading". REDZ recommends the abcZ Network Tool for firmware updates (chapter 17 "Software - abcZ Network Tool").

WARNING:

Use the firmware file whose file name matches your model. The unit itself only refuses a file of the other key group ("Error: Firmware Does not Match With Device."); a file of another model in the same group is accepted and installed. | Key group | Models | |---|---| | Group 1 | LKM154 / LKM254, LKM655, LKM354 / LKM454, LKM755 | | Group 2 | LKM154-Lite, LKM615, LKM354-Lite, LKM616 |

NOTE:

The settings are kept when the first two numbers of the version are equal (for example 3.00.01 to 3.00.02). Otherwise (for example 2.07.x to 3.00.x) the unit starts with factory settings. Download the configuration (10.12.3 "Download / Upload Configuration") before an update.

LKM154/254, Live Firmware Update card with a file selected - read-only (do not upload)

10.12.3 Download / Upload Configuration

"Download Current Configuration" saves the complete configuration of the unit to a file named ZTG_<Device Name>_v<version>.zcfg (for example ZTG_LKM_SERVER_v3.00.02.zcfg).

WARNING:

The downloaded configuration file contains the web password, the MQTT password, the DLMS passwords and the LoRaWAN keys in clear text. Keep the file private: store it in a protected place and do not send it by e-mail or share it with persons who must not have access to the unit.

"Upload Configuration File" opens a file dialog. Choose a .zcfg file; the upload starts at once. The window shows the answer of the unit:

AnswerMeaning
"Configuration Uploaded - device will restart"The file was stored; the unit restarts with it.
"Configuration Uploaded (warning: file from fw ..., device runs ...) - device will restart"Stored; the file was made with another firmware version. Check the settings after the restart.
"Configuration Uploaded (legacy config - no _meta) - device will restart"Stored; the file is from an older firmware and has no identity block, so it could not be checked.
"Rejected: product mismatch (file '...', device '...')."The file belongs to another product. Nothing changed.
"Rejected: build variant mismatch (file '...', device '...')."The file was edited or does not belong to this unit. Nothing changed.
"Rejected: config layout mismatch (file n bytes, device m bytes)."The file belongs to a firmware with another configuration layout. Nothing changed.
"Rejected: reboot in progress - configuration NOT saved"The unit was restarting. Upload again after the restart.
"Unsupported Escape Found at line n, pos. m. ..."A text value contains a "\u" code that the unit cannot store (\u0000, or a code above \u007F, for example \u00E9 for a letter with an accent). Nothing changed. Codes \u0001 to \u007F are accepted.
Other red texts with a line and position, for example "Unexpected End Of File found.", "Node ID Not Found at line n, pos. m." or "Invalid value found near line n, pos. m."The file is damaged or was edited incorrectly. Nothing changed.

A meter row value in the file that the unit cannot use is replaced by its factory value (16.7.2 "Upload a configuration").

LKM154/254, "Configuration Uploaded - device will restart" window - WRITE (config upload + restart; restore original afterwards)

LKM154/254, red "Rejected: config layout mismatch (file 9556 bytes, device 12636 bytes)." window (backup of a Lite model) - WRITE attempt (unit rejects the file, nothing changed)

10.12.4 Change Password

Enter "Current Password", "New Password" and "Confirm New Password" (up to 15 characters). The "Change Password" button is enabled when all three fields are filled and the two new entries match. After "Change Password" the window says "Password Changed, Next time you login, please use new password." The user name stays "admin". Possible refusals: "Rejected: current password is incorrect - password NOT changed", "Rejected: new password and confirmation do not match - password NOT changed".

10.12.5 LOG

The unit can send a log of its operation for diagnosis.

FieldValuesDescription
"Log Level""NONE", "ERROR", "INFO", "DEBUG"Amount of log data. NONE = no log (default). DEBUG = all details; use it only for diagnosis.
"Log Output""CONSOLE", "UDP SERVER"CONSOLE: log lines are sent to the console port of the unit (for REDZ service). UDP SERVER: log lines are sent to the address below. Lite and EMH models offer only "UDP SERVER".
"UDP Server IP"IPv4 addressPC that receives the log. Default 192.168.1.10.
"UDP Server Port"1 to 65535UDP port on that PC. Default 7001.

Press "Change Log Level and Reboot". If a log setting changed, the unit restarts ("Rebooting..."); otherwise the window says "Log settings unchanged - no reboot needed." Any UDP receiver program can show the log sent to a UDP server. How to read the log: see chapter 18 "Logs and Troubleshooting".

LKM154/254, LOG card with log level INFO and output "UDP SERVER", example IP address and port fields filled

With "INFO" the unit sends its start-up messages; a meter reading without errors adds no line. "DEBUG" shows every step of a meter reading, as in the picture.

UDP receiver program on a PC showing log lines of an LKM154/254 with "Log Level" "DEBUG": the steps of one meter reading (serial set-up, identification line, OBIS codes and values)

10.12.6 Restore / Reboot

ButtonConfirmationResult
"Restore Factory Configuration""Reset device to FACTORY configuration? All settings will be erased and the device will reboot."All settings return to factory values, including the password ("admin") and the network settings (DHCP client), then the unit restarts.
"Reboot Device""Reboot the device now?"The unit restarts with the stored settings.

After the confirmation a window with a progress bar shows "Rebooting..."; the page reloads after about 5 seconds. After a factory restore the unit may get another IP address (10.1.1 "Finding the IP address").

LKM154/254, confirmation window of "Restore Factory Configuration": "Reset device to FACTORY configuration? All settings will be erased and the device will reboot." with "Confirm" and "Cancel"

LKM154/254, "Reboot Device Command has been sent." window with progress bar - WRITE (restart)

NOTE:

The unit restarts itself once every 24 hours of operation. This is planned; the settings are kept and the meters are read again right after the start.

11. Modbus Register Map and Data Types

This chapter describes the Modbus registers of the LKM Series gateways with firmware 3.00.02. It is valid for all models; model differences are named where they exist. A worked example is in chapter 12 "Modbus Communication Example".

11.1 Protocol summary

ItemValue
Function codes03 Read Holding Registers only
Exception responsesnone - a request that cannot be served gets no answer
Unit ID (TCP) / slave address (RTU)must equal "Gateway Modbus Address" (1 to 247, factory 1); other addresses (also 0 and 255) get no answer
Register sizeevery value is 32 bits = 2 registers
Number of registers per request2 to 124, even numbers only; any other number gets no answer (11.4 "Address rule")
Byte orderbig-endian inside each register; word order set by "Modbus Word (Register) Swap" (factory: off = high word first)
Values per meter row48 (OBIS index 0 to 47)
Meter rows32 (standard and LoRaWAN models), 10 (LKM154-Lite, LKM354-Lite), 1 (LKM615, LKM616)

11.2 Modbus TCP server

Available when "Device Function" is "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)".

ItemValue
Port"Server Listening Port", factory 502
Simultaneous masters"Maximum Number of Clients", 1 to 10, factory 2
Master beyond the limitaccepted, then closed with a TCP reset after about 0.25 s if no place becomes free; the device log shows "TCP client refused - all client slots in use" (first three times, then every 100th)
IP filterthe white / black list of "Security Settings" applies to every Modbus TCP master
RequestMBAP header + FC 03 + start address + quantity (12 bytes); protocol identifier must be 0, length field must be 6

11.3 Modbus RTU slave

Available when "Device Function" is "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)" (not on LKM615 / LKM616). The meters are then read over TCP/IP and the serial port is the Modbus RTU slave.

ItemValue
PortRS232 and / or RS485, "Modbus Serial Settings" page; RS485 only on LKM154-Lite / LKM354-Lite
Serial settings"Baud rate" 300 to 460800, "Line Control" (8_NONE_1 etc.); factory RS485, 115200, 8_NONE_1
Frameslave address, 03, start address (2), quantity (2), CRC16 (low byte first)
Answer delaythe answer is sent at least 3.5 character times after the last byte of the request (1.75 ms above 19200 baud)
Wrong CRC, other function code, other slave addressno answer
Shared RS485 line (several slaves)requests to other slave addresses and the answers of the other slaves are ignored: no answer, not counted as errors, no restart
While the meters are not connectedrequests are also answered while the gateway is starting its network or connecting to the meters ("App Status" "WAIT_FOR_NET_READY", "OPENING_CONNECTION" or "WAIT_FOR_CONNECTION"), for example when a meter address does not answer; the registers then hold 0 or the last values read (11.6 "Value states")

NOTE:

On a shared RS485 line the gateway ignores all frames that carry another slave address (also address 0). They are not counted in "N. of Modbus Incorrect Characters" or "N. of Modbus Messages Received Correctly" on the "Device Status" page. With "Log Level" INFO or DEBUG the log shows once after each start-up a line with the text "RTU: frames for other slave ids ignored, first id: <n>"; <n> is the slave address of the first such frame.

NOTE:

Frames for the gateway's own address that are faulty (wrong CRC, other function code, invalid register request) are counted. A request with a correct CRC that asks for an odd number of registers or for more than 125 registers is counted in "N. of Modbus Incorrect Characters", but not in this count: it gets no answer, does not lead to a restart and does not start the count again. Every valid request starts this count again. When more than 500 such characters arrive without a valid request in between, the gateway restarts (log line "Serial INC CHARS RESTART"). This happens at most twice in a row: the third time it does not restart, and "App Status" shows "(SERIAL NOISE PARKED - check line/baud)" until a valid request arrives. Check the wiring, the baud rate and the "Line Control" of the master.

11.4 Address rule

address = (meter row - 1) x 256 + 2 x OBIS index
  • meter row: 1 to 32 (1 to 10 on Lite, 1 on EMH), as in the "Scheduler Settings" table,
  • OBIS index: 0 to 47, the position of the code in the OBIS list of the meter's profile (11.7 "Default OBIS lists").
RequestAnswer
start address even, low byte 0 to 94, row enabledvalues from the start index on
start address oddno answer
low byte 96 (0x60) or moreno answer
row not enabled in the meter listno answer
quantity 0, an odd quantity (for example 1) or a quantity larger than 125no answer
even quantity 2 to 124 reaching past index 47answer ends with index 47 (fewer registers than asked)
Modbus TCP: protocol identifier not 0, or length field not 6no answer
Modbus RTU: wrong CRCno answer

Holding register numbers used by tools with 1-based addressing (4xxxx) are address + 40001. A request never crosses into the next row: each row needs its own request.

NOTE:

Ask for an even number of registers that ends at or before index 47. A request for one register (an odd number) gets no answer, because every value takes two registers. Many Modbus masters reject an answer whose length differs from the request, so do not rely on the past-index-47 behaviour above. With "Log Level" DEBUG the log shows a line "MODBUS WRONG Req. register count: <n>" for each request with an odd quantity or a quantity larger than 125; <n> is the quantity asked.

11.5 Data types and value conversion

Every value is a 32-bit integer made from the text value the gateway stored for that OBIS code:

  1. the characters ".", ",", ":" and space are removed,
  2. the remaining text is converted to an integer: an optional "-" at the start, then the digits up to the first character that is not a digit,
  3. if the text contains "-" the value is a signed 32-bit integer (two's complement), otherwise unsigned.

A value that does not fit into 32 bits gives a limit value: an unsigned value above 4294967295 gives 4294967295 (0xFFFFFFFF), a negative value below -2147483648 gives -2147483648 (0x80000000). A limit value is not a reading.

The register itself does not say whether it is signed. Read a register that cannot be negative (for example energy) as unsigned 32-bit, and a register that can be negative (for example power with direction) as signed 32-bit.

The stored text depends on the meter protocol:

IEC 62056-21 meters. Only the digits between "(" and ")" (or "*") of the readout line are stored, with a minus sign when it is the first character of the value; leading zeros, the decimal separator, the unit, letters (also the letters of a hexadecimal value) and every other minus sign (for example in a date) are dropped. A value without any digit is stored as 0.

Readout lineRegister value (decimal / hex)
1.8.0(302.367*kWh)302367 / 0x00049D1F
32.7.0(230.1*V)2301 / 0x000008FD
0.9.1(10:29:47)102947 / 0x00019223
0.9.2(26-10-16)261016 / 0x0003FB98
C.1.0(ELM82733811)82733811 / 0x04EE6AF3
F.F(00000000)0
16.7.0(-001.234*kW)-1234 / 0xFFFFFB2E (signed)

The scale is the number of decimals the meter shows; the gateway does not send it.

DLMS/COSEM meters. The type follows from the OBIS code:

OBIS codeStored asRegister value
C = 1, D = 0, E = 0 (clock, e.g. 0.0.1.0.0.255)Unix time in secondse.g. 1792146600 (2026-10-16 10:30:00)
C = 96 (serial number)the text of the meterthe leading digits; 0 if the text starts with a letter
D = 8 or 9 (energy), D = 7 (instantaneous), D = 6 or C = 98 (demand)raw value with 3 decimalsraw value x 1000

NOTE:

The DLMS scaler of the object is not applied. A register value of 12041000 means a raw meter value of 12041; the unit and the scaler (10^n) of that object come from the meter's documentation.

NOTE:

Large DLMS values. Because the register holds raw value x 1000, a raw value from 0 to 4294967.295 fits (as unsigned), and a negative raw value down to -2147483.648 (as signed). Above that the register holds the limit value 4294967295 (0xFFFFFFFF), below it -2147483648 (0x80000000), for example for an energy register in Wh above 4294 kWh. The same applies to the MQTT data format "OBIS VALUES AS MODBUS FRAME" and to LoRaWAN. For such registers use the MQTT data format "OBIS VALUES AS OBJECTS" (chapter 13 "MQTT Communication Example") or the "Gateway Status" page: they show the stored value as text (e.g. "5500123.000").

NOTE:

Negative DLMS values. The signed types of DLMS (integer, long, double-long, long64) and the float types arrive with their sign: a long of -5 gives -5000 (0xFFFFEC78, signed 32-bit), a float of -5.0 also gives -5000. The same applies to MQTT and LoRaWAN.

The clock value includes the time zone deviation sent by the meter.

11.6 Value states

StateRegister value
Row enabled, not read since the gateway started0
OBIS code disabled in the profile, or never found in the readout0, or the last value read before (until the gateway restarts)
Last reading failed (meter did not answer)values of the previous reading; IEC values found before the time-out replace the old ones
Reading rejected with "ID MISMATCH R:n got ... (addr ...) - values dropped"values of the previous good reading
DLMS clock that could not be converted0, or the previous value

There is no status register and no time stamp register.

11.7 Default OBIS lists

Every meter row uses the OBIS list of one profile:

Meter rowProfile (tab on "Gateway Settings")
"Meter Protocol" IEC 62056-21IEC 62056-21
DLMS, "Meter Type:" "Landis+Gyr"Landis+Gyr DLMS
DLMS, "Meter Type:" "Itron"Actaris/Itron
DLMS, "Meter Type:" "Iskra"Iskra DLMS
DLMS, "Meter Type:" "Cewe"Cewe DLMS
DLMS, "Meter Type:" "Standard DLMS"Generic DLMS
any DLMS row on LKM615 / LKM616Generic DLMS

NOTE:

For the DLMS profiles the OBIS index is the position of the code in the stored list. A "Save Configuration" on the "Gateway Settings" page keeps this order: - a code that stays checked keeps its index, - a code that you uncheck is removed, and the codes after it move up one index (index - 1, their address goes down by 2), - a code that you check is added at the end of the list (several new codes in the order of the page), - a code that you uncheck and check again before you save keeps its index. On a unit with factory settings the indexes are the factory indexes of the tables below. The order of the codes on the "Gateway Settings" page is not the stored order. Read the register order from the unit after every change of a DLMS list: on the "Gateway Status" page "Reading OBIS Details" lists the codes in index order (empty positions are skipped). Plan the Modbus master (and the decoding of the MQTT Modbus frame and of LoRaWAN) from that list. After a save that moved codes, a register shows the value of its new code only after the next reading of that meter row.

NOTE:

Units that were saved with firmware 3.00.00 or 3.00.01. These firmware versions stored every DLMS list again in the order of the page at each save of "Gateway Settings" (grouped as "Date & Time", "Device Info", "Total Energy", "Tariff Rates", "Demand", "Instantaneous"). A unit whose "Gateway Settings" were saved with them keeps that order after the update to 3.00.02; the order is not changed back. For such a unit, with the factory lists, the columns "Index after a save with 3.00.00 / 3.00.01" of the tables below apply. The first index that moved: | Profile | First index that moved at the first save with 3.00.00 / 3.00.01 | |---|---| | IEC 62056-21 | none (the order is never changed) | | Landis+Gyr DLMS | 34 | | Actaris/Itron | 12 | | Iskra DLMS, Cewe DLMS, Generic DLMS | 28 |

The IEC 62056-21 list keeps its order: each of the 48 positions is a text field on the page.

Addresses below are for row 1. For row n add (n - 1) x 256.

11.7.1 IEC 62056-21 profile (meters with "Meter Protocol" IEC 62056-21)

IndexAddress of row 1 (dec / hex / holding register)OBIS code (search string)MeaningEnabled at factory
00 / 0x0000 / 40001F.FError codeyes
12 / 0x0002 / 400030.9.1Timeyes
24 / 0x0004 / 400050.9.2Dateyes
36 / 0x0006 / 400071.8.0Active energy import A+, totalyes
48 / 0x0008 / 400091.8.1Active energy import A+, tariff 1yes
510 / 0x000A / 400111.8.2Active energy import A+, tariff 2yes
612 / 0x000C / 400131.8.3Active energy import A+, tariff 3yes
714 / 0x000E / 400152.8.0Active energy export A-, totalyes
816 / 0x0010 / 400172.8.1Active energy export A-, tariff 1yes
918 / 0x0012 / 400192.8.2Active energy export A-, tariff 2yes
1020 / 0x0014 / 400212.8.3Active energy export A-, tariff 3yes
1122 / 0x0016 / 400235.8.0Reactive energy Q1 (Ri+), totalyes
1224 / 0x0018 / 400256.8.0Reactive energy Q2 (Rc+), totalyes
1326 / 0x001A / 400277.8.0Reactive energy Q3 (Ri-), totalyes
1428 / 0x001C / 400298.8.0Reactive energy Q4 (Rc-), totalyes
1530 / 0x001E / 400311.6.0Maximum demand, active import P+yes
1632 / 0x0020 / 400332.6.0Maximum demand, active export P-yes
1734 / 0x0022 / 4003532.7.0L1 voltage, instantaneousyes
1836 / 0x0024 / 4003752.7.0L2 voltage, instantaneousyes
1938 / 0x0026 / 4003972.7.0L3 voltage, instantaneousyes
2040 / 0x0028 / 4004131.7.0L1 current, instantaneousyes
2142 / 0x002A / 4004351.7.0L2 current, instantaneousyes
2244 / 0x002C / 4004571.7.0L3 current, instantaneousyes
2346 / 0x002E / 40047C.1.0Meter serial numberyes
2448 / 0x0030 / 400491.4.0Active import P+, current average demand (*)no
2550 / 0x0032 / 400512.4.0Active export P-, current average demand (*)no
2652 / 0x0034 / 400531.5.0Active import P+, last average demand (*)no
2754 / 0x0036 / 400552.5.0Active export P-, last average demand (*)no
2856 / 0x0038 / 400575.4.0Reactive Q1, current average demand (*)no
2958 / 0x003A / 400596.4.0Reactive Q2, current average demand (*)no
3060 / 0x003C / 400617.4.0Reactive Q3, current average demand (*)no
3162 / 0x003E / 400638.4.0Reactive Q4, current average demand (*)no
3264 / 0x0040 / 400655.5.0Reactive Q1, last average demand (*)no
3366 / 0x0042 / 400676.5.0Reactive Q2, last average demand (*)no
3468 / 0x0044 / 400697.5.0Reactive Q3, last average demand (*)no
3570 / 0x0046 / 400718.5.0Reactive Q4, last average demand (*)no
3672 / 0x0048 / 400735.6.0Reactive Q1, maximum demand (*)no
3774 / 0x004A / 400756.6.0Reactive Q2, maximum demand (*)no
3876 / 0x004C / 400777.6.0Reactive Q3, maximum demand (*)no
3978 / 0x004E / 400798.6.0Reactive Q4, maximum demand (*)no
4080 / 0x0050 / 400811.7.0Active power import P+, instantaneous (*)no
4182 / 0x0052 / 4008321.7.0L1 active power import, instantaneous (*)no
4284 / 0x0054 / 4008541.7.0L2 active power import, instantaneous (*)no
4386 / 0x0056 / 4008761.7.0L3 active power import, instantaneous (*)no
4488 / 0x0058 / 400893.7.0Reactive power import Q+, instantaneous (*)no
4590 / 0x005A / 4009123.7.0L1 reactive power import, instantaneous (*)no
4692 / 0x005C / 4009343.7.0L2 reactive power import, instantaneous (*)no
4794 / 0x005E / 4009563.7.0L3 reactive power import, instantaneous (*)no

11.7.2 Landis+Gyr DLMS profile

OBIS codeMeaning (web page text)Factory indexFactory address of row 1 (dec / hex / holding register)Index after a save with 3.00.00 / 3.00.01Address of row 1 after such a save
0.0.1.0.0.255Clock / Date-Time00 / 0x0000 / 4000100 / 0x0000 / 40001
0.0.96.1.0.255Serial Number12 / 0x0002 / 4000312 / 0x0002 / 40003
1.1.1.8.0.255Import Active Energy (Total)24 / 0x0004 / 4000524 / 0x0004 / 40005
1.1.2.8.0.255Export Active Energy (Total)36 / 0x0006 / 4000736 / 0x0006 / 40007
1.1.3.8.0.255Import Reactive Energy Q1+Q4 (Total)48 / 0x0008 / 4000948 / 0x0008 / 40009
1.1.4.8.0.255Export Reactive Energy Q2+Q3 (Total)510 / 0x000A / 40011510 / 0x000A / 40011
1.1.5.8.0.255Reactive Energy Q1 (Total)612 / 0x000C / 40013612 / 0x000C / 40013
1.1.6.8.0.255Reactive Energy Q2 (Total)714 / 0x000E / 40015714 / 0x000E / 40015
1.1.7.8.0.255Reactive Energy Q3 (Total)816 / 0x0010 / 40017816 / 0x0010 / 40017
1.1.8.8.0.255Reactive Energy Q4 (Total)918 / 0x0012 / 40019918 / 0x0012 / 40019
1.1.1.9.1.255Import Active Energy T11020 / 0x0014 / 400211020 / 0x0014 / 40021
1.1.1.9.2.255Import Active Energy T21122 / 0x0016 / 400231122 / 0x0016 / 40023
1.1.1.9.3.255Import Active Energy T31224 / 0x0018 / 400251224 / 0x0018 / 40025
1.1.1.9.4.255Import Active Energy T41326 / 0x001A / 400271326 / 0x001A / 40027
1.1.2.9.1.255Export Active Energy T11428 / 0x001C / 400291428 / 0x001C / 40029
1.1.2.9.2.255Export Active Energy T21530 / 0x001E / 400311530 / 0x001E / 40031
1.1.2.9.3.255Export Active Energy T31632 / 0x0020 / 400331632 / 0x0020 / 40033
1.1.2.9.4.255Export Active Energy T41734 / 0x0022 / 400351734 / 0x0022 / 40035
1.1.5.9.1.255Reactive Energy Q1 T11836 / 0x0024 / 400371836 / 0x0024 / 40037
1.1.5.9.2.255Reactive Energy Q1 T21938 / 0x0026 / 400391938 / 0x0026 / 40039
1.1.5.9.3.255Reactive Energy Q1 T32040 / 0x0028 / 400412040 / 0x0028 / 40041
1.1.5.9.4.255Reactive Energy Q1 T42142 / 0x002A / 400432142 / 0x002A / 40043
1.1.6.9.1.255Reactive Energy Q2 T12244 / 0x002C / 400452244 / 0x002C / 40045
1.1.6.9.2.255Reactive Energy Q2 T22346 / 0x002E / 400472346 / 0x002E / 40047
1.1.6.9.3.255Reactive Energy Q2 T32448 / 0x0030 / 400492448 / 0x0030 / 40049
1.1.6.9.4.255Reactive Energy Q2 T42550 / 0x0032 / 400512550 / 0x0032 / 40051
1.1.7.9.1.255Reactive Energy Q3 T12652 / 0x0034 / 400532652 / 0x0034 / 40053
1.1.7.9.2.255Reactive Energy Q3 T22754 / 0x0036 / 400552754 / 0x0036 / 40055
1.1.7.9.3.255Reactive Energy Q3 T32856 / 0x0038 / 400572856 / 0x0038 / 40057
1.1.7.9.4.255Reactive Energy Q3 T42958 / 0x003A / 400592958 / 0x003A / 40059
1.1.8.9.1.255Reactive Energy Q4 T13060 / 0x003C / 400613060 / 0x003C / 40061
1.1.8.9.2.255Reactive Energy Q4 T23162 / 0x003E / 400633162 / 0x003E / 40063
1.1.8.9.3.255Reactive Energy Q4 T33264 / 0x0040 / 400653264 / 0x0040 / 40065
1.1.8.9.4.255Reactive Energy Q4 T43366 / 0x0042 / 400673366 / 0x0042 / 40067
1.1.31.7.0.255Phase L1 Current3468 / 0x0044 / 400694284 / 0x0054 / 40085
1.1.51.7.0.255Phase L2 Current3570 / 0x0046 / 400714386 / 0x0056 / 40087
1.1.71.7.0.255Phase L3 Current3672 / 0x0048 / 400734488 / 0x0058 / 40089
1.1.32.7.0.255Phase L1 Voltage3774 / 0x004A / 400754590 / 0x005A / 40091
1.1.52.7.0.255Phase L2 Voltage3876 / 0x004C / 400774692 / 0x005C / 40093
1.1.72.7.0.255Phase L3 Voltage3978 / 0x004E / 400794794 / 0x005E / 40095
1.1.1.6.1.255Max. Import Active Power T14080 / 0x0050 / 400813468 / 0x0044 / 40069
1.1.1.6.2.255Max. Import Active Power T24182 / 0x0052 / 400833570 / 0x0046 / 40071
1.1.1.6.3.255Max. Import Active Power T34284 / 0x0054 / 400853672 / 0x0048 / 40073
1.1.1.6.4.255Max. Import Active Power T44386 / 0x0056 / 400873774 / 0x004A / 40075
1.1.2.6.1.255Max. Export Active Power T14488 / 0x0058 / 400893876 / 0x004C / 40077
1.1.2.6.2.255Max. Export Active Power T24590 / 0x005A / 400913978 / 0x004E / 40079
1.1.2.6.3.255Max. Export Active Power T34692 / 0x005C / 400934080 / 0x0050 / 40081
1.1.2.6.4.255Max. Export Active Power T44794 / 0x005E / 400954182 / 0x0052 / 40083

11.7.3 Actaris/Itron profile

OBIS codeMeaning (web page text)Factory indexFactory address of row 1 (dec / hex / holding register)Index after a save with 3.00.00 / 3.00.01Address of row 1 after such a save
0.0.1.0.0.255Clock / Date-Time00 / 0x0000 / 4000100 / 0x0000 / 40001
0.0.96.1.255.255Serial Number12 / 0x0002 / 4000312 / 0x0002 / 40003
1.1.1.8.0.255Import Active Energy (Total)24 / 0x0004 / 4000524 / 0x0004 / 40005
1.1.2.8.0.255Export Active Energy (Total)36 / 0x0006 / 4000736 / 0x0006 / 40007
1.1.3.8.0.255Import Reactive Energy Q1+Q4 (Total)48 / 0x0008 / 4000948 / 0x0008 / 40009
1.1.4.8.0.255Export Reactive Energy Q2+Q3 (Total)510 / 0x000A / 40011510 / 0x000A / 40011
1.1.5.8.0.255Reactive Energy Q1 (Total)612 / 0x000C / 40013612 / 0x000C / 40013
1.1.6.8.0.255Reactive Energy Q2 (Total)714 / 0x000E / 40015714 / 0x000E / 40015
1.1.7.8.0.255Reactive Energy Q3 (Total)816 / 0x0010 / 40017816 / 0x0010 / 40017
1.1.8.8.0.255Reactive Energy Q4 (Total)918 / 0x0012 / 40019918 / 0x0012 / 40019
1.1.9.8.0.255Apparent Energy Import (Total)1020 / 0x0014 / 400211020 / 0x0014 / 40021
1.1.A.8.0.255Apparent Energy Export (Total)1122 / 0x0016 / 400231122 / 0x0016 / 40023
1.1.1.8.1.255Import Active Energy T11224 / 0x0018 / 400252040 / 0x0028 / 40041
1.1.1.8.2.255Import Active Energy T21326 / 0x001A / 400272142 / 0x002A / 40043
1.1.1.8.3.255Import Active Energy T31428 / 0x001C / 400292244 / 0x002C / 40045
1.1.2.8.1.255Export Active Energy T11530 / 0x001E / 400312346 / 0x002E / 40047
1.1.2.8.2.255Export Active Energy T21632 / 0x0020 / 400332448 / 0x0030 / 40049
1.1.2.8.3.255Export Active Energy T31734 / 0x0022 / 400352550 / 0x0032 / 40051
1.1.128.8.1.255MID Import Active Energy Rate 11836 / 0x0024 / 400372652 / 0x0034 / 40053
1.1.130.8.1.255MID Export Active Energy Rate 11938 / 0x0026 / 400392754 / 0x0036 / 40055
1.1.5.8.1.255Reactive Energy Q1 T12040 / 0x0028 / 400412856 / 0x0038 / 40057
1.1.6.8.1.255Reactive Energy Q2 T12142 / 0x002A / 400432958 / 0x003A / 40059
1.1.7.8.1.255Reactive Energy Q3 T12244 / 0x002C / 400453060 / 0x003C / 40061
1.1.8.8.1.255Reactive Energy Q4 T12346 / 0x002E / 400473162 / 0x003E / 40063
1.1.1.9.1.255Import Active Energy T12448 / 0x0030 / 400491224 / 0x0018 / 40025
1.1.1.9.2.255Import Active Energy T22550 / 0x0032 / 400511326 / 0x001A / 40027
1.1.2.9.1.255Export Active Energy T12652 / 0x0034 / 400531428 / 0x001C / 40029
1.1.2.9.2.255Export Active Energy T22754 / 0x0036 / 400551530 / 0x001E / 40031
1.1.3.9.1.255Import Reactive Energy Q1+Q4 T12856 / 0x0038 / 400571632 / 0x0020 / 40033
1.1.3.9.2.255Import Reactive Energy Q1+Q4 T22958 / 0x003A / 400591734 / 0x0022 / 40035
1.1.4.9.1.255Export Reactive Energy Q2+Q3 T13060 / 0x003C / 400611836 / 0x0024 / 40037
1.1.4.9.2.255Export Reactive Energy Q2+Q3 T23162 / 0x003E / 400631938 / 0x0026 / 40039
1.1.1.7.0.255Import Active Power3264 / 0x0040 / 400654080 / 0x0050 / 40081
1.1.2.7.0.255Export Active Power3366 / 0x0042 / 400674182 / 0x0052 / 40083
1.1.3.7.0.255Import Reactive Power Q1+Q43468 / 0x0044 / 400694284 / 0x0054 / 40085
1.1.4.7.0.255Export Reactive Power Q2+Q33570 / 0x0046 / 400714386 / 0x0056 / 40087
1.1.5.7.0.255Reactive Power Q13672 / 0x0048 / 400734488 / 0x0058 / 40089
1.1.6.7.0.255Reactive Power Q23774 / 0x004A / 400754590 / 0x005A / 40091
1.1.7.7.0.255Reactive Power Q33876 / 0x004C / 400774692 / 0x005C / 40093
1.1.8.7.0.255Reactive Power Q43978 / 0x004E / 400794794 / 0x005E / 40095
1.1.31.7.0.255Phase L1 Current4080 / 0x0050 / 400813468 / 0x0044 / 40069
1.1.51.7.0.255Phase L2 Current4182 / 0x0052 / 400833570 / 0x0046 / 40071
1.1.71.7.0.255Phase L3 Current4284 / 0x0054 / 400853672 / 0x0048 / 40073
1.1.32.7.0.255Phase L1 Voltage4386 / 0x0056 / 400873774 / 0x004A / 40075
1.1.52.7.0.255Phase L2 Voltage4488 / 0x0058 / 400893876 / 0x004C / 40077
1.1.72.7.0.255Phase L3 Voltage4590 / 0x005A / 400913978 / 0x004E / 40079
0.0.98.133.61.255Demand Profile 14692 / 0x005C / 400933264 / 0x0040 / 40065
0.0.98.133.62.255Demand Profile 24794 / 0x005E / 400953366 / 0x0042 / 40067

11.7.4 Iskra DLMS, Cewe DLMS and Generic DLMS profiles (the three lists are the same)

OBIS codeMeaning (web page text)Factory indexFactory address of row 1 (dec / hex / holding register)Index after a save with 3.00.00 / 3.00.01Address of row 1 after such a save
0.0.1.0.0.255Clock / Date-Time00 / 0x0000 / 4000100 / 0x0000 / 40001
0.0.96.1.0.255Serial Number12 / 0x0002 / 4000312 / 0x0002 / 40003
1.0.1.8.0.255Import Active Energy (Total)24 / 0x0004 / 4000524 / 0x0004 / 40005
1.0.2.8.0.255Export Active Energy (Total)36 / 0x0006 / 4000736 / 0x0006 / 40007
1.0.3.8.0.255Import Reactive Energy Q1+Q4 (Total)48 / 0x0008 / 4000948 / 0x0008 / 40009
1.0.4.8.0.255Export Reactive Energy Q2+Q3 (Total)510 / 0x000A / 40011510 / 0x000A / 40011
1.0.5.8.0.255Reactive Energy Q1 (Total)612 / 0x000C / 40013612 / 0x000C / 40013
1.0.6.8.0.255Reactive Energy Q2 (Total)714 / 0x000E / 40015714 / 0x000E / 40015
1.0.7.8.0.255Reactive Energy Q3 (Total)816 / 0x0010 / 40017816 / 0x0010 / 40017
1.0.8.8.0.255Reactive Energy Q4 (Total)918 / 0x0012 / 40019918 / 0x0012 / 40019
1.0.9.8.0.255Apparent Energy Import (Total)1020 / 0x0014 / 400211020 / 0x0014 / 40021
1.0.A.8.0.255Apparent Energy Export (Total)1122 / 0x0016 / 400231122 / 0x0016 / 40023
1.0.1.8.1.255Import Active Energy T11224 / 0x0018 / 400251224 / 0x0018 / 40025
1.0.1.8.2.255Import Active Energy T21326 / 0x001A / 400271326 / 0x001A / 40027
1.0.1.8.3.255Import Active Energy T31428 / 0x001C / 400291428 / 0x001C / 40029
1.0.1.8.4.255Import Active Energy T41530 / 0x001E / 400311530 / 0x001E / 40031
1.0.2.8.1.255Export Active Energy T11632 / 0x0020 / 400331632 / 0x0020 / 40033
1.0.2.8.2.255Export Active Energy T21734 / 0x0022 / 400351734 / 0x0022 / 40035
1.0.2.8.3.255Export Active Energy T31836 / 0x0024 / 400371836 / 0x0024 / 40037
1.0.2.8.4.255Export Active Energy T41938 / 0x0026 / 400391938 / 0x0026 / 40039
1.0.3.8.1.255Import Reactive Energy Q1+Q4 T12040 / 0x0028 / 400412040 / 0x0028 / 40041
1.0.3.8.2.255Import Reactive Energy Q1+Q4 T22142 / 0x002A / 400432142 / 0x002A / 40043
1.0.3.8.3.255Import Reactive Energy Q1+Q4 T32244 / 0x002C / 400452244 / 0x002C / 40045
1.0.3.8.4.255Import Reactive Energy Q1+Q4 T42346 / 0x002E / 400472346 / 0x002E / 40047
1.0.4.8.1.255Export Reactive Energy Q2+Q3 T12448 / 0x0030 / 400492448 / 0x0030 / 40049
1.0.4.8.2.255Export Reactive Energy Q2+Q3 T22550 / 0x0032 / 400512550 / 0x0032 / 40051
1.0.4.8.3.255Export Reactive Energy Q2+Q3 T32652 / 0x0034 / 400532652 / 0x0034 / 40053
1.0.4.8.4.255Export Reactive Energy Q2+Q3 T42754 / 0x0036 / 400552754 / 0x0036 / 40055
1.0.1.7.0.255Import Active Power2856 / 0x0038 / 400573876 / 0x004C / 40077
1.0.2.7.0.255Export Active Power2958 / 0x003A / 400593978 / 0x004E / 40079
1.0.3.7.0.255Import Reactive Power Q1+Q43060 / 0x003C / 400614080 / 0x0050 / 40081
1.0.4.7.0.255Export Reactive Power Q2+Q33162 / 0x003E / 400634182 / 0x0052 / 40083
1.0.5.7.0.255Reactive Power Q13264 / 0x0040 / 400654284 / 0x0054 / 40085
1.0.6.7.0.255Reactive Power Q23366 / 0x0042 / 400674386 / 0x0056 / 40087
1.0.7.7.0.255Reactive Power Q33468 / 0x0044 / 400694488 / 0x0058 / 40089
1.0.8.7.0.255Reactive Power Q43570 / 0x0046 / 400714590 / 0x005A / 40091
1.0.9.7.0.255Apparent Power Import3672 / 0x0048 / 400734692 / 0x005C / 40093
1.0.A.7.0.255Apparent Power Export3774 / 0x004A / 400754794 / 0x005E / 40095
1.0.31.7.0.255Phase L1 Current3876 / 0x004C / 400773264 / 0x0040 / 40065
1.0.51.7.0.255Phase L2 Current3978 / 0x004E / 400793366 / 0x0042 / 40067
1.0.71.7.0.255Phase L3 Current4080 / 0x0050 / 400813468 / 0x0044 / 40069
1.0.32.7.0.255Phase L1 Voltage4182 / 0x0052 / 400833570 / 0x0046 / 40071
1.0.52.7.0.255Phase L2 Voltage4284 / 0x0054 / 400853672 / 0x0048 / 40073
1.0.72.7.0.255Phase L3 Voltage4386 / 0x0056 / 400873774 / 0x004A / 40075
1.0.1.6.0.255Max. Import Active Power (Total)4488 / 0x0058 / 400892856 / 0x0038 / 40057
1.0.2.6.0.255Max. Export Active Power (Total)4590 / 0x005A / 400912958 / 0x003A / 40059
1.0.3.6.0.255Max. Import Reactive Power Q1+Q44692 / 0x005C / 400933060 / 0x003C / 40061
1.0.4.6.0.255Max. Export Reactive Power Q2+Q34794 / 0x005E / 400953162 / 0x003E / 40063

11.8 The same values over MQTT and LoRaWAN

The MQTT data format "OBIS VALUES AS MODBUS FRAME" and the LoRaWAN meter data message carry the same 32-bit values in the same word order ("Modbus Word (Register) Swap" applies). The MQTT frame always carries all 48 indexes; the LoRaWAN message carries the enabled codes only. See chapter 13 "MQTT Communication Example" and chapter 14 "LoRaWAN Communication Example".

11.9 Example: reading row 2, three values

Row 2, factory IEC list, values "1.8.0" (index 3), "1.8.1" (index 4) and "1.8.2" (index 5):

  • start address = 1 x 256 + 2 x 3 = 262 (0x0106), holding register 40263,
  • quantity = 3 x 2 = 6 registers.

Example request (Modbus TCP, transaction 5, "Gateway Modbus Address" 1):

00 05  00 00  00 06  01  03  01 06  00 06

The answer has the form of 12.3 "Reading with function code 3 (example)": length field 00 0F, byte count 0C (12), then three 4-byte values.

12. Modbus Communication Example

The gateway reads IEC 62056-21 (mode C) and DLMS/COSEM electricity meters and keeps the values of up to 48 OBIS codes for every meter row. A Modbus master reads these values with function code 3 (Read Holding Registers).

The "Device Function" on the "Operating Mode" page decides which Modbus side the gateway has:

Device FunctionMetersModbus side
"Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)"on RS232 / RS485 (or optical probe)Modbus TCP server
"TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)"over TCP/IPModbus RTU slave on the serial port

Number of meter rows: 32 on the standard and LoRaWAN models, 10 on the Lite models (LKM154-Lite, LKM354-Lite), 1 on the EMH models (LKM615, LKM616). On the Lite models the meters are read over RS485 only (no RS232). The EMH models offer only the first device function.

NOTE:

The full register map (address rule, data types, default OBIS lists of every profile) is in chapter 11 "Modbus Register Map and Data Types" "Modbus Register Map and Data Types". This chapter shows a worked example.

12.1 Modbus settings

On the "Gateway Settings" page:

FieldMeaningFactory value
"Gateway Modbus Address"Unit ID (Modbus TCP) or slave address (Modbus RTU) the gateway answers to: 1 to 247. A request with another address gets no answer.1
"Modbus Word (Register) Swap"Off: each 32-bit value is sent high word first. On: low word first.off

Use an address from 1 to 247. The page refuses another value ("Modbus Address should be a number between 1 and 247"), and the gateway keeps its previous address. Set the Unit ID (slave ID) of your Modbus master to the same number: a master that sends Unit ID 0 or 255 gets no answer.

On the "Network Settings" page (Modbus TCP server only):

FieldMeaningFactory value
"Server Listening Port"TCP port of the Modbus TCP server.502
"Maximum Number of Clients"How many Modbus TCP masters can be connected at the same time, 1 to 10.2

Changes on "Gateway Settings" (address, swap, OBIS codes) and the meter list are applied at once. Changes on "Network Settings" take effect after a restart ("Management" > "Reboot Device").

NOTE:

When all client places are in use, a further master is not left waiting: its connection is accepted and, if no place becomes free within about 0.25 s, closed at once (TCP reset). The device log shows "TCP client refused - all client slots in use" (for the first three refusals and then for every 100th). Set "Maximum Number of Clients" to the number of masters that read the gateway.

12.2 Register addresses

The register address carries the meter row and the OBIS index:

  • high byte = meter row - 1 (row 1 = 0x00xx, row 2 = 0x01xx, ... row 32 = 0x1Fxx),
  • low byte = 2 x OBIS index (OBIS index 0 to 47, the position of the code in the OBIS list of the meter's profile, see 11.7 "Default OBIS lists").

Every value takes 2 registers (32 bits). The start address must be even.

RowOBIS index 3 (factory IEC list: "1.8.0")Holding register (1-based tools)
10x0006 (6)40007
20x0106 (262)40263
100x0906 (2310)42311
32 (standard and LoRaWAN models only)0x1F06 (7942)47943

A row is answered only while it is enabled in the meter list. All rows can be read by one master or by several masters at the same time.

12.3 Reading with function code 3 (example)

Example request: read 8 registers (4 values: "1.8.0", "1.8.1", "1.8.2", "1.8.3") of row 1 from a gateway with "Gateway Modbus Address" 1:

00 01  00 00  00 06  01  03  00 06  00 08
BytesMeaning
00 01Transaction identifier (copied into the answer)
00 00Protocol identifier (must be 0)
00 06Length: 6 bytes follow (must be 6)
01Unit ID = "Gateway Modbus Address"
03Function code 3
00 06Start address: row 1 (00), OBIS index 3 (06)
00 08Number of registers: 8 (4 values x 2 registers)

Example answer, with the readout lines 1.8.0(302.367*kWh), 1.8.1(180.120*kWh), 1.8.2(097.512*kWh), 1.8.3(024.735*kWh):

00 01  00 00  00 13  01  03  10  00 04 9D 1F  00 02 BF 98  00 01 7C E8  00 00 60 9F
BytesMeaning
00 13Length: 19 bytes follow
1016 data bytes
00 04 9D 1F"1.8.0" = 302367
00 02 BF 98"1.8.1" = 180120
00 01 7C E8"1.8.2" = 97512
00 00 60 9F"1.8.3" = 24735

With "Modbus Word (Register) Swap" on, the same values come as 9D 1F 00 04 BF 98 00 02 7C E8 00 01 60 9F 00 00.

The same values of row 2: start address 01 06.

12.4 How a value is converted

IEC 62056-21 meters: the gateway takes the digits between the brackets of the readout line and drops the decimal separator, leading zeros, the unit and every other character (also letters, so a hexadecimal value cannot be read). A minus sign at the start of the value is kept: the value is then negative.

Readout lineValue in the register
1.8.0(302.367*kWh)302367
5.8.0(058.000*kvarh)58000
0.9.1(10:29:47)102947
C.1.0(ELM82733811)82733811
16.7.0(-001.234*kW)-1234 (signed 32-bit)

The number of decimals is the one the meter shows. Your Modbus application applies the scale (here / 1000). You can compare the values with the "Gateway Status" page.

NOTE:

A minus sign inside a value (for example in a date such as 0.9.2(26-10-16)) is dropped; only a minus sign at the start of the value makes it negative.

DLMS/COSEM meters: the register holds the raw meter value x 1000 (the gateway keeps three decimals and removes the decimal point). The scaler of the meter object is not applied. The clock object ("0.0.1.0.0.255") arrives as a Unix time stamp (seconds), the serial number as its digits. Negative values (signed DLMS integer types and float types) keep their sign.

NOTE:

Limits of the 32-bit register: - IEC 62056-21 values: the digits without the decimal separator must fit in 32 bits. A larger value gives the limit value 4294967295 (0xFFFFFFFF), a larger negative value the limit value -2147483648 (0x80000000). - DLMS values: a raw value from 0 to 4294967.295 fits as an unsigned 32-bit value, a negative raw value down to -2147483.648 as a signed 32-bit value. A larger value gives the limit value 4294967295 (0xFFFFFFFF), a smaller negative value the limit value -2147483648 (0x80000000). A register at a limit value may be out of range. This is the case, for example, for an energy register in Wh above 4294 kWh. For such registers use the MQTT data format "OBIS VALUES AS OBJECTS" (chapter 13 "MQTT Communication Example") or the "Gateway Status" page: they show the full value as text. - Read a register that cannot be negative (for example energy) as unsigned 32-bit, and a register that can be negative (for example power with direction) as signed 32-bit.

See chapter 11 "Modbus Register Map and Data Types" "Modbus Register Map and Data Types" for the details.

12.5 What the master gets when something is missing

The gateway sends no Modbus exception responses. It does not answer when:

  • the function code is not 3,
  • the unit ID / slave address is not the "Gateway Modbus Address",
  • the start address is odd or its low byte is 96 (0x60) or more,
  • the row (high byte) is not enabled in the meter list,
  • the number of registers is 0, odd (for example 1) or larger than 125,
  • (Modbus TCP) the protocol identifier is not 0 or the length field is not 6,
  • (Modbus RTU) the CRC is wrong.

Set the master's timeout and treat a missing answer as an error.

SituationRegister value
Row enabled but not read yet since the start0
OBIS code disabled or not found in the readout0, or the last value read before (until the gateway restarts)
Reading failed (no answer)the values of the last reading stay; values found before the time-out are taken over
"ID MISMATCH" on "Meter Reading Status" (another meter answered)the values of that reading are dropped; the last good values stay

NOTE:

The registers carry no time stamp or quality flag. To see when a row was read last, use the "Device Status" page ("Last Query Time" in "Meter Communication Status").

NOTE:

Always ask for an even number of registers that ends at or before OBIS index 47. An odd number gets no answer; a request that runs past index 47 is answered only up to index 47. Many Modbus masters reject an answer whose length differs from the request.

12.6 Example: three meters, read with a Modbus TCP master

12.6.1 Step 1 - Enter the meters

On the "Operating Mode" page enter the meters in the "Scheduler Settings" table and check "Enable" for each row. In this example (the same data set is used in chapter 11 "Modbus Register Map and Data Types", chapter 13 "MQTT Communication Example" and chapter 14 "LoRaWAN Communication Example"):

  • row 1: meter ELM82733811 on the RS232 port, "Serial Interface:" RS232, "Start Baud Rate:" 300, "Location Name or Serial Number" ELM82733811,
  • rows 2 and 3: two meters on one RS485 line, "Serial Interface:" RS485, "IEC Address:" 5061905 and 5061906.

Click "Save Configuration". The meter list is applied without a restart.

LKM154 v3.00.02, Operating Mode page, Scheduler Settings with 3 enabled IEC rows: row 1 on RS232, rows 2 and 3 on RS485 with "IEC Addr:" 5061905 and 5061906 in their settings line

NOTE:

When several meters share one RS485 line, enter the meter address (serial number) in every row. The gateway checks that the answer comes from the addressed meter (see "ID MISMATCH" in chapter 10 "Configuration via WEB Interface").

12.6.2 Step 2 - Check the readings

Open "Device Status" and check "Last Serial Package" and "Status" in "Meter Communication Status".

LKM154 v3.00.02, Device Status page, Meter Communication Status with 3 rows read

Open "Meter Reading Status" and check that the reading of each row ends with "READING FINISHED S:<s> R:<row>" without "ERROR".

LKM154 v3.00.02, Meter Reading Status page with "READING FINISHED" lines without "ERROR" for rows 1-3

12.6.3 Step 3 - Choose the OBIS codes

Open "Gateway Settings". Adapt the OBIS codes of the IEC 62056-21 tab to the readout of your meters and click "Save Configuration". In this example the factory list (24 enabled codes) is kept.

LKM154 v3.00.02, Gateway Settings page, "OBIS Code Settings" card, "IEC 62056-21" tab with the factory list (24 codes enabled), counter "24 / 48 enabled"

12.6.4 Step 4 - Check the values on the gateway

Open "Gateway Status", select the meter in "Show OBIS Values For", click "Set Show Meter Value" and check the values in "Reading OBIS Details".

LKM154 v3.00.02, Gateway Status page, Reading OBIS Details of row 1

12.6.5 Step 5 - Read the registers

Connect the Modbus TCP master to the gateway's IP address and "Server Listening Port" (502). Create one read per meter:

MeterUnit IDFunctionStart addressRegisters
Row 1103 Read Holding Registers0 (0x0000)48 (24 values)
Row 2103256 (0x0100)48
Row 3103512 (0x0200)48

Set the display of the master to 32-bit integer, big-endian (or word swapped if "Modbus Word (Register) Swap" is on).

NOTE:

In Modbus Poll (version 5.0.1) the display depends on "Modbus Word (Register) Swap" on the "Gateway Settings" page: not checked (factory setting) - "Long Inverse"; checked - "Long". With the other one the two halves of each value are swapped.

Modbus Poll on a PC, three read windows (rows 1-3, start addresses 0, 256 and 512, 48 registers each), display "Long Inverse" with "Modbus Word (Register) Swap" not checked, showing the 32-bit values of Gateway Status

13. MQTT Communication Example

In both device functions the gateway can publish the meter values to an MQTT broker at the same time as it serves them over Modbus (and, on the LoRaWAN models, over LoRaWAN). One message is published per meter row after a successful reading.

13.1 MQTT settings

Go to "Network Settings" and check "Enable MQTT Publisher for Enabled Obis Codes". The fields:

FieldMeaningMax. lengthFactory value
"MQTT Broker IP or URL"IP address or host name of the broker64mqtt.tago.io
"MQTT Broker Port"TCP port of the broker5 digits1883
"Client ID"MQTT client identifier32MQTT_LKM_Client
"User Name"user name for the broker64MQTT_LKM_User
"Password"password (or token) for the broker4836 asterisks (a placeholder, not usable) - enter your broker password or token
"Publish Topic"topic of the meter messages32MQTT_LKM_Publish_topic
"Subscribe Topic"topic the gateway listens to (13.5 "Subscribe topic: configuration over MQTT")32MQTT_LKM_Subscribe_topic
"Minimum Send Interval for a Parsed Data (in seconds)"shortest time between two messages of the same meter row0 to 6553560
"Data Format""OBIS VALUES AS OBJECTS" or "OBIS VALUES AS MODBUS FRAME"-"OBIS VALUES AS OBJECTS"

The field shows the stored password as dots; the eye button at the right end of the field shows or hides it (10.3.2 "MQTT Settings"). Type a new password to replace it; a field left empty returns to the stored password.

Click "Save Configuration", then restart the gateway ("Management" > "Reboot Device"). The MQTT settings take effect after the restart.

NOTE:

The gateway connects with plain MQTT over TCP only (no TLS encryption). Use the plain MQTT port of your broker, normally 1883.

Connection details: MQTT 3.1.1, QoS 0, clean session, no retained messages, keep-alive 120 s. The user name and password are always sent.

13.2 Message format "OBIS VALUES AS OBJECTS"

Topic: "Publish Topic". Payload: one JSON object per meter row. Example for row 1 of 12.6 "Example: three meters, read with a Modbus TCP master" (factory IEC list, 24 enabled codes):

{"LKMNme":"LKM_SERVER","Time":"1792146600","MtrAdr":"ELM82733811","MtrNmr":"1","Data":{"F.F":"0","0.9.1":"102947","0.9.2":"261016","1.8.0":"302367","1.8.1":"180120","1.8.2":"97512","1.8.3":"24735","2.8.0":"12400","2.8.1":"8100","2.8.2":"4300","2.8.3":"0","5.8.0":"58000","6.8.0":"1250","7.8.0":"840","8.8.0":"21300","1.6.0":"1250","2.6.0":"430","32.7.0":"2301","52.7.0":"2298","72.7.0":"2310","31.7.0":"520","51.7.0":"485","71.7.0":"502","C.1.0":"82733811"}}
KeyContent
"LKMNme""Device Name" of the gateway ("Operating Mode" page)
"Time"UTC Unix time in seconds (1792146600 = 2026-10-16 10:30:00 UTC); present only when the gateway has the time from the NTP server
"MtrAdr""Location Name or Serial Number" of the meter row; "-" if empty
"MtrNmr"meter row number (1 = first row of "Scheduler Settings")
"Data"one pair per enabled OBIS code of the row's profile: OBIS code and stored value, both as text; "-" when no value is stored

The value text is the stored value: for IEC 62056-21 meters the digits of the readout value without decimal separator ("302.367" -> "302367"), with a leading "-" for a negative value; for DLMS meters the raw value with three decimals ("12041.000", with a leading "-" for a negative value of a signed type), the clock as Unix time and the serial number as text (see chapter 11 "Modbus Register Map and Data Types" "Modbus Register Map and Data Types"). This format is not limited to 32 bits: use it for DLMS values that are too large for a Modbus register (11.5 "Data types and value conversion").

A message is at most 2700 bytes. If the enabled codes do not fit, the list is cut, the JSON stays valid and the device log shows "MQTT message size limit - OBIS list cut at index: n".

Quotes and backslashes in the device name or location name are escaped, so the payload is always valid JSON.

13.3 Message format "OBIS VALUES AS MODBUS FRAME"

The keys are the same; "Data" holds one key "ModFr" with a hex string: one byte count (C0 = 192), then all 48 values of the row as 32-bit integers in OBIS index order (4 bytes each). It is the data part of a Modbus answer for start address 0, 96 registers. A disabled code gives 0, or the last value read before it was disabled. Example for the same row:

{"LKMNme":"LKM_SERVER","Time":"1792146600","MtrAdr":"ELM82733811","MtrNmr":"1","Data":{"ModFr":"C000000000000192230003FB9800049D1F0002BF9800017CE80000609F0000307000001FA4000010CC000000000000E290000004E20000034800005334000004E2000001AE000008FD000008FA0000090600000208000001E5000001F604EE6AF3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}
PartMeaning
C0192 data bytes follow
00000000index 0, "F.F" = 0
00019223index 1, "0.9.1" = 102947
0003FB98index 2, "0.9.2" = 261016
00049D1Findex 3, "1.8.0" = 302367
...indexes 4 to 23
04EE6AF3index 23, "C.1.0" = 82733811
00000000 x 24indexes 24 to 47 (disabled at the factory)

"Modbus Word (Register) Swap" changes the word order here too. The conversion and the 32-bit limits of 11.5 "Data types and value conversion" apply (signed and unsigned values, limit values for values that do not fit).

13.4 When messages are sent, and what happens without a broker

  • A message of a meter row is prepared after every successful reading of that row. It is published when "Minimum Send Interval for a Parsed Data (in seconds)" has passed since the last message of the same row. It carries the values at the time it is sent. Readings in between are not queued: the broker gets the latest values, not every reading.
  • A reading that fails, or that ends with "ID MISMATCH", produces no message.

When the broker cannot be reached:

  • the gateway tries to connect again, at most once every 5 seconds,
  • about 18 minutes after the last delivery to the broker the gateway restarts its MQTT client, and then about every 5 minutes while the broker stays unreachable (as a DHCP client the gateway first renews its DHCP address; with a fixed IP address the timing is the same),
  • the gateway does not restart because of MQTT. Meter reading, Modbus and the web pages keep working.

Messages that could not be sent are not stored: when the broker is back, each row sends its latest values.

NOTE:

A separate network watchdog checks the router (network gateway) of a gateway that gets its address by DHCP. If the router itself stops answering, this watchdog renews the address and, as the last step, restarts the unit. This is not caused by MQTT.

The "Device Status" page shows "MQTT Sent Messages" and "MQTT Status". While the gateway is connected the status is APP_MQTT_STATE_SUBSCRIBED or one of the publish / wait states that follow it (10.5.2 "Communication Counters"). The "MQTT" card at the top of the page shows "Connected" or "Not connected" in short (10.5 "MENU: Device Status").

LKM154 v3.00.02, Device Status page, Communication Counters with MQTT Sent Messages counting and MQTT Status APP_MQTT_STATE_SUBSCRIBED

13.5 Subscribe topic: configuration over MQTT

The gateway subscribes to "Subscribe Topic". A message on this topic is taken as a part of a configuration file (the same file as the configuration export of the "Management" page). Each part has the form <total length>, <position>, <length>, "<data>. After each part the gateway publishes an answer on the fixed topic MQTT_LKM_Conf_Ack_topic, for example:

{ "variable": "conf_upd_ack","value": "started","metadata": {"mqtt_topic": "MQTT_LKM_Conf_Ack_topic", "result": "OK", "position": 0, "length": 512, "response": "Configuration Uploaded", "response_1": "" }}

A complete file is stored and the gateway restarts. Meter row values that the unit cannot use are replaced by their factory value, as for an upload on the "Management" page (16.7.2 "Upload a configuration"). Parts out of order are rejected ("result": "error").

NOTE:

Anyone who can publish on the "Subscribe Topic" of your broker can change the gateway configuration. Use a broker with user accounts and topic rights, and a subscribe topic that only your system can write.

13.6 Example with TagoIO

  1. Enter the meters and check the readings (12.6 "Example: three meters, read with a Modbus TCP master", steps 1 to 4).
  2. In the TagoIO panel click "Add Device", choose "Custom MQTT", enter a device name and click "Create My Device". Copy the token of the new device.
  3. On the gateway: "Network Settings" > "Enable MQTT Publisher for Enabled Obis Codes". "MQTT Broker IP or URL": mqtt.tago.io, "MQTT Broker Port": 1883, "Password": the token. Choose the "Data Format".
  4. Click "Save Configuration" and restart the gateway.
  5. In TagoIO open "Live Inspector" of the device and start it. The messages of the meter rows appear.

LKM154 v3.00.02, Network Settings page, MQTT Settings card filled for mqtt.tago.io:1883, Password field masked (eye button at its right end)

TagoIO Live Inspector showing one OBIS VALUES AS OBJECTS message from the gateway

The use of the data (dashboards, graphs) is done in the MQTT platform.

14. LoRaWAN Communication Example

This chapter applies to the LoRaWAN models for Europe 868 MHz: LKM354, LKM454, LKM755, LKM354-Lite and LKM616. They read the meters as the other models do, serve the values over Modbus (and MQTT) and send them to a LoRaWAN network server. The pages "LoRa Settings" and "LoRa Status" are shown only on these models.

The example uses The Things Network (TTN) as network server and the example data set of 12.6 "Example: three meters, read with a Modbus TCP master" (three IEC meter rows, factory IEC list with 24 enabled codes).

14.1 LoRa Settings

First enter the meters and check the readings (12.6 "Example: three meters, read with a Modbus TCP master", steps 1 to 4). Then open "LoRa Settings".

LKM354/454 v3.00.02, LoRa Settings page, OTAA selected, EU868 band 1, ADR on, Class C, without ACK; the App Key is masked in the picture

FieldMeaningFactory value
"Band Selection""1: EUROPE 868MHz / Max. EIRP 16 dBm" or "129: EUROPE 868MHz (Rx2:SF9) / Max. EIRP 16 dBm" (Rx2 window at SF9, as TTN uses)1
"Activation Method""End-Device Activation Over-the-Air (OTAA)" or "End-Device Activation by Personalization (ABP)"OTAA
"Device EUI" (OTAA)8 bytes, read from the radio module, read-only; "Copy" copies it for the network serverfrom the module
"Application EUI" (OTAA)8 bytes (JoinEUI / AppEUI of the network server), entered as AA-BB-CC-DD-EE-FF-11-22 or AABBCCDDEEFF1122 (16 hex characters)AA-BB-CC-DD-EE-FF-11-22
"Application Key" (OTAA)16 bytes, 32 hex characters01-02-...-10
"Device Address" (ABP)4 bytes, entered as 31-1A-44-D9 or 311A44D9 (8 hex characters)31-1A-44-D9
"Network Session Key" (ABP)16 bytes, 32 hex characters00-11-...-FF
"Application Session Key" (ABP)16 bytes, 32 hex charactersFF-EE-...-00

Copy the EUIs and keys from the network server in full: an entry with fewer digits is refused (10.7.2 "Device Activation Over the Air (OTAA)").

FieldMeaningFactory value
"LoRaWAN Port"port of the meter data messages; use 3 to 255 (port 1 carries the status message, port 2 the OBIS details)3
"Adaptive Data Rate"the network server sets the data rate; "Uplink Data Rate" is then lockedon
"Uplink Data Rate""LoRa SF12 / 125 kHz / 250 bps" to "LoRa SF7 / 125 kHz / 5470 bps"SF12
"Tx Power Level (EIRP)"0 to 16 dBm16 dBm
"LoRaWAN Class""Class A" or "Class C"Class C
"Data Transmission Method""Data Transmission without ACK" (unconfirmed) or "Data Transmission with ACK" (confirmed)without ACK
"Data Format""OBIS VALUES AS MODBUS FRAME" (only option)-
"Minimum Send Interval for a Parsed Data (in seconds)"shortest time between two meter data messages of the same meter row, 0 to 6553560
"Send OBIS Code Details as Status Message At Start"also send the OBIS code list after joining (14.5 "Messages sent to the network server")off

NOTE:

"Send OBIS Code Details as Status Message At Start" is off at the factory. At SF12 the OBIS list needs many messages before the first meter data. Turn it on only if your application needs the code list from the gateway.

Click "Save Configuration" and restart the gateway ("Management" > "Reboot Device"). Of the OTAA and ABP values only those of the selected "Activation Method" are saved (10.7.4 "Communication Settings"). The LoRa settings are written to the radio module at the start.

NOTE:

On the LoRaWAN models "Set Device Time" on the "Management" page also sets the time of the radio module. The gateway does not restart. The page answers "Device time has been set.".

14.2 Add the end device in TTN - entered manually

In the TTN console click "+ Register end device", choose "Enter end device specifics manually" and select the frequency plan "Europe 863-870 MHz" and the LoRaWAN version and regional parameters version of the device. Enter the JoinEUI (the same value as "Application EUI" on the gateway), the DevEUI (copy it with "Copy" next to "Device EUI") and generate or enter the AppKey (the same value as "Application Key"). Click "Register end device".

TTN console, Register end device - manual, EU868, JoinEUI / DevEUI / AppKey filled

TTN console, device overview after registration

14.3 Add the end device in TTN - from the device repository

Choose "Select the end device in the LoRaWAN Device Repository", search for the brand REDZ, select model, hardware version, firmware version, profile and frequency plan. Then enter JoinEUI, DevEUI and AppKey as in 14.2 "Add the end device in TTN - entered manually".

TTN console, device repository, brand REDZ, LKM model selected

14.4 Check the activation

Open "LoRa Status". "Network Status" shows "JOINING (OTAA)" while joining and "ACTIVE (OTAA)" (or "ACTIVE (ABP)") when the device has joined. Then "Data Rate", "LoRaWAN Port Number", "Maximum Payload Size", "Device Address" and "Power Level (EIRP)" are shown. "Latest LoRaWAN Message Sent" shows the last payload in hex and as ASCII.

LKM354/454 v3.00.02, LoRa Status page, Network Status ACTIVE (OTAA), data rate SF10 with Maximum Payload Size 51, Latest LoRaWAN Message Sent filled

The "Device Status" page counts the LoRa messages ("N. of LoRa Messages Sent Correctly", "N. of LoRaWAN Messages Lost", "N. of LoRaWAN Messages Pending", "Last LoRaWAN Message Duty Cycle Block Time (s)"). The "LoRaWAN" card at the top of the page shows the network status and the time of the last uplink (10.5 "MENU: Device Status").

If the activation takes long, turn on the device log and follow it on the console or UDP log (chapter 18 "Logs and Troubleshooting"). In TTN, "Live data" shows the uplinks.

TTN console, Live data of the gateway: the meter data uplinks of one read-out (three packages)

14.5 Messages sent to the network server

After every join the gateway sends, in this order:

  1. a LoRaWAN time request (DeviceTimeReq) to set its clock,
  2. the status message (port 1),
  3. the OBIS details message (port 2) - only if "Send OBIS Code Details as Status Message At Start" is on,
  4. then the meter data messages ("LoRaWAN Port", factory 3).

A step that cannot be completed in 5 tries or 180 seconds is skipped, so meter data is never blocked by steps 1 to 3. The status or OBIS details message of a skipped step is dropped and counted in "N. of LoRaWAN Messages Lost", unless the radio module is still sending it.

All messages start with the same two fields:

ByteContent
0-3Device ID (shown as "Device ID" on the "Operating Mode" page, e.g. 0x03BFEB), big-endian
4lower 4 bits: message type (0 = status, 1 = OBIS details, 2 = meter data); upper 4 bits: package number (0 = first package; see 14.6 "Messages longer than the maximum payload")

14.5.1 Status message (port 1)

ByteContent
0-3Device ID
40x00
5number of enabled meter rows
6-11number of enabled OBIS codes per profile, one byte each: IEC 62056-21, Landis+Gyr DLMS, Actaris/Itron, Iskra DLMS, Cewe DLMS, Generic DLMS
12"LoRaWAN Port" of the meter data messages
13-16gateway time, packed (see below)
17-19firmware version, one byte each (v3.00.02 = 03 00 02)
20-"Device Name", ASCII, up to 21 characters

Time format (32 bits, big-endian): bits 0-5 seconds, 6-11 minutes, 12-15 month, 16-20 hours, 21-25 day, 26-31 year - 2000.

Example (built from the format, not captured): 3 meter rows, factory OBIS lists, port 3, gateway time 2026-10-16 10:30:00, v3.00.02, factory name LKM_LW_SERVER:

00 03 BF EB  00  03  18 30 30 30 30 30  03  6A 0A A7 80  03 00 02  4C 4B 4D 5F 4C 57 5F 53 45 52 56 45 52

14.5.2 OBIS details message (port 2, optional)

One message for each profile that an enabled meter row uses. After byte 4 (0x01) it carries one 8-byte entry per enabled OBIS code, in index order:

Byte of the entryContent
0profile (0 = IEC 62056-21, 1 = Landis+Gyr DLMS, 2 = Actaris/Itron, 3 = Iskra DLMS, 4 = Cewe DLMS, 5 = Generic DLMS)
1OBIS index + 1 (1 to 48)
2-7the groups of the code, one byte each (A.B.C.D.E.F); a letter group is hexadecimal (1.1.A.8.0.255 -> 01 01 0A 08 00 FF)

For the IEC 62056-21 profile the groups of the code are placed from byte 2 on and the rest is 0: "1.8.0" -> 01 08 00 00 00 00, "F.F" -> 0F 0F 00 00 00 00, "C.1.0" -> 0C 01 00 00 00 00.

NOTE:

For the DLMS profiles the index of a code is its position in the stored list. Unchecking a code moves the codes after it, and newly checked codes are added at the end (11.7 "Default OBIS lists"). Read the code list (or this message) again after every change of a DLMS list.

14.5.3 Meter data message ("LoRaWAN Port", factory 3)

ByteContent
0-3Device ID
40x02 (+ package number in the upper 4 bits)
5meter row number (1 = first row)
6OBIS index + 1 of the first value in this message
7number of data bytes that follow (4 per value)
8-values, 4 bytes each

The values are those of the enabled OBIS codes of the row's profile, in index order; disabled codes are skipped. The value of a code is the same 32-bit integer as in the Modbus register, with the same word order ("Modbus Word (Register) Swap") and the same limits (signed and unsigned values, limit values, 11.5 "Data types and value conversion"). To know which code a value belongs to, use the enabled list of the profile (from the gateway configuration or from the OBIS details message).

A meter data message of a row is sent when "Minimum Send Interval for a Parsed Data (in seconds)" has passed since the last message of that row. Between two uplinks there are at least 10 seconds. The message is built when it is sent, from the values the row has at that moment (the same values as in the Modbus registers); while a message of a row is waiting, new readings of that row change these values and do not add a second message. A row that is being read at that moment is sent after the reading has ended. The remaining packages of a split message carry the values of its first package. A failed reading or an "ID MISMATCH" reading adds no message; a message that is already waiting is sent with the values the row has then.

With "Data Transmission with ACK" a message that gets no ACK from the network server is sent again a limited number of times. When it still has no ACK, it is dropped and counted in "N. of LoRaWAN Messages Lost".

14.6 Messages longer than the maximum payload

The gateway reads the "Maximum Payload Size" from the radio module (51 bytes at SF12 in EU868) and splits longer messages itself. Each package repeats the device ID and the type byte with the package number in the upper 4 bits; a meter data package also repeats the row number and gives the OBIS index of its first value. When the radio module reports that the duty cycle blocks the channel, the gateway waits the time given by the module ("Last LoRaWAN Message Duty Cycle Block Time (s)" on "Device Status") and sends the next package then.

Example (built from the format, not captured): row 1 of 12.6 "Example: three meters, read with a Modbus TCP master", IEC 62056-21 meter, factory list (24 enabled codes), payload 51 bytes. The 96 data bytes are sent in 3 packages of up to 10 values:

00 03 BF EB 02 01 01 28 00 00 00 00 00 01 92 23 00 03 FB 98 00 04 9D 1F 00 02 BF 98 00 01 7C E8 00 00 60 9F 00 00 30 70 00 00 1F A4 00 00 10 CC
00 03 BF EB 12 01 0B 28 00 00 00 00 00 00 E2 90 00 00 04 E2 00 00 03 48 00 00 53 34 00 00 04 E2 00 00 01 AE 00 00 08 FD 00 00 08 FA 00 00 09 06
00 03 BF EB 22 01 15 10 00 00 02 08 00 00 01 E5 00 00 01 F6 04 EE 6A F3
PackageByte 4First index + 1Data bytesValues
1020128 (40)"F.F" .. "2.8.2" (index 0-9): 0, 102947, 261016, 302367, 180120, 97512, 24735, 12400, 8100, 4300
2120B (11)28 (40)"2.8.3" .. "72.7.0" (index 10-19): 0, 58000, 1250, 840, 21300, 1250, 430, 2301, 2298, 2310
32215 (21)10 (16)"31.7.0" .. "C.1.0" (index 20-23): 520, 485, 502, 82733811

The OBIS details message of the same profile needs 5 packages at 51 bytes (5 entries per package):

00 03 BF EB 01 00 01 0F 0F 00 00 00 00 00 02 00 09 01 00 00 00 00 03 00 09 02 00 00 00 00 04 01 08 00 00 00 00 00 05 01 08 01 00 00 00
00 03 BF EB 11 00 06 01 08 02 00 00 00 00 07 01 08 03 00 00 00 00 08 02 08 00 00 00 00 00 09 02 08 01 00 00 00 00 0A 02 08 02 00 00 00
00 03 BF EB 21 00 0B 02 08 03 00 00 00 00 0C 05 08 00 00 00 00 00 0D 06 08 00 00 00 00 00 0E 07 08 00 00 00 00 00 0F 08 08 00 00 00 00
00 03 BF EB 31 00 10 01 06 00 00 00 00 00 11 02 06 00 00 00 00 00 12 20 07 00 00 00 00 00 13 34 07 00 00 00 00 00 14 48 07 00 00 00 00
00 03 BF EB 41 00 15 1F 07 00 00 00 00 00 16 33 07 00 00 00 00 00 17 47 07 00 00 00 00 00 18 0C 01 00 00 00 00

If the payload is too small for even one value, the package is dropped and counted in "N. of LoRaWAN Messages Lost".

When a package of a split message is lost, the rest of that message is dropped; it is not sent later with another message. The message is counted once in "N. of LoRaWAN Messages Lost".

14.7 Payload formatter (firmware 3.00.02)

The formatter below decodes the three message types for TTN (it also works as a ChirpStack v4 codec). Set WORD_SWAP to true when "Modbus Word (Register) Swap" is on. Values are returned as raw integers; apply the scale of each OBIS code in your application. value32 returns a signed 32-bit value. For a code that cannot be negative (for example energy) whose raw value can be above 2147483647, use the unsigned value (value32(b, i) >>> 0) in your application. The limit values of 11.5 "Data types and value conversion" come out as -1 (4294967295) and -2147483648.

var WORD_SWAP = false;
var PROFILES = ["IEC 62056-21", "Landis+Gyr DLMS", "Actaris/Itron", "Iskra DLMS", "Cewe DLMS", "Generic DLMS"];

function u32(b, i) { return ((b[i] << 24) | (b[i + 1] << 16) | (b[i + 2] << 8) | b[i + 3]) >>> 0; }

function value32(b, i) {
  var v = WORD_SWAP ? (((b[i + 2] << 24) | (b[i + 3] << 16) | (b[i] << 8) | b[i + 1]) >>> 0) : u32(b, i);
  return v > 0x7FFFFFFF ? v - 0x100000000 : v;   // signed 32-bit (negative IEC and DLMS values)
}

function rtc(t) {
  return { year: 2000 + ((t >>> 26) & 0x3F), month: (t >>> 12) & 0x0F, day: (t >>> 21) & 0x1F,
           hour: (t >>> 16) & 0x1F, minute: (t >>> 6) & 0x3F, second: t & 0x3F };
}

function decodeUplink(input) {
  var b = input.bytes;
  if (b.length < 5) { return { errors: ["too short"] }; }
  var d = { deviceId: u32(b, 0), type: b[4] & 0x0F, package: (b[4] >> 4) & 0x0F };
  var i;
  if (d.type === 0 && input.fPort === 1) {
    d.meterRows = b[5];
    d.obisCount = {};
    for (i = 0; i < 6; i++) { d.obisCount[PROFILES[i]] = b[6 + i]; }
    d.dataPort = b[12];
    d.time = rtc(u32(b, 13));
    d.firmware = b[17] + "." + ("0" + b[18]).slice(-2) + "." + ("0" + b[19]).slice(-2);
    d.name = String.fromCharCode.apply(null, b.slice(20));
  } else if (d.type === 1 && input.fPort === 2) {
    d.obis = [];
    for (i = 5; i + 8 <= b.length; i += 8) {
      d.obis.push({ profile: PROFILES[b[i]] || b[i], index: b[i + 1] - 1, groups: b.slice(i + 2, i + 8) });
    }
  } else if (d.type === 2) {
    d.row = b[5];
    d.firstIndex = b[6] - 1;     // index of the first value; the next values belong to the next ENABLED codes
    d.values = [];
    for (i = 8; i + 4 <= 8 + b[7] && i + 4 <= b.length; i += 4) { d.values.push(value32(b, i)); }
  } else {
    return { errors: ["unknown message type " + d.type + " on port " + input.fPort] };
  }
  return { data: d };
}

NOTE:

The formatters of the earlier manual (firmware before v2.7.0, and v2.7.0 and later) are replaced by this formatter. Use this one for firmware 3.00.01 and 3.00.02 (the message layout is the same).

TTN console, Payload formatters, Custom Javascript formatter with the v3.00.02 code, test with a port 3 payload

15. Video Examples

Recordings of the web interface of a gateway with firmware 3.00.02. The videos have no sound; each step is described in the chapter named above the video.

15.1 Firmware update

The Management page of a gateway: the image file is chosen with "Select Firmware File", sent with "Upload Firmware" and checked by the gateway ("Checking...", then "Firmware Uploaded"); afterwards "Alternative Firmware Version" shows the uploaded version. The switch to the new firmware with "Reboot Alternative Firmware" is not part of the recording. Steps, limits and the upgrade from 2.x: 10.12.2 "Live Firmware Update", 16.4 "Update the firmware from the web interface" and 16.6 "Upgrade from firmware 2.x".

15.2 Reading meters over Modbus TCP

The example of 12.6 "Example: three meters, read with a Modbus TCP master" on a gateway in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)": the meter rows on the "Operating Mode" page, the OBIS codes on "Gateway Settings", and the pages "Device Status", "Meter Reading Status" and "Gateway Status" while a Modbus TCP master reads the meters. The connection of the gateway to the meters (direct cable or optical probe) is shown in the diagrams of 9.1 "Scenario 1 - Meter on a direct cable, read over Modbus TCP" and 9.2 "Scenario 2 - Meter on an optical probe, read over Modbus TCP".

16. Firmware Update and Upgrading

This chapter describes firmware 3.00.02: what changed since 3.00.00, which update keeps the settings, how to update the firmware from the web interface and how to back up and restore the configuration. The firmware version and its build date are shown in the header of every web page ("Version: 3.00.02, -built: <date>").

16.1 What is new in 3.00.02 and 3.00.01

16.1.1 Changes in 3.00.02

ChangeWhat you see
Negative valuesIEC 62056-21: a minus sign at the start of a value is kept (a minus sign inside a value, for example in a date, is still dropped). DLMS/COSEM: the signed integer types (integer, long, double-long, long64) keep their sign. Modbus, the MQTT Modbus frame and LoRaWAN carry such a value as a signed 32-bit integer (11.5 "Data types and value conversion"). Positive values do not change.
Values that do not fit 32 bitsA value above 4294967295 gives the limit value 4294967295 (0xFFFFFFFF), a value below -2147483648 gives -2147483648 (0x80000000). Before, such a value gave a wrong number that looked like a reading. Every value that fits gives the same register as before. For DLMS this is a raw value above 4294967.295 (11.5 "Data types and value conversion").
DLMS OBIS orderA save of "Gateway Settings" keeps the stored order of the DLMS lists: unchanged codes keep their index, an unchecked code is removed and the codes after it move up one index, new codes are added at the end (11.7 "Default OBIS lists"). Before, every save sorted the DLMS lists in the order of the page and moved registers. A unit that was saved with 3.00.00 or 3.00.01 keeps its current order.
"Set Device Time"On the LoRaWAN models the button is now named "Set Device Time", as on the other models. It never restarted the unit.
Configuration downloadWhen a download of the configuration file was stopped before the end, the next download is complete again. Before, it could start in the middle of the file.
No DHCP leaseA unit in DHCP client mode that has no lease uses its stored address (factory 192.168.1.1) without a gateway: it can be reached from its own subnet only (10.1.1 "Finding the IP address"). A lease sets the gateway of the DHCP server as before. Static address and DHCP server mode are not changed.
DHCP lease lostOnly in DHCP client mode: when the unit loses its lease and its own DHCP re-discover does not bring a new one, it first restarts its network interface; if there is still no lease, the unit restarts. Before, such a unit could stay without a lease until its 24-hour restart (10.12.6 "Restore / Reboot"). Connections are interrupted during the interface restart.
Status coloursThe status colours can be read now: on "Meter Reading Status", "Gateway Status", "LoRa Status" and the "Configuration" box of "Device Status" a coloured text is shown in green, amber or red on a dark background (chapter 10 "Configuration via WEB Interface"). Before, these texts were shown in the normal light grey.
Red lines on "Meter Reading Status"More messages that need attention are shown in red, among them "ID MISMATCH ...", "No OBIS in profile ...", "A3: ...", "BE: ..." and "IEC: previous session ended without ACK ..." (10.10 "MENU: Meter Reading Status").
"Last Login / Identification"On "Gateway Status" the field shows the identification line of the meter (IEC 62056-21) or the DLMS login line of the last meter session. Before, it could show another line of the meter session.
"System Diagnostics" cardThe "Device Status" page no longer shows the "System Diagnostics" card (a service view).
LoRaWAN split messagesOnly on the LoRaWAN models: when a package of a split message is lost, the rest of that message is dropped (14.6 "Messages longer than the maximum payload"). Before, the rest could be sent later in place of another message. A late or repeated report of the radio module for the first package no longer marks the rest of the message as sent; before, the rest could then be counted in "N. of LoRa Messages Sent Correctly" without ever being sent, and it was not counted as lost.
LoRaWAN messages and busy answers of the radio moduleOnly on the LoRaWAN models: while the radio module is still sending a message that it has accepted, its busy answers to further requests no longer restart the unit. With "Data Transmission with ACK" a message that gets no ACK is sent again a limited number of times; then it is dropped and counted in "N. of LoRaWAN Messages Lost" (14.5 "Messages sent to the network server"). Before, the unit could restart while the radio module was still sending, a message without ACK could be dropped during its first send or be sent again without end, and the message of another meter row could be dropped or counted as sent by mistake.
Overview cards on "Device Status"The "Device Status" page starts with short overview cards for the meters, Modbus, MQTT and LoRaWAN, each with a green, amber, red or grey dot (10.5 "MENU: Device Status").
"Modbus Communication Status" in the TCP/IP functionIn the function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)" the table shows one row, the Modbus RTU line. Before, it repeated the same line in as many rows as "Maximum Number of Clients".
Values the unit did not takeWhen a save contains values that the unit does not accept (for example out of range), the window is shown in amber and adds "Warning: <k> of <n> value(s) were rejected by the device and kept their previous value; the other values were saved." Before, the window confirmed the save without this line (10.1.4 "How saving works").
"Gateway Modbus Address"The page accepts 1 to 247, the range the unit stores ("Modbus Address should be a number between 1 and 247"). Before, the page also accepted 248 to 255 and the unit kept its previous address.
"REBOOT REQUIRED" on Operating ModeA save of the "Operating Mode" page shows "REBOOT REQUIRED" when "Device Function" or the network host name (from "Device Name") differs from the values the unit runs with. Before, the window did not show the note after a change of "Device Function", although a restart was needed.
Modbus RTU on a shared RS485 lineOnly in the function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)": requests to other slave addresses and the answers of other slaves on the same RS485 line are ignored; they are no longer counted as errors and no longer restart the unit. Faulty frames for the gateway's own address lead to a restart only when more than 500 bad characters arrive without a valid request in between. Before, normal traffic of other slaves, or occasional errors added up over time, restarted the unit (11.3 "Modbus RTU slave").
"Server Listening Port" and "MQTT Broker Port"The page accepts 1 to 65535, the range the unit stores ("The Server Port should be a number between 1 and 65535", "MQTT Broker Port should be a number between 1 and 65535"). Before, the page also accepted 0 and the unit kept its previous port.
"Server Listening Port" and "Maximum Number of Clients"A new value is used only after the restart, as the "REBOOT REQUIRED" note says. Before, the unit could already use the new port or number of clients for connections opened again before the restart.
Modbus register countA read (function code 3) for an odd number of registers or for more than 125 registers gets no answer, like other requests the unit cannot serve (11.4 "Address rule"). Before, an odd number was answered with one register more than asked, and more than 125 registers were not refused. Even numbers up to 124 are answered as before. A Modbus master that reads one register must now read two. In the function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)" such requests do not lead to a restart.
Several requests on one connectionThe unit answers one request per connection and then closes the connection, as before. A request that a program sends on the same connection without waiting for the answer (for example the bank switch right after the firmware file) is now ignored. Before, a firmware upload followed by such a request could stop without an answer. Send each request on a new connection. The web page and abcZ Network Tool do this.
Modbus RTU while meters are not connectedSame function: the gateway answers Modbus RTU requests also while it is starting its network or connecting to the TCP/IP meters, for example when no meter can be reached. Before, it gave no answer until the gateway reached normal operation ("App Status" "SERVING_CONNECTIONS").
Failed meter readingsOn "Meter Reading Status" a reading that fails ends with "READING FINISHED S:<s> R:<row> ERROR: <reason>", shown in red, for example "ERROR: Timeout WAIT_FOR_ACK" or "ERROR: ID MISMATCH" (10.10.2 "Messages of the unit"). The separator "--- READING COMPLETE ---" is shown only after a successful reading. Before, a failed reading ended with the same "READING FINISHED S:<s> R:<row>" line as a successful one, followed by the separator.
IEC read-out endThe check character (BCC) at the end of an IEC 62056-21 read-out is no longer shown on "Meter Reading Status". Before, it could appear as a line of one character after the line "!".
Numbers with a decimal pointThe web pages refuse a number with a decimal point (for example "502.5") in a whole-number field, with the same message as a value out of range, and the field is set back. Before, the page let such a number pass and the unit kept its previous value.
LoRaWAN "Minimum Send Interval for a Parsed Data (in seconds)"Only on the LoRaWAN models: when the page refuses the value on the "LoRa Settings" page, the field returns to its own last saved value. Before, it took the value of the MQTT field with the same name.
Configuration file of another modelA backup of another model with the same settings layout (for example an LKM655 backup on an LKM154) is refused with "Rejected: product mismatch (file '...', device '...')." Before, the long product names of several models gave "Rejected: _meta product unreadable (too long or not a string) - identity not verified." In both cases nothing is changed (16.7.2 "Upload a configuration").
Meter rows in a configuration fileWhen an uploaded configuration file (from the "Management" page or over MQTT) contains a meter row value that the unit cannot use, for example a "TCP Port:" of 0, a "Reading Table Code:" above 9, a "Start Baud Rate:" that is not in the list or a "Serial Interface:" other than RS232 / RS485, the unit uses the factory value of that field: RS485, 300 baud, TCP port 502, table code 0, "Send Init String:" 0, "Query Interval (s):" 10, "Time Out (s):" 10. The unit checks the stored rows in the same way at every start-up, also after an update to this version. Before, such a value was stored as it was, and the row could, for example, not be read or not connect to its meter (16.7.2 "Upload a configuration").
LoRaWAN "Device Address" and saving "LoRa Settings"Only on the LoRaWAN models: "Save Configuration" sends only the values of the selected "Activation Method"; the unit keeps its stored values of the other card (10.7.4 "Communication Settings"). The "Device Address" (ABP) is typed as 8 hexadecimal digits, with or without separators (for example "31-1A-44-D9" or "0x311A44D9"), and is shown as AA-BB-CC-DD; any other entry is refused with "Device Address should be a 4 Byte value (0xAABBCCDD)". A change of only the "Device Address" makes "Save Configuration" active. Before, a change of only the "Device Address" did not make "Save Configuration" active, the address was then shown without "-", the form AA-BB-CC-DD could not be typed in full, and an entry with wrong characters at the end was shortened without a message (for example "311A44ZZ" was taken as 00311A44).
LoRaWAN EUI and key fieldsOnly on the LoRaWAN models: "Application EUI" needs all 16 hexadecimal digits; "Application Key", "Network Session Key" and "Application Session Key" need all 32. Any other entry, for example a shorter one, is refused with a message and the field returns to its last saved value (10.7.2 "Device Activation Over the Air (OTAA)"). A space between the bytes is now accepted. Before, a shorter entry was filled with zeros in front without a message, for example "1234" in "Application EUI" was taken as 00-00-00-00-00-00-12-34 and saved like that; an entry with spaces was refused. A value that is already stored is not changed by the update.
LoRaWAN log after an ACKOnly on the LoRaWAN models with "Data Transmission with ACK": an ACK from the network server no longer writes the error line "LORAWAN mes. rec., NOT HANDLED. size<n>" to the log. The line now appears only when the network server sends data to the unit, which the unit does not use; <n> is the size of that data in bytes. An ACK without data gives only debug lines. Before, the ACK of a status or meter data message also wrote this error line, with the size of the message sent by the unit.
Reply of "Upload Configuration File"The reply stays inside the bar of the window, also when it needs two lines.
Configuration file with "\u" codesA text value in the configuration file may contain a "\u" code from \u0001 to \u007F; the unit stores that character. The unit itself writes control characters in text values this way when it creates its configuration file, so such a file can now be uploaded again, from the "Management" page or over MQTT. A code \u0000 or above \u007F (for example \u00E9, which some programs write for a letter with an accent) is refused with "Unsupported Escape Found at line <n>, pos. <m>. ..." and nothing is changed (16.7.2 "Upload a configuration"). Before, every "\u" code was refused with "Invalid Character Found at line <n>, pos. <m>. ...".
LoRaWAN meter data valuesOnly on the LoRaWAN models: a meter data message is built when it is sent, from the values the unit holds for the row at that moment (the same values as in the Modbus registers). While the message of a row waits in the queue, new readings of the row change the values it will carry and do not add a second message. The remaining packages of a split message carry the values of its first package. Before, a waiting message kept the values of the reading that created it, and new readings of the row were not queued (14.5 "Messages sent to the network server").
LoRaWAN status and OBIS details messagesOnly on the LoRaWAN models: the status message and the OBIS details message have their own places in the send queue, and the remaining packages of a split OBIS details message are sent before meter data. Before, they used the place of meter row 1: a waiting message of row 1 could be replaced by one of them, for example after a new join, and was then lost without being counted; while one of them waited, new readings of row 1 were not queued, and the rest of a split message was sent only when meter row 1 was enabled. A status or OBIS details message whose start step is skipped (5 tries or 180 seconds) is now dropped and counted in "N. of LoRaWAN Messages Lost" (14.5 "Messages sent to the network server").
MQTT "Password" fieldOn "Network Settings" the field shows the stored MQTT password as dots. The eye button at the right end of the field shows the password in clear text and hides it again. A field left empty returns to the stored password; type a new password to replace it. Saving works as before: the stored password is kept unless a new one is typed. Before, the field was always empty with the gray text (unchanged), and the stored password could not be seen on the page (10.3.2 "MQTT Settings").

16.1.2 Changes in 3.00.01

ChangeWhat you see
IEC meter identity checkWith several IEC 62056-21 meters on one RS485 line, a read-out from another meter than the one asked is not stored. "Meter Reading Status" shows "ID MISMATCH R:<row> got <identity in the read-out> (addr <IEC Address>) - values dropped". The row number counts from 1. The check works when the "IEC Address" of the row holds the meter serial number (6 digits or more). Only rows with the protocol "IEC62056-21 (Mode C)" are checked.
IEC session closingOnly in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)": when an IEC meter session ends without an answer, the gateway sends the IEC break message and waits for 2 seconds of line silence before it asks the next meter. "Meter Reading Status" shows "IEC: previous session ended without ACK - break sent, line quiet 2 s, row: <row> (n=<count>, +<lines not shown>)", or "... line NOT quiet in 10 s, row: <row> (n=<count>)" when the line did not become quiet. <row> is the row whose session was left open. The "line quiet" line is shown at most once a minute; "+<lines not shown>" counts the lines left out.
IEC answer waitOnly in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)", for rows with the protocol "IEC62056-21 (Mode C)": the gateway waits at least 5 seconds for an answer, even when "Time Out (s):" of the row is smaller. The stored value is not changed. "Meter Reading Status" then shows once for that row: "IEC: TimeoutInterval <t> s below minimum - using 5 s, row: <row>". TCP/IP meters (the Modbus RTU function) use the "Time Out (s):" value as it is.
MQTT broker not reachableThe device no longer restarts because of the MQTT broker. While the network gateway answers but the broker does not, the device first refreshes its DHCP address (only when it is a DHCP client) and then restarts only its MQTT connection: the first time after roughly 15 to 20 minutes without delivery, then about every 5 minutes, until the broker answers again. Meter reading, Modbus and the web interface keep running.
RS485 transmit endThe RS485 driver changes direction after the last character has left the port.
Special charactersDevice name, meter location, IEC address, DLMS password and OBIS codes that contain quotes or backslashes are shown correctly on the web pages and in MQTT messages.
Modbus TCP connectionsIn the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)": when all client slots are in use and a client leaves, a waiting client gets the free slot at once.

NOTE:

In DHCP client mode, the DHCP re-discover step can change the IP address or drop it for a moment, so a Modbus TCP or web connection can be interrupted once. When the network gateway itself cannot be reached (not only the MQTT broker), the network check of a unit in DHCP client mode can still restart the unit.

16.2 Which update keeps the settings

The settings are carried to the new firmware only when the first two numbers of the version are the same (for example 3.00.xx to 3.00.yy).

FromToSettings
3.00.013.00.02Kept (checked on an LKM154)
3.00.003.00.02Kept (checked on an LKM615)
2.xx.xx (for example 2.07.00)3.00.02Reset to factory settings

Both "Kept" rows were checked on units: after the update the configuration was the same as before, except the "_meta" block of the configuration file (it names the firmware version).

A meter row value that the unit cannot use is set to its factory value at the start (16.1.1 "Changes in 3.00.02").

NOTE:

Before every update, download a configuration backup (see 16.7 "Configuration backup and restore"). After an update from 2.x you upload this backup to the new firmware.

16.3 Choose the correct firmware image

The firmware package has one image (.binimg) for each model group:

ModelFirmware image
LKM154, LKM254LKM154-254_v3.00.02.binimg
LKM655LKM655_BPL_v3.00.02.binimg
LKM154-LiteLKM154-Lite_LITE_v3.00.02.binimg
LKM615LKM615_LITE_EMH_v3.00.02.binimg
LKM354, LKM454LKM354-454_LW_EU868MHz_v3.00.02.binimg
LKM755LKM755_LW_EU868MHz_BPL_v3.00.02.binimg
LKM354-LiteLKM354-Lite_LW_EU868MHz_LITE_v3.00.02.binimg
LKM616LKM616_LW_EU868MHz_LITE_EMH_v3.00.02.binimg

Use the image whose file name matches your model. The unit itself only refuses an image of the other key group:

Key groupModels
Group 1LKM154, LKM254, LKM655, LKM354, LKM454, LKM755
Group 2LKM154-Lite, LKM615, LKM354-Lite, LKM616

WARNING:

An image of another model of the same key group is accepted by the unit (for example a LoRaWAN or BPL image on an LKM154, or an LKM616 image on an LKM154-Lite) and does not work correctly on your unit. Check the model on the label and the product name in the web header (1.3 "Product names shown by the device") before you upload.

We recommend abcZ Network Tool for firmware updates, because it checks that the image matches the model (chapter 17 "Software - abcZ Network Tool").

16.4 Update the firmware from the web interface

The new firmware is written into the second (alternative) firmware bank. The running firmware is not changed until you start the new one.

  1. Open the "Management" page.
  2. In "Live Firmware Update", click "Select Firmware File" and choose the .binimg file of your model. The file name is shown under "Firmware file to upload".
  3. Click "Upload Firmware". The window "Upload firmware file" shows the progress ("%1" ... "%100"), then "Checking...".
  4. Wait for "Firmware Uploaded" (shown with a check mark). "Alternative Firmware Version" and "Alternative Firmware Date" now show the new firmware.
  5. Click "Reboot Alternative Firmware". The device asks "Reboot into the ALTERNATIVE firmware? The device will switch firmware banks." Click "Confirm".
  6. The device shows "Reboot Alternative Firmware Command has been sent." and "Rebooting...". After about 5 seconds the page loads again, whether the unit is already up or not. If the page does not open, wait and refresh it. After an update from 2.x the unit has factory settings and can have a new IP address (see 16.6 "Upgrade from firmware 2.x").
  7. Check the version in the web header.

LKM154, "Upload firmware file" window with "Firmware Uploaded" after uploading LKM154-254_v3.00.02.binimg - WRITE (writes the alternative bank; do not click "Reboot Alternative Firmware" unless the update is wanted)

LKM154, confirmation window "Reboot into the ALTERNATIVE firmware? ..." with "Confirm" / "Cancel" - read-only if "Cancel" is clicked

NOTE:

Do not close the page and do not switch the unit off during the upload. If the upload is cut, the running firmware is not affected; start the upload again.

16.4.1 Messages

MessageMeaning
"Firmware Uploaded"The image is written and checked. Click "Reboot Alternative Firmware" to start it.
"Error: Firmware Does not Match With Device."The image was written but cannot be started on this unit. "Reboot Alternative Firmware" is disabled. Upload the image again. If the message repeats, contact support.
"Error: Cannot Upload Firmware."The device did not accept the upload. Check that the image is for your model and that the file is not damaged, then upload again.
"Update Failed! Firmware file could be wrong"The upload stopped near the middle of the file, where the device checks the image. Usually the image is of the other key group (16.3 "Choose the correct firmware image") or the file is damaged.
"Connection error!"The connection was lost during the upload. Check the network and upload again.
"Alternate Firmware Boot Failed! (Rejected: alternate firmware bank not accepted by bootloader)" or "Alternate Firmware Boot Failed! (Rejected: alternate firmware image is not valid)"There is no valid firmware in the alternative bank. Upload the image again.

NOTE:

Every upload first erases the alternative bank. After a failed upload the previous firmware is no longer in the alternative bank, even if the page still shows its version and date. Reload the page after a failed upload: "Reboot Alternative Firmware" is then disabled until an upload succeeds.

16.5 Go back to the previous firmware

After a successful update the previous firmware stays in the alternative bank. "Alternative Firmware Version" shows it. To go back, click "Reboot Alternative Firmware" and "Confirm". The previous firmware stays available until the next firmware upload.

LKM154 v3.00.02, "Management" page, "Live Firmware Update" card after the update: no file selected, the alternative bank holds the previous firmware ("Alternative Firmware Version" and "Alternative Firmware Date" of that image), "Reboot Alternative Firmware" enabled

NOTE:

Going back from 3.00.02 to 3.00.01 (or 3.00.00) keeps the settings, because the first two numbers of the version are the same. Going back from 3.x to 2.x does not carry the 3.x settings; check every setting after going back.

16.6 Upgrade from firmware 2.x

WARNING:

An update from 2.x to 3.00.02 resets every setting to the factory settings. Download a configuration backup on the 2.x firmware before the update (step 1) and upload it after the update (step 4).

  1. On the 2.x firmware, click "Download Current Configuration" (or the download button of your 2.x web page) and keep the file.
  2. Choose the image of your model (16.3 "Choose the correct firmware image"). Upload the 3.00.02 image and start it as described in 16.4 "Update the firmware from the web interface".
  3. The unit starts with factory settings. It takes its IP address from a DHCP server: connect it to a network with a DHCP server and find the address it got (for example in the client list of the DHCP server, or with the abcZ Network Tool, 17.1 "Find the unit"). The web login is user "admin", password "admin". The header shows the red banner "FACTORY DEFAULTS - device is not configured" (on screen the dash is a long dash).
  4. Open the "Management" page and upload the 2.x backup with "Upload Configuration File". The reply is "Configuration Uploaded (legacy config - no _meta) - device will restart".
  5. After the restart, check every page. Settings that 2.x did not have keep their factory value.

NOTE:

On LoRaWAN models the red banner reads "FACTORY DEFAULTS - device is not configured (factory LoRaWAN identity: address collision risk)". It disappears as soon as the configuration differs from the factory settings. If the LoRaWAN identity is still the factory one, an orange banner stays: "FACTORY LoRaWAN IDENTITY - DevEUI/AppKey/DevAddr still factory: two recovered devices collide", until the LoRaWAN identity and keys are changed.

16.6.1 What behaves differently from 2.x

The table lists what you notice after the upgrade from 2.x, and what to do.

TopicIn firmware 3.00.02What to do
SettingsAfter the update from 2.x the unit starts with the factory settings: web login user "admin", password "admin", and the red banner "FACTORY DEFAULTS - device is not configured" in the header.Upload the 2.x backup (step 4) and check every page.
IP addressAt the factory the unit is a DHCP client: a unit that used a static address on 2.x gets its address from a DHCP server after the update. Without a DHCP server it uses 192.168.1.1 without a gateway, about 1 minute after the start-up.Find the unit with the abcZ Network Tool (17.1 "Find the unit"), or connect from a PC in the subnet of 192.168.1.1.
Configuration fileA 2.x backup can be uploaded; settings that 2.x did not have keep their factory value. A 2.x backup does not name its model, so the unit cannot check it: upload only the backup of this unit. A file saved with 3.00.02 names its model; a file of another model is refused and nothing is changed.Check every page after uploading a 2.x backup (16.7.2 "Upload a configuration").
IEC character formatNew setting "IEC Meter Line Control:" ("7_EVEN_1", "8_NONE_1", "8_EVEN_1"), one value for all IEC rows; factory value "7_EVEN_1". A 2.x backup does not contain it.Set it to the character format of your IEC meters (10.2.4 "Meter Protocol Settings window").
"Meter Reading Status"The page keeps the last 210 lines. The line "--- READING COMPLETE ---" separates the readings and follows only a successful reading.The separator is not an error (10.10.2 "Messages of the unit").
Saving a pageAn amber window says that the unit did not take some values ("Warning: <k> of <n> value(s) were rejected by the device and kept their previous value; the other values were saved."); they keep their previous value. A red text means that nothing was saved, for example "(Rejected: reboot in progress - settings NOT saved. Retry after device restarts.)".Correct the values and save again; after a red text wait for the restart and save again (10.1.4 "How saving works").
"Set Device Time"The time is set at once; the unit does not restart.Nothing to do (10.12.1 "Set Device Time").
Log settings"Change Log Level and Reboot" restarts the unit only when a log setting changed; otherwise the window says "Log settings unchanged - no reboot needed."Nothing to do (10.12.5 "LOG").
"Send OBIS Code Details as Status Message At Start" (LoRaWAN models)Off at the factory.After uploading the 2.x backup check it on "LoRa Settings"; switch it on if your application uses the OBIS details message (14.1 "LoRa Settings").
Ethernet linkWhen the unit sees that the Ethernet link is down, it waits for the link and does not restart for this.Check the cable and the switch port if the link does not come back (18.3.2 "Network").
Router not reachable (DHCP client)The unit renews its address, re-discovers it (the address can change) and, as the last step, restarts.Check the router and the network (18.4 "Known behaviours and limits").
Firmware uploadEvery upload first erases the alternative bank. After a failed upload the previous firmware is no longer in the alternative bank; the running firmware is not affected.Upload the image again; reload the page after a failed upload (16.4.1 "Messages").
Modbus register countA read for an odd number of registers or for more than 125 registers gets no answer; the unit sends no exception responses.Read an even number of registers (11.4 "Address rule").
Narrow screenOn a narrow screen, for example a phone, the menu opens with the menu button at the top.Nothing to do (10.1.3 "Screen layout").

The changes of 3.00.01 and 3.00.02 against 3.00.00 are listed in 16.1 "What is new in 3.00.02 and 3.00.01".

16.7 Configuration backup and restore

16.7.1 Download the configuration

On the "Management" page, in "Download / Upload Configuration", click "Download Current Configuration". The browser saves the file "ZTG_<Device Name>_v3.00.02.zcfg". It is a text file (JSON) with all settings of the unit. Its first block "_meta" names the product, the model variant, the firmware version and build and the device name.

LKM154 v3.00.02, "Management" page, "Download / Upload Configuration" card with the buttons "Download Current Configuration" and "Upload Configuration File"

WARNING:

The downloaded configuration file contains the web password, the MQTT password, the DLMS meter passwords and the LoRaWAN keys in clear text. Keep the file private: store it in a safe place and do not send it to others.

NOTE:

Start one configuration download at a time. If a second download is started while the first one is still running, the first file ends early. A complete file ends with "}"; a file that is not complete must be downloaded again.

16.7.2 Upload a configuration

  1. On the "Management" page, click "Upload Configuration File" and choose the file.
  2. The window "Upload Configuration file" shows the reply of the device.
  3. When the reply starts with "Configuration Uploaded", the settings are saved and the device restarts itself. Wait for the restart, then log in again.

NOTE:

The file also sets the web password. After the restart, log in with the password that was valid on the unit the file came from.

The device checks the "_meta" block of the file before it saves anything:

ReplyMeaning
"Configuration Uploaded - device will restart"The file is from this model and this firmware version.
"Configuration Uploaded (warning: file from fw <version>, device runs 3.00.02) - device will restart"The file is from the same model but from another firmware version (for example a 3.00.01 backup). It is applied.
"Configuration Uploaded (legacy config - no _meta) - device will restart"The file has no "_meta" block (for example a 2.x backup). It is applied; the model cannot be checked.
"Rejected: config layout mismatch (file ... bytes, device ... bytes)."The file is from a model of another group (standard, Lite, or LKM615 / LKM616), or from firmware with another settings layout. Nothing is changed.
"Rejected: product mismatch (file '...', device '...')."The file is from another model of the same group (for example an LKM655 backup on an LKM154). Nothing is changed.
"Rejected: build variant mismatch (file '...', device '...')."The file was edited or does not belong to this unit. Nothing is changed.
"Rejected: reboot in progress - configuration NOT saved"The device was already restarting. Upload the file again after the restart.
"Unsupported Escape Found at line <n>, pos. <m>. ..."A text value in the file contains a "\u" code that the unit cannot store: \u0000, or a code above \u007F (for example \u00E9 for a letter with an accent). Nothing is changed. Replace the code with a character from \u0001 to \u007F (or remove it), then upload the file again.
Any other reply that starts with "Rejected:"The file was not accepted. Nothing is changed.

NOTE:

The unit checks the values of the meter rows in the file. A value that the unit cannot use (for example a "TCP Port:" of 0 or a "Reading Table Code:" above 9) is replaced by the factory value of that field; the other values are stored as they are in the file. The reply is the same. Check the meter rows after the restart.

LKM154 v3.00.02, "Upload Configuration file" window with "Configuration Uploaded - device will restart" after uploading its own backup - WRITE (config written + restart; same file, so no setting changes)

LKM154 v3.00.02, "Upload Configuration file" window with a "Rejected: product mismatch ..." reply after uploading an LKM655 (BPL) backup - nothing is written

LKM154 v3.00.02, "Upload Configuration file" window with "Rejected: config layout mismatch (file 9556 bytes, device 12636 bytes)." after uploading the backup of a Lite model (LKM354-Lite) - nothing is written

NOTE:

On LoRaWAN models the file carries the LoRaWAN identity and keys. Do not load the same file into two units without changing the LoRaWAN settings of one of them; two units with the same identity disturb each other on the LoRaWAN network.

17. Software - abcZ Network Tool

The abcZ Network Tool is our Windows program for REDZ devices on an Ethernet network. With LKM Series gateways it finds the units and shows their address, product, firmware version and MAC address, reads the identity of one unit, gives a unit a static address, and updates the firmware of one unit or of many units at once. This chapter describes version 1.1.0 and only what you need with an LKM unit. Download the tool and its own user guide from the Support page of redz-sc.com (https://redz-sc.com/en/support).

The tool talks to the unit the way a web browser does. Type the user name ("admin") and the password of the unit's web interface (10.1.2 "Logging in") in "User" and "Password" on each tab. A unit with another password is listed with "auth required (password?)" in the "Product" column.

The tool reads the same pages and sends the same requests as the web interface: the firmware file is uploaded in the same way as with "Upload Firmware" and the switch to the new firmware is the same command as "Reboot Alternative Firmware" (16.4 "Update the firmware from the web interface").

17.1 Find the unit

Open the "Discovery" tab. In "IP range" type the addresses to search: a network such as 192.168.10.0/24, a range of the last number such as 192.168.10.1-254, a range such as 192.168.10.10-192.168.11.50, or one address. Click "Scan (HTTP)": the tool reads the start page of every address in the range, so it also finds units behind a router. Each unit found appears as a row with "IP", "MAC", "Series" (LKM), "Product" (the product name of 1.3 "Product names shown by the device"), "Device" (the "Device Name" of the unit), "Version" and "Build date".

abcZ Network Tool 1.1.0, Discovery tab after "Scan (HTTP)" of one address: one LKM154/254 row with IP, MAC, Series "LKM", Product, Device, Version 3.00.02 and Build date; the log below (no other unit in the range)

"Discover (UDP)" is faster: it asks with a broadcast on UDP port 30303, which the unit answers with its MAC address and its network host name. A broadcast does not cross routers, so it finds only units in the same subnet as the PC. The units that answer are then read in the same way as with "Scan (HTTP)".

A unit that is not found may have no address from a DHCP server. It then works with the address stored in its configuration (192.168.1.1 on a unit with factory settings) and without a gateway, so it answers only a PC in its own subnet (10.1.1 "Finding the IP address"). Search from a PC in that subnet, for example with the address 192.168.1.10 and the net mask 255.255.255.0.

Double-click a row to open the unit's web interface in your browser. "Series filter" and "Find" narrow the list. "Export CSV" saves the selected rows (or all rows shown) as a list for "Fleet Update" (17.5 "Update many units").

17.2 Read the identity of one unit

On the "Single Device Update" tab, type the unit's address in "Device IP" and click "Read Identity (safe)". The panel "Device identity (last read)" shows the product name, firmware version, build date, MAC address and device name. Nothing is changed on the unit. If "Expected product" is empty, the tool fills it with the product name it read; this name protects the firmware update (17.4 "Update the firmware").

abcZ Network Tool 1.1.0, Single Device Update tab after "Read Identity (safe)": panel "Device identity (last read)" of an LKM154/254 with Product, Version 3.00.02, Build, MAC and Device name, "Expected product" filled, and the log

The LKM616 and the LKM354-Lite show the same product name (1.3 "Product names shown by the device"). Before an update the tool also reads the model variant that the unit writes at the start of its configuration file, and tells the two models apart by it.

17.3 Give the unit a static address

On the "Discovery" tab, right-click the unit's row and choose "Set IP / Subnet / Gateway (one device)...". The tool first reads the network settings of the unit; the window "Set network - <address>" then shows "IP address", "Subnet mask" and "Gateway" as they are stored for the static address ("Server IP Address", "Server Net Mask" and "Server Gateway Address" on the "Network Settings" page, 10.3.3 "Device Network Settings"). A unit that has its address from a DHCP server shows these stored values, not the address it uses now.

abcZ Network Tool 1.1.0, window "Set network - <address>" for an LKM154/254 with IP address, Subnet mask, Gateway, the warning text and Apply / Cancel (closed with Cancel)

Type the new values, click "Apply" and type SET to confirm. The tool turns on "Use Static Address for Device", saves the three values (the other network settings are kept), restarts the unit and looks for it by its MAC address in the new subnet. When it finds the unit there, the log says "now reachable at" with the new address. When it does not, the log warns that the unit was not found by its MAC address, and the "Status" column shows "IP set? not found at" with the address you typed. While a scan or an update is running, the tool refuses this command; wait until the task ends.

NOTE:

If the unit is not found after the change, check the new address with "Scan (HTTP)" or in your browser. A wrong subnet mask or gateway can make the unit unreachable.

17.4 Update the firmware

On the "Single Device Update" tab:

  1. Type the unit's address in "Device IP" and click "Read Identity (safe)", so that "Expected product" holds the product name of this unit.
  2. Click "Browse..." and choose the firmware image (.binimg) of your model from the firmware package (16.3 "Choose the correct firmware image"). Keep the file RELEASE_v3.00.02.json of the package next to the image: the tool then checks the image against it.
  3. Click "Update" and confirm.

Before it writes, the tool stops when the product name read from the unit is not the expected one (this cannot be overridden), skips a unit that already runs the version in the file name (tick "Force (flash even if version matches)" to write it anyway) and asks before it writes an image of another model, for example a LoRaWAN or BPL image for an LKM154, or an LKM616 image for an LKM154-Lite: answer No in the window "Image / device mismatch" and the unit is not touched. The unit itself refuses only an image of the other key group (16.3 "Choose the correct firmware image"); the tool also warns about an image of another model of the same key group.

The image is written into the unit's alternative firmware bank; the tool then sends the command to start it once, waits for the restart and compares the version and build date the unit reports. The log ends with "RESULT:" and "SUCCESS" when the unit reports the version and build date of the uploaded image. The tool sends every request on a new connection, as the unit requires (16.1.1 "Changes in 3.00.02").

abcZ Network Tool 1.1.0, Single Device Update tab at the end of an update of an LKM154/254 with "Force": the log ends with the bank switch confirmed by the unit, the version read back after the restart (3.00.02) and "RESULT: ... [SUCCESS]"

The settings of the unit are kept when the first two numbers of the version stay the same, for example from 3.00.01 to 3.00.02; an update from 2.x starts the unit with factory settings and possibly another address (16.2 "Which update keeps the settings" and 16.6 "Upgrade from firmware 2.x"). Find the unit again with "Scan (HTTP)" by its MAC address.

NOTE:

"Factory reset after update" deletes every setting of the unit after the update, including the password and the network settings, and its address may change. Leave it off unless you want the factory settings.

17.5 Update many units

The "Fleet Update" tab updates a list of units from a CSV file with the columns ip, expected_product and image_path (the image path is relative to the CSV file). "Export CSV" on the "Discovery" tab writes such a list with the image column empty. "Validate CSV (dry-run)" checks the list without writing. With a "Pilot IP (opt.)" the tool updates that unit first and leaves all the others untouched if it fails; the rest are then updated "Parallelism (jobs)" at a time. A list can hold different LKM models: give each row the image of its own model.

18. Logs and Troubleshooting

The unit can send log lines about its operation to its console port or to a UDP log server. This chapter explains how to turn the log on and how to read it, lists the lines you are most likely to see, and collects the known behaviours of firmware v3.00.02 that are easily taken for a fault.

18.1 Turning on the log

The log is set on the "Management" page, card "LOG" (10.12.5 "LOG"):

  1. Choose the "Log Level": "ERROR", "INFO" or "DEBUG" ("NONE" switches the log off; factory setting).
  2. Choose the "Log Output": "UDP SERVER" sends the lines to a PC, "CONSOLE" to the console port of the unit (for REDZ service). Lite and EMH models offer only "UDP SERVER".
  3. For "UDP SERVER" enter the address of the PC in "UDP Server IP" and its port in "UDP Server Port" (factory 192.168.1.10 and 7001).
  4. Press "Change Log Level and Reboot". When a log setting changed, the unit restarts and sends its log from the start-up on.

On the PC, any program that receives UDP datagrams on that port can show the log. The unit does not store its log: lines are sent when they are made, and lines sent while no program receives them are lost. Start the receiver before the event you want to see.

On the "Device Status" page, "Log Status" and "Log Counter" (10.5.2 "Communication Counters") show the state of the log output and the number of lines sent, as long as the log is on.

18.2 Reading a log line

Every line starts with the date and time of the unit, then the type of the line and the text:

21-10-26 10:53:54 DBG-Identification message received...
21-10-26 10:53:54 DBG-/ELM5METER2
21-10-26 10:53:54 DBG-uptime min: 2
21-10-26 10:53:55 DBG-Make Data 7E1
21-10-26 10:53:55 DBG-Switch SerialSetup FOR SERIAL OK: 9600
TypeSent at "Log Level"Meaning
ERR-"ERROR", "INFO", "DEBUG"A fault or an event that changes the operation, for example a restart request or a lost connection. Some start-up lines are also of this type.
INF-"INFO", "DEBUG"Information about the start-up and about changes of state.
DBG-"DEBUG"Every step of the work of the unit, for example each step of a meter reading.

With "INFO" a unit in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)" that reads its meters without errors adds no line after the start-up lines. Use "DEBUG" to follow the readings step by step, and switch it back to "INFO" or "ERROR" afterwards.

Until the unit has the time from the NTP server (10.3.1 "NTP Settings") or from "Set Device Time" (10.12.1 "Set Device Time"), the lines carry a date such as 30-11-99 or 01-01-25. On models without LoRaWAN, "DEBUG" shows a line "Set Device time:" with the new time when the NTP server has set the clock.

A line holds at most 82 characters. A longer line is cut and ends with "~"; the end of its text is not sent. The tables below therefore give some lines only by their beginning.

When the unit makes lines faster than it can send them (for example with "DEBUG" and much traffic), it keeps the older lines, drops the newer ones and reports their number later in one line (18.3.7 "Daily restart and log output"). Only log lines are lost; meter reading, Modbus, MQTT and LoRaWAN are not affected.

18.3 Log lines you may see

The tables list the lines you are most likely to see, when they appear and what to do. The messages of the meter readings (for example "READING FINISHED", "ID MISMATCH" or "DLMS LOGIN REJECTED") are explained in 10.10.2 "Messages of the unit"; they are shown on the "Meter Reading Status" page.

18.3.1 Start-up

LineWhenMeaning and what to do
a line that starts with BOOT rcon=0xOnce after every start-up, when the log output is ready (after the first start-up lines; "Log Level" "ERROR" or higher).Why the unit started: POR = power on (BORe next to it is normal), BOR! = the supply voltage dropped, SWR = the firmware restarted the unit (for example after a configuration upload, a firmware switch, "Reboot Device" or the planned daily restart), EXTR = reset input, WDTO = watchdog. Repeated BOR! or WDTO: check the power supply and contact REDZ support.
a line that starts with diag streak=After the line above.Restart diagnostics for REDZ support. Send it together with the line above.
CONFIG: factory defaults - reconfigure device!Start-up of a unit with factory settings.Expected after "Restore Factory Configuration" and after an update from 2.x. Enter the settings or upload your configuration file (16.6 "Upgrade from firmware 2.x").
a line that starts with CONFIG: factory LoRaWAN identityLoRaWAN models: start-up while the LoRaWAN identity and keys are still the factory values.Enter the LoRaWAN settings of this unit (10.7 "MENU: LoRa Settings"). The header of the web page shows the same warning (10.1.3 "Screen layout").
Current Flash Memory Bank: <n>Start-up ("INFO").Which of the two firmware banks runs. The number changes after each switch with "Reboot Alternative Firmware".
TCP stack ready.Wait for NET ready, Server NET ready:Start-up ("INFO").The network starts; the line after Server NET ready: gives the address, net mask and gateway, then the MAC address.

18.3.2 Network

LineWhenMeaning and what to do
a line that starts with NETDIAG link=At start-up and at every change of the network state ("ERR-" type), for example NETDIAG link=1 ready=1 dhcp=1 gw=1 ip=<address>.The state of the Ethernet link, of the network and of DHCP. Two or three such lines at every start-up are normal and do not mean a fault.
a line that starts with NET: link DOWNThe Ethernet link is down. At start-up it can appear for a moment while the link comes up; then a line that starts with NET: link RESTORED follows.The unit waits for the link and does not restart for this. If the line stays without NET: link RESTORED, check the cable and the switch port.
a line that starts with NET(boot): no DHCP lease in timeAbout 1 minute after the start-up, when no DHCP server answered.The unit works with the address stored in its configuration and without a gateway (10.1.1 "Finding the IP address"). Check the DHCP server, or give the unit a static address.
NETWD: gateway unreachable, consecutive failures<n>Unit in DHCP client mode: the router (network gateway) does not answer the check of the unit.NETWD: DHCP renew (lease may be stale) and NETWD: DHCP re-discover (disable/enable) follow after further failures, and as the last step NETWD: still unreachable -> reboot: the unit asks for a restart. NETWD: gateway reachable again after failures<n> ends the series. Check the router and the network (13.4 "When messages are sent, and what happens without a broker").
NETWD: lease lost - DHCP re-discover (disable/enable), NETWD: still no lease -> rebootUnit in DHCP client mode that lost its DHCP lease.The unit asks for a new lease, restarts its network interface and, if there is still no lease, restarts (16.1.1 "Changes in 3.00.02"). Check the DHCP server.

18.3.3 MQTT

LineWhenMeaning and what to do
MQTTWD: no delivery (gateway ARP OK - L3/broker suspect)<n>MQTT enabled: once a minute while the unit could not deliver to the broker.The local network answers, the broker or the way to it does not. Check "MQTT Broker IP or URL", "MQTT Broker Port" and the route to the broker (13.4 "When messages are sent, and what happens without a broker"). As a DHCP client the unit first renews its address (MQTTWD: DHCP renew (route may be stale), MQTTWD: DHCP re-discover (disable/enable)).
a line that starts with MQTTWD: still no delivery -> MQTT client restartAfter about 18 minutes without delivery, then about every 5 minutes.Only the MQTT client is restarted, not the unit. Meter reading, Modbus and the web interface keep working.
MQTTWD: delivery recovered<n>The broker takes messages again ("INFO").Nothing to do.

18.3.4 Modbus

LineWhenMeaning and what to do
ICMP_EchoRequest Started. S:<n>, a line that starts with SocketId: and ends with HOST UNREACHABLE-> <address>Function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)": the unit checks a meter address before it connects ("INFO"); the second line ("ERROR") when the meter does not answer.The meter of that row cannot be reached; "Meter Communication Status" shows "HOST UNREACHABLE" (10.5.3 "Meter Communication Status"). Check the address of the meter and the network.
TCP client refused - all client slots in use, n: <n>A Modbus TCP master connects while all places are in use (the first three times, then every 100th time).The connection is closed (11.2 "Modbus TCP server"). Set "Maximum Number of Clients" to the number of masters, or close unused connections.
MODBUS WRONG Req. register count: <n>"DEBUG": a request for an odd number of registers or for more than 125 registers.The request gets no answer. Ask for an even number of registers (11.4 "Address rule").
RTU: frames for other slave ids ignored, first id: <n>Function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)", "INFO": once after the start-up, when frames for other slave addresses are seen on the line.Information only: frames for other slaves are ignored (11.3 "Modbus RTU slave").
Serial INC CHARS RESTARTSame function: more than 500 faulty characters for the unit's own address without a valid request in between.The unit restarts; the third time in a row it does not restart and "App Status" shows "(SERIAL NOISE PARKED - check line/baud)". Check the wiring, the baud rate and the "Line Control" of the master (11.3 "Modbus RTU slave").

18.3.5 LoRaWAN models

LineWhenMeaning and what to do
LORA busy expected: accepted send in flight, no reboot"INFO": after a series of busy answers of the radio module while it is still sending a message it has accepted.Information only; the unit does not restart (16.1.1 "Changes in 3.00.02").
LORA busy count met, TIME not - no reboot (ms): <ms>A series of busy answers that was shorter than the time limit.Information only; the unit does not restart.

18.3.6 Firmware update and configuration

LineWhenMeaning and what to do
a line that starts with FW upload start - alt pre-erased; no more log = cut.Start of every firmware upload.The alternative bank was erased for the new image. A successful upload adds no further line: check "Firmware Uploaded" on the page. A line that starts with FW upload FAILED means that the image did not pass a check; a line that starts with FirmwareUpd: prev upload CUT at the next upload means that the earlier upload was cut. The running firmware is not affected (16.4.1 "Messages").
a line that starts with FW upload REJECTED at INIT - image larger than alt bankThe file is larger than a firmware bank.The file is not a firmware image of this unit. Nothing was erased.
FW upload FAILED: verify mismatch, alt erased @<address> (also write overrun, no valid stamp, verify overrun, size mismatch)The written image did not pass a check.The alternative bank was erased; it holds no firmware now. Upload the image of your model again (16.3 "Choose the correct firmware image" and 16.4.1 "Messages").
RbtAltFim accepted (BL + content stamp) - switching bank"Reboot Alternative Firmware" was accepted ("INFO").The unit restarts with the other firmware.
RbtAltFim REJECTED - alt content stamp invalid"Reboot Alternative Firmware" was refused.There is no valid firmware in the alternative bank. Upload the image again (16.4.1 "Messages").
Config import OK - restarting to applyA configuration file from the "Management" page was accepted. Config import OK (MQTT) - restarting to apply for a file sent over MQTT (13.5 "Subscribe topic: configuration over MQTT").The unit restarts with the new settings.
CFG norm r<row> <field>-><factory value> val=<value>(0x<hex>)Start-up, when a meter row holds a value the unit cannot use, for example CFG norm r1 TCPport->502 val=0(0x0).The field of that row is used with its factory value (16.7.2 "Upload a configuration"). The line comes at every start-up until the row is saved again: check the row on the "Operating Mode" page and save it.

18.3.7 Daily restart and log output

LineWhenMeaning and what to do
RESTART_SYSTEM_TIMEOUT: (S)<seconds>After 24 hours of operation ("INFO").The planned daily restart (10.12.6 "Restore / Reboot"). Nothing to do.
LOG ring overflow - line(s) dropped (oldest kept): <n>More lines were made than could be sent.<n> lines are missing in the log. Use the counters of the "Device Status" page for counting, and a lower "Log Level" for long observations.
BOOT: LOG channel - undelivered lines: <n>Start-up, when log lines of the earlier operation could not be sent.Information only; for example the UDP receiver could not be reached. Three more lines with counters of the log output follow.

18.4 Known behaviours and limits

The following behaviours of firmware 3.00.02 are known and intended or accepted. They are listed here so that they are not taken for a fault.

BehaviourWhat you seeWhat to do
Planned restart every 24 hoursOnce a day the unit restarts; open TCP connections are closed. With "INFO" or "DEBUG" the log shows RESTART_SYSTEM_TIMEOUT: (S)<seconds>.Nothing. Modbus TCP masters and other clients must connect again by themselves (10.12.6 "Restore / Reboot").
Restart when no Modbus client connectsOnly in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)", while the MQTT publisher is off and, on the LoRaWAN models, while the unit has not joined the network: after 1 hour without a Modbus TCP client the unit opens its listening connections again, without a restart (log Clientless timeout stage-1: listen sockets recycled: <n>); after one more hour without a client it restarts (log Clientless timeout stage-2 reboot, total (s):7200). A client that connects starts the time again.Nothing if no Modbus TCP master is used. Otherwise check that the master reaches the unit (11.2 "Modbus TCP server").
Update from 2.xAfter the update the unit has factory settings, the header shows "FACTORY DEFAULTS - device is not configured" and the unit can have another address.Download the configuration before the update and upload it afterwards (16.6 "Upgrade from firmware 2.x"). Updates within 3.00.x keep the settings (16.2 "Which update keeps the settings").
No DHCP serverAbout 1 minute after the start-up the unit works with its stored address (192.168.1.1 with factory settings) and without a gateway; it can be reached only from its own subnet.Connect from a PC in that subnet, then set a static address or enable DHCP on the network (10.1.1 "Finding the IP address").
DHCP lease lostIn DHCP client mode the unit asks for a new lease, restarts its network interface and, if there is still no lease, restarts. Connections are interrupted.Check the DHCP server (16.1.1 "Changes in 3.00.02").
Router not reachableIn DHCP client mode the unit renews its address, re-discovers it (the address can change) and, as the last step, restarts.Check the router and the network. This is not caused by MQTT (13.4 "When messages are sent, and what happens without a broker").
MQTT broker not reachableNo messages reach the broker; the "MQTT" card shows "Not connected". About 18 minutes after the last delivery, and then about every 5 minutes, the unit restarts its MQTT client. The unit itself does not restart. Messages that could not be sent are not stored.Check the broker address, the port and the route, or switch MQTT off until the broker is ready (13.4 "When messages are sent, and what happens without a broker").
Another meter answers on a shared line"Meter Reading Status" shows "ID MISMATCH ..."; when the read-out was complete, the reading ends with "READING FINISHED S:<s> R:<row> ERROR: ID MISMATCH". The values of that reading are not used.Enter the meter serial number as "IEC Address:" of every IEC row on the line (10.10.2 "Messages of the unit").
An IEC meter does not answerIts readings end with "READING FINISHED S:<s> R:<row> ERROR: Timeout WAIT_FOR_ACK"; in the function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)" the line "IEC: previous session ended without ACK ..." appears. Each such cycle costs about 2.5 s.Check address, baud rate, wiring and "Time Out (s):" of the row (10.10.2 "Messages of the unit").
IEC "Time Out (s):" below 5 (function "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)")The unit waits 5 s and shows "IEC: TimeoutInterval ..." once for the row.Nothing, or set the value to 5 or more (10.10.2 "Messages of the unit").
Values after a failed readingThe Modbus registers keep the values of the previous reading (IEC values received before the time-out replace them); they carry no time stamp and no quality flag.Check "Meter Reading Status" (10.10 "MENU: Meter Reading Status") to see whether the last reading succeeded (12.5 "What the master gets when something is missing" and 11.6 "Value states").
Modbus requests without answerThe unit sends no exception responses. Function codes other than 3, an odd number of registers, more than 125 registers, another unit ID and rows that are not enabled get no answer.Set the response timeout of the master and read even numbers of registers (11.1 "Protocol summary" and 11.4 "Address rule"). With "DEBUG" the log shows MODBUS WRONG Req. register count: <n>.
More Modbus TCP masters than allowedThe extra connection is closed after about 0.25 s; the log shows TCP client refused - all client slots in use, n: <n>.Set "Maximum Number of Clients" to the number of masters (11.2 "Modbus TCP server").
Other slaves on the RS485 lineIn the function "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)" frames for other slave addresses are ignored and not counted.Nothing (11.3 "Modbus RTU slave").
Faulty frames for the unit's own addressAfter more than 500 faulty characters without a valid request the unit restarts; the third time in a row it stays up and "App Status" shows "(SERIAL NOISE PARKED - check line/baud)".Check the wiring, the baud rate and the "Line Control" of the master (11.3 "Modbus RTU slave").
One request at a time on the web interfaceA button pressed while another request runs shows "The Device is not ready, please retry later."; a request without answer ends with "Request timed out." after 15 seconds.Wait for the window of the first request, then try again (10.1.4 "How saving works").
Settings used after a restartThe save window shows "REBOOT REQUIRED".Press "Reboot Device" when all changes are done (10.1.4 "How saving works").
Values that the unit did not takeThe save window is amber and says "Warning: <k> of <n> value(s) were rejected by the device and kept their previous value; the other values were saved."Correct the values and save again (10.1.4 "How saving works").
One request per connectionA second request that a program sends on the same connection without waiting for the answer is ignored.Send each request on a new connection; the web page and the abcZ Network Tool do this (16.1.1 "Changes in 3.00.02").
Firmware image of another modelThe unit refuses only an image of the other key group; an image of another model of the same group is accepted and does not work correctly.Choose the image by the model (16.3 "Choose the correct firmware image"), or use the abcZ Network Tool, which checks the model (17.4 "Update the firmware").
Failed or cut firmware uploadThe alternative bank is erased: the previous firmware is no longer there, and after a reload "Reboot Alternative Firmware" stays disabled.Upload the image again (16.4.1 "Messages").
Configuration fileThe file holds the web password, the MQTT and DLMS passwords and the LoRaWAN keys in clear text.Keep the file private (16.7.1 "Download the configuration").
Two configuration downloads at the same timeThe first file ends early.Download one at a time; a complete file ends with "}" (16.7.1 "Download the configuration").
Unusable meter row values in a configuration fileThe file is accepted with the normal reply; such a value is replaced by the factory value of the field.Check the meter rows after the restart (16.7.2 "Upload a configuration").
One configuration file in two LoRaWAN unitsBoth units have the same LoRaWAN identity and disturb each other.Change the LoRaWAN settings of one unit (16.7.2 "Upload a configuration").
LoRaWAN queueThe queue holds one message per meter row. A waiting message is sent with the values its row has when it is sent; readings in between are not sent separately.Set "Minimum Send Interval for a Parsed Data (in seconds)" to how often the network server needs the values. If "N. of LoRaWAN Messages Lost" grows, check the coverage of the LoRaWAN gateway (10.5.2 "Communication Counters" and 14.5 "Messages sent to the network server").
LoRaWAN message with ACK but no ACKThe message is sent again a limited number of times, then dropped and counted in "N. of LoRaWAN Messages Lost".Check the coverage of the LoRaWAN gateway (14.5 "Messages sent to the network server").
Busy answers of the LoRaWAN radio moduleThe log shows LORA busy expected: accepted send in flight, no reboot; the unit does not restart.Nothing (16.1.1 "Changes in 3.00.02").
LKM616 and LKM354-LiteBoth show the same product name in the web header.Check the "Operating Mode" page: LKM616 has one meter row (1.3 "Product names shown by the device").
"Change Log Level and Reboot"The unit restarts when a log setting changed.Change the log settings when a restart is acceptable (10.12.5 "LOG").
"Reset Logs""N. of Modbus Incorrect Characters", "N. of Incorrect LoRa Characters Received", the last duty cycle time and the totals of the overview cards are not set to zero.The two counters are cleared by a restart (10.5.5 "Buttons").

18.5 Information for REDZ support

When you contact REDZ support, send:

  • the model (label of the unit), and the product name, the firmware version and build date and the MAC address from the header of the web page,
  • the "Device Function" of the "Operating Mode" page and the "App Status" of the "Device Status" page,
  • the time of the event and what you saw,
  • the lines of the "Meter Reading Status" page when a meter reading is concerned,
  • the log around the event (with "DEBUG" if possible), including the first lines after a start-up (BOOT rcon=... and the line after it).

NOTE:

The configuration file contains passwords and keys (16.7.1 "Download the configuration"). Send it only when REDZ support asks for it.

19. Ordering Information

ModelDescription
LKM154Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports, 1 x RS232 and 1 x RS485, 5 - 48 V DC power input (60 V maximum)
LKM254Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports, 1 x RS232 and 1 x RS485, 100 - 240 V AC, 50 Hz to 60 Hz (120 - 370 V DC) power input
LKM655-PN-ACElectricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, three-phase AC power input, 110 - 240 V, 50 - 60 Hz, phase to neutral (PN) data connection
LKM655-PP-ACElectricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, three-phase AC power input, 110 - 240 V, 50 - 60 Hz, phase to phase (PP) data connection
LKM655-PP-DCElectricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, 9 - 36 V DC power input, phase to phase (PP) data connection
LKM154-LiteElectricity Meter Protocol to Modbus Protocol Gateway with MQTT, 1 x 10/100Base-T(X) Ethernet port, 1 x RS485, 9 - 36 V DC power input (40 V maximum)
LKM615Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 1 x 10/100Base-T(X) Ethernet port, direct connection to the meter, powered from the meter interface
LKM354868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports, 1 x RS232 and 1 x RS485, 5 - 48 V DC power input (60 V maximum)
LKM454868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports, 1 x RS232 and 1 x RS485, 100 - 240 V AC, 50 Hz to 60 Hz (120 - 370 V DC) power input
LKM755-PN-AC868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, three-phase AC power input, 110 - 240 V, 50 - 60 Hz, phase to neutral (PN) data connection
LKM755-PP-AC868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, three-phase AC power input, 110 - 240 V, 50 - 60 Hz, phase to phase (PP) data connection
LKM755-PP-DC868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 2 x 10/100Base-T(X) Ethernet ports and 1 x BPL (Broadband Power Line) link, 1 x RS232 and 1 x RS485, 9 - 36 V DC power input, phase to phase (PP) data connection
LKM354-Lite868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 1 x 10/100Base-T(X) Ethernet port, 1 x RS485, 9 - 36 V DC power input (40 V maximum)
LKM616868 MHz LoRaWAN Meter Reader and Electricity Meter Protocol to Modbus Protocol Gateway with MQTT, 1 x 10/100Base-T(X) Ethernet port, direct connection to the meter, powered from the meter interface

NOTE:

The firmware image of each model is named in the tables of chapter 20 "Product Selection". Use the image whose file name matches your model; 16.3 "Choose the correct firmware image" explains which images the unit refuses.

NOTE:

The LKM series also has Modbus RTU versions: LKM111, LKM114, LKM124, LKM141, LKM144 and LKM614. Please check those models if a Modbus RTU version is needed in the project.

20. Product Selection

20.1 LKM Series

FeatureLKM154LKM254LKM655LKM154-LiteLKM615
Gets power from meter (isolated)●
9 - 36 V DC power input● *●
5 - 48 V DC power input (60 V maximum)●
100 - 240 V AC, 50 - 60 Hz (120 - 370 V DC) power input●
Three-phase AC power input, 110 - 240 V, 50 - 60 Hz● *
Reads 1 meter (direct connection)●
Reads up to 10 meters●
Reads up to 32 meters●●●
OBIS codes set by user●●●●●
Web interface for status●●●●●
BPL (Broadband Power Line) link●
Firmware imageLKM154-254_v3.00.02.binimgLKM154-254_v3.00.02.binimgLKM655_BPL_v3.00.02.binimgLKM154-Lite_LITE_v3.00.02.binimgLKM615_LITE_EMH_v3.00.02.binimg

NOTE:

* The LKM655 is made in three versions: LKM655-PN-AC and LKM655-PP-AC with three-phase AC power input (phase to neutral or phase to phase BPL data connection), and LKM655-PP-DC with 9 - 36 V DC power input (phase to phase). See chapter 19 "Ordering Information".

20.2 LKM LoRaWAN Series

FeatureLKM354LKM454LKM755LKM354-LiteLKM616
868 MHz LoRaWAN Meter Reader●●●●●
Gets power from meter (isolated)●
9 - 36 V DC power input● *●
5 - 48 V DC power input (60 V maximum)●
100 - 240 V AC, 50 - 60 Hz (120 - 370 V DC) power input●
Three-phase AC power input, 110 - 240 V, 50 - 60 Hz● *
Reads 1 meter (direct connection)●
Reads up to 10 meters●
Reads up to 32 meters●●●
OBIS codes set by user●●●●●
Web interface for status●●●●●
BPL (Broadband Power Line) link●
Firmware imageLKM354-454_LW_EU868MHz_v3.00.02.binimgLKM354-454_LW_EU868MHz_v3.00.02.binimgLKM755_LW_EU868MHz_BPL_v3.00.02.binimgLKM354-Lite_LW_EU868MHz_LITE_v3.00.02.binimgLKM616_LW_EU868MHz_LITE_EMH_v3.00.02.binimg

NOTE:

* The LKM755 is made in three versions: LKM755-PN-AC and LKM755-PP-AC with three-phase AC power input (phase to neutral or phase to phase BPL data connection), and LKM755-PP-DC with 9 - 36 V DC power input (phase to phase). See chapter 19 "Ordering Information".

All models convert the meter data to Modbus and can send it to an MQTT broker. All models except LKM615 and LKM616 can work as "Serial Electricity Meter to Modbus TCP Gateway (and MQTT Publisher)" or as "TCP/IP Electricity Meter to Modbus RTU Gateway (and MQTT Publisher)"; LKM615 and LKM616 work as the first one only. Ports and power of each model: chapter 19 "Ordering Information".

LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT (and LoRaWAN)
LKM Series Electricity Meter Protocol to Modbus Protocol Gateways with MQTT (and LoRaWAN)
STG Series WMBus (Wireless MBus) - Modbus Protocol Gateway with MQTT
STG Series WMBus (Wireless MBus) - Modbus Protocol Gateway with MQTT
TLM Series LoRa Modems and LoRaWAN EndNode Modems
TLM Series LoRa Modems and LoRaWAN EndNode Modems
CKL Series Modbus TCP and RTU Gateways and Serial to Ethernet Gateways
CKL Series Modbus TCP and RTU Gateways and Serial to Ethernet Gateways
BSB Series Industrial Unmanaged Ethernet Switch (with Broadband Power Line)
BSB Series Industrial Unmanaged Ethernet Switch (with Broadband Power Line)
KMK Series Optical Probes for Energy Meters
HUR Series Modbus TCP and RTU Remote I/O Devices with MQTT (and LoRaWAN)
BKV Series Industrial Converters and USB Tools
BKV Series Industrial Converters and USB Tools
BKV Series Industrial Converters and USB Tools
MBC Series IEC62056-21 Protocol Auto Baud Changer
KMK Series Optical Probes for Energy Meters
REDZ Software Solutions
LoRaWAN
LoRaWAN
In today's rapidly digitizing world, IoT (Internet of Things) devices and applications are becoming increasingly prevalent. In this context, long-range wireless communication technologies play a significant role. One such technology that stands out is LoRa, which offers an innovative solution for low-power, long-range wireless communication.
MQTT
MQTT
As the Internet of Things (IoT) continues to grow, the demand for efficient, lightweight, and reliable communication protocols becomes essential. One of the most popular protocols meeting these demands is MQTT (Message Queuing Telemetry Transport).
Broadband Power Line (BPL)
Broadband Power Line (BPL)
Broadband Powerline Technology (BPL), also known as Powerline Communication (PLC), represents a revolutionary approach to data transmission, leveraging the existing electrical power infrastructure to deliver broadband internet connectivity.
Wireless MBus (WMBus)
Wireless MBus (WMBus)
In an era defined by connectivity and data-driven decision-making, the need for efficient and reliable metering solutions has never been greater. Enter Wireless M-Bus (Meter-Bus) technology, a versatile and robust platform designed to revolutionize remote meter reading and data communication in utility management systems.
IEC62056-21 (for Electricity Meters)
IEC62056-21 (for Electricity Meters)
IEC 62056-21 is an international standard for communication with electricity meters. Developed by the International Electrotechnical Commission (IEC), this protocol standardizes the way data is exchanged between meters and various devices or systems, ensuring interoperability and efficient data management.
DLMS/COSEM (for Electricity Meters)
DLMS/COSEM (for Electricity Meters)
DLMS/COSEM (Device Language Message Specification / Companion Specification for Energy Metering) is the global standard for smart energy metering. It provides a highly secure, interoperable framework for reading and managing energy data across diverse utility networks.
P1 Companion Standard (for Electricity Meters)
P1 Companion Standard (for Electricity Meters)
Smart energy meters have become essential in monitoring and controlling energy usage. To facilitate better integration, communication, and functionality of these smart meters, standards are crucial. One such standard, particularly relevant in Europe, is the P1 Companion Standard.
Modbus RTU
Modbus RTU
Modbus RTU is a widely recognized and utilized communication protocol in the field of industrial automation. Developed by Modicon (now Schneider Electric) in 1979, it was designed to facilitate communication between various electronic devices, primarily programmable logic controllers (PLCs).
Modbus TCP
Modbus TCP
Modbus TCP, also known as Modbus TCP/IP, is a widely adopted communication protocol in the industrial automation sector. It was developed to enable Modbus communication over Ethernet networks, combining the reliability and simplicity of the Modbus protocol with the versatility of Ethernet.
LoRa RF Communication
LoRa RF Communication
LoRa stands for Long Range and is a proprietary wireless modulation technique developed by Semtech. Essentially, LoRa is the physical layer, or the hardware, that allows long-range communication between devices.
MBus
MBus
M-Bus (Meter-Bus) is a robust European standard specifically designed for the remote reading of utility meters, such as electricity, gas, water, and heat. It utilizes a simple, polarity-independent two-wire system that transmits both data and power over long distances, making it highly cost-effective and immune to industrial noise.