Skip to main content

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:

  1. Enable the Modbus server in WBM → System Control → Status.
  2. Open TCP port 502 in WBM → Network → Port Sharing.
  3. Set the charging point release mode to Modbus (WBM → Charging Stations → Charge Point → Configuration → Release Mode) if you want to use set_charging_release() or set_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

aiophoenixcontactcharx-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiophoenixcontactcharx-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file aiophoenixcontactcharx-0.1.1.tar.gz.

File metadata

  • Download URL: aiophoenixcontactcharx-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiophoenixcontactcharx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca0ede7371dcc7ba0ac0bfd06823cce10c1f01c44e8d72cfcf979ecbc52dfc6e
MD5 cd013afc3971322316e0e8c0558561d1
BLAKE2b-256 5355b852b4653121bcc5a9b672f35ef688f8a01a624c94872c57de893e56e551

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiophoenixcontactcharx-0.1.1.tar.gz:

Publisher: release.yaml on klconsultancy/aiophoenixcontactcharx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiophoenixcontactcharx-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aiophoenixcontactcharx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3bcbf1830e25cbd4062a06639218f37b6ad06573b8a16c3aeee9e44727278d0
MD5 c8b71205476dab7e565748f7b3dd0d5f
BLAKE2b-256 9e71c7ddcf614dba54531e088e30decd9568832586ce612cdf817c23f0bfcf88

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiophoenixcontactcharx-0.1.1-py3-none-any.whl:

Publisher: release.yaml on klconsultancy/aiophoenixcontactcharx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page