OCPP sandbox
Point a real charger at a test backend of the hosted edition and see every OCPP message it sends, checked against the schema, without a backend of your own.
Connect a charger
- Open Test charger in the top bar of the analyzer (hosted edition, signed in, email confirmed) and add a charger. Type the identity your charger already uses, so only its address and password change; leave it empty and the sandbox makes one (sbx- and 12 characters).
- The setup panel shows each value with a Copy button: the full address (wss://.../ocpp/<identity>), the backend address the charger adds its identity to, the identity, and a password of 40 hex characters. Keep the password: it is not shown again, but New password makes another. Copy all and Download the settings keep them together.
- Pick the OCPP version of the charger and the panel says where each value goes: in 1.6 the central system address and the AuthorizationKey with SecurityProfile 2; in 2.0.1 and 2.1 the CSMS address of the network connection profile and the BasicAuthPassword of SecurityCtrlr. The charger sends its identity as the user name, so it has to match exactly.
- The sandbox speaks OCPP 1.6, 2.0.1 and 2.1 and agrees on the first of them the charger offers.
- The values are settings for the charger, not web links; a browser cannot open them. The charger may be given the backend address or the full address: the sandbox takes the identity from the end of the address, also when the charger adds it to the full address again or is set to the bare host. The charger has to support TLS (wss://).
- Check the address opens the address from this browser and from the sandbox itself, as a charger would. It tells apart an address that works, a network that blocks WebSockets (a charger on another network may still get in), and an address set up wrong on the server.
- A charger with no password setting (OCPP security profile 0), or a simulator in a web browser, which cannot send a password: open "No password setting on your charger" and make an address with a key (wss://.../ocpp/k/<key>). The key takes the place of the password and is shown once; make a new one or remove it there.
- No charger at hand: the panel gives a wscat command and a BootNotification to paste, or Play a charger with the emulator (Pro and Team) fills the emulator in with the same values.
When the charger does not connect
- The charger list says why its latest attempt was refused, and what to change, until the next good connection: no password sent, a user name other than the identity, a wrong password, a wrong or removed address key, too many wrong passwords from its address (it waits 15 minutes), no OCPP version the sandbox speaks (with the versions it offered), or the messages of the day used up.
- Nothing in the list at all: the charger never reached the sandbox. Use Check the address in the setup panel, then check the host and wss:// on the charger and that it reaches the internet.
- The charger checklist above the messages ticks off what the charger has shown so far: the boot accepted, a heartbeat, a connector status, a card, a transaction started, meter values, the transaction stopped, and every message within the schema. The first open step says what to do on the charger, or which command below brings it about.
What the sandbox does
- It accepts every boot, card and transaction, answers Heartbeat with the time and gives a heartbeat interval of 300 s.
- How the sandbox answers, under the checklist, changes that for one charger, to test how it takes a no: answer the boot Pending or Rejected, refuse every card (Invalid) or the cards on a list (Blocked), and give another heartbeat interval (10 s to 24 h). A connected charger gets the new answers from its next message. Listed cards are kept as a fingerprint, and the page shows only their last four characters.
- Download the checklist saves the checklist as a web page to keep or send: the charger, how the sandbox answered, each step with its time or what went wrong, and the messages that broke the schema.
- The steps on top of the page (add a charger, connect it, run through the checklist) tick off as the test goes on; a step takes you to its part of the page.
- It checks every message against the official OCA JSON schema of the version. A message that breaks it gets a CALLERROR (FormationViolation in 1.6, FormatViolation later) that says where, and the log marks it.
- An action the version does not define gets NotImplemented. The sandbox does not sign certificates and says so (SignCertificate Rejected).
- Alerts (off by default) email the account when a charger is refused, sends a message that breaks the schema, or disconnects, for a test you are not watching. Turn them on per kind on the page; a digest goes out, not a mail per event, to the account owners and admins. The page lists the recent alerts.
- Messages shows the log of a charger, updated every two seconds; select a row for the whole message, or show only the messages with a problem. Download log saves it in the form the analyzer reads: open it next to a capture, or in Batch for the OCPP checks and the ChargeX KPIs. With a capture open, Add to the open capture does that in one step.
Send commands to the charger
- With a charger connected, Send to the charger above its messages sends what a backend sends: Reset, a remote start and stop (RemoteStartTransaction and RemoteStopTransaction in 1.6, RequestStartTransaction and RequestStopTransaction later), TriggerMessage, ChangeAvailability, UnlockConnector, reading and changing configuration (GetConfiguration and ChangeConfiguration, or GetVariables, SetVariables and GetBaseReport), SetChargingProfile, ClearChargingProfile, GetCompositeSchedule, ClearCache, GetLocalListVersion, UpdateFirmware, a log upload (GetDiagnostics or GetLog) and DataTransfer.
- Each command starts from an example payload that holds to the schema of the version the charger speaks. Edit it as JSON; the page checks it against the schema as you type, and the sandbox checks it again before it goes out.
- The answer shows under the command once the charger sends it, checked against the schema of the response; the log names it after the command (Reset result, TriggerMessage error). An answer that breaks the schema is marked like any other message.
- One command at a time, as OCPP-J asks of both sides: the next waits for the answer, or 30 seconds. At most 30 commands a minute per account; each counts as a message of the day.
- A remote stop needs the transaction id the charger sent: in 1.6 the one the sandbox gave in StartTransaction, in 2.0.1 and 2.1 the transactionId of its TransactionEvent.
Limits and your data
- The messages reach our server and are kept for 7 days, then deleted. Card ids (idTag, idToken) are masked to their last four characters before they are stored; passwords in messages are removed. Delete the log deletes them at once, Delete deletes the charger with its log.
- Each charger has one connection at a time: a new one replaces the old. Messages are at most 64 KiB and at most 20 per second; a charger that stays silent for 10 minutes is disconnected.
- Each plan has a number of sandbox chargers and messages per day: Free 1 charger and 5 000 messages, Pro 5 and 50 000, Team 25 and 250 000. A connection counts as one message.
- Ten wrong passwords from one address block that address for 15 minutes. The charger itself is never locked, so nobody who knows its identity can lock you out; the page shows how many wrong passwords came since the last connection.
- Captures, CAN logs and Control Pilot logs still never leave your browser; the sandbox only ever sees what the charger sends to it.