I wanted to combine all the data of my home automation in a place where I can automate it and do some usefull stuff with it. But it’s not an easy task to get the APIs figured out since there is very few documentation online. The main thing I found was people with similar question.
API Token
Go to https://openapi.growatt.com/ -> Login -> Settings -> Account management. Generate an API key. It’s just a single never expiring token.
Device types
One of the following: inv, storage, sph, max, spa, min, wit, sph-s, noah. My basic inverter was type “min”
Growatt API Request for Latest Data
These are the technical details for querying the latest data via the Growatt API.
Request Details
| Parameter | Value |
| Request URL | https://openapi.growatt.com/v4/new-api/queryLastData |
| Request Method | POST |
| Content-Type | application/x-www-form-urlencoded |
HTTP Header Parameters
The following parameter must be included in the HTTP Header:
| Parameter Name | Required | Type | Description |
| token | Yes | String | Secret token |
Example (Code Block):
HTTP Header:
token: [YourSecretTokenHere]
When using Postman add it as a header value and not in the authorization tab.
HTTP Body Parameters
The following parameters must be sent in the HTTP Body (as application/x-www-form-urlencoded):
| Parameter Name | Required | Type | Description |
| deviceType | Yes | String | Device Type |
| deviceSn | Yes | String | Device Serial Number (Device SN) |
Example (Code Block):
HTTP Body (application/x-www-form-urlencoded):
deviceType=inverter&deviceSn=ABC123456789
Growatt API Request for Historical Data
This interface retrieves all detailed data for a specific device on a particular day based on the device’s Serial Number (SN), device type, and date.
Request Details
| Parameter | Value |
| Request URL | https://openapi.growatt.com/v4/new-api/queryHistoricalData |
| Request Method | POST |
| Content-Type | application/x-www-form-urlencoded |
HTTP Header Parameters
The following parameter must be included in the HTTP Header:
| Parameter Name | Required | Type | Description |
| token | Yes | String | Secret token |
Example (Header):
HTTP Header:
token: [YourSecretTokenHere]
HTTP Body Parameters
The following parameters must be sent in the HTTP Body (as application/x-www-form-urlencoded):
| Parameter Name | Required | Type | Description |
| deviceSn | Yes | String | Device unique serial number (SN) |
| deviceType | Yes | String | Device type (corresponds to the deviceType from the fetch device list interface) |
| date | Yes | String | Start date (format: yyyy-mm-dd) |
Example Call:
HTTP Body (application/x-www-form-urlencoded):
deviceSn=FDCJQ00003&deviceType=min&date=2024-05-14
Growatt API: MIN Device Last Detailed Data Format
This section outlines the structure of the JSON response when retrieving the latest comprehensive data for a Growatt MIN series device.
Example Return Structure
The API returns a JSON object with a main data field containing an array under the key min.
JSON
{
"code": 0,
"data": {
"min": [
{
"serialNum": "AFE494403F",
"calendar": 1716619122927,
"status": 1,
"ppv": 112.9,
"pac": 110.9,
// ... many other fields ...
"eacToday": 2.0,
"eacTotal": 25799.8,
"time": "2024-05-25 14:38:42",
"statusText": "Normal"
}
]
},
"message": "SUCCESSFUL_OPERATION"
}
Return Parameter Descriptions
The following table details the key parameters returned for a MIN device.
| Parameter Name | Type | Description |
serialNum | String | Serial Number of the device. |
calendar | CalendarTime | Calendar time (Timestamp). |
time | String | Human-readable time of the data point (e.g., "2024-05-25 14:38:42"). |
status | int | Min Status: 0: waiting, 1: normal, 2: fault. |
statusText | String | Human-readable status (e.g., "Normal"). |
ppv | String | Total PV input power (W). |
ppv1, ppv2, ppv3, ppv4 | String | Individual PV input power for each PV string (W). |
pac | String | Inverter output power (W). |
eacToday | String | Inverter daily output energy (kWh). |
eacTotal | String | Inverter total output energy (kWh). |
vpv1, vpv2… | String | PV input voltage for each string (V). |
ipv1, ipv2… | String | PV input current for each string (A). |
vac1, vac2, vac3 | String | Grid voltage for each phase (V). |
fac | String | Grid frequency (Hz). |
temp1, temp5 | String | Temperature readings (e.g., internal temperatures) (°C). |
pf | float | Power factor value. |
sysFaultWord | int | System Fault Word (main fault indicator). |
warnCode | int | Warning code. |
etoUserToday | String | Daily energy output to the grid (kWh). |
etoGridToday | String | Daily energy input from the grid (kWh). |
Battery and Storage Parameters (BDC/BMS)
If the MIN device is a hybrid model with battery storage, the following parameters will also be returned:
| Parameter Name | Type | Description |
bdc1Status | int | BDC1 (Battery DC-DC Converter) status. |
bdc1Vbat | String | BDC1 battery voltage (V). |
bdc1Soc | int | BDC1 battery capacity (State of Charge, %). |
bmsStatus | int | BMS (Battery Management System) status. |
bmsVbat | String | BMS battery voltage (V). |
bmsSoc | String | BMS battery capacity (State of Charge, %). |
echargeToday | String | System daily charging energy (kWh). |
edischargeToday | String | System daily discharging energy (kWh). |
Remarks
- Retrieval Frequency: The data is updated at a maximum frequency of once every 5 minutes or less.
