Skip to content

DDS8888-2P Single-phase DIN-rail Relay Energy Meter — Integration Guide

Model catalog

Search for these models in ThinkLink by name or ID.

Model typeNameid_namePlatform model ID
RPC[DDS8888 ACT] 23115 DEMAND-CLRdds8888_demand_clear_23115124191561935122435
RPC[DDS8888 GET] 23115dds8888_get_23115124191561935122433
RPC[DDS8888 ACT] 23115 RELAYdds8888_relay_action_23115124191561935122434
RPC[DDS8888 SET] 23115dds8888_set_23115124191561935122432
RPC[DDS8888 ACT] 23115 SET-ALARMdds8888_set_alarm_23115124191561935122436
TemplateDDS8888124193141094772736
Thing Model[DDS8888]dds8888_23115124190219116113920
Parameter Thing Model[DDS8888-PARA]dds8888_para_23115124190219116113921
Trigger[DDS8888] 电压/继电器/功率告警触发规则dds8888_alarm_23115124191561935122439

1. Device Overview

ItemValue
DeviceDDS8888-2P single-phase 2P DIN-rail energy meter with relay
VendorYueqing Lantian Hi-Tech Co., Ltd.
ProtocolModbus-RTU (RS-485)
AccessEdgeBus DTU (KC11 mains) / LoRaWAN Class C
Business Code23115
TemplateDDS8888

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

  1. Single-phase 2P DIN-rail (35mm standard rail) — fast, space-saving panel mounting.
  2. Built-in relay — remote trip/close over RS-485 for prepaid / remote cut-off.
  3. Meters forward/reverse active energy + max demand; measures V/I/active&reactive power/PF/frequency.
  4. Class 0.5/1 accuracy, anti-creep, immune to surge/strong-field/lightning.
  5. 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

ItemValue
DTU modelKC11 (mains)
PowerAC 85–270V (mains, always on)
LoRaWAN ClassClass C
InterfaceRS-485
Serial9600 / 8N1 (default)
Default address0x01 (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:

ItemAddressRegsTypeCoefUnit
Forward active energy0x0018–0x00192uint32BE0.01kWh
Reverse active energy0x001A–0x001B2uint32BE0.01kWh
Max demand0x001C–0x001D2uint32BE0.0001kW
Voltage0x001E1uint16BE0.1V
Current0x001F–0x00202uint32BE0.001A
Active power0x0021–0x00222uint32BE0.0001kW
Reactive power0x0023–0x00242uint32BE0.0001kvar
Power factor0x00251uint16BE0.001
Frequency0x00261uint16BE0.01Hz
Status word 10x00271uint16BE
Relay control/status0x681C1uint16BE(R/W)

Config/control registers:

ItemAddressR/WNote
Modbus address0x000FR/W01–FE
Meter no. (3 regs)0x0010–0x0012R/Wwrite password
Baud rate0x0013R/W9600=0x2580 etc.
Clear max demand0x0028Wwrite 0x22B8
Relay control0x681CR/W0x001A=trip / 0x001C=close

5.2 Status Bits (status word 0x0027)

BitMeaningValue
Bit5Reactive power direction0=forward / 1=reverse
Bit4Active power direction0=forward / 1=reverse
Bit1Demand integration mode0=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

ParamValue
name / portdds8888 / 22
version / dataType0x87 / 0x31
serial9600 / 8N1
BzType / BzVersion23115 / 1
upPeriodIndex / periodIndex70 / 70 (COV off, shared)
Modbus addr injectionapp_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.

typescript
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

TypeNameid Name
Telemetry[DDS8888]dds8888_23115
Parameter[DDS8888-PARA]dds8888_para_23115

frameInfo: port 22, dataLen 40, battery index 4, tagList [0x87, 0x31]. Data starts at index 6:

fieldbyte indextypecoef
energy_fwd6uint32BE0.01
energy_rev10uint32BE0.01
max_demand14uint32BE0.0001
voltage18uint16BE0.1
current20uint32BE0.001
active_power24uint32BE0.0001
reactive_power28uint32BE0.0001
power_factor32uint16BE0.001
frequency34uint16BE0.01
status_word36hexbe2
relay_raw38hexbe2

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

json
{
    "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

Nameid NameTypePurpose
Set paramsdds8888_set_23115SETupload period / Modbus addr / heartbeat / power-on delay, echo verified
Get paramsdds8888_get_23115GETread back the above
Relay controldds8888_relay_action_23115ACTIONremote close / trip
Clear demanddds8888_demand_clear_23115ACTIONclear max demand
Set alarmdds8888_set_alarm_23115ACTIONover/under-voltage thresholds + notify group

9.2 Parameter Definitions

Paramfield_nameslottyperange/defaultdescription
Upload periodperiod_upapp_70uint32le1–3600 / 300 sDTU poll+upload interval
Heartbeat periodperiod_heartapp_40uint32le86400 spower-saving; blank/<1h auto-set to 24h
Power-on delaypwron_delayapp_38uint16le1000 mswait before serial query
Modbus addressaddr_modbusapp_150uint81–247 / 1DTU 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

Nameid NameMonitors
Voltage/relay/power alarmdds8888_alarm_23115over-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).