Event Types

This page provides detailed information about each webhook event type, including payload structures and examples.

ocpp.message

The ocpp.message event is triggered whenever an OCPP message is sent to or received from a charging station. This provides real-time visibility into all communication between the Lynkwell platform and your charging infrastructure.

OCPP RPC Framework

OCPP (Open Charge Point Protocol) uses a JSON-RPC-like framework for communication between the central system (Lynkwell) and charging stations. Understanding the message types is essential for processing these webhooks correctly.

Message Types

Message TypeDescription
CALLA request message that initiates an action. Contains an action name and a payload with parameters.
CALL_RESULTA successful response to a CALL. Contains only a payload with the result data.
CALL_ERRORAn error response to a CALL. Contains an errorCode, errorDescription, and optional errorDetails.

Message Correlation

Every OCPP message includes a messageId field. This ID is used to correlate requests with their responses:

  1. A CALL message is sent with a unique messageId
  2. The recipient responds with either a CALL_RESULT or CALL_ERROR using the same messageId

This allows you to match responses to their original requests when processing webhooks.

Station                          Lynkwell
   │                                │
   │  CALL (messageId: "abc123")    │
   │  Action: BootNotification      │
   │ ─────────────────────────────► │
   │                                │
   │  CALL_RESULT (messageId: "abc123")
   │ ◄───────────────────────────── │
   │                                │

Supported Protocols

The protocol field indicates which OCPP version the station is using:

  • ocpp1.6 - OCPP 1.6 (JSON)
  • ocpp2.0.1 - OCPP 2.0.1

Payload Structure

The data object in an ocpp.message webhook contains:

FieldTypeDescription
asset.idstringThe unique identifier of the charging station
connection.idstringThe unique identifier for this connection session
connection.protocolstringThe OCPP protocol version (ocpp1.6 or ocpp2.0.1)
logobjectThe OCPP message details (varies by message type)
timestampstringISO 8601 timestamp when the message was received

Examples

CALL - BootNotification (Station to Lynkwell)

When a charging station connects to the network, it sends a BootNotification to register itself:

{
  "id": "whevt_01JGXYZ123ABC456DEF789",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705315800000",
      "action": "BootNotification",
      "payload": "{\"chargePointVendor\":\"ExampleVendor\",\"chargePointModel\":\"Model X\",\"chargePointSerialNumber\":\"SN123456\",\"firmwareVersion\":\"1.0.0\"}"
    },
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

CALL_RESULT - BootNotification Response (Lynkwell to Station)

The response to a successful BootNotification:

{
  "id": "whevt_01JGXYZ123ABC456DEF790",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T10:30:00.100Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL_RESULT",
      "messageId": "1705315800000",
      "payload": "{\"status\":\"Accepted\",\"currentTime\":\"2024-01-15T10:30:00.100Z\",\"interval\":300}"
    },
    "timestamp": "2024-01-15T10:30:00.100Z"
  }
}

CALL - Heartbeat (Station to Lynkwell)

Stations send periodic Heartbeat messages to indicate they are still connected. The interval is determined by the interval field in the BootNotification response (e.g., every 300 seconds):

{
  "id": "whevt_01JGXYZ123ABC456DEF7A0",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T10:35:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705316100000",
      "action": "Heartbeat",
      "payload": "{}"
    },
    "timestamp": "2024-01-15T10:35:00.000Z"
  }
}

CALL_RESULT - Heartbeat Response (Lynkwell to Station)

The response contains the current server time, which stations use to synchronize their clocks:

{
  "id": "whevt_01JGXYZ123ABC456DEF7A1",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T10:35:00.050Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL_RESULT",
      "messageId": "1705316100000",
      "payload": "{\"currentTime\":\"2024-01-15T10:35:00.050Z\"}"
    },
    "timestamp": "2024-01-15T10:35:00.050Z"
  }
}

CALL - StartTransaction (Station to Lynkwell)

When a charging session begins:

{
  "id": "whevt_01JGXYZ123ABC456DEF791",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T11:00:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705317600000",
      "action": "StartTransaction",
      "payload": "{\"connectorId\":1,\"idTag\":\"RFID123456\",\"meterStart\":0,\"timestamp\":\"2024-01-15T11:00:00.000Z\"}"
    },
    "timestamp": "2024-01-15T11:00:00.000Z"
  }
}

CALL - MeterValues (Station to Lynkwell)

Periodic energy consumption updates during charging:

{
  "id": "whevt_01JGXYZ123ABC456DEF792",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T11:15:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705318500000",
      "action": "MeterValues",
      "payload": "{\"connectorId\":1,\"transactionId\":12345,\"meterValue\":[{\"timestamp\":\"2024-01-15T11:15:00.000Z\",\"sampledValue\":[{\"value\":\"7500\",\"unit\":\"Wh\",\"measurand\":\"Energy.Active.Import.Register\"}]}]}"
    },
    "timestamp": "2024-01-15T11:15:00.000Z"
  }
}

CALL - StatusNotification (Station to Lynkwell)

Stations send StatusNotification messages whenever a connector's status changes. The payload contains a status field indicating the connector state and an errorCode field for fault detection.

Connector Statuses (OCPP 1.6):

StatusDescription
AvailableConnector is available for a new session
PreparingConnector is preparing for a session (e.g., cable plugged in)
ChargingConnector is actively charging a vehicle
SuspendedEVCharging suspended by the vehicle
SuspendedEVSECharging suspended by the charger
FinishingSession is ending, connector will become available
ReservedConnector is reserved for a specific user
UnavailableConnector is not available (e.g., out of service)
FaultedConnector has encountered an error

Detecting Faults:

To detect faults, check both the status and errorCode fields in the payload:

  • If status is Faulted, the connector has an active fault
  • The errorCode field provides details about the fault type (e.g., GroundFailure, OverCurrentFailure, PowerMeterFailure)
  • When errorCode is NoError, the connector is operating normally

Example - Normal Status Change (Charging):

{
  "id": "whevt_01JGXYZ123ABC456DEF793",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T11:00:05.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705317605000",
      "action": "StatusNotification",
      "payload": "{\"connectorId\":1,\"status\":\"Charging\",\"errorCode\":\"NoError\",\"timestamp\":\"2024-01-15T11:00:05.000Z\"}"
    },
    "timestamp": "2024-01-15T11:00:05.000Z"
  }
}

Example - Faulted Connector:

{
  "id": "whevt_01JGXYZ123ABC456DEF7B0",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T14:22:30.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "1705329750000",
      "action": "StatusNotification",
      "payload": "{\"connectorId\":1,\"status\":\"Faulted\",\"errorCode\":\"GroundFailure\",\"info\":\"Ground fault detected on connector\",\"timestamp\":\"2024-01-15T14:22:30.000Z\"}"
    },
    "timestamp": "2024-01-15T14:22:30.000Z"
  }
}

Error Codes (OCPP 1.6):

Error CodeDescription
NoErrorNo error to report
ConnectorLockFailureFailure to lock or unlock connector
EVCommunicationErrorCommunication failure with the vehicle
GroundFailureGround fault circuit interrupter activated
HighTemperatureTemperature inside Charge Point too high
InternalErrorError in internal hard- or software
LocalListConflictConflict with LocalAuthorizationList
OtherErrorOther error (see vendorErrorCode)
OverCurrentFailureOver current protection device tripped
OverVoltageVoltage above acceptable level
PowerMeterFailureFailure to read power meter
PowerSwitchFailureFailure to control power switch
ReaderFailureFailure with idTag reader
ResetFailureUnable to perform a reset
UnderVoltageVoltage below acceptable level
WeakSignalWeak wireless signal

CALL - RemoteStartTransaction (Lynkwell to Station)

When you initiate a charging session remotely via the API:

{
  "id": "whevt_01JGXYZ123ABC456DEF794",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T12:00:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL",
      "messageId": "lynk_1705321200000",
      "action": "RemoteStartTransaction",
      "payload": "{\"connectorId\":1,\"idTag\":\"REMOTE_START_TOKEN\"}"
    },
    "timestamp": "2024-01-15T12:00:00.000Z"
  }
}

CALL_RESULT - RemoteStartTransaction Response

{
  "id": "whevt_01JGXYZ123ABC456DEF795",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T12:00:00.200Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL_RESULT",
      "messageId": "lynk_1705321200000",
      "payload": "{\"status\":\"Accepted\"}"
    },
    "timestamp": "2024-01-15T12:00:00.200Z"
  }
}

CALL_ERROR - Request Rejected

When a station cannot process a request:

{
  "id": "whevt_01JGXYZ123ABC456DEF796",
  "type": "ocpp.message",
  "createdAt": "2024-01-15T12:05:00.000Z",
  "data": {
    "asset": {
      "id": "ast_01ABC123XYZ"
    },
    "connection": {
      "id": "conn_01DEF456UVW",
      "protocol": "ocpp1.6"
    },
    "log": {
      "messageType": "CALL_ERROR",
      "messageId": "lynk_1705321500000",
      "errorCode": "NotSupported",
      "errorDescription": "Requested action is not supported by this charge point",
      "errorDetails": "{}"
    },
    "timestamp": "2024-01-15T12:05:00.000Z"
  }
}

Common Error Codes

When processing CALL_ERROR messages, you may encounter these error codes:

Error CodeDescription
NotImplementedThe requested action is not implemented
NotSupportedThe requested action is not supported
InternalErrorAn internal error occurred
ProtocolErrorA protocol error occurred
SecurityErrorA security error occurred
FormationViolationThe payload is malformed
PropertyConstraintViolationA property constraint was violated
OccurenceConstraintViolationAn occurrence constraint was violated
TypeConstraintViolationA type constraint was violated
GenericErrorA generic error occurred

asset.connectivity

The asset.connectivity event is triggered when a charging station's connection status changes. This allows you to monitor the online/offline status of your charging infrastructure in real-time.

Connectivity Statuses

The connectivityStatus field indicates what happened:

StatusDescription
CONNECTEDThe station has established a WebSocket connection to the OCPP server
DISCONNECTEDThe station has disconnected from the OCPP server

Connection Lifecycle

Station                          Lynkwell
   │                                │
   │  WebSocket Connect             │
   │ ─────────────────────────────► │
   │                                │  ← CONNECTED event
   │                                │
   │         ... normal operation ...
   │                                │
   │  WebSocket Disconnect          │
   │ ────────────────────────────X  │
   │                                │  ← DISCONNECTED event

Payload Structure

The data object in an asset.connectivity webhook contains:

FieldTypeDescription
assetIdstringThe unique identifier of the charging station
timestampstringISO 8601 timestamp when the event occurred
ocppServerVersionstringThe OCPP server version handling this connection (V1 or V2)
connectivityStatusstringThe connectivity event type: CONNECTED or DISCONNECTED

Examples

Station Connected

When a station first establishes a connection:

{
  "id": "whevt_01JGXYZ123ABC456DEF800",
  "type": "asset.connectivity",
  "createdAt": "2024-01-15T10:29:58.000Z",
  "data": {
    "assetId": "ast_01ABC123XYZ",
    "timestamp": "2024-01-15T10:29:58.000Z",
    "ocppServerVersion": "V1",
    "connectivityStatus": "CONNECTED"
  }
}

Station Disconnected

When a station loses connection:

{
  "id": "whevt_01JGXYZ123ABC456DEF802",
  "type": "asset.connectivity",
  "createdAt": "2024-01-15T18:45:30.000Z",
  "data": {
    "assetId": "ast_01ABC123XYZ",
    "timestamp": "2024-01-15T18:45:30.000Z",
    "ocppServerVersion": "V1",
    "connectivityStatus": "DISCONNECTED"
  }
}

Use Cases

Common use cases for asset.connectivity events:

  • Monitoring dashboards - Display real-time station status
  • Alerting - Notify operators when stations go offline
  • Analytics - Track station uptime and reliability metrics
  • Automated diagnostics - Trigger health checks when stations reconnect

Was this page helpful?