Async Python library for Phoenix Contact CHARX SEC EV charging controllers via Modbus/TCP
Project description
aiophoenixcontactcharx
Async Python library for Phoenix Contact CHARX SEC EV AC charging controllers (firmware 1.9.0+).
Communicates over Modbus/TCP (port 502). Supports the full CHARX SEC-3xxx family (SEC-3000, SEC-3050, SEC-3100, SEC-3150) with up to 12 charging points per controller group.
Installation
pip install aiophoenixcontactcharx
Requires Python 3.11+ and pymodbus ≥ 3.6.
Development
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/
Quick start
import asyncio
from aiophoenixcontactcharx import CharxClient
async def main():
async with CharxClient("192.168.1.100") as client:
data = await client.fetch_data(num_charging_points=1)
info = data.device_info
print(f"Device: {info.designation} — SW {info.software_version}")
print(f"IP ETH0: {info.ip_eth0}")
print(f"Group power: {info.group_active_power_w:.1f} W")
cp = data.charging_points[0]
print(f"CP1 status: {cp.status.vehicle_status}")
print(f"CP1 power: {cp.status.active_power_w:.1f} W")
print(f"CP1 energy: {cp.status.energy_active_kwh:.3f} kWh")
asyncio.run(main())
Writing control values
async with CharxClient("192.168.1.100") as client:
# Charging point must be in Modbus release mode (configured in WBM)
await client.set_charging_release(charging_point=1, enabled=True)
await client.set_max_current(charging_point=1, current_a=11)
await client.set_availability(charging_point=1, available=True)
# Load management
await client.set_dynamic_max_current(current_a=32)
Register map
See aiophoenixcontactcharx/registers.py for all addresses. Full documentation is in the Phoenix Contact manual UM EN CHARX SEC, Revision 08, Appendix B3 (p. 167–174).
Modbus prerequisites
Before the client can read or write data:
- Enable the Modbus server in WBM → System Control → Status.
- Open TCP port 502 in WBM → Network → Port Sharing.
- Set the charging point release mode to Modbus (WBM → Charging Stations → Charge Point → Configuration → Release Mode) if you want to use
set_charging_release()orset_availability().
Supported CHARX models
| Model | Modbus/TCP |
|---|---|
| CHARX SEC-3000 | ✓ |
| CHARX SEC-3050 | ✓ |
| CHARX SEC-3100 | ✓ |
| CHARX SEC-3150 | ✓ |
The CHARX SEC-1000 has no Ethernet and must be attached to a SEC-3xxx as a backplane extension. Its data is accessible via the SEC-3xxx Modbus interface at the corresponding charging point registers.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiophoenixcontactcharx-0.1.0.tar.gz.
File metadata
- Download URL: aiophoenixcontactcharx-0.1.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16fdff04fa9c0fd8a9005db3af27f9e2313b88adf69280776fcaf5d03d32fc28
|
|
| MD5 |
650ea7d4fe19b6db8d6427c622983690
|
|
| BLAKE2b-256 |
fcbbc4839126b95c91762316668c2120e1fde4c754c409960962e5c59f822aa9
|
File details
Details for the file aiophoenixcontactcharx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aiophoenixcontactcharx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1a2c37054c25dbf70b3e0c2ff5c7745e8ee9d6ea5906e2a5732326e93672bf
|
|
| MD5 |
376692b30accf672c9e09b338e9b2c1a
|
|
| BLAKE2b-256 |
ababab34f4bdfabad9403dc9c5c3070a7b515f864dc21750e8bf1b221be3c279
|