Next Generation Python bindings for libiec61850, packaged as a Python wheel.
This repository provides Python bindings for the libiec61850 library, which is an open-source implementation of the IEC 61850 standard for communication networks and systems in substations.
pip install pyiec61850-ngpip install pyiec61850-ng --find-links https://github.com/f0rw4rd/pyiec61850-ng/releases/latest/download/pip install git+https://github.com/f0rw4rd/pyiec61850-ng.gitpip install pyiec61850-ng-*.whlimport pyiec61850.pyiec61850 as pyiec61850
# Create and connect to an IEC 61850 server
connection = pyiec61850.IedConnection_create()
error = pyiec61850.IedConnection_connect(connection, "192.168.1.100", 102)
if error == pyiec61850.IED_ERROR_OK:
print("Connected successfully!")
# Perform operations...
pyiec61850.IedConnection_close(connection)
pyiec61850.IedConnection_destroy(connection)For comprehensive examples, see the examples directory:
- Basic Connection - Connect to an IEC 61850 server
- Device Discovery - Discover logical devices, nodes, and data objects
- Reading Data - Read values from data objects
- File Transfer - Download files using MMS file services
Run examples:
python examples/01_basic_connection.py 192.168.1.100
python examples/02_device_discovery.py 192.168.1.100The wheel package is built using Docker:
docker build -t pyiec61850-builder --build-arg LIBIEC61850_VERSION=v1.6 .To extract the wheel file:
mkdir -p ./dist
docker create --name wheel-container pyiec61850-builder
docker cp wheel-container:/wheels/. ./dist/
docker rm wheel-containerThis package uses the format: LIBIEC61850_VERSION.REVISION
- Example:
1.6.0.1= libiec61850 v1.6.0, first package revision - 1.6.0: The exact libiec61850 version included (static)
- .1: Package revision for bug fixes, rebuilds, binding improvements
This clearly shows which libiec61850 version you're getting and our package iteration.
Check current version:
python version.py # Package version: 1.6.0.1
python version.py --libiec61850 # libiec61850 version: v1.6.0