Growatt OpenApi

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

ParameterValue
Request URLhttps://openapi.growatt.com/v4/new-api/queryLastData
Request MethodPOST
Content-Typeapplication/x-www-form-urlencoded

HTTP Header Parameters

The following parameter must be included in the HTTP Header:

Parameter NameRequiredTypeDescription
tokenYesStringSecret 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 NameRequiredTypeDescription
deviceTypeYesStringDevice Type
deviceSnYesStringDevice 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

ParameterValue
Request URLhttps://openapi.growatt.com/v4/new-api/queryHistoricalData
Request MethodPOST
Content-Typeapplication/x-www-form-urlencoded

HTTP Header Parameters

The following parameter must be included in the HTTP Header:

Parameter NameRequiredTypeDescription
tokenYesStringSecret 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 NameRequiredTypeDescription
deviceSnYesStringDevice unique serial number (SN)
deviceTypeYesStringDevice type (corresponds to the deviceType from the fetch device list interface)
dateYesStringStart 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 NameTypeDescription
serialNumStringSerial Number of the device.
calendarCalendarTimeCalendar time (Timestamp).
timeStringHuman-readable time of the data point (e.g., "2024-05-25 14:38:42").
statusintMin Status: 0: waiting, 1: normal, 2: fault.
statusTextStringHuman-readable status (e.g., "Normal").
ppvStringTotal PV input power (W).
ppv1, ppv2, ppv3, ppv4StringIndividual PV input power for each PV string (W).
pacStringInverter output power (W).
eacTodayStringInverter daily output energy (kWh).
eacTotalStringInverter total output energy (kWh).
vpv1, vpv2StringPV input voltage for each string (V).
ipv1, ipv2StringPV input current for each string (A).
vac1, vac2, vac3StringGrid voltage for each phase (V).
facStringGrid frequency (Hz).
temp1, temp5StringTemperature readings (e.g., internal temperatures) (°C).
pffloatPower factor value.
sysFaultWordintSystem Fault Word (main fault indicator).
warnCodeintWarning code.
etoUserTodayStringDaily energy output to the grid (kWh).
etoGridTodayStringDaily 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 NameTypeDescription
bdc1StatusintBDC1 (Battery DC-DC Converter) status.
bdc1VbatStringBDC1 battery voltage (V).
bdc1SocintBDC1 battery capacity (State of Charge, %).
bmsStatusintBMS (Battery Management System) status.
bmsVbatStringBMS battery voltage (V).
bmsSocStringBMS battery capacity (State of Charge, %).
echargeTodayStringSystem daily charging energy (kWh).
edischargeTodayStringSystem daily discharging energy (kWh).

Remarks

  • Retrieval Frequency: The data is updated at a maximum frequency of once every 5 minutes or less.