RFID & Autocharge

How ChargeIndia Hub supports charger-initiated RFID and Autocharge via OCPI Tokens.

ChargeIndia Hub is an OCPI 2.2.1 roaming broker. It does not speak OCPP. RFID taps and Autocharge (MAC / EVCCID) are modeled as OCPI Tokens. The CPO CSMS maps OCPP idTag (or vehicle MAC) to token.uid before calling Hub.

Remote app start (START_SESSION with auth_method: COMMAND) already works with type: "RFID". This page covers charger-initiated flows.

Conventions

Modetoken.typeuidTypical auth_method
RFID cardRFIDCard UIDAUTH_REQUEST or WHITELIST
AutochargeOTHERNormalized MAC / EVCCIDAUTH_REQUEST or WHITELIST

Partners may agree to use RFID for Autocharge UIDs; OTHER is the Hub default recommendation for MAC/EVCCID.

Prefer whitelist: ALWAYS or ALLOWED_OFFLINE when pushing Tokens for offline Autocharge.

Online authorize (RFID tap / plug-in)

When the driver authenticates at the charger, the CPO asks the eMSP through Hub in realtime:

CPO → Hub: POST /ocpi/2.2.1/tokens/{uid}/authorize?type=RFID
           Headers: OCPI-To = eMSP
Hub → eMSP: POST {tokens_sender_url}/{uid}/authorize?type=RFID

Hub returns full AuthorizationInfo (allowed, optional token, location, authorization_reference, info). Set authorization_reference when possible so Hub can rewrite a Hub cdr_token under COMPATIBILITY.

API details: CPO Tokens · eMSP Tokens

Whitelist / offline Autocharge

For low-latency or offline auth, the eMSP pushes Tokens to Hub; Hub fans out to routed CPOs:

eMSP → Hub: PUT /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{uid}
Hub → CPO:  PUT /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{uid}

CPO may also GET /ocpi/2.2.1/tokens (routing-filtered) to pull Tokens. Invalid / valid: false Tokens are still forwarded so CPOs can revoke whitelist entries.

Sessions and CDRs

After authorize (online or whitelist):

  1. CPO pushes session with auth_method: AUTH_REQUEST or WHITELIST
  2. Prefer a real eMSP identity on cdr_token (not Hub CIH)
  3. If cdr_token is Hub and the CPO is in active COMPATIBILITY, Hub may rewrite via matching START_SESSION or authorization_event (authorization_reference, else token.uid)
  4. CDR follows the same routing rules

Full contract: Session Lifecycle

Partner checklist

CPO

  • [ ] Map OCPP Authorize / StartTransaction idTag (or Autocharge MAC) → OCPI token.uid
  • [ ] Call Hub POST …/tokens/{uid}/authorize with OCPI-To = token-owning eMSP
  • [ ] Implement Tokens RECEIVER for Token whitelist push
  • [ ] Optionally GET Tokens from Hub for pull sync
  • [ ] Push sessions/CDRs with correct auth_method and eMSP cdr_token

eMSP

  • [ ] Issue RFID cards and Autocharge MACs as OCPI Tokens
  • [ ] Implement Tokens SENDER for CPO-initiated POST …/authorize
  • [ ] Push Tokens with appropriate whitelist for offline Autocharge
  • [ ] Return full AuthorizationInfo (include authorization_reference when useful)

Out of Hub scope

OCPP CSMS, RFID readers, Autocharge MAC learning UI, and Plug & Charge are not implemented in Hub. Stay on OCPI Token authorize + sync.