OBIS (Object Identification System) is the standardized addressing scheme defined by IEC 62056 for energy meters. The Weble universal gateway OBIS driver reads data from smart meters and energy meters using several IEC 62056 sub-protocols over serial, TCP, or HTTP connections.
The driver supports the following protocols:
The driver also provides a By meter model mode for meters that push DLMS/HDLC frames on their customer interface (Landis & Gyr E450, Kamstrup OMNIPOWER HAN): the gateway only listens.
| Protocol | Transport | Use case |
|---|---|---|
| D0Protocol | Serial | IEC 62056-21 meters read through an optical head or an RS-485 interface. The gateway requests the data (300 baud, 7 data bits, even parity by default). |
| SML Protocol | Serial / TCP | German smart meters (Discovergy, EMH, eBZ). Binary format. |
| JsonEfrProtocol | HTTP | EFR Smart Grid Hub — reads OBIS data via HTTP API. |
| DLMS | Serial | Landis+Gyr E650 read through its optical port (IEC 62056-21 mode E, then DLMS/HDLC). Fixed list of registers, read every 30 seconds. |
| By meter model | Serial | Meters that push DLMS/HDLC frames on their customer interface: Landis & Gyr E450 and Kamstrup OMNIPOWER HAN. The gateway only listens. |
D0Protocol.300 (the D0 protocol starts at 300 baud and auto-negotiates to a higher speed).7, StopBits 1, Parity even (standard D0 settings).For supported meters, the By meter model mode is the simplest:
By meter model.Landis & Gyr E450 or Kamstrup OMNIPOWER HAN).The gateway only listens: it becomes connected when the first frame is received, and the addresses are created from the pushed data. Values cannot be read on demand (read-only (push mode)).
D0Protocol — the gateway reads only what you ask for:
%obis: (nothing after the prefix). If several meters share the same RS-485 line, create one address per meter and put the meter's device address after the prefix, for example %obis:12345678.60000) or a cron expression (*/15 * * * *); several values can be separated by ;. A single reading can also be triggered by reading the address.{"<code>": {"name": …, "value": …, "unit": …}, …}.%obis:<root>/<code>/value, copying <code> exactly as it appears in the JSON (/unit and /name are also available). With the root %obis: this gives %obis:/<code>/value.By meter model and DLMS — nothing to create: the root address %obis: and one branch per OBIS code are added automatically — when the first frame arrives in By meter model, at start for the fixed DLMS register list (see section 2.7). The Polling column is ignored in these modes.
The address format is described in section 3.1.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this OBIS gateway instance. |
| Cluster ID | cluster | Cluster identifier. Use 0 for single-gateway setups. |
| Description | description | Optional description. |
| Protocol | protocol | Communication protocol: D0Protocol, SmlProtocol, JsonEfrProtocol, DLMS, or By meter model. |
| Model | meterModel | Only visible in By meter model mode. Meter model preset: Landis & Gyr E450 or Kamstrup OMNIPOWER HAN. |
| Transport type | type | Transport medium: serial, tcp, or http. Hidden in D0, DLMS, and By meter model modes (serial is forced). |
| Request timeout (ms) | timeout | Maximum time in milliseconds to wait for a meter response. Default: 10000. |
| Idle timeout (ms) | idleTimeout | Pause in milliseconds before sending a new request. Default: 5000. |
Visible when transport type is serial or when using D0/DLMS/By meter model protocols.
| Label | JSON Key | Description |
|---|---|---|
| Serial Port | serialPort | Serial interface connected to the meter. Auto-complete lists detected USB/serial interfaces. |
| Serial Baudrate | serialBaudRate | Initial baudrate. For D0: 300 (auto-negotiation). For E450: 2400. Values: 300 to 115200. |
| Serial DataBits | serialDataBits | Data bits per character: 5, 6, 7 (D0 standard), or 8. |
| Serial StopBits | serialStopBit | Stop bits: 1 or 2. |
| Serial Parity | serialParity | Parity: none, even (D0/DLMS standard), odd, mark, or space. |
Visible when transport type is tcp.
| Label | JSON Key | Description |
|---|---|---|
| Host | host | IP address or domain of the meter or TCP-serial converter. |
| Port | port | TCP port. Default: 10001. |
Visible when transport type is http (JsonEfrProtocol).
| Label | JSON Key | Description |
|---|---|---|
| http request url | httpRequestUrl | The URL from which to query OBIS data. |
Visible when protocol is D0Protocol.
| Label | JSON Key | Description |
|---|---|---|
| D0 wake up chars | protocolD0WakeupCharacters | Number of NULL characters sent before the first transmission to wake up the meter. Default: 0. |
| D0 sign on message | protocolD0SignOnMessage | Command for the sign-on message. Default: ? (queries all mandatory fields). Other values depend on the meter. |
| D0 mode overwrite | protocolD0ModeOverwrite | Override the D0 mode reported by the meter. Leave empty to use the mode from the meter's identification message. |
| D0 baudrate overwrite | protocolD0BaudrateChangeoverOverwrite | Override the baudrate change. Use when the meter reports incorrect baudrate information. |
Visible when protocol is SmlProtocol.
| Label | JSON Key | Description |
|---|---|---|
| SML ignore invalid CRC | protocolSmlIgnoreInvalidCRC | If enabled, CRC checksum errors are ignored. Useful for meters with known CRC issues. |
| SML input encoding | protocolSmlInputEncoding | Input data encoding: binary (default, from serial), ascii, utf-8, or base64. |
With Protocol = DLMS only the Serial Port is shown. The serial settings are handled by the driver (sign-on at 300 baud, 7 data bits, even parity, then the speed announced by the meter with 8 data bits and no parity). There is no transport option: the gateway always opens the connection itself (IEC 62056-21 mode E, then DLMS/HDLC) and reads a fixed list of registers every 30 seconds:
voltage L1 and L3 (32.7.0, 72.7.0), current L1 and L3 (31.7.0, 71.7.0), frequency (14.7.0), active power (16.7.0), reactive power (131.7.0), power factor (13.7.0), active energy import and export (1.8.0, 2.8.0), reactive energy import and export (3.8.0, 4.8.0).
This list matches the Landis+Gyr E650; other DLMS meters are not supported in this mode. Meters that push DLMS frames by themselves are handled by the By meter model protocol.
D0 Protocol (standard optical head):
{
"protocol": "D0Protocol",
"type": "serial",
"serialPort": "/dev/serial/by-id/usb-FTDI_FT232R-if00",
"serialBaudRate": 300,
"serialDataBits": 7,
"serialStopBit": 1,
"serialParity": "even",
"timeout": 10000,
"idleTimeout": 5000,
"protocolD0WakeupCharacters": 0,
"protocolD0SignOnMessage": "?"
}
By meter model (Landis & Gyr E450):
{
"protocol": "By meter model",
"meterModel": "Landis & Gyr E450",
"serialPort": "/dev/serial/by-id/usb-MBUS-if00",
"serialBaudRate": 2400,
"serialDataBits": 8,
"serialStopBit": 1,
"serialParity": "even"
}
SML Protocol (German smart meter via TCP):
{
"protocol": "SmlProtocol",
"type": "tcp",
"host": "192.168.1.50",
"port": 10001,
"protocolSmlIgnoreInvalidCRC": false,
"protocolSmlInputEncoding": "binary"
}
All addresses start with %obis: and form a tree:
| Address | Content |
|---|---|
%obis: |
Root address of the meter. Its value is a JSON object containing every OBIS code received. In D0 mode the text after the prefix is the meter's device address (empty = none). |
%obis:<root>/<code> |
One OBIS code (JSON object). |
%obis:<root>/<code>/value |
The value of that code — the address to use in routes and loggers. |
%obis:<root>/<code>/unit, /name, /desc |
Unit and label of the code (depending on the mode). |
<code> is written as the meter or the mode provides it:
| Mode | Example | Notes |
|---|---|---|
| By meter model (E450, Kamstrup) | %obis:/1.0.1.7.0.255/value |
Six numbers separated by dots. Created automatically. Kamstrup meters also provide _timestamp, _version, _serial and _meterId. |
| DLMS (E650) | %obis:/1.8.0/value |
Short code. Created automatically, with /value and /desc. |
| D0Protocol | %obis:/<code>/value |
You create the child addresses, with the code copied from the root value (see section 1.4). |
Always check the unit: values are those sent by the meter, not necessarily kWh. With the Landis & Gyr E450 preset, energies are in Wh, powers in W, voltages in V and currents in hundredths of an ampere.
For reference, the standard meaning of the most common codes (written here in the full A-B:C.D.E*F notation, which is not the address format):
| OBIS code | Description |
|---|---|
1-0:1.8.0*255 |
Total active energy import (kWh) |
1-0:1.8.1*255 |
Active energy import tariff 1 |
1-0:1.8.2*255 |
Active energy import tariff 2 |
1-0:2.8.0*255 |
Total active energy export (kWh) |
1-0:16.7.0*255 |
Instantaneous total active power (W) |
1-0:32.7.0*255 |
Voltage L1 (V) |
1-0:52.7.0*255 |
Voltage L2 (V) |
1-0:72.7.0*255 |
Voltage L3 (V) |
1-0:31.7.0*255 |
Current L1 (A) |
1-0:51.7.0*255 |
Current L2 (A) |
1-0:71.7.0*255 |
Current L3 (A) |
1-0:14.7.0*255 |
Frequency (Hz) |
| Label | JSON Key | Description |
|---|---|---|
| Name | name | The OBIS address (see section 3.1). Created automatically in By meter model and DLMS; created by you in D0Protocol. |
| Description | description | Optional description. |
| Polling | polling | Grid column only, editable on root addresses (without /). D0Protocol: period in ms or cron expression, several values separated by ; (see section 1.4). Ignored in the other modes. |
| Log | log | Logging mode: never, on update, always, or a duration in ms. |
| Property | Value |
|---|---|
| Readable | D0Protocol: yes, on the root address (triggers a fresh meter read). By meter model and DLMS: no. |
| Writable | No (read-only from meters) |
| Routable | Yes |
| Loggable | Yes |
| Model | Protocol | Default serial settings |
|---|---|---|
| Landis & Gyr E450 | DLMS push (listening) | 2400 baud, 8 data bits, 1 stop bit, even parity |
| Kamstrup OMNIPOWER HAN | DLMS push (listening) | 2400 baud, 8 data bits, 1 stop bit, no parity |
The D0 protocol is widely supported by electricity meters from most manufacturers. Any meter with an IEC 62056-21 optical port or RS485 interface should work with the D0 protocol. Common examples include:
The E650 is read through its optical port: set Protocol to DLMS and select the Serial Port of the optical head. No other parameter is needed (see section 2.7).
For a complete E450 integration example, see the article Landis & Gyr E450 meters.
| Symptom | Cause | Action |
|---|---|---|
| D0: the address list stays empty | No root address, or no Polling on it. | See section 1.4. |
D0: status !timeout |
The meter did not answer. The gateway retries 4 times, 5 seconds apart, before reporting the error. | Check the position of the optical head, the serial settings (300 baud, 7 data bits, even parity) and, on RS-485, the device address. |
| By meter model: the gateway never connects | No frame received. | Check the wiring, the baudrate (2400) and the parity. |
DLMS: status such as !Association failed on %obis: |
The meter did not answer the sign-on or refused the association. | Check the optical head; this mode supports the Landis+Gyr E650 only. |
read-only (push mode) when reading an address |
By meter model and DLMS values cannot be read on demand. | Wait for the next frame or cycle. |
Driver stops at start with missing license |
No licence for the OBIS driver. | Contact your reseller. |
Request timeout is an inactivity timer: it restarts each time data is exchanged with the meter. Idle timeout is the pause after each reading. Both apply to D0 only. OBIS addresses are read-only.