Meter protocols
ZiggyMeter speaks two protocol families over the optical port. Pick the one your meter uses under Meter → Configuration → Meter protocol; everything else on this page depends on that choice.
| Protocol | Data format | Typical meters |
|---|---|---|
| IEC 62056-21:2002 | ASCII text, one line per value | Older and simpler meters, and most meters in "readout" mode |
| DLMS/COSEM | Structured binary objects | Modern smart meters, often password-protected |
TIP
If you do not know which one your meter uses, start with IEC 62056-21. Most meters answer the identification request in that protocol even when they also support DLMS, and the identification string tells you what you are dealing with.
IEC 62056-21
Modes
The standard defines five modes. All are supported.
| Mode | How it works |
|---|---|
| A | Bidirectional, fixed 300 baud, no baud-rate change. |
| B | Like A, but the meter proposes a higher baud rate. |
| C | Bidirectional with negotiated baud rate — the most common mode. |
| D | One-way. The meter pushes a readout on its own; there is no request. |
| E | Handshake mode; the meter can hand the session over to another protocol, typically HDLC/DLMS. |
The device negotiates automatically. You only need to change settings for mode D, or to cap the baud rate.
Maximum baud rate
Meter → Configuration → Transmission limits how fast the device is willing to go: 300, 600, 1200, 2400, 4800, 9600 or 19200 baud.
The meter and the device negotiate the lowest of what both offer, so this setting is a ceiling, not a target. Lower it if readings are corrupted or truncated — a long or dirty optical path can fail at 9600 but work reliably at 2400.
Battery-powered meters
Some meters power their optical interface down between sessions to save energy and need to be woken first.
Tick The meter is battery powered and the device sends a wake-up sequence before every transmission. It costs a second or two per readout and is harmless on mains-powered meters, but leave it off unless you need it.
Mode D
Mode D meters transmit unprompted at a fixed baud rate; there is no request to send. Enable Use Mode D and set the baud rate the meter uses (commonly 2400).
WARNING
Only enable mode D for a meter that actually uses it. With mode D on, the device listens rather than asking, and a normal mode C meter will simply never say anything.
Mode E → DLMS/COSEM
A meter that announces mode E is offering to continue the session in HDLC. Tick Use DLMS/COSEM when the meter reports mode E and the device switches to DLMS/COSEM instead of falling back to mode C.
This is the usual way to reach a smart meter that presents an IEC 62056-21 front door but keeps the useful data behind DLMS. The DLMS settings below then apply.
DLMS/COSEM
DLMS/COSEM is used in pull mode: the device opens an association with the meter, requests a list of objects, and closes it again.
Authentication
| Level | What it needs | Typical client address |
|---|---|---|
| None | Nothing | 16 (public client) |
| Low (LLS) | A password from your utility | 32 |
| High (GMAC) | An authentication key (AK) | 32 or as specified |
INFO
Ask your utility. Password, keys and addressing are set by whoever commissioned the meter. Without them you will usually still get the public objects — often just the meter name and serial number — and nothing else.
Encryption
Tick Encrypt transmission to use the meter's ciphered application layer. Two 16-byte keys are required, each entered as 32 hexadecimal characters:
| Key | Purpose |
|---|---|
| Block cipher key (GUEK) | Encrypts the payload |
| Authentication key (AK) | Authenticates the payload; also used for High/GMAC authentication |
Keys are stored in the device's encrypted configuration. They are never returned by the web interface or the API — a stored password shows only as "set". Leaving a key field blank when saving keeps the existing value.
Addressing
| Field | Meaning | Common value |
|---|---|---|
| Client address | Which client role the device presents as | 16 = public/no auth, 32 = LLS |
| Server logical address | Logical device inside the meter | 1 (management logical device) |
| Server physical address | Physical address of the meter | 0 |
If your utility supplies different values, use theirs.
OBIS poll list
Unlike IEC 62056-21, where the meter sends whatever it wants, DLMS requires you to ask for each object by name. Meter → Configuration → OBIS poll list holds the request list.
Each entry has three parts:
| Part | Format | Notes |
|---|---|---|
| OBIS code | A.B.C.D.E.F, six values 0–255 | Usually 1.0.C.D.E.255 |
| Class | COSEM interface class | 1 = Data, 3 = Register (value + unit), 8 = Clock |
| Attribute | Attribute index | 2 is the value for most classes |
The factory defaults cover the codes most meters expose:
| OBIS | Class | Meaning |
|---|---|---|
1-0:1.8.0 | 3 | Positive active energy, total |
1-0:1.8.1 / 1-0:1.8.2 | 3 | Positive active energy, tariff 1 / tariff 2 |
1-0:2.8.0 | 3 | Negative active energy, total |
1-0:1.7.0 / 1-0:2.7.0 | 3 | Instantaneous active power, import / export |
1-0:32.7.0, 1-0:52.7.0, 1-0:72.7.0 | 3 | Instantaneous voltage, phases L1 / L2 / L3 |
1-0:31.7.0, 1-0:51.7.0, 1-0:71.7.0 | 3 | Instantaneous current, phases L1 / L2 / L3 |
1-0:14.7.0 | 3 | Frequency |
0-0:1.0.0 | 8 | Clock |
0-0:42.0.0 | 1 | Logical device name |
0-0:96.1.0 | 1 | Device serial number |
Remove entries your meter rejects — a request for an object that does not exist costs time on every readout, and on batteries that is energy. Add entries for anything else your utility documents.
TIP
Read the meter with the defaults first and see what comes back. Then trim the list to what actually answered.
Response timeout
The per-request receive timeout defaults to 1000 ms. Meters on a marginal optical link, or that are slow to compute a register, may need more. It is adjustable through the API (POST /api/v1/dlms/config).
Choosing between them
The serial console prints the identification string and the negotiated mode, which makes this a two-minute question to answer rather than a guess.
TIP
If your meter supports both mode C and mode E, consider staying on mode C. Mode C reads the meter with no password and no authentication keys, so there is nothing to obtain from your utility and nothing to re-enter if the meter is exchanged. Mode E hands the session over to DLMS/COSEM, which usually needs credentials before it returns anything beyond the meter name and serial number.
Take the mode E route when the data you want is only available over DLMS — and you have the credentials for it.