Download OpenAPI specification:Download
To ensure the system's security and data confidentiality, we use an HTTP request authentication mechanism based on accessKey and secret. This mechanism ensures that only legitimate requests are accepted by the system through timestamp verification and request path checking.
Timestamp Generation and Encryption
timeStamp
).timeStamp
using the ECB mode of the AES encryption algorithm to obtain the encrypted signature (sign
).Request Header Information Setup
sign
into the HTTP request header with the key name X-Signature
.accessKey
into the HTTP request header with the key name X-AccessKey
.var cryptoJs = require("crypto-js");
const time = Date.now().toString();
const key = cryptoJs.enc.Utf8.parse('your secret key');
var sign = cryptoJs.AES.encrypt(time,key,{
mode: cryptoJs.mode.ECB,
padding: cryptoJs.pad.Pkcs7
}).toString();
Get Communication Device Information by Serial Number
sn required | string sn |
{- "code": 0,
- "data": {
- "activeTime": "2019-08-24T14:15:22Z",
- "categoryIdentifier": "string",
- "deviceIdentifier": "string",
- "deviceName": "string",
- "deviceSecret": "string",
- "deviceStatus": "DISABLE",
- "deviceType": "string",
- "disable": false,
- "productIdentifier": "string",
- "sn": "string",
- "updateTime": "2019-08-24T14:15:22Z"
}, - "message": "string",
- "requestId": "string"
}
Call the API: Get Communication Device Information by Serial Number. Retrieve the response data and extract the following parameters:
productIdentifier
deviceName
deviceSecret
sn
Send the following command to the Bluetooth BLE device:
{
"id": "xx1xx",
"t": 2,
"pw":{
"pk": {your_productIdentifier},
"dn": {your_deviceName},
"ds": {your_deviceSecret},
"wn": {your_wifiName},
"wp": {your_wifiPassword},
"sn": {your_sn}
}
}
id
: A unique ID for the commandt
: Command type, 2 for network configurationpk
: The productIdentifier
from Step 1dn
: The deviceName
from Step 1ds
: The deviceSecret
from Step 1wn
: WiFi namewp
: WiFi passwordsn
: The sn
from Step 1After completing these steps, you can call the API:
Get Communication Device Information by Serial Number
to check the device's network connection status.
{- "id": "xx1xx",
- "result": "OK"
}
the sn of the device
sn required | string sn |
{- "sn": "string"
}
{- "code": 0,
- "data": false,
- "message": "string",
- "requestId": "string"
}
pageNo required | integer <int32> page number |
pageSize required | integer <int32> page size |
{- "pageNo": 0,
- "pageSize": 0
}
{- "code": 0,
- "data": {
- "list": [
- {
- "activeTime": "2019-08-24T14:15:22Z",
- "deviceIdentifier": "string",
- "deviceType": "string",
- "sn": "string"
}
], - "total": 0
}, - "message": "string",
- "requestId": "string"
}
Get Realtime Power Energy Flow Data
sn required | string sn |
{- "code": 0,
- "data": {
- "batteryToGrid": 0,
- "batteryToLoad": 0,
- "gridToBattery": 0,
- "gridToLoad": 0,
- "pvToBattery": 0,
- "pvToGrid": 0,
- "pvToLoad": 0
}, - "message": "string",
- "requestId": "string"
}
Get Historical Energy Flow Data
end | string End Time - Depending on the specific query type, for dates, pass yyyy-MM-dd; for weekly, pass yyyy-MM-dd; for months, pass yyyy-MM; for years, pass yyyy format; for total in summary, this parameter does not need to be passed. |
periodType | string Enum: "DATE" "MONTH" "TOTAL" "WEEK" "YEAR" Query Cycle Type |
sn | string sn |
start | string Start Time - Depending on the specific query type, for dates, pass yyyy-MM-dd; for weekly, pass yyyy-MM-dd; for months, pass yyyy-MM; for years, pass yyyy format; for total in summary, this parameter does not need to be passed. |
{- "end": "string",
- "periodType": "DATE",
- "sn": "string",
- "start": "string"
}
{- "code": 0,
- "data": [
- {
- "batteryToGrid": 0,
- "batteryToLoad": 0,
- "endDate": "string",
- "gridToBattery": 0,
- "gridToLoad": 0,
- "pvToBattery": 0,
- "pvToGrid": 0,
- "pvToLoad": 0,
- "statDate": "string"
}
], - "message": "string",
- "requestId": "string"
}
Get the inverter basic Setting info, from this you are able to read some basic setting status of the inverter,
for example. to know whether is the inverter on, just read the attribute TurnOn
return, if the value equal 1, it means the inverter is working now
sn required | string sn |
{- "code": 0,
- "data": {
- "TurnOff": 0,
- "TurnOn": 0.1,
- "activeChargeDischarge": 0,
- "antiFeedbackEnable": 0,
- "antiFeedbackMode": 0,
- "antiFeedbackPower": 0.1,
- "battery1BackupSOC": 0.1,
- "battery1Capacity": 0.1,
- "battery1Enable": 0,
- "battery1MaxChargeCurrent": 0.1,
- "battery1MaxDischargeCurrent": 0.1,
- "battery1MinSOC": 0.1,
- "battery1OvervoltageSetting": 0.1,
- "battery1RatedVoltage": 0.1,
- "battery2BackupSOC": 0.1,
- "battery2Capacity": 0.1,
- "battery2Enable": 0,
- "battery2MaxChargeCurrent": 0.1,
- "battery2MaxDischargeCurrent": 0.1,
- "battery2MinSOC": 0.1,
- "battery2OvervoltageSetting": 0.1,
- "battery2RatedVoltage": 0.1,
- "battery2UndervoltageSetting": 0.1,
- "batteryConnectionMode": 0,
- "batteryType": 0,
- "day": 0,
- "dischargeAndIdleMode": 0.1,
- "electricMeterConnectionEnable": 0,
- "hour": 0,
- "inputFrequencyLevel": 0,
- "inputVoltageLevel": 0,
- "islandProtectionEnable": 0.1,
- "meterConnectionMethod": 0,
- "minute": 0,
- "month": 0,
- "offGridSwitchingMode": 0,
- "operatingMode": 0,
- "parallelModuleNumber": 0,
- "pv1Enable": 0,
- "pv2Enable": 0,
- "pv3Enable": 0,
- "pv4Enable": 0,
- "pvConnectionMode": 0,
- "second": 0,
- "standaloneOrParallel": 0,
- "systemModuleQuantity": 0,
- "threePhaseThreeWireOrFourWireSystem": 0,
- "year": 0
}, - "message": "string",
- "requestId": "string"
}
Set the inverter basic Setting info,make you able to change the work mode ,output power and such so on settings of inverter.
Get the inverter basic Setting info
interface. The data from this interface is updated once per minute.7 .Get the inverter basic Setting info
interface. You can take the corresponding required field attributes directly.
for example. aim to turn on the inverter, just set the param of propertyIdentifier to 'TurnOn' ,and the value set to 1, so the request body would like below
{
"propertyIdentifier":"TurnOn",
"value":1
}sn required | string sn |
propertyIdentifier required | string device propertyIdentifier, same with the attribute of |
value required | object propertyValue, support number and string, value range refer to the |
{- "propertyIdentifier": "TurnOn",
- "value": 1
}
{- "code": 0,
- "data": false,
- "message": "string",
- "requestId": "string"
}
Get the battery basic Setting info
sn required | string sn |
{- "code": 0,
- "data": {
- "batteryCabinet1BMSOperationStatus": 0,
- "batteryCabinet1BasicStatus": 0,
- "batteryCabinet1ChargingTotalEnergy": 0.1,
- "batteryCabinet1CyclePeriod": 0.1,
- "batteryCabinet1DischargingTotalEnergy": 0.1,
- "batteryCabinet1HighVoltageAlarm": 0,
- "batteryCabinet1HighVoltageFault": 0,
- "batteryCabinet1HighVoltageProtection": 0,
- "batteryCabinet1LowVoltageAlarm": 0,
- "batteryCabinet1LowVoltageFault": 0,
- "batteryCabinet1LowVoltageProtection": 0,
- "batteryCabinet1SOC": 0,
- "batteryCabinet1SOH": 0.1,
- "batteryCabinet1Temperature": 0.1,
- "batteryCabinet1TotalCurrent": 0.1,
- "batteryCabinet1TotalVoltage": 0.1,
- "batteryCabinet2BMSRunningStatus": 0,
- "batteryCabinet2BasicStatus": 0,
- "batteryCabinet2BatteryPackTotalCurrent": 0.1,
- "batteryCabinet2BatteryPackTotalVoltage": 0.1,
- "batteryCabinet2ChargingTotalEnergy": 0.1,
- "batteryCabinet2CyclePeriod": 0.1,
- "batteryCabinet2DischargeTotalEnergy": 0.1,
- "batteryCabinet2HighVoltageAlarm": 0,
- "batteryCabinet2HighVoltageFault": 0,
- "batteryCabinet2HighVoltageProtection": 0.1,
- "batteryCabinet2LowVoltageAlarm": 0,
- "batteryCabinet2LowVoltageFault": 0,
- "batteryCabinet2LowVoltageProtection": 0,
- "batteryCabinet2SOC": 0,
- "batteryCabinet2SOH": 0.1,
- "batteryCabinet2Temperature": 0.1,
- "bms1Protocol": 0.1,
- "bms1SoftwareVersion": "string",
- "bms2Protocol": 0.1,
- "bms2SoftwareVersion": "string"
}, - "message": "string",
- "requestId": "string"
}
Get the latest consumption data
sn required | string sn |
{- "code": 0,
- "data": {
- "batteryChargeAmount": 0.1,
- "batteryDischargeAmount": 0.1,
- "dailyBatteryChargeAmount": 0.1,
- "dailyBatteryDischargeAmount": 0.1,
- "dailyFeedPowerAmount": 0.1,
- "dailyLoadPowerAmount": 0.1,
- "dailyPurchasePowerAmount": 0.1,
- "dailySelfGenerationPowerPV": 0.1,
- "feedPowerMeterReading": 0.1,
- "loadPowerAmount": 0.1,
- "purchasePowerMeterReading": 0.1,
- "selfGenerationPowerPV": 0.1
}, - "message": "string",
- "requestId": "string"
}
{- "code": 0,
- "data": {
- "battery1Current": 0.1,
- "battery1Power": 0.1,
- "battery1Voltage": 0.1,
- "battery2Current": 0.1,
- "battery2Power": 0.1,
- "battery2Voltage": 0.1,
- "batteryCabinet1SOC": 0,
- "batteryCabinet2SOC": 0,
- "gridAPhaseApparentPower": 0.1,
- "gridAPhaseCurrentRMS": 0.1,
- "gridAPhaseVoltage": 0.1,
- "gridBPhaseApparentPower": 0.1,
- "gridBPhaseCurrentRMS": 0.1,
- "gridBPhaseVoltage": 0.1,
- "gridCPhaseApparentPower": 0.1,
- "gridCPhaseCurrentRMS": 0.1,
- "gridCPhaseVoltage": 0.1,
- "inverterAPhaseApparentPower": 0.1,
- "inverterAPhaseCurrentRMS": 0.1,
- "inverterAPhaseVoltage": 0.1,
- "inverterBPhaseApparentPower": 0.1,
- "inverterBPhaseCurrentRMS": 0.1,
- "inverterBPhaseVoltage": 0.1,
- "inverterCPhaseApparentPower": 0.1,
- "inverterCPhaseCurrentRMS": 0.1,
- "inverterCPhaseVoltage": 0.1,
- "inverterVoltageFrequency": 0.1,
- "loadAPhaseCurrentRMS": 0.1,
- "loadAPhaseVoltage": 0.1,
- "loadBPhaseCurrentRMS": 0.1,
- "loadBPhaseVoltage": 0.1,
- "loadCPhaseCurrentRMS": 0.1,
- "loadCPhaseVoltage": 0.1,
- "pv1Current": 0.1,
- "pv1Voltage": 0.1,
- "pv1Power": 0.1,
- "pv2Current": 0.1,
- "pv2Power": 0.1,
- "pv2Voltage": 0.1
}, - "message": "string",
- "requestId": "string"
}
Events are classified based on urgency into the following levels (from highest to lowest):
URGENT
IMPORTANT
SECONDARY
REMINDER
You can filter or query events of a specific level using the warnType field
endTime | string format yyyy-MM-dd HH:mm:ss |
pageNo required | integer pageNo |
pageSize required | integer pageSize |
sn required | string device sn |
startTime | string format yyyy-MM-dd HH:mm:ss |
type required | string type of notify, support BATTERY, DIESEL, INVERTER |
{- "code": 0,
- "data": {
- "list": [
- {
- "createTime": "2024-07-08 14:15:22",
- "ruleName": "Timeout for soft start of direct current bus voltage",
- "warnId": "668c0f58939de9017ef90e4f",
- "warnLevel": "IMPORTANT",
- "warnType": "inverter"
}
], - "total": 1
}, - "message": "",
- "requestId": ""
}
Time schedule discharge control
Array of objects (OpenDevicePlanSeasonCreateVO) schedule time period | |
sn | string device sn |
{- "periodList": [
- {
- "endMonth": "1",
- "seasonTimeList": [
- {
- "charge": false,
- "dayOfWeek": "WEEKEND",
- "endTime": "string",
- "startTime": "string"
}
], - "sortNo": 0,
- "startMonth": "1"
}
], - "sn": "string"
}
{- "code": 0,
- "message": "string",
- "requestId": "string"
}
page list battery historical data
pageNo required | integer <int32> page number,min value 1 |
pageSize required | integer <int32> page size,max value 1000 |
sn required | string sn |
startTime | string <date-time> startTime,format yyyy-MM-dd HH:mm:ss,which to limit the data range, sorted by updateTime desc |
endTime | string <date-time> endTime,format yyyy-MM-dd HH:mm:ss,which to limit the data range, sorted by updateTime desc |
{- "pageNo": 0,
- "pageSize": 0,
- "sn": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z"
}
{- "code": 0,
- "data": {
- "list": [
- {
- "categoryIdentifier": "string",
- "deviceIdentifier": "string",
- "id": "string",
- "property": {
- "battery1Current": 0,
- "battery1Voltage": 0,
- "battery2Current": 0,
- "battery2Voltage": 0,
- "batteryCabinet1SOC": 0,
- "batteryCabinet1Temperature": 0,
- "batteryCabinet2SOC": 0,
- "batteryCabinet2Temperature": 0
}, - "stationId": 0,
- "updateTime": "2019-08-24T14:15:22Z"
}
], - "total": 0
}, - "message": "string",
- "requestId": "string"
}