OCPP In-Depth Guide
The Charge Controller family implements the OCPP standard based on the official OCPP 1.6 standard defined by the Open Charge Alliance. Download relevant documents from the Open Charge Alliance website.
- OCPP 1.6
- OCA ISO 15118 (scroll down to "Application Notes")
- Secure transfer of the Eichrecht OCPP public key via hastobe spec
- EVSE Check V3
1. Setting up the connection and verifying it
-
Basic Requirements
- Valid ChargePointID (found under BACKEND > OCPP)
- Working network connection (GSM, Ethernet, or WLAN)
- OCPP backend URL (format:
ws://backend:8080/OCPPJProxy/v16/
)
-
Connection Verification
- Check BACKEND > Connection Status
- Verify heartbeat messages are being sent/received
- Confirm transaction messages are flowing
2. Troubleshooting guide
2.1. Common connection issues
-
No Backend Connection
- Check network connectivity (ping test)
- Verify ChargePointID is correct
- Confirm backend URL format
- Check SSL certificates if using WSS
-
Connection Drops
- Check network stability
- Verify heartbeat interval settings
- Monitor system logs for timeout errors
-
Authentication Failures
- Verify basic auth credentials
- Check authorization key format
- Confirm OCPP version compatibility
2.2. Diagnostic Steps
-
Check real-time logs:
- DIAGNOSTICS > OCPP Status
- DIAGNOSTICS > System Logs
-
Verify network settings:
- BACKEND > Connection Type
- NETWORK > Configuration
-
Test backend communication:
- Initiate test transaction
- Monitor message exchange
- Check error responses
3. Supported feature profiles
4. Supported messages based on "Open Charge Point Protocol 1.6"
5. Supported messages based on "Using ISO 15118 Plug & Charge with OCPP 1.6"
6. List of all configuration keys and equivalent Config UI labels
7. OCPP-relevant configuration parameters in Config UI
8. OCPP-Relevant Configuration Parameters
9. In-Depth Explanations
9.1. Connectivity keep-alive troubleshooting
Purpose: Maintain a persistent connection with the OCPP backend.
Details:
- If your backend frequently disconnects, try enabling
Force Heartbeat
and/or lowering theWebSockets keep-alive interval
to 60 seconds. - This setting works alongside the TCP watchdog.
- Pings sent prevent NAT/firewall timeout issues in some networks.
9.2. Informative StatusNotifications
Controlled by:
Send informative StatusNotifications
(INFO_STATUS_NOTIFICATIONS
)
Details:
-
Sends info-level updates like:
- Energy flow start/stop
- Temperature readings
- Web UI logins
- GPIO state changes
-
Useful for debugging, UI feedback, and backend analytics.
-
Does not include error-level data.
Triggered Informational StatusNotifications:
-
Energy Flow:
- "Energy is flowing to vehicle"
- "No energy flowing to vehicle"
- "Energy flow to vehicle is unknown"
-
Temperature Reports:
- "Temperatures: CPU: [temp] RFID: [temp]"
- "Charging paused. Temperature: +XX.X C"
- "Signaled current reduced. Temperature: +XX.X C"
- "Signaled current back to nominal. Temp: +XX.X C"
-
Ventilation & Heating: State change notifications
-
Web UI Login Events: If enabled
-
GPIO State Changes: Depends on related GPIO notify setting
-
Triggered by backend: "Triggered status report" via TriggerMessage
9.3. Error StatusNotifications
Controlled by:
Send error StatusNotifications
(ERROR_STATUS_NOTIFICATIONS
)
Examples of Static Info Strings:
- "Residual current detected via sensor"
- "Vehicle signals error"
- "Vehicle diode check failed - tamper detection"
- "MCB of type 2 socket triggered"
- "RCD may be triggered (OCPP meter power loss)"
- "Contactor welded"
- "Plug locking failed"
- "Housing temperature too high - charging paused"
- "Temperature reaches safety limit - emergency stop"
- "GSM SIM card is missing"
- "USB communication errors."
- "Message queue is full"
Examples of Dynamic Info Strings:
- GSM signal strength:
gsm_get_ocpp_status_info_string()
- Firmware update status:
net_firmware_get_status_info_string()
- USB hotplug:
usb_hotplug_progress_string()
- Phase errors:
phase_monitor_get_phase_err_msg()
- Internal diagnostics: component manager, PIC24, etc.
9.4. USB error StatusNotifications
Controlled by:
Send USB error StatusNotifications
(USB_ERROR_STATUS_NOTIFICATIONS
)
-
Sends:
- "USB communication errors."
- "USB stick handling: Finalized - Remove USB stick"
- "USB stick handling failed - Remove USB stick"
-
Often sent together with log file diagnostics or update failures
9.5. SSL strictness and IP address use
Problem: When using IP addresses instead of domain names, TLS certificate validation fails due to hostname mismatch.
Solution:
- Set
SSL Strictness as client
toSkip host check
- This disables hostname validation but maintains encryption
9.6. Backend connection timeout details
Parameter:
Backend connection timeout
(BackendConnectionTimeout
)
Default: 60s Range: 3–300s
Behavior:
-
Used for:
- APN and proxy connection timeout
- OCPP request-response timeout
-
Retries use exponential backoff:
- Timeout doubles per failure (±20% jitter)
- Max delay: 12h (43,200s)
- After max: triggers reboot
-
Volatile messages are discarded after timeout
-
Persistent messages are retried
-
Triggers backend reset via
tcpip_comm_manage_generic_error(0)
9.7. TCP watchdog timeout
Parameter:
TCP Watchdog Timeout
Purpose:
- Acts as a global failsafe
- If no TCP activity over a long period, reboot is triggered
- Log example: "No tcp connection for long time. Rebooting"
9.8. OCPP queue full behavior
Parameter:
Disallow charging if OCPP queue full
Name: OCPP_QUEUE_FULL_AS_ERROR_STATE
(OCPP: "OcppQueueFullAsErrorState")
Default: OFF
Type: ON/OFF option
File: ocpp_logic_parameters.c:1370–1383
Purpose:
- Charging is blocked if the internal OCPP message queue is full
- Prevents starting new sessions that would generate unsent messages
- Especially important for Eichrecht-compliant operations
9.9. Queue implementation and limits
Total queue capacity:
- 350 messages maximum: Hard-coded limit (
PERS_LIST_ELEM_NUM_MAX
) - 70 message threshold for StatusNotifications: If 70+ items in queue, additional StatusNotifications are suppressed (
PERS_LIST_ELEM_NUM_MSG_LIMIT
)
Technical Behavior:
-
Before sending any new message, the system checks queue fullness
-
If full:
- A log warning is created
- The message is discarded silently
- If the feature is enabled: triggers error state
ERR_OCPP_MSG_QUEUE_FULL
- Error marked as
pause_during_error = 1
, which blocks or stops charging
Error state properties:
- OCPP Status: "Message queue is full"
- Internal Code:
01-05-006
- Recovery trigger: Queue no longer full
- Recovery behavior: Clears error and automatically resumes charging
9.10. Charging impact
-
When queue is full and this setting is enabled:
- Charging stops
- New sessions cannot start
- State persists until queue drains
-
When disabled:
- Queue full only suppresses new messages silently, does not affect charging
9.11. Operational Notes
- Message queue stats are not visible in the UI
- May correlate with watchdog reboots or intermittent disconnects
- When queue is full, all message types compete for limited space
- Retransmissions (like MeterValues) hold up queue until backend responds
9.12. Recommendations
- Enable only in legally constrained scenarios
- Avoid on unstable connections unless retries are optimized
- Use with infinite retry for transaction messages to prevent data loss
9.13. Transaction message retry logic
Parameter:
TRANSACTION_MESSAGE_ATTEMPTS
(OCPP: "TransactionMessageAttempts")
Default: 5 attempts
Range: 0–5 attempts
Special value: 0 = infinite retries
File: ocpp_logic_parameters.c:1293-1311
Behavior:
-
Applies when Eichrecht is not active
-
Retries are limited to the value set in the parameter
-
When retries are exhausted:
- Message is logged as deleted
- Removed from persistent queue
- Memory is freed
- No error state is triggered — message is silently dropped
Retry Interval:
- Controlled by
TRANSACTION_MESSAGE_RETRY_INTERVAL
(OCPP: "TransactionMessageRetryInterval") - Default: 0 seconds
- Range: 0–1000 seconds
- Sets how long the ChargePoint waits before resubmitting a transaction-relevant message
- File:
ocpp_logic_parameters.c:1334–1350
Transaction-Relevant Messages Include:
- StartTransaction
- StopTransaction
- MeterValues with transaction ID
- (Also TransactionEvent in OCPP 2.0)
9.14. Eichrecht transaction message attempts
Parameter:
EICHRECHT_TRANSACTION_MESSAGE_ATTEMPTS
(OCPP: "EichrechtTransactionMessageAttempts")
Default: 0 (infinite retries) Range: -1 to 5 Special values:
0
: Infinite retries-1
: Use value ofTRANSACTION_MESSAGE_ATTEMPTS
File:ocpp_logic_parameters.c:1312–1332
Applies when:
-
Eichrecht is active AND
-
Message is:
- StartTransaction
- StopTransaction
- MeterValues with transaction ID
Priority behavior:
if (eichrecht_is_active() && ocpp_client_is_message_transaction_relevant(message, 0))
return PS_GET(EICHRECHT_TRANSACTION_MESSAGE_ATTEMPTS, unsigned int);
return PS_GET(TRANSACTION_MESSAGE_ATTEMPTS, unsigned int);
Eichrecht active condition:
- Eichrecht-certified meter is selected (eHZ, DZG, etc.) OR
- System is in Eichrecht locked state
File:
eichrecht.c:216–227
Fallback logic:
- If parameter = -1 → use
TRANSACTION_MESSAGE_ATTEMPTS
9.15. Retransmit MeterValues (cross-linked with queue behavior)
Parameter:
Retransmit MeterValues
Purpose: Determines whether MeterValues messages are retried upon backend failure.
Behavior:
-
When enabled:
- MeterValues with transaction ID are treated as persistent
- Retried according to transaction message attempt logic (
TransactionMessageAttempts
,EichrechtTransactionMessageAttempts
) - Held in queue until successfully sent or max attempts exceeded
- Increases queue pressure, see OCPP queue full behavior
-
When disabled:
- MeterValues are considered volatile
- If backend is unreachable, messages are dropped immediately after timeout
Dependencies:
- Queue size: 350 message limit affects retried MeterValues
- If queue is full and
OcppQueueFullAsErrorState
is enabled, charging is blocked (see Queue full behavior) - Retransmit setting only applies to transaction-bound MeterValues
Implementation:
- Retransmission logic tied to message persistence flag
- Controlled via config UI flag or internal preset
- File references:
ocpp_client.c
,persistent_list.c
Recommendation:
- Enable in Eichrecht or legally regulated environments
- Disable in unstable networks where queue overflow is a risk
see CANNED response on this if existing
-->