Skip to main content
MIX devices are Growatt hybrid inverters that combine solar power generation with battery storage capabilities. This method retrieves real-time operational status, including current power levels, battery state, and system health.
Retrieves the current status and operational data for a specific MIX device, providing real-time information about power generation, consumption, and battery state.

Method Signature

pub async fn get_mix_status(
    &mut self,
    plant_id: &str,
    mix_sn: &str
) -> Result<serde_json::Value>

Parameters

plant_id
&str
required
The unique identifier of the plant containing the MIX device. You can retrieve plant IDs using the get_plant_list() method.
mix_sn
&str
required
The serial number of the MIX device. This uniquely identifies the specific hybrid inverter whose status you want to query.

Returns

Returns a Result<serde_json::Value> containing the current status data for the MIX device, or a GrowattError if the request fails.

Errors

  • GrowattError::NotLoggedIn - If the client is not authenticated
  • GrowattError::InvalidResponse - If the response is empty or malformed
  • GrowattError::RequestError - If the HTTP request fails

Example

use growatt_api::GrowattApi;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut api = GrowattApi::new();
    
    // Login first
    api.login("username", "password").await?;
    
    // Get MIX status data
    let status = api.get_mix_status("123456", "ABC1234567").await?;
    
    println!("MIX Status: {:#?}", status);
    
    // You can access specific fields from the JSON response
    if let Some(power) = status.get("power") {
        println!("Current Power: {}", power);
    }
    
    Ok(())
}

API Endpoint

POST /panel/mix/getMIXStatusData?plantId={plant_id}
The method sends a form-encoded POST request with the MIX serial number.

Build docs developers (and LLMs) love