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

# Why isn't it charging?

> Read why a plugged-in car takes no power, and what to tell the driver.

A car is plugged in and nothing flows. One device read usually explains it: `activeControlMode` says which mode holds the charger, and `notChargingReason` says what is stopping the current.

## 1. Read the charger

```bash theme={null}
curl https://api.amps.ai/ev-charger/device_abc123 \
  -H "x-api-key: $AMPS_API_KEY"
```

```json theme={null}
{
  "success": true,
  "data": {
    "id": "device_abc123",
    "state": {
      "status": "available",
      "isConnected": true,
      "isCharging": false,
      "currentPower": 0,
      "notChargingReason": "authorization"
    }
  }
}
```

`isConnected: true` with `isCharging: false` means a car is on the cable and taking nothing. Here the charger is waiting for approval, so the driver needs to approve the session, not call an engineer.

## 2. Check the mode first

If `activeControlMode` starts with `auto.`, the charger is running a [smart charging](/cookbooks/ev-charger/smart-charging) mode and is waiting for a cheap hour or spare solar. That is the mode working: show "waiting for the right moment", not a fault.

## 3. Read the reason

| `notChargingReason` | Meaning | Tell the driver |
| - | - | - |
| `vehicle` | The car declined the charge or isn't ready. | Check the car. |
| `target_reached` | The car reached its own charge limit and stopped. | Charging is finished. |
| `charger` | The charger is limiting or curtailing. | Check the charger. |
| `load_management` | A site power share is holding the charge. | Wait. It resumes when capacity frees. |
| `authorization` | Waiting for an RFID card or app approval. | Approve the session or present the card. |
| `schedule` | The charger's own schedule blocks charging now. | Change the schedule in the manufacturer's app. |
| `unknown` | The charger reports a pause but not why. | The charge is on hold. |

The field is absent while charging, while nothing is plugged in, or when the charger doesn't report reasons. Absent isn't `unknown`: check the key exists before you read it.

```javascript theme={null}
const { state } = (await res.json()).data;

if (state.isCharging) return "Charging";
if (!state.isConnected) return "Plug the car in";
if (state.activeControlMode?.startsWith("auto.")) return "Waiting for the right moment";
if (!("notChargingReason" in state)) return "Paused";
return state.notChargingReason;
```

## At push time

An immediate `charge` or `auto.*` push can come back with a `warnings` array: `vehicle_not_connected` or `awaiting_authorization`. The command is still accepted and takes effect when the condition clears. No `warnings` means nothing was blocking it when you sent it.

## Next steps

<CardGroup cols={2}>
  <Card title="Smart charging" icon="bolt" href="/cookbooks/ev-charger/smart-charging">
    The modes behind an `activeControlMode` that starts with `auto.`.
  </Card>

  <Card title="Pull" icon="arrow-down" href="/guides/pull">
    Read shape, freshness, and absent fields.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.