1. Overview
This tool is a comprehensive simulator and testing utility for the OCPP 1.6-J protocol. It allows you to explore message formats, validate payloads, and perform live end-to-end testing against a Central System.
2. Modes of Operation
The simulator has two main modes, selected using the radio buttons at the top of the page.
Mode 1: Simulator Only
This offline mode is for exploring and understanding OCPP messages. You can:
- Select any OCPP message from the dropdown.
- View its description and the detailed structure of its request and response payloads.
- Edit request parameters in the form and see the generated JSON payload in real-time.
- Click "Run Simulation" to validate the request payload and see a simulated response.
Mode 2: Charge Point (CP) Mode
This mode turns the simulator into a live OCPP client, allowing you to test it against your Central System (CSMS). It includes both manual message testing and a powerful automated charging scenario.
Key Features of CP Mode:
- Connection: After you enter your server's WebSocket URL and click "Connect", the simulator automatically sends a `BootNotification` and, upon success, sends a `StatusNotification` for both connector 1 and 2, setting them to `Available`.
- Health Diag Report: After boot is accepted, the simulator auto-starts a vendor `DataTransfer` (`vendorId: jio-bp`, `messageId: HealthDiagReport`) every 60 seconds. Edit CPID/outlet/firmware/energy per charger in the Health Diag panel, or use Start/Stop Health Diag.
- Manual Testing: You can manually send any Charge-Point-initiated message (like `Heartbeat`) at any time by selecting it from the main dropdown, editing its parameters, and clicking "Send Request to Server".
- Listening: The simulator actively listens for messages from your CSMS. When a message like `SetChargingProfile` is received, you can view its payload and craft a response from the UI.
- Log Export: You can export the entire message log to a `.csv` file at any time by clicking the "Export Log" button.
The Automated Charging Scenario
This is the most powerful feature for end-to-end testing. Here is the typical flow:
-
Starting a Session (Two Methods):
- Local Start (RFID): Fill in the session parameters and click the Start (RFID) button. This simulates a user tapping an RFID card at the charger and triggers an `Authorize` request.
- Remote Start (App): While the simulator is in the `Available` state, send a `RemoteStartTransaction` request from your CSMS. The simulator will automatically accept it and begin the session flow.
-
Setting Energy Limit (Optional):
Immediately after a session is initiated, the simulator enters the "Awaiting Energy" state for 5 seconds. During this window, your CSMS can send a `DataTransfer` message with a data payload like preset_12.5 to set the energy for the session. If no message is received, the simulator times out and uses the value from the UI.
-
The Charging Process:
- The simulator sends `StartTransaction` and transitions through the `Preparing` and `Charging` states, shown on the Visual State Machine.
- It sends periodic `MeterValues` messages, simulating power delivery at a constant 60kW (incrementing energy by 1kWh per minute).
- The meter value is cumulative; the `meterStop` from one session becomes the `meterStart` for the next session on that connector.
-
Stopping a Session (Multiple Ways):
- Local Stop: Clicking the "Stop (Local)" button.
- Remote Stop: Sending a `RemoteStopTransaction` request from your CSMS.
- Fault Scenario: Selecting a reason (e.g., `EmergencyStop`, `PowerLoss`) from the dropdown and clicking the fault button.
- Automatic Stop: The session ends if it reaches the configured Energy, Time, or Cost limit, or if the SoC hits 100%.
-
After the Session:
Upon a normal (non-faulted) stop, the simulator sends a final `StatusNotification` with status `Available` for the relevant connector to indicate it is ready for a new session. In a fault scenario, its status remains `Faulted`.
Negative Test Mode
Enable Negative Test Mode in the Automatic Charging Scenario panel to simulate a misbehaving charger for CMS validation:
- Simulator sends
Authorize — CMS may respond Invalid.
- Simulator still sends
StartTransaction with the same idTag.
- CMS may respond with
transactionId: 0 and Invalid idTagInfo.
- Simulator still dispenses
MeterValues with transactionId: 0.
- Your CMS should detect txnId 0 and send
RemoteStopTransaction(0).
- Simulator auto-accepts RemoteStop and sends
StopTransaction with reason Remote.
Leave Negative Test Mode unchecked for the normal positive flow.