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.3.tar.gz (15.3 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.3-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiophoenixcontactcharx-0.1.3.tar.gz
  • Upload date:
  • Size: 15.3 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.3.tar.gz
Algorithm Hash digest
SHA256 6e9ea2a3698e09cdcae3ca725944d01c76bec07fc5433aea3cdd3503a64cd205
MD5 226b8085b2c8cee389373e06caba43c0
BLAKE2b-256 16d1db6a648e663d904a5b41d692026d68da9b117ed4c9356477a614266e703b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for aiophoenixcontactcharx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d4bd48a228b4a3e40704b5bc5050fe1578e3a9258f7120b6c79251c30a0f21c
MD5 0445505e652ea33f002263545578dba2
BLAKE2b-256 59a3b7ead4f1cedf890a3bd5729d0b25ee254e5b847295ae859955fd8ccf600f

See more details on using hashes here.

Provenance

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