# OCPP Error Codes

## Overview

This document details the OCPP error codes implemented in the charging station.

## Status Notification for non-fault conditions
The StatusNotification message is used to report the operational status of the charging station. It can also be used to report non-fault conditions, such as when an error or warning has been raised but does not prevent the charging station from functioning normally. 

In such cases, the error code is not included in the PDU withe the following message format:

- **errorCode**: "NoError"
- **severity**: 1
- **vendorErrorCode**: "AMINA_INFO"
- **vendorId**: "amina"
- **info**: "Internal information message of max 50 characters"

Charging Station LED will not change state.

## Structure of Error Codes

StatusNotification message sent by the Charge Point to the Central System contains an error code if the Charge Point detects a fault condition. The error codes are defined by the OCPP specification. The list below lists the error codes implemented in our charging stations.

---

## Status Notification for fault conditions

### EVCommunicationError
Indicates a breakdown in communication between the charging station and the electric vehicle.

- **errorCode**: EVCommunicationError
- **severity**: 2
- **info**: A car communication failure event has occurred

Charging Station LED will be **blinking orange**.

### GroundFailure
 Indicates detection of DC current leakage by the Residual Direct Current – Detecting Device (RCD-DD).
 
- **errorCode**: GroundFailure
- **severity**: 2
- **info**: A RCD-DC fault event has occurred

Charging Station LED will be **steady orange**. 

### HighTemperature
Indicates that the charging station's temperature has exceeded safe operational limits.

- **errorCode**: HighTemperature
- **Severity**: 2
- **info**: An overtemperature event has occurred
 
Charging Station LED will be **steady red**.

### NoError
See the Status Notification for non-fault conditions above.

### OverCurrentFailure
Indicates that the charging current protection has detected a critical overcurrent condition and tripped.

- **errorCode**: OverCurrentFailure
- **severity**: 2
- **info**: A critical overcurrent event has occurred

Charging Station LED will be **steady red**.

### OverCurrentFailure
Indicates that the **Electric Vehicle has attempted to draw more than the maximum allowed current** as communicated by the Charge Point to the Electric Vehicle. This is a rare condition where certain EVs attempts to consume too much power upon connection.

- **errorCode**: OverCurrentFailure
- **severity**: 2
- **info**: An overcurrent event has occurred

The Charging Station LED will be **steady green**, and charging will be stopped.

### PowerSwitchFailure
Indicates that the power switch has failed to operate correctly. The relays have been stuck in the closed position, requiring hardware maintenance.
- **errorCode**: PowerSwitchFailure
- **severity**: 2
- **info**: Welded relays, EVSE may need service

Charging Station LED will be **blinking red**.
The charging station will be permanently disabled until the product is replaced.

### OtherError
Indicates an error with the charging station that doesn't fit into one of the pre-defined error categories.

#### Unsupported Grid Type
Indicates that an unsupported grid type has been detected.
- **errorCode**: OtherError
- **severity**: 2
- **vendorErrorCode**: "AMINA_UNSUPPORTED_GRID_TYPE"
- **vendorId**: "amina"
- **info**: An unsupported grid type has been detected

Charging Station LED will be **blinking red-white**.
