> ## Documentation Index
> Fetch the complete documentation index at: https://docs.der-connect.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to a Huawei PV system

> Connect and control solar plants remotely.

## What you'll need

* A valid access (bearer) token
* The plant owner needs a Huawei account to provide consent

## Let's get started

<Steps>
  <Step title="Start the onboarding process">
    Create an [Entity Onboarding Request](/api-reference/endpoint/onboarding-api/onboard-entities/create-an-entity-onboarding-request), setting the <Tooltip tip="Specify the type of device or vehicle that you want to connect with.">type</Tooltip> to `SolarPlant` and <Tooltip tip="Specify the brand (for example: “Audi” or “Tesla”) of the device or vehicle you want to connect with.">brand</Tooltip> to `Huawei`.

    <ParamField body="type" type="enum<string>" required />

    <ParamField body="brand" type="string" required />
  </Step>

  <Step title="Check for required actions">
    In most cases, the onboarding request will have the <Tooltip tip="Available options: Canceled, Failed, InProgress, Pending, and Succeeded">status</Tooltip> `Pending` until a required <Tooltip tip="Represents a required action before the request can be completed.">action</Tooltip> is completed.

    Huawei always requires an action of <Tooltip tip="Available options: Consent and Redirect">type</Tooltip> `Redirect`. Such actions contain a <Tooltip tip="A URL where the user can complete the onboarding action.">redirectLink</Tooltip>. You can redirect your user here or share this link directly with the plant's owner to complete the action.

    ```json Response (Body) [expandable] {3, 5-8} theme={null}
    {
        "id": "3c90c3cc-[....]-8dd25736052a",
        "status": "Pending",
        "requestType": "Entity",
        "action": {
            "type": "Redirect",
            "redirectLink": "<string>"
        },
        "data": {
            ...
        }, ...
    }
    ```

    <ResponseField name="action" type="object">
      <Expandable title="properties">
        <ResponseField name="type" type="enum<string>">
          Available options: `Consent`, `Redirect`
        </ResponseField>

        <ResponseField name="redirectLink" type="string">
          A link to redirect the user to complete the action.
        </ResponseField>

        <ResponseField name="documentationLink" type="string">
          A link to our documentation, explaining the user how to proceed.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Step>

  <Step title="Track the onboarding status">
    Periodically poll the Onboarding API to check if the status of your request has updated to `Succeeded`. Once it's complete, you'll find the newly created Entity and its ID in the <Tooltip tip="An object containing the newly created Entity.">data</Tooltip> object.

    You can reference the <Tooltip tip="The ID of the Entity">entityId</Tooltip> when using our Readings API and the Commands API.

    ```json {3, 6} theme={null}
    {
       "id": "3c90c3cc-[....]-8dd25736052a",
       "status": "Succeeded",
       "data": {
           "entity": {
               "id": "3c90c3cc-[...]-8dd25736052a",
               ...
           },
       }, ...
    }
    ```
  </Step>
</Steps>

## Work with your newly created Entity

**Tip:** Take note of your Entity ID before you get started with our APIs.

<CardGroup cols={2}>
  <Card title="Readings API" icon="gauge" href="/guides/readings">
    Observe the state of the plant.
  </Card>

  <Card title="Commands API" icon="square-terminal" href="/guides/commands">
    Curtail or deactivate the inverter.
  </Card>
</CardGroup>

<RequestExample>
  ```json Onboarding Request (Body) theme={null}
  {
      "type": "SolarPlant",
      "brand": "Huawei"
  }
  ```
</RequestExample>
