Skip to content

Conversation

@MaheshSuthar119
Copy link

Summary

This PR introduces several enhancements to the OCPP 2.0.1 implementation by adding
server-side handlers in central_system.py and new client-side request functions
in charge_point.py. Additionally, a Dockerfile has been added to simplify deployment
and testing.


🚀 New Features Added

✅ Server (Central System)

Implemented new OCPP message handlers:

  • CancelReservation
  • StatusNotification
  • SecurityEventNotification
  • Authorize
  • MeterValues
  • ReportChargingProfiles

These handlers return appropriate call_result.* responses and include basic logging.


✅ Charge Point (Client)

Added new asynchronous methods to simulate Charge Point messages:

  • send_boot_notification()
  • send_heartbeat()
  • send_cancel_reservation()
  • send_status_notification()
  • send_security_event_notification()
  • send_meter_values()
  • send_authorization()

These functions generate valid OCPP 2.0.1 requests and send them to the central system.

Also added:

  • SampledValue and MeterValue dataclasses
  • Utility method get_current_time()

🐳 Docker Support

Added a Dockerfile to run the server or charge point in a containerized environment.


📌 Motivation

This contribution enhances the OCPP 2.0.1 example implementation, making it easier to:

  • Simulate a realistic EV charging ecosystem
  • Test message flows between CSMS and EVSE
  • Help developers understand how individual OCPP messages behave

✔️ Tests

Tested locally by:

  • Running the central system WebSocket server
  • Connecting the ChargePoint client
  • Verifying logs for all new request/response flows

🙏 Notes

I am open to feedback and happy to make improvements if requested.

@MaheshSuthar119
Copy link
Author

MaheshSuthar119 commented Nov 22, 2025

Hi @proelke and @mdwcrft,
I hope you're doing well.
Please let me know if I need to make any changes or improvements.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant