Skip to content

1. Overview

Model catalog

Search for these models in ThinkLink by name or ID.

Model typeNameid_namePlatform model ID
TemplateZENNER-BATTERY-2112171880621491752965
Thing Model[ZENNER] waterzenner_2112171719731542888453
Thing Model[ZENNER-21121-ZENNER资产] 区域聚合zenner_asset_21121119677189950959627
Parameter Thing Model[ZENNER-PARA]zenner_para_21121111417969946292224

EdgeBus code

This is the original EdgeBus code used by the device.

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";
////////////////////////////////////////////////////////////////////////////////////////
const eventInfo:UserConfUPItem[]=[
    {
        name:"water",port:22,version:"0x83",dataType:"0x32",upPeriod:"10y",
        quInfo:[
            {
                protocol:"modbus",addr:"0x02",code:"0x03", periodIndex:70,
                indexAPP:150, indexCMD:0, copySize:1,payIndex:3,ackAddrIndex:0,
                listVal:[
                    { start: "0x0007", end: "0x0007",  },// EDC 电压状态 2字节:0x0007(低字节含状态码:FF/01/02 等,按手册解释)type: "Uint16BE"
                ]
            },
            {
                protocol:"modbus",addr:"0x02",code:"0x03", periodIndex:70,
                indexAPP:150, indexCMD:0, copySize:1,payIndex:3,ackAddrIndex:0,
                listVal:[
                    { start: "0x0008", end: "0x0008",  },//EDC 报警信息 2字节:0x0008,type: "Uint16BE"
                ]
            },
            {
                protocol:"modbus",addr:"0x02",code:"0x03", periodIndex:70,
                indexAPP:150, indexCMD:0, copySize:1,payIndex:3,ackAddrIndex:0,isLast:true,
                listVal:[
                    { start: "0x0004", end: "0x0005"   }, // type: "FloatBE"
                ]
            }
        ]
    }
]
let otaConfig = getOtaConfig({
    BaudRate: 9600,
    StopBits: 1,
    DataBits: 8,
    Checkbit: CheckbitEnum.EVEN,
    Battery: true,
    ConfirmDuty: 60,
    BzType: 21121,
    BzVersion: 16
})
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)

This document describes the complete integration solution for ZENNER water meters (DN25 / DN40) connected via KC21 data collector, using Modbus-RTU protocol and EB framework, and integrated into the ThinkLink platform.

The document includes:

  • Device wiring and communication parameters
  • ThinkLink platform usage instructions
  • Telemetry data format and third-party subscription
  • Advanced EB integration details (EBHelper, Thing Model, RPC)

Part 1: User Guide


2. Meter Device Information

2.1 Water Meter Specifications

  • Brand: ZENNER
  • Device Type: Water Meter
  • Models: DN25 / DN40
  • Power Supply: External power required
  • Input Voltage: DC 12–24V

2.2 Communication Parameters (RS485 / Modbus-RTU)

ParameterValue
ProtocolModbus-RTU
Baud Rate9600 bps
Data Bits8
ParityEven
Stop Bits1
Slave AddressConfigurable

2.3 Water Meter Wiring

Wire ColorDescription
RedPower +
BlackPower −
YellowRS485 A
Green / BlueRS485 B

2.4 Official Manuals


3. Data Collector Information (KC21)

3.1 Basic Information

  • Model: KC21
  • Power Supply: Battery powered
  • External Power Output: 15V (for meter power supply)

3.2 KC21 Wiring

Wire ColorDescription
Red / BrownPower +
BlackPower −
BlueRS485 A
WhiteRS485 B

⚠️ Ensure RS485 A/B lines are connected correctly between the KC21 and the water meter.



4.1 Add Device

  1. Log in to the ThinkLink platform
  2. Go to Device Management → Add Device
  3. Search and add the following model:
plain
ZENNER-BATTERY-21121
  1. Complete device binding

4.2 Parameter Configuration

Navigation path:

plain
Device Management → Select Device → Configuration → RPC

Select RPC:

plain
[EB SET] easy para

Parameters

ParameterDescription
periodMeter reading interval (seconds)
addrModbus slave address of the water meter

4.3 Third-Party Data Subscription

MQTT Topic

plain
/v32/{Organization Account}/tkl/up/telemetry/{eui}

Sample Telemetry Payload

json
{
    "eui": "6353012af10a9331",
    "active_time": "2026-02-05T08:35:48.000Z",
    "thingModelId": "71719731542888453",
    "thingModelIdName": "zenner_21121",
    "telemetry_data": {
        "snr": 13.5,
        "rssi": -51,
        "battery": 3.37,
        "total_flow": 1,
        "update_time": 1770280548000
    }
}

Protocol Reference


Part 2: Advanced Integration


5. Data Acquisition via EBHelper

5.1 Communication Protocol

  • Protocol: Modbus-RTU
  • Implementation: EBHelper
  • Business Type (BzType): 21121

5.2 Modbus Register Mapping

Register AddressDescriptionData Type
0x0007EDC voltage statusUint16BE
0x0008EDC alarm statusUint16BE
0x0004–0x0005Total water consumptionFloatBE

5.3 OTA Configuration

javascript
let otaConfig = getOtaConfig({
    BaudRate: 9600,
    StopBits: 1,
    DataBits: 8,
    Checkbit: CheckbitEnum.EVEN,
    Battery: true,
    ConfirmDuty: 60,
    BzType: 21121,
    BzVersion: 16
})

5.4 EB Compilation Logic

  • EBHelper is used to define Modbus polling logic
  • Event configuration is defined in eventInfo
  • OTA file is generated using buildOtaFile()
  • Supports periodic Modbus polling and LoRa uplink

6. Thing Model Mapping

Port: 22

Uses the EBHelper standard frame format:

Field NameOffsetLength (Bytes)Description
version01Protocol version, fixed at 0x83
dataType11Fixed at 0x32
covStatus21Reserved byte (for internal COV processing)
status31Query event status
battery41Battery level
addr51Sub-device address
EDC Voltage62Big-endian format, Uint16BE
EDC Alarm82Big-endian format, Uint16BE
Total Flow104FloatBE, unit:

6.2 Thing Model Information

ItemValue
Thing Model NameZENNER
Thing Model ID Namezenner_21121
Event Namewater

6.2 Field Mapping

FieldDescription
total_flowTotal water consumption
batteryBattery voltage
rssiSignal strength
snrSignal-to-noise ratio

7. Payload Parsing Logic

7.1 Telemetry Parsing

  • LoRa Port: 22
  • Data Type: FloatBE
  • Precision: 3 decimal places

7.2 Parameter Parsing (RPC)

APP AddressParameter
70Polling interval (period)
150Modbus slave address

8. RPC Parameter Configuration

  • RPC Name: [EB SET] easy para
  • RPC ID Name: eb_set_easy_para
APP AddressDescription
app_70Polling period
app_150Water meter Modbus address

9. Summary

This solution provides a complete and reliable integration of ZENNER water meters into the ThinkLink platform using EB + KC21:

  • Remote parameter configuration
  • Periodic meter reading
  • Standard MQTT telemetry for third-party systems
  • Low power consumption and high stability

It is well suited for water management, irrigation automation, and smart utility projects.