1. Sensor Introduction
Model catalog
Search for these models in ThinkLink by name or ID.
| Model type | Name | id_name | Platform model ID |
|---|---|---|---|
| RPC | [ADW2xx GET] para | adw2xx_get_23109 | 102274327663087623 |
| RPC | [ADW2xx SET] para | adw2xx_set_23109 | 102273573074243589 |
| Template | ADW2xx-23109 | 102273965933727749 | |
| Thing Model | [ADW2xx-23109] | adw2xx_23109 | 102271576388407301 |
| Thing Model | [ACREL-23109-ADW2xx资产] 区域聚合 | adw2xx_asset_23109 | 119677189950959616 |
| Parameter Thing Model | [ADW2xx-PARA] | adw2xx_para_23109 | 102272760276848645 |
ADW2xx is an Acrel multi-channel DIN-rail multi-circuit power meter, mainly used for full electrical parameter measurement of multiple three-phase circuits. The device can connect up to 4 three-phase current input circuits at the same time, and can measure voltage, current, power, power factor, frequency, energy, and other parameters.
In this solution, ADW2xx is used as a multi-user electricity meter. One collector collects data from one ADW2xx device. Since ADW2xx contains multiple internal channels/circuits, each channel is uploaded independently as one data packet. The channel number is determined by the value of the 2nd byte in the uplink data.
2. Product Features
The ADW2xx multi-circuit power meter has the following features:
- Supports full electrical parameter measurement for 1 to 4 three-phase circuits.
- Supports three-phase voltage, three-phase current, zero-sequence current, and frequency collection.
- Supports active power, reactive power, apparent power, and total power measurement.
- Supports three-phase power factor and total power factor measurement.
- Supports forward active energy, reverse active energy, forward reactive energy, and reverse reactive energy metering.
- Supports RS-485 communication using the Modbus-RTU protocol.
- Supports independent reading and uploading of multi-channel data, suitable for multi-user electricity meter scenarios.
- Supports access to LoRaWAN networks through KC21/KC11, and supports data parsing, sub-device differentiation, and third-party platform forwarding on the ThinkLink platform.
3. Scope of Application
This integration solution applies to the following scenarios:
- Multi-user electricity metering.
- Multi-circuit energy monitoring in buildings, parks, apartments, commercial complexes, and similar scenarios.
- Connecting a single ADW2xx multi-channel meter to ThinkLink through one LoRaWAN collector.
- Power monitoring scenarios where different users or electrical circuits need to be distinguished by channel.
- Scenarios where third-party platforms need to subscribe to electricity meter telemetry data through MQTT.
4. Collector Information
4.1 Hardware Information
| Item | Description |
|---|---|
| Collector model | KC21 / KC11 |
| Collection interface | RS-485 |
| Communication protocol | Modbus-RTU |
| Collection target | ADW2xx multi-channel electricity meter |
| Collection method | One collector collects data from one ADW2xx |
| Reporting method | LoRaWAN |
| Power supply | 220V / 12V / battery power, selected according to the actual collector model and on-site power conditions |
4.2 Wiring Information
Power and Communication Interface
The ADW2xx meter is connected to the KC21/KC11 collector through RS-485. The collector reads the register data of each ADW2xx channel through Modbus-RTU and reports it to ThinkLink through LoRaWAN.
| ADW2xx | KC21/KC11 |
|---|---|
| RS-485 A | RS-485 A |
| RS-485 B | RS-485 B |
| Power terminal | Connect according to the on-site ADW2xx power supply requirements |
| Collector power supply | Connect 220V / 12V / battery power according to the KC21/KC11 model |
The ADW2xx main unit supports an RS-485 interface and the Modbus-RTU protocol. The supported communication baud rate is 1200 to 38400. In the EB configuration of this document, the default setting is 9600 bps, 8N1.
Sensor Interface
ADW2xx is a multi-circuit power meter. Each current circuit is connected through an external current transformer. CH1 to CH4 correspond to 4 three-phase current circuits respectively. Voltage and current transformer wiring should follow the wiring diagram in the ADW2xx manual.
This solution does not involve additional sensor interfaces. The collector only reads the Modbus registers of the ADW2xx through RS-485.
5. Data Collection
In this solution, Modbus-RTU function code 0x03 is used to read the following ADW2xx registers.
Each ADW2xx channel is read independently and uploaded independently. The reported data distinguishes the current channel number through the value of the 2nd byte:
| Reported dataType | Corresponding channel |
|---|---|
| 9 | CH1 |
| 10 | CH2 |
| 11 | CH3 |
| 12 | CH4 |
In the thing model script, the field ch comes from the 2nd byte of the uplink frame, namely index:1. When ch > 8, the script executes ch = ch - 9. Therefore, the final output channel number is:
| Original ch value | Parsed ch value | Corresponding channel |
|---|---|---|
| 9 | 0 | CH1 |
| 10 | 1 | CH2 |
| 11 | 2 | CH3 |
| 12 | 3 | CH4 |
5.1 Register Definition
5.1.1 Channel Reading Range
| Channel | Start address | End address | Description |
|---|---|---|---|
| CH1 | 0x0100 | 0x013D | CH1 electrical parameters |
| CH2 | 0x0156 | 0x0193 | CH2 electrical parameters |
| CH3 | 0x01AC | 0x01E9 | CH3 electrical parameters |
| CH4 | 0x0202 | 0x023F | CH4 electrical parameters |
Each channel reads the same type of content. The register addresses are offset by channel.
5.1.2 CH1 Register Definition
| Register address | Field name | Field identifier | Unit | Data type |
|---|---|---|---|---|
| 0x0100-0x0101 | Phase A voltage | ua | V | float |
| 0x0102-0x0103 | Phase B voltage | ub | V | float |
| 0x0104-0x0105 | Phase C voltage | uc | V | float |
| 0x0106-0x0107 | AB line voltage | uab | V | float |
| 0x0108-0x0109 | BC line voltage | ubc | V | float |
| 0x010A-0x010B | CA line voltage | uca | V | float |
| 0x010C-0x010D | Frequency | freq | Hz | float |
| 0x010E-0x010F | Phase A current | ia | A | float |
| 0x0110-0x0111 | Phase B current | ib | A | float |
| 0x0112-0x0113 | Phase C current | ic | A | float |
| 0x0114-0x0115 | Zero-sequence current | i0 | A | float |
| 0x0116-0x0117 | Phase A active power | pa | W | float |
| 0x0118-0x0119 | Phase B active power | pb | W | float |
| 0x011A-0x011B | Phase C active power | pc | W | float |
| 0x011C-0x011D | Total active power | pt | W | float |
| 0x011E-0x011F | Phase A reactive power | qa | var | float |
| 0x0120-0x0121 | Phase B reactive power | qb | var | float |
| 0x0122-0x0123 | Phase C reactive power | qc | var | float |
| 0x0124-0x0125 | Total reactive power | qt | var | float |
| 0x0126-0x0127 | Phase A apparent power | sa | VA | float |
| 0x0128-0x0129 | Phase B apparent power | sb | VA | float |
| 0x012A-0x012B | Phase C apparent power | sc | VA | float |
| 0x012C-0x012D | Total apparent power | st | VA | float |
| 0x012E-0x012F | Phase A power factor | pfa | float | |
| 0x0130-0x0131 | Phase B power factor | pfb | float | |
| 0x0132-0x0133 | Phase C power factor | pfc | float | |
| 0x0134-0x0135 | Total power factor | pft | float | |
| 0x0136-0x0137 | Phase A forward active energy | epfa | kWh | float |
| 0x0138-0x0139 | Phase B forward active energy | epfb | kWh | float |
| 0x013A-0x013B | Phase C forward active energy | epfc | kWh | float |
| 0x013C-0x013D | Total forward active energy | epft | kWh | float |
5.1.3 CH2 to CH4 Register Description
The field meanings of CH2, CH3, and CH4 are the same as CH1. The register addresses are as follows:
| Field | CH2 address | CH3 address | CH4 address |
|---|---|---|---|
| Phase A voltage | 0x0156-0x0157 | 0x01AC-0x01AD | 0x0202-0x0203 |
| Phase B voltage | 0x0158-0x0159 | 0x01AE-0x01AF | 0x0204-0x0205 |
| Phase C voltage | 0x015A-0x015B | 0x01B0-0x01B1 | 0x0206-0x0207 |
| AB line voltage | 0x015C-0x015D | 0x01B2-0x01B3 | 0x0208-0x0209 |
| BC line voltage | 0x015E-0x015F | 0x01B4-0x01B5 | 0x020A-0x020B |
| CA line voltage | 0x0160-0x0161 | 0x01B6-0x01B7 | 0x020C-0x020D |
| Frequency | 0x0162-0x0163 | 0x01B8-0x01B9 | 0x020E-0x020F |
| Phase A current | 0x0164-0x0165 | 0x01BA-0x01BB | 0x0210-0x0211 |
| Phase B current | 0x0166-0x0167 | 0x01BC-0x01BD | 0x0212-0x0213 |
| Phase C current | 0x0168-0x0169 | 0x01BE-0x01BF | 0x0214-0x0215 |
| Zero-sequence current | 0x016A-0x016B | 0x01C0-0x01C1 | 0x0216-0x0217 |
| Phase A active power | 0x016C-0x016D | 0x01C2-0x01C3 | 0x0218-0x0219 |
| Phase B active power | 0x016E-0x016F | 0x01C4-0x01C5 | 0x021A-0x021B |
| Phase C active power | 0x0170-0x0171 | 0x01C6-0x01C7 | 0x021C-0x021D |
| Total active power | 0x0172-0x0173 | 0x01C8-0x01C9 | 0x021E-0x021F |
| Phase A reactive power | 0x0174-0x0175 | 0x01CA-0x01CB | 0x0220-0x0221 |
| Phase B reactive power | 0x0176-0x0177 | 0x01CC-0x01CD | 0x0222-0x0223 |
| Phase C reactive power | 0x0178-0x0179 | 0x01CE-0x01CF | 0x0224-0x0225 |
| Total reactive power | 0x017A-0x017B | 0x01D0-0x01D1 | 0x0226-0x0227 |
| Phase A apparent power | 0x017C-0x017D | 0x01D2-0x01D3 | 0x0228-0x0229 |
| Phase B apparent power | 0x017E-0x017F | 0x01D4-0x01D5 | 0x022A-0x022B |
| Phase C apparent power | 0x0180-0x0181 | 0x01D6-0x01D7 | 0x022C-0x022D |
| Total apparent power | 0x0182-0x0183 | 0x01D8-0x01D9 | 0x022E-0x022F |
| Phase A power factor | 0x0184-0x0185 | 0x01DA-0x01DB | 0x0230-0x0231 |
| Phase B power factor | 0x0186-0x0187 | 0x01DC-0x01DD | 0x0232-0x0233 |
| Phase C power factor | 0x0188-0x0189 | 0x01DE-0x01DF | 0x0234-0x0235 |
| Total power factor | 0x018A-0x018B | 0x01E0-0x01E1 | 0x0236-0x0237 |
| Phase A forward active energy | 0x018C-0x018D | 0x01E2-0x01E3 | 0x0238-0x0239 |
| Phase B forward active energy | 0x018E-0x018F | 0x01E4-0x01E5 | 0x023A-0x023B |
| Phase C forward active energy | 0x0190-0x0191 | 0x01E6-0x01E7 | 0x023C-0x023D |
| Total forward active energy | 0x0192-0x0193 | 0x01E8-0x01E9 | 0x023E-0x023F |
5.2 Status Bit Definition
The current thing model script uses the status field for status judgment:
if((tdata?.status&0x02)===0x02) {
// time out , just update the status.
}The status bit definition is as follows:
| Status bit | Meaning | Processing logic |
|---|---|---|
| status & 0x02 | Modbus collection timeout | Keep the previous telemetry data and only update the status |
When a collection timeout occurs, the platform does not overwrite the original valid electrical parameter data. It only updates the device status to prevent business data from being cleared due to timeout.
6. EdgeBus Model
ADW2xx itself is not a LoRaWAN device and needs to be connected through a KC21/KC11 collector. Therefore, this solution requires EB code. EdgeBus is responsible for generating Modbus collection tasks, periodically reading the registers of each ADW2xx channel, and reporting the data in packets through LoRaWAN.
6.1 EB Configuration Parameters
| Parameter | Value |
|---|---|
| Business code | 23109 |
| Business version | 13 |
| Device template | ADW2xx-23109 |
| Baud rate | 9600 |
| Data bits | 8 |
| Stop bits | 1 |
| Parity | No parity |
| LoRaWAN reporting port | 23 |
| Uplink version identifier | 0x87 |
| Default number of collected devices | 2 |
| Number of channels per device | 4 |
| Collection protocol | Modbus-RTU |
| Function code | 0x03 |
Parameter Index Definition
| Parameter | APP Index | Field name | Type | Description |
|---|---|---|---|---|
| Device 1 query period | 70 | period1 | uint32le | Unit: seconds |
| Device 2 query period | 74 | period2 | uint32le | Unit: seconds |
| Device 1 RS-485 address | 150 | addr1 | uint8 | Modbus address |
| Device 2 RS-485 address | 151 | addr2 | uint8 | Modbus address |
The current user scenario is “one collector collects one device”. Therefore, in actual deployment, usually only period1 and addr1 are used. The code reserves the configuration capability for 2 ADW2xx devices.
6.2 EB Code
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";
////////////////////////////////////////////////////////////////////////////////////////
let eventInfo:UserConfUPItem[]=[]
let otaConfig = getOtaConfig({
BaudRate: 9600,
StopBits: 1,
DataBits: 8,
Checkbit: CheckbitEnum.NONE,
Battery: false,
ConfirmDuty: 60,
BzType: 23109,
BzVersion: 13
})
for(let i=0;i<2;i++){
let name="ADW2XX_3M_4CH_"+(i+1).toString();
let periodIndex=70+i*4
let addrIndex=150+i
for (let j=0;j<4;j++){
let start="0x100"
let end="0x13D"
if (j===1) { start="0x156";end="0x193"
}else if(j===2){start="0x1AC";end="0x1E9"
}else if(j===3){start="0x202";end="0x23F"}
let userConf:UserConfUPItem={
name:name,dataType:(9+j).toString(), port:23, version:"0x87",upPeriod:"10y",
quInfo:[
{ protocol:"modbus",code:"0x03", periodIndex:periodIndex,
indexAPP:addrIndex, indexCMD:0, copySize:1,isLast:true,
listVal:[{ start:start, end:end}]
}
]
}
eventInfo.push(userConf);
}
}
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)6.3 Description
Current EB logic description:
- The EB code is configured by default for 2 ADW2xx devices, with each ADW2xx containing 4 channels.
- The current user scenario is “one collector collects one device”, so in actual use, mainly the first ADW2xx is enabled, namely
addr1andperiod1. - Each channel independently generates one Modbus collection task.
- Each channel independently uploads one data packet. The LoRaWAN port is uniformly 23.
- The uplink frame version identifier is
0x87. - The channel number is distinguished by
dataType:- 9: CH1
- 10: CH2
- 11: CH3
- 12: CH4
- During thing model parsing, the 2nd byte is read as the
chfield, and 9 to 12 are converted to 0 to 3 for channel differentiation on the platform side. - Since ADW2xx is a multi-user meter, ThinkLink can use the
sub_devicemechanism to parse each channel as a different sub-device, enabling channel-based device management for multi-user meters.
7. Thing Model
7.1 Basic Thing Model Information
| Item | Description |
|---|---|
| Thing model name | ADW2xx-23109 |
| Device model | ADW2xx |
| Business code | 23109 |
| LoRaWAN Port | 23 |
| Frame version | 0x87 |
| Uplink frame length | 130 bytes |
| RSSI included | Yes |
| Battery voltage included | Yes, battery:4 |
| Channel judgment method | 2nd byte ch |
| Sub-device differentiation method | sub_device = tdata.addr + 1000 |
7.2 Uplink Frame Structure
let frameInfo = {
port:23,
dataLen:130,
rssi:true,
battery:4,
tagList:[
{ index:0, tag:0x87 }
]
}Uplink Field Definition
| Field name | Field identifier | Unit | Byte position | Type | Decimal places |
|---|---|---|---|---|---|
| CH | ch | 1 | uint8 | ||
| Phase A voltage | ua | V | 6 | floatbe | 3 |
| Phase B voltage | ub | V | 10 | floatbe | 3 |
| Phase C voltage | uc | V | 14 | floatbe | 3 |
| AB line voltage | uab | V | 18 | floatbe | 3 |
| BC line voltage | ubc | V | 22 | floatbe | 3 |
| CA line voltage | uca | V | 26 | floatbe | 3 |
| Frequency | freq | Hz | 30 | floatbe | 3 |
| Phase A current | ia | A | 34 | floatbe | 3 |
| Phase B current | ib | A | 38 | floatbe | 3 |
| Phase C current | ic | A | 42 | floatbe | 3 |
| Zero-sequence current | i0 | A | 46 | floatbe | 3 |
| Phase A active power | pa | W | 50 | floatbe | 3 |
| Phase B active power | pb | W | 54 | floatbe | 3 |
| Phase C active power | pc | W | 58 | floatbe | 3 |
| Total active power | pt | W | 62 | floatbe | 3 |
| Phase A reactive power | qa | var | 66 | floatbe | 3 |
| Phase B reactive power | qb | var | 70 | floatbe | 3 |
| Phase C reactive power | qc | var | 74 | floatbe | 3 |
| Total reactive power | qt | var | 78 | floatbe | 3 |
| Phase A apparent power | sa | VA | 82 | floatbe | 3 |
| Phase B apparent power | sb | VA | 86 | floatbe | 3 |
| Phase C apparent power | sc | VA | 90 | floatbe | 3 |
| Total apparent power | st | VA | 94 | floatbe | 3 |
| Phase A power factor | pfa | 98 | floatbe | 3 | |
| Phase B power factor | pfb | 102 | floatbe | 3 | |
| Phase C power factor | pfc | 106 | floatbe | 3 | |
| Total power factor | pft | 110 | floatbe | 3 | |
| Phase A forward active energy | epfa | kWh | 114 | floatbe | 3 |
| Phase B forward active energy | epfb | kWh | 118 | floatbe | 3 |
| Phase C forward active energy | epfc | kWh | 122 | floatbe | 3 |
| Total forward active energy | epft | kWh | 126 | floatbe | 3 |
7.3 Thing Model Script
7.3.1 Data Thing Model Script
let port=msg?.userdata?.port || null;
let frameInfo = {
port:23,
dataLen:130,
rssi:true,
battery:4,
tagList:[
{ index:0, tag:0x87 }
]
}
let appInfo = [
{ name:"CH", field_name:"ch", unit:"", index:1, type:"uint8" },
{ name:"Phase A voltage", field_name:"ua", unit:"V", index:6, type:"floatbe", decimal:3 },
{ name:"Phase B voltage", field_name:"ub", unit:"V", index:10, type:"floatbe", decimal:3 },
{ name:"Phase C voltage", field_name:"uc", unit:"V", index:14, type:"floatbe", decimal:3 },
{ name:"AB line voltage", field_name:"uab", unit:"V", index:18, type:"floatbe", decimal:3 },
{ name:"BC line voltage", field_name:"ubc", unit:"V", index:22, type:"floatbe", decimal:3 },
{ name:"CA line voltage", field_name:"uca", unit:"V", index:26, type:"floatbe", decimal:3 },
{ name:"Frequency", field_name:"freq", unit:"Hz", index:30, type:"floatbe", decimal:3 },
{ name:"Phase A current", field_name:"ia", unit:"A", index:34, type:"floatbe", decimal:3 },
{ name:"Phase B current", field_name:"ib", unit:"A", index:38, type:"floatbe", decimal:3 },
{ name:"Phase C current", field_name:"ic", unit:"A", index:42, type:"floatbe", decimal:3 },
{ name:"Zero-sequence current", field_name:"i0", unit:"A", index:46, type:"floatbe", decimal:3 },
{ name:"Phase A active power", field_name:"pa", unit:"W", index:50, type:"floatbe", decimal:3 },
{ name:"Phase B active power", field_name:"pb", unit:"W", index:54, type:"floatbe", decimal:3 },
{ name:"Phase C active power", field_name:"pc", unit:"W", index:58, type:"floatbe", decimal:3 },
{ name:"Total active power", field_name:"pt", unit:"W", index:62, type:"floatbe", decimal:3 },
{ name:"Phase A reactive power", field_name:"qa", unit:"var", index:66, type:"floatbe", decimal:3 },
{ name:"Phase B reactive power", field_name:"qb", unit:"var", index:70, type:"floatbe", decimal:3 },
{ name:"Phase C reactive power", field_name:"qc", unit:"var", index:74, type:"floatbe", decimal:3 },
{ name:"Total reactive power", field_name:"qt", unit:"var", index:78, type:"floatbe", decimal:3 },
{ name:"Phase A apparent power", field_name:"sa", unit:"VA", index:82, type:"floatbe", decimal:3 },
{ name:"Phase B apparent power", field_name:"sb", unit:"VA", index:86, type:"floatbe", decimal:3 },
{ name:"Phase C apparent power", field_name:"sc", unit:"VA", index:90, type:"floatbe", decimal:3 },
{ name:"Total apparent power", field_name:"st", unit:"VA", index:94, type:"floatbe", decimal:3 },
{ name:"Phase A power factor", field_name:"pfa", unit:"", index:98, type:"floatbe", decimal:3 },
{ name:"Phase B power factor", field_name:"pfb", unit:"", index:102, type:"floatbe", decimal:3 },
{ name:"Phase C power factor", field_name:"pfc", unit:"", index:106, type:"floatbe", decimal:3 },
{ name:"Total power factor", field_name:"pft", unit:"", index:110, type:"floatbe", decimal:3 },
{ name:"Phase A forward active energy", field_name:"epfa", unit:"kWh", index:114, type:"floatbe", decimal:3 },
{ name:"Phase B forward active energy", field_name:"epfb", unit:"kWh", index:118, type:"floatbe", decimal:3 },
{ name:"Phase C forward active energy", field_name:"epfc", unit:"kWh", index:122, type:"floatbe", decimal:3 },
{ name:"Total forward active energy", field_name:"epft", unit:"kWh", index:126, type:"floatbe", decimal:3 },
]
let tdata={}
let payParser=new PayloadParser({
device:device,
msg:msg,
frameInfo:frameInfo,
appInfo:appInfo,
})
tdata= payParser.telemetry()
if((tdata?.status&0x02)===0x02) {
// time out , just update the status.
const status=tdata.status
tdata={ ...(device.telemetry_data?.[thingModelId] ?? {})}
tdata.status=status
}
if(tdata?.ch>8) {
tdata.ch=tdata.ch-9
}
return {
sub_device:tdata==undefined ? null : (tdata.addr+1000),
telemetry_data: tdata,
server_attrs: null,
shared_attrs: null
}7.3.2 Parameter Thing Model Script
let port=msg?.userdata?.port || null;
const rpcName="adw2xx_23109_set";
let paraDef = {
app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}
if (port!==214) {
let checkData=Utils.paraCheck(rpcName,device.server_attrs,device.shared_attrs)
return {
server_attrs: checkData.sdata,
action:checkData.action,
}
}
let pdata=(new PayloadParser({
device:device,
msg:msg,
paraInfo:paraDef,
})).paras()
let checkData= Utils.paraCheck(rpcName,pdata)
return {
telemetry_data: pdata,
server_attrs: checkData.sdata,
shared_attrs: pdata,
action: checkData.action,
}8. Third-Party Platform Data Subscription
8.1 MQTT Topic
/v32/{Organization Account}/tkl/up/telemetry/{eui}Example:
/v32/{Organization Account}/tkl/up/telemetry/{eui}Where:
| Parameter | Description |
|---|---|
| ThinkLink organization account | |
| LoRaWAN device EUI |
8.2 Reported Data Example
The following example shows the reported data from the CH1 channel of an ADW2xx multi-user meter. In actual business scenarios, each channel independently reports one data packet and is distinguished by the ch field.
{
"eui": "6353012af10a9331",
"active_time": "2026-02-05T08:35:48.000Z",
"thingModelId": "23109",
"thingModelIdName": "ADW2xx-23109",
"telemetry_data": {
"snr": 13.5,
"rssi": -51,
"battery": 3.37,
"addr": 1,
"ch": 0,
"ua": 220.125,
"ub": 219.876,
"uc": 220.342,
"uab": 380.456,
"ubc": 381.012,
"uca": 379.998,
"freq": 50.002,
"ia": 12.345,
"ib": 11.876,
"ic": 12.021,
"i0": 0.012,
"pa": 2300.125,
"pb": 2201.456,
"pc": 2250.789,
"pt": 6752.370,
"qa": 120.123,
"qb": 118.456,
"qc": 121.789,
"qt": 360.368,
"sa": 2310.125,
"sb": 2210.456,
"sc": 2260.789,
"st": 6781.370,
"pfa": 0.995,
"pfb": 0.996,
"pfc": 0.995,
"pft": 0.995,
"epfa": 1234.567,
"epfb": 1220.345,
"epfc": 1218.901,
"epft": 3673.813,
"status": 0
}
}Channel Description
| telemetry_data.ch | Corresponding channel |
|---|---|
| 0 | CH1 |
| 1 | CH2 |
| 2 | CH3 |
| 3 | CH4 |
Sub-Device Description
In the current thing model script:
sub_device:tdata==undefined ? null : (tdata.addr+1000)The platform distinguishes lower-level devices based on the sub-device address. For multi-user meter scenarios, it is recommended to combine addr and ch for business-side user/circuit binding. For example:
| ADW2xx address | Channel | Business meaning |
|---|---|---|
| 1 | 0 | User / circuit 1 |
| 1 | 1 | User / circuit 2 |
| 1 | 2 | User / circuit 3 |
| 1 | 3 | User / circuit 4 |
9. RPC
9.1 RPC Name
| RPC type | RPC name |
|---|---|
| Configure parameters | adw2xx_23109_set |
| Read parameters | adw2xx_23109_set |
9.2 Parameter Definition
| Parameter name | Field name | APP Index | Unit | Type | Description |
|---|---|---|---|---|---|
| period1 | period1 | 70 | S | uint32le | Device 1 query/upload period |
| period2 | period2 | 74 | S | uint32le | Device 2 query/upload period, reserved |
| addr1 | addr1 | 150 | uint8 | Device 1 Modbus address | |
| addr2 | addr2 | 151 | uint8 | Device 2 Modbus address, reserved |
The current scenario is one collector collecting one ADW2xx. Therefore, the main configuration is:
{
"period1": 300,
"addr1": 1
}9.3 RPC Code
9.3.1 Configure Parameter RPC
let classMode = (device && device.shared_attrs && device.shared_attrs.class_mode) || "ClassA";
const rpcName="adw2xx_23109_set";
let paraDef = {
app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}
let frames=RPCHelper.buildFrame({
paraDef:paraDef,
params:params
});
let redoBuffer=RPCHelper.redo()
let dnBuffer=Buffer.alloc(frames.writeBuffer.length+frames.readBuffer.length);
frames.writeBuffer.copy(dnBuffer,0)
frames.readBuffer.copy(dnBuffer,frames.writeBuffer.length)
logger.info("set para")
let msgQue=Utils.makeParaSetMSG({
device:device,
classMode:classMode,
rpcName:rpcName,
params:params,
paraDownBuffer:dnBuffer,
extraAppBuffer:redoBuffer
})
if (msgQue.length==0) return null
return msgQue9.3.2 Read Parameter RPC
let paraDef = {
app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}
let frames=RPCHelper.buildFrame({
paraDef:paraDef,
params:params
});
let msg=RPCHelper.makeMSG({
msgType:Utils.msgType.paras,
device:device,
dnBuffer:frames.readBuffer,
sleepTime:0,
})
return [msg]9.3.3 RPC Call Example
Configure the ADW2xx address as 1 and the collection period as 300 seconds:
{
"method": "adw2xx_23109_set",
"params": {
"period1": 300,
"addr1": 1
}
}Reserved parameters for using a second device:
{
"method": "adw2xx_23109_set",
"params": {
"period1": 300,
"addr1": 1,
"period2": 300,
"addr2": 2
}
}10. Template Selection
Search for the following template in the ThinkLink platform:
ADW2xx-23109Or search by business type:
Multi-circuit power meter
Multi-user meter
Modbus electricity meter
ADW2xx
Acrel ADW2xx11. Integration Notes
- ADW2xx is a multi-channel electricity meter. Each channel is uploaded as one separate data packet.
- The current channel number is determined by the 2nd byte of the uplink data.
dataType=9to12correspond to CH1 to CH4 respectively.- In the thing model, when
ch > 8, the value is reduced by 9 and converted to the platform internal channel numbers 0 to 3. - The default EB code supports 2 ADW2xx devices, with 4 channels per device. When the current project is deployed as “one collector collects one device”, only
addr1andperiod1need to be configured. - The ADW2xx communication parameters must be consistent with the EB configuration: 9600 bps, 8 data bits, 1 stop bit, no parity.
- When the RS-485 bus is long or the on-site environment has strong interference, it is recommended to check shield grounding, terminal resistance, and A/B polarity.