Trending

World technology news

→
A ChargePoint electric vehicle charging station
The Mobility House (PyPI)In-depth report

OCPP Python 2.2.0 adds an OCPP 2.1 interface for electric vehicle charging

The stable PyPI release includes a Python module for version 2.1 of the protocol used by charging stations and central systems.

·The Mobility House (PyPI)
Reading progress0%

Package version 2.2.0 and protocol version 2.1

The Mobility House’s open-source ocpp package reached PyPI as stable version 2.2.0 on November 28. The independently operated piwheels index recorded the same release at 18:59:53 UTC. The Python package and the charging protocol have separate numbering schemes. The previous stable package, numbered 2.1.0, listed protocol versions 1.6 and 2.0.1. The new release adds OCPP 2.1. Inspecting the distributed wheel found a v21 module with message classes, data types and enumerations. Those files give developers an interface for the protocol. The package announcement provides no deployment count for charging stations.

The connection between a station and its controller

The Open Charge Alliance describes OCPP as the protocol through which a charging station and its management system communicate. An application can support the new module while keeping separate paths for existing stations that use earlier versions. A message that can be constructed in Python may still require a capability that the hardware, firmware or central system does not provide. A compatibility matrix can put the Python version, package version, protocol version and device capabilities in separate fields. That helps testers see which layer accounts for a change in behavior.

Test one capability at a time

The Open Charge Alliance describes bidirectional energy transfer among the additions in OCPP 2.1. An installation also needs compatible hardware, firmware and operating rules to use that capability. A team can first verify basic communication in an environment designed for testing. It can then pick one feature and compare the actual messages and responses with the feature’s documented requirements. A successful message-level exercise leaves electrical performance, billing and operational controls to their own testing. The release establishes that a Python module is distributed for the protocol.

Preserve coverage for older installations

An operator may still have stations using OCPP 1.6 or 2.0.1. Keep regression cases for their current message and error behavior when preparing a software update. Different protocol versions can express similar station states with different fields. If the application normalizes those values, test missing values and unexpected responses as well as the expected path. The PyPI metadata requires Python 3.11 or later. Recording the interpreter and package environment helps establish whether a regression came from the runtime, the application or the protocol implementation.

What was verified in the release files

PyPI lists both a source archive and a wheel for this release. The new module was verified in the distributed wheel, and the release time was checked against piwheels and deps.dev. Establishing charging behavior in a real installation would require separate tests with its station and control software. A repeatable fixture can capture a known request, its expected response and the protocol version negotiated by the two sides. Keeping that record across upgrades helps distinguish work completed in the library from the behavior of an actual charging network.

Archive photo · Oleg Yunakov / Wikimedia Commons ↗ · CC BY-SA 4.0 · Illustrative archive photograph of charging hardware. Use of this Python package at the pictured station was not established. Resized for WebP.

Sources and verification
Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

Which alternative architecture would you try for the same problem?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.