LAN Local Interface

Updated: 2026-10-19
EMS Local Interface

Energy Management System API

This guide organizes the raw interface documentation into a "run it first, then extend" sequence: discover devices, read state, and finally perform control and pass-through. Endpoint: TCP:8080. Protocol: JSON / Modbus. Recommended sequence: mDNS → JSON → Control → Pass-through.

  • 1. Overview
  • 2. Scope
  • 3. Route Selection
  • 4. Prerequisites
  • 5. Minimum Integration Flow
  • 6. JSON Message Rules
  • 7. Device Discovery: mDNS
  • 8. HA JSON Data Interface
  • 9. Energy Control Parameters
  • 10. Modbus RTU Pass-through
  • 11. Modbus TCP
  • 12. Debug & Acceptance
  • 13. FAQ
  • ✓ CT meters, infrared meter readers, P1 meters, smart plugs, Linky meter readers
  • ✓ Energy storage systems, inverters, batteries
  • ✓ Heat pumps, chargers
  • ✓ All Energy Control Cloud products and any device using Energy Control Cloud WIFI modules

Device Type Overview

Meters & readers

Power / Electricity

PV / AC / Battery

Active Power

Connector 1 / 2

Power / Temp

This guide organizes the raw interface documentation into a "run it first, then extend" sequence: discover the device first, then read state, and finally perform control and pass-through. It is best suited for first-time integration: anyone who wants to quickly ingest EMS data into their own application, dashboard, gateway, or platform.

StageSuggestion
Step 1Discover the device IP and port via mDNS
Step 2Use HA JSON to read device parameters and confirm connectivity
Step 3Read energy control parameters, then perform writes
Step 4If you already have industrial protocols, see RTU / TCP pass-through
  • Applies to AECC EMS local interface integration scenarios.
  • Supports HA JSON data interface, energy control parameters interface, Modbus RTU pass-through interface, and Modbus TCP interface.
  • For the first joint debug, it is recommended to open only one interface and get the read working first, then extend to settings and pass-through.

If you don't know which interface to start with, follow the sequence below — it saves time.

ScenarioPriority InterfaceReason
Confirm device reachabilitymDNS + HA JSON readRead-only interface is low risk and easiest to verify network and device state
Monitoring onlyHA JSON data interfaceGet device state, power, SOC and similar data
Change strategies or limitsEnergy control parameters interfaceSupports reading and setting control parameters
Already have RTU framesModbus RTU pass-throughForward existing frames directly to EMS
Native Modbus systemModbus TCP interfaceSuited for PLC, gateways, and industrial hosts
  • Device is powered on and connected to the network successfully.
  • Dev machine or gateway is on the same LAN as the EMS device.
  • Get the device IP first; the default port is TCP 8080.
  • Read first to confirm the message format and response structure, then write.
  • Prepare a TCP debug tool, mDNS tool, and Modbus tool.
  1. Discover the device via mDNS and record s_ip and s_port.
  2. Establish a TCP connection, default port 8080.
  3. Send a read-only JSON request first, e.g. get device parameters.
  4. Check the response for key fields such as Response, SerialNumber, Target.
  5. Once read is confirmed, try energy control parameters.
  6. Finally perform settings or Modbus pass-through.

The most important fields in a JSON request are: Get / Set / Response / SerialNumber / CommandSource / Target.

Example request:

{
  "Get": "EnergyParameter",
  "SerialNumber": 1,
  "CommandSource": "Web"
}

mDNS answers two questions: where the device is, and what this device is.

7.1 mDNS Fields

FieldDescriptionType
_http._tcpService type identifierString
SXD-mDNS.localDomain nameString
s_snDevice serial numberString
s_ipDevice IP addressString
s_portService portString
s_typeDevice typeString

7.2 mDNS Data Example

{
  "_http._tcp": "SXD-mDNS-IF-NKYWLTS011",
  "SXD-mDNS.local": "8080",
  "s_sn": "NKYWLTS011",
  "s_ip": "192.168.3.206",
  "s_port": "8080",
  "s_type": "131"
}

This interface is best suited for monitoring, dashboards, and first-time connectivity tests. Get "device parameters" working first, then expand fields gradually.

It is recommended to look at top-level summary fields first, then expand device lists. This makes debugging easier — is it network, message, or field parsing?

8.1 Minimum Request for Device Parameters

{
  "Get": "EnergyParameter",
  "SerialNumber": 1,
  "CommandSource": "Web"
}

8.2 Response: Top-Level Summary + Multiple Device Lists

{
  "Response": "EnergyParameter",
  "SerialNumber": 1,
  "Target": "Web",
  "Storage_list": [{
    "DevAddr": 1,
    "StorageSN": "ZL-2502250374-00039",
    "StorageStatus": 1,
    "PvChargingPower": 0,
    "AcChargingPower": 0,
    "BatterySoc": 100,
    "BatteryDischargingPower": 50,
    "AcInActivePower": -350,
    "OffGridLoadPower": 0,
    "BatteryChargingPower": 0,
    "PvStringCount": 0,
    "Pv1Power": 0,
    "Pv2Power": 0,
    "Pv3Power": 0,
    "Pv4Power": 0
  }],
  "SSumInfoList": {
    "ControlEnableStatus": 1,
    "MeterTotalActivePower": 0,
    "TotalPVPower": 4,
    "TotalPVChargePower": 0,
    "TotalACChargePower": 0,
    "TotalSmartLoadElectricalPower": 0,
    "AverageBatteryAverageSOC": 60,
    "TotalBatteryOutputPower": 9,
    "TotalGridOutputPower": -35,
    "TotalBackUpPower": 0,
    "TotalChargePower": 0
  },
  "ChargerInfoList": [{
    "DevAddr": 55,
    "lsThirdParty": 0,
    "FansDevType": 0,
    "lsInterconnect": 1,
    "ChargerSN": "SXDI78C594",
    "ChargerStatus": 1,
    "Connector1Status": 0,
    "Connector1Power": 0,
    "Connector2Status": 0,
    "Connector2Power": 0,
    "ConnectorElectricity": 0
  }],
  "PlugInfoList": [{
    "DevAddr": 110,
    "lsThirdParty": 0,
    "FansDevType": 6,
    "lsInterconnect": 1,
    "PlugSN": "NKPG1DDC40",
    "PlugStatus": 0,
    "PlugActvePower": 0,
    "PlugVol": 2359,
    "PlugCurrent": 0,
    "PlugRatePower": 2000,
    "PlugElectricity": 0
  }],
  "HotInfoList": [{
    "DevAddr": 150,
    "lsThirdParty": 0,
    "FansDevType": 6,
    "lsInterconnect": 1,
    "HotSN": "SXDI7A47B8",
    "HotStatus": 1,
    "HotActvePower": 0,
    "HotActvePowerMAX": 1200,
    "HotTEMP": 258,
    "HotTEMPMAX": 470
  }]
}

8.3 Top-Level Key Fields

Key FieldDescription
ResponseResponse method name, usually EnergyParameter
SerialNumberRequest sequence, used to map responses to requests
TargetResponse target, commonly Web or HA
SSumInfoListTop-level power summary object
PlugInfoListSmart plug device list
ChargerInfoListCharger list
Storage_listEnergy storage list
HotInfoListHot water / heat pump device list

8.4 Common List Fields

Group by list first, then look at business fields in detail — easiest to stay oriented.

List FieldCommon FieldsPurpose
SSumInfoListControlEnableStatus / MeterTotalActivePower / TotalPVPower / TotalChargePowerOverall running state
Storage_listStorageSN / StorageStatus / BatterySoc / BatteryChargingPowerEnergy storage state
PlugInfoListPlugSN / PlugStatus / PlugActvePower / PlugVol / PlugCurrentPlug load
ChargerInfoListChargerSN / ChargerStatus / Connector1Status / Connector2StatusCharger state
HotInfoListHotSN / HotStatus / HotActvePower / HotTEMPHot water device state
InterverInfoListInterverSN / InterverStatus / InterverActivePowerInverter state

8.5 SSumInfoList Field Details

FieldDescriptionType
ControlEnableStatusGreen-power plan switch, 0=Off / 1=Onint
MeterTotalActivePowerMeter total active power, unit Wdouble
TotalPVPowerPV power, unit Wdouble
TotalPVChargePowerPV total charge power, unit Wdouble
TotalACChargePowerAC total charge power, unit Wdouble
TotalSmartLoadElectricalPowerSmart load total electrical power, unit Wdouble
AverageBatteryAverageSOCBattery average SOC, unit %int
TotalBatteryOutputPowerBattery total output power, unit Wdouble
TotalGridOutputPowerDevice total grid-tied power, unit Wdouble
TotalBackUpPowerDevice total off-grid power, unit Wdouble
TotalChargePowerBattery total charge power, unit Wdouble

8.6 Storage_list Field Details

FieldDescriptionType
DevAddrRegistration IDint
StorageSNEnergy storage serial numberstring
StorageStatusEnergy storage status, 0=Off / 1=Onint
PvChargingPowerEnergy storage PV charge power, unit Wdouble
AcChargingPowerEnergy storage AC charge power, unit Wdouble
BatterySocEnergy storage battery SOC, unit %int
BatteryDischargingPowerBattery discharge power, unit Wdouble
AcInActivePowerAC grid-tied active power, unit Wdouble
OffGridLoadPowerOff-grid load power, unit Wdouble
BatteryChargingPowerBattery charge power, unit Wdouble
PvStringCountNumber of PV input stringsint
Pv1Power / Pv2Power / Pv3Power / Pv4PowerEach PV input power, unit Wdouble

8.7 PlugInfoList Field Details

FieldDescriptionType
DevAddrRegistration IDint
lsThirdPartyThird-party device flagint
FansDevTypeThird-party device modelint
PlugSNPlug serial numberstring
PlugStatusPlug status, 0=Off / 1=Onint
PlugActvePowerPlug active power, unit Wdouble
PlugVolPlug voltage, unit Vdouble
PlugCurrentPlug current, unit Adouble
PlugRatePowerPlug rated power, unit Wdouble
PlugElectricityPlug electricity, unit kWhdouble

8.8 ChargerInfoList Field Details

FieldDescriptionType
DevAddrRegistration IDint
lsThirdPartyThird-party device flagint
FansDevTypeThird-party device modelint
ChargerSNCharger serial numberstring
ChargerStatusCharger statusint
Connector1StatusConnector 1 status, 0=Off / 1=Ready / 2=Charging / 3=Charging endint
Connector1PowerConnector 1 power, unit Wdouble
Connector2StatusConnector 2 status, 0=Off / 1=Ready / 2=Charging / 3=Charging endint
Connector2PowerConnector 2 power, unit Wdouble
ConnectorElectricityConnector electricity, unit kWhdouble

8.9 HotInfoList Field Details

FieldDescriptionType
DevAddrRegistration IDint
lsThirdPartyThird-party device flagint
FansDevTypeThird-party device modelint
HotSNHot water device serial numberstring
HotStatusHot water device status, 0=Off / 1=Onint
HotActvePowerHot water device current power, unit Wdouble
HotActvePowerMAXHot water device max power, unit Wdouble
HotTEMPCurrent temperature, raw value in tenths of a degree Celsiusint
HotTEMPMAXMax temperature, raw value in tenths of a degree Celsiusint

This interface is the entry point for reading and setting control strategies: power limits, time-period strategies, SOC control, and linkage control.

Before writing parameters, read the original values back and save them — especially for power periods, SOC thresholds, and peak/valley strategies.

FieldField NameTypeDescription
GetRead methodstring"EnergycontrolparametersList": read energy control parameters
SetWrite methodstring"EnergycontrolparametersList": set energy control parameters
ResponseReplystring"EnergycontrolparametersList": read/write reply
SerialNumberRequest sequenceintAuto-incremented by 1 per request
CommandSourceCommand sourcestring"Web": web page
TargetCommand sourcestring"HA": Home Assistant
RegControlFieldRead parameter fieldsarrayArray of secondary field names to read
ControlInfoFieldRead resultobjectField names and normalized current values
SetControlInfoFieldSet parametersobjectField names and values to set
SetParametersFieldSet success resultobjectSuccessful fields and the actual values read back after setting
SetFailedFieldSet failed resultobjectOptional. Key is failed field name, value is the failure reason

9.1 Read Request & Response

Request:

{
  "Get": "EnergycontrolparametersList",
  "SerialNumber": 1,
  "CommandSource": "Web",
  "RegControlField": [
    "PhaseRecognitionTrigger",
    "MeterSelector",
    "SystemMaxPowerLimit",
    "PowerRegulationOperatingPoint"
  ]
}

Response:

{
  "Response": "EnergycontrolparametersList",
  "SerialNumber": 1,
  "Target": "Web",
  "ControlInfoField": {
    "EnergyManagement": "0",
    "ScheduledModeEnabled": "1",
    "PhaseRecognitionTrigger": "0",
    "MeterSelector": "1",
    "SystemMaxPowerLimit": "10800,3600,3600,3600",
    "PhaseRecognitionPowerMultiplier": "50",
    "PowerRegulationOperatingPoint": "10",
    "DeviceGridInputPowerLimit": "800",
    "PeakShavingConfig": "0:0",
    "BaseDischargePower": "0",
    "PeriodValidTimestamp": "2024-09-20 00:00:00",
    "InstantControlPeriod": "255,20261231,0,00:00,23:59,800,0,6,100,10",
    "ValleyChargePowerStrategy": "0",
    "SystemAcChargePowerLimits": "4200,1400,1400,1400",
    "VppDispatchPeriod": "255,20261231,0,00:00,23:59,800,100,10,7000"
  }
}

9.2 Write Request & Response

Request:

{
  "Set": "EnergycontrolparametersList",
  "SerialNumber": 2,
  "CommandSource": "Web",
  "SetControlInfoField": {
    "PhaseRecognitionTrigger": "0",
    "MeterSelector": "1",
    "SystemMaxPowerLimit": "10800,3600,3600,3600",
    "PhaseRecognitionPowerMultiplier": "50",
    "PowerRegulationOperatingPoint": "10",
    "DeviceGridInputPowerLimit": "800"
  }
}

Response:

{
  "Response": "EnergycontrolparametersList",
  "SerialNumber": 2,
  "Target": "Web",
  "SetParametersField": {
    "PhaseRecognitionTrigger": "0",
    "MeterSelector": "1",
    "SystemMaxPowerLimit": "10800,3600,3600,3600"
  }
}

9.3 Common Field Reference

FieldParameter DescriptionTypeUnitR/WExplanation
EnergyManagementEnergy management linkage enableString/R/W0: Off / 1: On
ScheduledModeEnabledScheduled mode enableString/R/W0: Off / 1: On but no power compensation / 2: On with power compensation
PhaseRecognitionTriggerPhase recognition triggerString/R/W0: Clear / idle / 1: Trigger one phase recognition
MeterSelectorMeter selectionString/R/WMeter ID participating in energy management control, non-negative integer
SystemMaxPowerLimitSystem max power limitStringWR/WFormat: totalLimitW,phaseALimitW,phaseBLimitW,phaseCLimitW
PhaseRecognitionPowerMultiplierPhase recognition power multiplierString/R/WNon-negative integer
PowerRegulationOperatingPointPower regulation operating pointStringWR/WSigned integer
DeviceGridInputPowerLimitDevice grid input power limitStringWR/WUpper limit of grid input power, non-negative integer
PeakShavingConfigPeak-shaving configurationString/R/WFormat: enable:socThreshold; example: 1:50; normalized to 0:0 when off
BaseDischargePowerBase discharge powerStringWR/WBase discharge power field
PeriodValidTimestampPeriod valid timestampString/R/WFormat: "yyyy-mm-dd hh:mm:ss"; example: "2024-09-20 00:00:00"

9.4 Time Period Fields

FieldDescription
PowerControlPeriod1 ~ PowerControlPeriod16Power control period 1 to 16. Same format. Suitable for site time-period configuration.
[时间段使能],[起始时间],[结束时间],[强制取/馈电功率限制],[允许取电功率限制],[功率控制模式],[充电最大 SOC],[放电最小 SOC]
"1,09:00,23:59,1000,500,0,100,10"

Means: this period is enabled, time 09:00 to 23:59, forced take/feed power limit 1000W, allowed take power limit 500W.

9.5 Other Combined Fields

FieldDescription
InstantControlPeriodInstant control period. Common format includes date, time period, power limit and SOC threshold.
ValleyChargePowerStrategyValley charge power strategy.
SystemAcChargePowerLimitsSystem AC charge power limits, usually total + per-phase.
VppDispatchPeriodVirtual power plant dispatch period.

If you already have standard Modbus RTU frames, there is no need to rewrite business logic — just pass them through.

This interface is suitable for forwarding existing RTU frames directly to EMS. Note that TransmittedData must be a complete RTU frame with CRC, and bytes are separated by spaces.

10.1 Pass-through Field Reference

FieldField NameTypeDescription
SetWrite methodstring"DataTransmission": data pass-through
ResponseReplystringReturns pass-through result
SerialNumberRequest sequenceintAuto-incremented by 1 per request
CommandSourceCommand sourcestring"Web": web page
TargetCommand sourcestring"HA": Home Assistant
SetCommandPass-through parametersstringPass-through parameter configuration
FunctionCodeFunction codestringSupports 0x03 / 0x04 / 0x06 / 0x10
TransmittedDataPass-through datastringPass-through data for set / return
CommandResponsePass-through responsestringResponse data
ControlStatePass-through statestringSuccess: "succeed" / Failure: "fail"

10.2 Send Example

{
  "Set": "DataTransmission",
  "SerialNumber": 1,
  "CommandSource": "Web",
  "SetCommand": {
    "FunctionCode": 3,
    "TransmittedData": "01 03 FE 06 00 03 56 67"
  }
}

10.3 Response Example

{
  "Response": "DataTransmission",
  "SerialNumber": 1,
  "Target": "Web",
  "CommandResponse": {
    "FunctionCode": 3,
    "ControlState": "succeed",
    "TransmittedData": "01 03 06 00 01 02 03 04 05 2F CE"
  }
}

Modbus TCP is used to directly read EMS-accessed devices' registers, suitable for PLCs, gateways, and industrial hosts.

11.1 Standard Message Examples

Request (0x03):

00 01 00 00 00 06 01 03 FE 06 00 03

Response:

00 01 00 00 00 09 01 03 06 00 01 00 02 00 03
StageWhat to CheckPass Criteria
DiscoveryDevice IP, port, modelGet s_ip and tell what the device is
ConnectTCP 8080 reachableClient connects and receives response
ReadJSON fields completeGet / Response / SerialNumber mapped correctly
SetFailed fields and reasonsLocate the specific field, not just "failed"
Pass-throughRTU / TCP frame formatRTU includes CRC, TCP excludes CRC
RegressionRestore original value after changesCan read back after changes, restore when needed