Skip to content

Commit 4e96a23

Browse files
authored
Merge branch 'master' into validation
2 parents eeccb50 + 71c5adb commit 4e96a23

File tree

174 files changed

+5840
-9196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+5840
-9196
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @OrangeTux @tropxy
1+
* @mdwcrft @proelke

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@master
1313
- name: Set up Python 3.10
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: '3.10'
1717

.github/workflows/pull-request.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ jobs:
1111
strategy:
1212
matrix:
1313
version:
14-
- "3.7"
1514
- "3.8"
1615
- "3.9"
1716
- "3.10"
17+
- "3.11"
18+
- "3.12"
1819
steps:
1920
- uses: actions/checkout@master
2021
- name: Set up Python ${{ matrix.version }}
21-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2223
with:
2324
python-version: ${{ matrix.version }}
2425

.readthedocs.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-lts-latest
10+
tools:
11+
python: "3.12"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/source/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
# python:
34+
# install:
35+
# - requirements: docs/requirements.txt

CHANGELOG.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,115 @@
11
# Change log
22

33
- [#506](https://github.com/mobilityhouse/ocpp/issues/506) Reduce use of NotSupportedError in favor of ValidationError when validating payload. Thanks [@drc38](@https://github.com/drc38).
4+
5+
## 2.0.0-rc.2 (2024-06-18)
6+
7+
- [#315](https://github.com/mobilityhouse/ocpp/pull/315) Allow to skip schema validation in `ChargePoint.call()`. Thanks [@esiebert](https://github.com/esiebert)!
8+
9+
## 2.0.0-rc.1 (2024-06-01)
10+
11+
## BREAKING ##
12+
- [#642](https://github.com/mobilityhouse/ocpp/pull/642) Fix serializing of "ocpp_csms_url".
13+
14+
## 2.0.0-rc.0 (2024-05-22)
15+
16+
- [#631](https://github.com/mobilityhouse/ocpp/pull/631) Fix publishing to Pypi.
17+
18+
## BREAKING ##
19+
- [#573](https://github.com/mobilityhouse/ocpp/issues/635) Fix serialization of types that contain a collection of items.
20+
21+
## 1.0.0 (2024-04-05)
22+
23+
- [#573](https://github.com/mobilityhouse/ocpp/issues/573) Introduce Experimental Module For v2.1
24+
- [#547](https://github.com/mobilityhouse/ocpp/pull/547) Feat: Handle recursively serializing a dataclasses as a dictionary Thanks [@MacDue](https://github.com/MacDue)
25+
- [#601](https://github.com/mobilityhouse/ocpp/issues/601) Fix case conversion for soc in non "State of Charge" context
26+
- [#523](https://github.com/mobilityhouse/ocpp/issues/523) The serialisation of soc to SoC should not occur in camel case if it is existing at the beginning of a field
27+
- [#515](https://github.com/mobilityhouse/ocpp/issues/515) Update Readthedocs configuration
28+
- [#602](https://github.com/mobilityhouse/ocpp/issues/602) Correct v2g serialisation/deserialisation
29+
- [#557](https://github.com/mobilityhouse/ocpp/issues/557) OCPP 2.0.1 Wrong data type in CostUpdated total_cost
30+
- [#564](https://github.com/mobilityhouse/ocpp/issues/564) Add support For Python 3.11 and 3.12
31+
- [#583](https://github.com/mobilityhouse/ocpp/issues/583) OCPP v1.6/v2.0.1 deprecate dataclasses from calls and call results with the suffix 'Payload'
32+
- [#590](https://github.com/mobilityhouse/ocpp/pull/336) snake_to_camel_case url to URL does not get converted correctly
33+
- [#591](https://github.com/mobilityhouse/ocpp/issues/591) Camel_to_snake_case doesn't handle v2x correctly
34+
- [#593](https://github.com/mobilityhouse/ocpp/issues/593) Update tests to use Call and CallResult without the suffix Payload
35+
- [#435](https://github.com/mobilityhouse/ocpp/issues/435) Typo in CostUpdated Action
36+
- [#577](https://github.com/mobilityhouse/ocpp/issues/577) v2.0.1 AttributeType Enum Corrections
37+
- [#340](https://github.com/mobilityhouse/ocpp/issues/340) 2.0.1 dataclasses have a incorrect types that don't match carnality
38+
- [#519](https://github.com/mobilityhouse/ocpp/issues/519) Typo in v201.enums.StatusInfoReasonType.invaild_schedule
39+
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics
40+
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction
41+
- [#613](https://github.com/mobilityhouse/ocpp/issues/613) Typo correction in v201.enums.StatusInfoReasonType.value_too_hight -> value_too_high
42+
- [#622](https://github.com/mobilityhouse/ocpp/issues/622) Fix typo in OCPP 2.0.1 enum Action.cost_updated
43+
44+
## 1.0.0-rc.1 (2024-02-14)
45+
46+
- [#573](https://github.com/mobilityhouse/ocpp/issues/573) Introduce Experimental Module For v2.1
47+
- [#547](https://github.com/mobilityhouse/ocpp/pull/547) Feat: Handle recursively serializing a dataclasses as a dictionary Thanks [@MacDue](https://github.com/MacDue)
48+
- [#601](https://github.com/mobilityhouse/ocpp/issues/601) Fix case conversion for soc in non "State of Charge" context
49+
- [#523](https://github.com/mobilityhouse/ocpp/issues/523) The serialisation of soc to SoC should not occur in camel case if it is existing at the beginning of a field
50+
- [#515](https://github.com/mobilityhouse/ocpp/issues/515) Update Readthedocs configuration
51+
- [#602](https://github.com/mobilityhouse/ocpp/issues/602) Correct v2g serialisation/deserialisation
52+
- [#557](https://github.com/mobilityhouse/ocpp/issues/557) OCPP 2.0.1 Wrong data type in CostUpdated total_cost
53+
- [#564](https://github.com/mobilityhouse/ocpp/issues/564) Add support For Python 3.11 and 3.12
54+
- [#583](https://github.com/mobilityhouse/ocpp/issues/583) OCPP v1.6/v2.0.1 deprecate dataclasses from calls and call results with the suffix 'Payload'
55+
- [#590](https://github.com/mobilityhouse/ocpp/pull/336) snake_to_camel_case url to URL does not get converted correctly
56+
- [#591](https://github.com/mobilityhouse/ocpp/issues/591) Camel_to_snake_case doesn't handle v2x correctly
57+
- [#593](https://github.com/mobilityhouse/ocpp/issues/593) Update tests to use Call and CallResult without the suffix Payload
58+
- [#435](https://github.com/mobilityhouse/ocpp/issues/435) Typo in CostUpdated Action
59+
- [#577](https://github.com/mobilityhouse/ocpp/issues/577) v2.0.1 AttributeType Enum Corrections
60+
- [#340](https://github.com/mobilityhouse/ocpp/issues/340) 2.0.1 dataclasses have a incorrect types that don't match carnality
61+
- [#519](https://github.com/mobilityhouse/ocpp/issues/519) Typo in v201.enums.StatusInfoReasonType.invaild_schedule
462
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics
563
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction
664

65+
## DEPRECATED ##
66+
- [#599](https://github.com/mobilityhouse/ocpp/issues/599) v1.6 Action Enum members corrected IMPORTANT SEE UPGRADE PATH [#599](https://github.com/mobilityhouse/ocpp/issues/599)
67+
- [#579](https://github.com/mobilityhouse/ocpp/issues/579) v2.0.1 Action enums corrected - IMPORTANT SEE UPGRADE PATH [#579](https://github.com/mobilityhouse/ocpp/issues/579)
68+
69+
## BREAKING ##
70+
- [#574](https://github.com/mobilityhouse/ocpp/issues/574) Remove v1.6 deprecated enum members - IMPORTANT see upgrade path [#574](https://github.com/mobilityhouse/ocpp/issues/574)
71+
- [#498](https://github.com/mobilityhouse/ocpp/issues/498) Remove support for OCPP 2.0 - IMPORTANT SEE UPGRADE PATH [#498](https://github.com/mobilityhouse/ocpp/issues/498)
72+
73+
## 0.26.0 (2024-01-17)
74+
75+
- [#544](https://github.com/mobilityhouse/ocpp/issues/544) ocpp/charge_point.py - Pass `Call.unique_id` to the `on` and `after` routing handlers.
76+
- [#559](https://github.com/mobilityhouse/ocpp/issues/559) Update project dependencies as of 22-12-2023
77+
- [#447](https://github.com/mobilityhouse/ocpp/issues/447) v16, v201 - Make formatting of enums in py3.11 consistent with earlier Python versions
78+
- [#421](https://github.com/mobilityhouse/ocpp/issues/421) Type of v16.datatypes.SampledValue.context is incorrect
79+
80+
## 0.25.0 (2024-01-08)
81+
82+
- [#366](https://github.com/mobilityhouse/ocpp/issues/366) Fix type hint of OCPP 1.6 ChangeConfiguration.value
83+
- [#431](https://github.com/mobilityhouse/ocpp/issues/431) Attributes with 'v2x' are serialized as 'V2x', but should be serialized as 'V2X'
84+
- [#554](https://github.com/mobilityhouse/ocpp/issues/554) OCPP 2.0.1 Edition 2 Errata 2023-12 document added
85+
- [#548](https://github.com/mobilityhouse/ocpp/issues/548) OCPP 2.0.1 MessageInfoType attribute name correction
86+
- [#300](https://github.com/mobilityhouse/ocpp/issues/300) OCPP 2.0.1 add reference components and variables
87+
- [#518](https://github.com/mobilityhouse/ocpp/issues/518) OCPP 2.0.1 add additional reason codes from v1.3
88+
89+
## 0.24.0 (2023-12-07)
90+
91+
92+
- [#539](https://github.com/mobilityhouse/ocpp/issues/539) feat: Add ChargePoint._handle_call return value. Thanks [@wafa-yah](https://github.com/wafa-yah)
93+
- [#266](https://github.com/mobilityhouse/ocpp/issues/266) fix: Central System documentation link.
94+
- [#516](https://github.com/mobilityhouse/ocpp/issues/516) OCPP 2.0.1 add additional security events from v1.3.
95+
- [#537](https://github.com/mobilityhouse/ocpp/pull/537) Fix DataTransfer data types. Thanks [@mdwcrft](https://github.com/mdwcrft)
96+
97+
## 0.23.0 (2023-11-30)
98+
99+
- [#531] Feat: Add 1.6 security extension datatypes. Thanks [@proelke](https://github.com/proelke)
100+
- [#528](https://github.com/mobilityhouse/ocpp/issues/528) v2.0.1 CertificateHashDataChainType childCertificateHashData requires the default of None.
101+
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics.
102+
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction.
103+
- [#511](https://github.com/mobilityhouse/ocpp/issues/511) 2.0.1 Units of Measure update to match Appendix 2. Standardized Units Of Measure
7104

8105
## 0.22.0 (2023-11-03)
9106

10107
- [#493](https://github.com/mobilityhouse/ocpp/issues/493) Reduce use of NotSupportedError in favor of NotImplementedError. Thanks [@drc38](@https://github.com/drc38).
11108
- [#278](https://github.com/mobilityhouse/ocpp/pull/278) Fix types for attributes of OCPP 1.6's type `IdTagInfo`. Thanks [@chan-vince](https://github.com/chan-vince)
12109
- [#504](https://github.com/mobilityhouse/ocpp/pull/504) Add missing tech_info attribute to v2.0.1 EventDataType. Thanks [@LokiHokie](https://github.com/LokiHokie)
13110
- [#381](https://github.com/mobilityhouse/ocpp/issues/381) Add FormationError and OccurrenceConstraintViolationError.
111+
- [#373](https://github.com/mobilityhouse/ocpp/issues/373) v201.datatypes.ChargingNeedsType.request_energy_transfer is mistyped
112+
- [#207](https://github.com/mobilityhouse/ocpp/issues/207) v16/schemas/StopTransaction.json missing "Hertz"
14113

15114
## 0.21.0 (2023-10-19)
16115

README.rst

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ OCPP
1111
----
1212

1313
Python package implementing the JSON version of the Open Charge Point Protocol
14-
(OCPP). Currently OCPP 1.6 (errata v4), OCPP 2.0 and OCPP 2.0.1 (Final Version)
14+
(OCPP). Currently OCPP 1.6 (errata v4), OCPP 2.0.1 (Edition 2 FINAL, 2022-12-15)
1515
are supported.
1616

1717
You can find the documentation on `rtd`_.
1818

19+
The purpose of this library is to provide the building blocks to construct a
20+
charging station/charge point and/or charging station management system
21+
(CSMS)/central system. The library does not provide a completed solution, as any
22+
implementation is specific for its intended use. The documents in this library
23+
should be inspected, as these documents provided guidance on how best to
24+
build a complete solution.
25+
26+
Note: "OCPP 2.0.1 contains fixes for all the known issues, to date, not only
27+
the fixes to the messages. This version replaces OCPP 2.0. OCA advises
28+
implementers of OCPP to no longer implement OCPP 2.0 and only use version
29+
2.0.1 going forward."
30+
1931
Installation
2032
------------
2133

@@ -34,8 +46,9 @@ Or clone the project and install it manually using:
3446
Quick start
3547
-----------
3648

37-
Below you can find examples on how to create a simple OCPP 2.0 central system as
38-
well as an OCPP 2.0 charge point.
49+
Below you can find examples on how to create a simple OCPP 1.6 or 2.0.1 Central
50+
System/CSMS as well as the respective OCPP 1.6 or 2.0.1
51+
Charging Station/Charge Point.
3952

4053
.. note::
4154

@@ -45,12 +58,12 @@ well as an OCPP 2.0 charge point.
4558
4659
$ pip install websockets
4760
48-
Central system
49-
~~~~~~~~~~~~~~
61+
Charging Station Management System (CSMS) / Central System
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5063

51-
The code snippet below creates a simple OCPP 2.0 central system which is able
52-
to handle BootNotification calls. You can find a detailed explanation of the
53-
code in the `Central System documentation_`.
64+
The code snippet below creates a simple OCPP 2.0.1 CSMS which
65+
is able to handle BootNotification calls. You can find a detailed explanation of the
66+
code in the `Central System documentation`_.
5467

5568

5669
.. code-block:: python
@@ -121,8 +134,8 @@ code in the `Central System documentation_`.
121134
if __name__ == '__main__':
122135
asyncio.run(main())
123136
124-
Charge point
125-
~~~~~~~~~~~~
137+
Charging Station / Charge point
138+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126139

127140
.. code-block:: python
128141

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
# -- Project information -----------------------------------------------------
2020

2121
project = "OCPP"
22-
copyright = "2023, Auke Willem Oosterhoff"
22+
copyright = "2024, Auke Willem Oosterhoff"
2323
author = "Auke Willem Oosterhoff"
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "0.22.0"
26+
release = "2.0.0-rc.2"
2727

2828

2929
# -- General configuration ---------------------------------------------------
-292 KB
Binary file not shown.
1.9 MB
Binary file not shown.

examples/v20/central_system.py

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)