---
agentTools:
  projectIndex: https://docs.edrv.io/llms.txt
---

# Set Static Chargestation Power Limits

[block:api-header]
{
  "title": "Introduction"
}
[/block]

Operators may prefer to set a default power limit for chargestations. This allows them to have a power ceiling in place for installations that may be power constrained.

eDRV allows admins and developers to set/clear power limits on a chargestation or connectors.

[block:api-header]
{
  "title": "Set a Power Limit for a Chargestation or a Connector"
}
[/block]

Your application can alter the maximum power or current delivered to an EV (applies to all connectors). You can do this via:

* `chargestations/{id}/set_default_power_limit` (for a chargestation)
* `connectors/{id}/set_default_power_limit` (for a connector)

[block:callout]
{
  "type": "info",
  "title": "Chargestation vs Connector Power Limits",
  "body": "Chargestation power limits have a higher priority than connector power limits."
}
[/block]

**Example 1**
The following example limits the default max power available to the EV to 75kW.

[block:code]
{
  "codes": [
    {
      "code": "{\n\tunit: 'power',\n\tlimit: 75000\n}",
      "language": "json",
      "gist": "312251b0a638a7217514cc7029bbd05b",
      "name": "set_default_power_limit "
    }
  ]
}
[/block]

**Example 2**
The following example sets the default max current available to the EV to 40 Amperes.

[block:code]
{
  "codes": [
    {
      "code": "{\n\tunit: 'current',\n\tlimit: 40\n}",
      "language": "json",
      "name": "trasaction amperes"
    }
  ]
}
[/block]

**Expected Response**
A successful API call returns an [Actions](https://docs.edrv.io/docs/actions) id as the `result._id`.

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"ok\": true,\n    \"message\": \"Chargestation Set Default Power Requested\",\n    \"result\": {\n        \"_id\": \"6401c837dcd98625f00393ed\",\n        \"type\": \"chargestation.set_power_limit\",\n        \"status\": \"APIRequested\",\n        \"chargestation\": \"5f72f55431a6770a131db277\",\n        \"data\": {\n            \"unit\": \"current\",\n            \"limit\": 10,\n        },\n        \"createdAt\": \"2023-03-03T10:13:11.895Z\",\n        \"updatedAt\": \"2023-03-03T10:13:11.895Z\"\n    }\n}",
      "language": "json",
      "name": "chargesstation response"
    },
    {
      "code": "{\n    \"ok\": true,\n    \"message\": \"Connector Set Default Power Requested\",\n    \"result\": {\n        \"_id\": \"6401c837dcd98625f00393ed\",\n        \"type\": \"chargestation.set_power_limit\",\n        \"status\": \"APIRequested\",\n        \"connector\": \"5f72f55431a6770a131db277\",\n        \"data\": {\n            \"unit\": \"current\",\n            \"limit\": 10,\n        },\n        \"createdAt\": \"2023-03-03T10:13:11.895Z\",\n        \"updatedAt\": \"2023-03-03T10:13:11.895Z\"\n    }\n}",
      "language": "json",
      "name": "connector response"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Checking Power Limits"
}
[/block]

Power limits are reported via webhooks and can be retrieved via:

* GET `chargestations/{id}`

The following report the set power limits:

* `chargestation.configuration.default_power_limit`(for a chargestation)
* `chargestation.connectors[].configuration.default_power_limit` (for a connector)

[block:api-header]
{
  "title": "Clear Power Limits"
}
[/block]

If your application wants to remove the power / current limit (that you may have set previously) on a chargestation or connector, you can do so via

* `chargestations/{id}/clear_default_power_limit` (for a chargestation)
* `connectors/{id}/clear_default_power_limit` (for a connector)

**Expected Response**

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"ok\": true,\n    \"message\": \"\",\n    \"result\": {\n        \"_id\": \"630cc4efb8d8867b16ca693b\",\n        \"type\": \"chargestation.clear_power_limit\",\n        \"status\": \"requested\",\n        \"chargestation\": \"601d3fbd50189514b894676e\",\n        \"data\": {},\n        \"createdAt\": \"2022-08-29T13:53:51.784Z\",\n        \"updatedAt\": \"2022-08-29T13:53:51.784Z\"\n    }\n}",
      "language": "json",
      "name": "chargestation"
    },
    {
      "code": "{\n    \"ok\": true,\n    \"message\": \"\",\n    \"result\": {\n        \"_id\": \"630cc4efb8d8867b16ca693b\",\n        \"type\": \"connector.clear_power_limit\",\n        \"status\": \"requested\",\n        \"connector\": \"601d3fbd50189514b894676e\",\n        \"data\": {},\n        \"createdAt\": \"2022-08-29T13:53:51.784Z\",\n        \"updatedAt\": \"2022-08-29T13:53:51.784Z\"\n    }\n}",
      "language": "json",
      "name": "connector"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Webhooks"
}
[/block]

Your application should monitor the following [Webhook Events](https://docs.edrv.io/docs/list-of-webhook-events)  when using `set_power_limit` or `clear_power_limit` for a chargestation or a connector.

`chargestation.set_power_limit.requested` or `chargestation.clear_power_limit.requested`

> A request has been sent to the chargestation

`chargestation.set_power_limit.completed` or `chargestation.clear_power_limit.completed`

> The chargestation accepted the request and has begun processing it

`chargestation.set_power_limit.failed` or `chargestation.clear_power_limit.failed`

> The chargestation rejected the request. See response data for any error details reported by the chargestation

[block:callout]
{
  "type": "info",
  "title": "Do you need help with Smart Charging?",
  "body": "Do reach out to the eDRV team via chat or email for help for your specific Smart Charging use case."
}
[/block]