DDS8888-2P Single-phase DIN-rail Relay Energy Meter — Integration Guide
Model catalog
Search for these models in ThinkLink by name or ID.
| Model type | Name | id_name | Platform model ID |
|---|---|---|---|
| RPC | [DDS8888 ACT] 23115 DEMAND-CLR | dds8888_demand_clear_23115 | 124191561935122435 |
| RPC | [DDS8888 GET] 23115 | dds8888_get_23115 | 124191561935122433 |
| RPC | [DDS8888 ACT] 23115 RELAY | dds8888_relay_action_23115 | 124191561935122434 |
| RPC | [DDS8888 SET] 23115 | dds8888_set_23115 | 124191561935122432 |
| RPC | [DDS8888 ACT] 23115 SET-ALARM | dds8888_set_alarm_23115 | 124191561935122436 |
| Template | DDS8888 | 124193141094772736 | |
| Thing Model | [DDS8888] | dds8888_23115 | 124190219116113920 |
| Parameter Thing Model | [DDS8888-PARA] | dds8888_para_23115 | 124190219116113921 |
| Trigger | [DDS8888] 电压/继电器/功率告警触发规则 | dds8888_alarm_23115 | 124191561935122439 |
1. Device Overview
| Item | Value |
|---|---|
| Device | DDS8888-2P single-phase 2P DIN-rail energy meter with relay |
| Vendor | Yueqing Lantian Hi-Tech Co., Ltd. |
| Protocol | Modbus-RTU (RS-485) |
| Access | EdgeBus DTU (KC11 mains) / LoRaWAN Class C |
| Business Code | 23115 |
| Template | DDS8888 |
DDS8888-2P is a single-phase SOC DIN-rail energy meter compliant with GB/T 17215.321-2008 (class 0.5/1). It meters forward/reverse active energy and max demand, measures voltage/current/power/power-factor/frequency, and has a built-in relay for remote trip/close. This guide integrates it into ThinkLink over Modbus-RTU via a KC11 DTU.
2. Product Features
- Single-phase 2P DIN-rail (35mm standard rail) — fast, space-saving panel mounting.
- Built-in relay — remote trip/close over RS-485 for prepaid / remote cut-off.
- Meters forward/reverse active energy + max demand; measures V/I/active&reactive power/PF/frequency.
- Class 0.5/1 accuracy, anti-creep, immune to surge/strong-field/lightning.
- RS-485 1200–9600bps, supports both Modbus-RTU and DL/T645.
3. Application Scenarios
- Sub-metering & remote cut-off for rentals/shops: remote reading, trip on arrears, close after payment.
- Branch-circuit monitoring in industry/buildings: per-circuit V/I/power/PF, detect overload, outage, reverse power.
- Energy & demand management: max-demand assessment, time-of-use energy analytics.
4. Gateway (DTU) Information
4.1 Hardware
| Item | Value |
|---|---|
| DTU model | KC11 (mains) |
| Power | AC 85–270V (mains, always on) |
| LoRaWAN Class | Class C |
| Interface | RS-485 |
| Serial | 9600 / 8N1 (default) |
| Default address | 0x01 (configurable) |
4.2 Wiring
KC11 (AC mains DTU) DDS8888-2P meter
L / N ── AC 85~270V mains
RS485-A ─────────────────────── 485 A
RS485-B ─────────────────────── 485 B
(120Ω terminator to 485A at bus end if needed)5. Data Acquisition
Modbus-RTU FC03 reads the telemetry block 0x0018–0x0027 (16 contiguous registers) in one transaction, plus a separate read of 0x681C for relay status. Byte order is big-endian ABCD.
5.1 Register Map (Appendix B, Modbus-RTU)
Telemetry registers:
| Item | Address | Regs | Type | Coef | Unit |
|---|---|---|---|---|---|
| Forward active energy | 0x0018–0x0019 | 2 | uint32BE | 0.01 | kWh |
| Reverse active energy | 0x001A–0x001B | 2 | uint32BE | 0.01 | kWh |
| Max demand | 0x001C–0x001D | 2 | uint32BE | 0.0001 | kW |
| Voltage | 0x001E | 1 | uint16BE | 0.1 | V |
| Current | 0x001F–0x0020 | 2 | uint32BE | 0.001 | A |
| Active power | 0x0021–0x0022 | 2 | uint32BE | 0.0001 | kW |
| Reactive power | 0x0023–0x0024 | 2 | uint32BE | 0.0001 | kvar |
| Power factor | 0x0025 | 1 | uint16BE | 0.001 | — |
| Frequency | 0x0026 | 1 | uint16BE | 0.01 | Hz |
| Status word 1 | 0x0027 | 1 | uint16BE | — | — |
| Relay control/status | 0x681C | 1 | uint16BE(R/W) | — | — |
Config/control registers:
| Item | Address | R/W | Note |
|---|---|---|---|
| Modbus address | 0x000F | R/W | 01–FE |
| Meter no. (3 regs) | 0x0010–0x0012 | R/W | write password |
| Baud rate | 0x0013 | R/W | 9600=0x2580 etc. |
| Clear max demand | 0x0028 | W | write 0x22B8 |
| Relay control | 0x681C | R/W | 0x001A=trip / 0x001C=close |
5.2 Status Bits (status word 0x0027)
| Bit | Meaning | Value |
|---|---|---|
| Bit5 | Reactive power direction | 0=forward / 1=reverse |
| Bit4 | Active power direction | 0=forward / 1=reverse |
| Bit1 | Demand integration mode | 0=sliding / 1=block |
⚠️ Field check 1 — relay read-back encoding: the manual defines only the WRITE semantics of relay register 0x681C (0x001A trip / 0x001C close), not the read value. This integration assumes the same encoding on read (0x001C=close / 0x001A=trip); verify on site.
⚠️ Field check 2 — write password (meter number): relay control and address-change writes (FC10) append a 6-byte meter number as password. This integration is confirmed to run with password disabled and uses an all-zero meter number; if the field meter enables the password, replace it with the real meter number.
6. EdgeBus Model
6.1 EB Config
| Param | Value |
|---|---|
| name / port | dds8888 / 22 |
| version / dataType | 0x87 / 0x31 |
| serial | 9600 / 8N1 |
| BzType / BzVersion | 23115 / 1 |
| upPeriodIndex / periodIndex | 70 / 70 (COV off, shared) |
| Modbus addr injection | app_150 → command address byte |
6.2 Notes
The EB code has 1 uplink event with 2 queries: ① FC03 read 0x0018–0x0027 (telemetry block, 32 bytes); ② FC03 read 0x681C (relay status, 2 bytes, isLast triggers uplink). COV off, collect=upload=300s. The uplink frame has a 6-byte DTU header followed by 34 data bytes (dataLen=40). The Modbus target address is injected from app_150.
import { Buffer } from "buffer";
import { buildOtaFile } from "@EBSDK/run";
import {
ActionAfertExpr, CalcData,
CrcMode,
CvtRule,
EBBuffer,
EBModel,
ExprCondition,
LoraUpEvent,
QueryEvent, SetUpCovDataType,
UserConfUPItem, EventInfoItem
} from "@EBSDK/EBCompiler/all_variable";
import { CheckbitEnum, getOtaConfig, HwTypeEnum, UpgrdTypeEnum } from "@EBSDK/otaConfig";
// DDS8888-2P 单相2P导轨继电器电能表 — Modbus-RTU 大端ABCD(见 requirement/requirements.md §5)
// 上行数据顺序 = 下面 quInfo 各 listVal 的拼接顺序:
// Q1(0x0018-0x0027,16 reg=32B): energy_fwd/energy_rev/max_demand/voltage/current/
// active_power/reactive_power/power_factor/frequency/status_word
// Q2(0x681C,1 reg=2B): relay_status(继电器状态,单独读,isLast 触发上行)
// addr_modbus 由 APP 槽位 150 动态注入到命令地址字节(indexAPP:150 → indexCMD:0 copySize:1)
const eventInfo: UserConfUPItem[] = [
{
name: "dds8888",
port: 22,
version: "0x87",
dataType: "0x31",
upPeriodIndex: 70,
quInfo: [
// Q1: 遥测主块 0x0018-0x0027(连续16寄存器,一次读全部遥测)
{
protocol: "modbus", addr: "0x01", code: "0x03", periodIndex: 70,
indexAPP: 150, indexCMD: 0, copySize: 1,
listVal: [{ start: "0x0018", end: "0x0027" }]
},
// Q2: 继电器状态 0x681C(与主块不连续,单独读;isLast 触发上行)
{
protocol: "modbus", addr: "0x01", code: "0x03", periodIndex: 70,
indexAPP: 150, indexCMD: 0, copySize: 1,
isLast: true,
listVal: [{ start: "0x681C", end: "0x681C" }]
}
]
}
]
let otaConfig = getOtaConfig({
BaudRate: 9600,
StopBits: 1,
DataBits: 8,
Checkbit: CheckbitEnum.NONE,
Battery: false, // KC11 市电常供电 → Class C
ConfirmDuty: 60,
BzType: 23115,
BzVersion: 1
})
const MODBUS_TT = (ebModel: EBModel) => {
for (let i = 0; i < eventInfo.length; i++) {
let event = new EventInfoItem(eventInfo[i]);
event.upEventSetup()
event.eventInstall()
}
return JSON.stringify(ebModel, null, 2)
}
buildOtaFile(import.meta.url, otaConfig, MODBUS_TT)7. Thing Models
7.1 Basic Info
| Type | Name | id Name |
|---|---|---|
| Telemetry | [DDS8888] | dds8888_23115 |
| Parameter | [DDS8888-PARA] | dds8888_para_23115 |
7.2 Uplink Frame
frameInfo: port 22, dataLen 40, battery index 4, tagList [0x87, 0x31]. Data starts at index 6:
| field | byte index | type | coef |
|---|---|---|---|
| energy_fwd | 6 | uint32BE | 0.01 |
| energy_rev | 10 | uint32BE | 0.01 |
| max_demand | 14 | uint32BE | 0.0001 |
| voltage | 18 | uint16BE | 0.1 |
| current | 20 | uint32BE | 0.001 |
| active_power | 24 | uint32BE | 0.0001 |
| reactive_power | 28 | uint32BE | 0.0001 |
| power_factor | 32 | uint16BE | 0.001 |
| frequency | 34 | uint16BE | 0.01 |
| status_word | 36 | hexbe2 | — |
| relay_raw | 38 | hexbe2 | — |
The status word yields active_power_dir (bit4) / reactive_power_dir (bit5); relay_raw yields relay_status (0x001C=1 close / 0x001A=0 trip).
8. Third-party MQTT Subscription
8.1 Topic
/v32/{org account}/tkl/up/telemetry/{eui}
8.2 Sample Payload
{
"eui": "6353012af10a9331",
"active_time": "2026-06-29T08:35:48.000Z",
"thingModelId": "124190219116113920",
"thingModelIdName": "dds8888_23115",
"telemetry_data": {
"snr": 9.5,
"rssi": -65,
"energy_fwd": 876543.21,
"energy_rev": 12.34,
"max_demand": 1.1010,
"voltage": 220.3,
"current": 5.000,
"active_power": 1.1010,
"reactive_power": 0.0500,
"power_factor": 0.998,
"frequency": 50.00,
"active_power_dir": 0,
"reactive_power_dir": 0,
"relay_status": 1,
"status_word": "0000",
"relay_raw": "001c"
}
}9. RPC
9.1 RPC List
| Name | id Name | Type | Purpose |
|---|---|---|---|
| Set params | dds8888_set_23115 | SET | upload period / Modbus addr / heartbeat / power-on delay, echo verified |
| Get params | dds8888_get_23115 | GET | read back the above |
| Relay control | dds8888_relay_action_23115 | ACTION | remote close / trip |
| Clear demand | dds8888_demand_clear_23115 | ACTION | clear max demand |
| Set alarm | dds8888_set_alarm_23115 | ACTION | over/under-voltage thresholds + notify group |
9.2 Parameter Definitions
| Param | field_name | slot | type | range/default | description |
|---|---|---|---|---|---|
| Upload period | period_up | app_70 | uint32le | 1–3600 / 300 s | DTU poll+upload interval |
| Heartbeat period | period_heart | app_40 | uint32le | 86400 s | power-saving; blank/<1h auto-set to 24h |
| Power-on delay | pwron_delay | app_38 | uint16le | 1000 ms | wait before serial query |
| Modbus address | addr_modbus | app_150 | uint8 | 1–247 / 1 | DTU query target address |
9.3 Relay Control
Select close (power on) or trip (cut off) then execute. Internally a transparent FC10 write to register 0x681C (close=0x001C / trip=0x001A) with an all-zero meter-number password, echo-verified. The actual relay state is confirmed via the periodic relay_status telemetry.
10. Alarm Trigger
| Name | id Name | Monitors |
|---|---|---|
| Voltage/relay/power alarm | dds8888_alarm_23115 | over-voltage, under-voltage, relay trip, reverse active power |
Enable steps: ① run dds8888_set_alarm_23115 to set over/under-voltage thresholds and notify group; ② bind this trigger to the target devices/template. It then evaluates every frame, with a voltage hysteresis dead-band, and auto-clears when a threshold is absent.
11. Template Selection
Search the ThinkLink platform for template DDS8888 (or by business code 23115 / single-phase DIN-rail relay meter). It bundles the telemetry+parameter thing models, all RPCs, and the alarm trigger, with KC11 mains Class C defaults (heart_period=300s).
12. Notes
- Write operations (relay/address change) append a 6-byte meter-number password; this integration uses all-zeros (password disabled).
- The device also supports DL/T645-2007/1997; this integration uses Modbus-RTU.
- Verify the relay read-back encoding and the meter-number password on site at deployment (see §5.2).