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-1.0.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

aiophoenixcontactcharx-1.0.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiophoenixcontactcharx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0c3d107e4a0969a87bf462ca25d338f53d21e0870ad3b3d54553f5882f4d1f84
MD5 2d47d395e4d4b01a0699dcaca3a147da
BLAKE2b-256 9b990c5f2562575dc699765d2c97a08c985d5f335fe91a3ca420c909b21ac11b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiophoenixcontactcharx-1.0.0.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-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aiophoenixcontactcharx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8863415a9752a0376d6ed5345d99958e241ea4434020f8e1301b96df5e129b5
MD5 dfc801837b3c0190f956fd9120fac0a9
BLAKE2b-256 931adb0411ae17844e902ddc372c927b7cf10023c442fe84f2937d46e7427c76

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiophoenixcontactcharx-1.0.0-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