scietex.hal.vfd
The scietex.hal.vfd package is a Python library for interfacing with variable
frequency drives (VFD). It defines a transport-agnostic driver contract
(VFDProtocol) plus the data structures and capability model shared by every
driver, and ships concrete implementations for three drive families.
A driver reaches a drive over one of two transports:
- Direct RS485 — the driver owns the serial port and speaks Modbus RTU to
the drive itself (
scietex.hal.vfd.base.rs485.VFD). - Scietex Modbus gateway — the gateway owns the RS485 bus, and the driver
speaks Modbus/TCP to a gateway device entry that routes to the drive by unit
id (
scietex.hal.vfd.intek.spe_b.client.IntekSPEBModbusVFD).
Features
VFDProtocol, a runtime-checkable contract: connect, disconnect, read parameters, read state, read and reset faults, start, stop and set the frequency setpoint.VFDCapabilities, which advertises optional control surface (direction, jog, freewheel stop, fault reset, frequency setpoint) so a caller can reject an unsupported command before dispatching it.VFDParameters, which reports frequency in both Hz and percent of the configured maximum, plus output current, voltage and power, and the optional DC bus voltage and temperatures a drive exposes. An optional field isNonewhen the drive does not report it, which is distinct from a reported0.0.- Implemented drive models, each with both transports:
Intek SPE-B— direct RS485 (SPEvB) and gateway (IntekSPEBModbusVFD).Vesper E5-8200— direct RS485 (VesperE58200) and gateway (VesperE58200ModbusVFD).Vesper E4-8400/E4-P8402— direct RS485 (VesperE48400) and gateway (VesperE48400ModbusVFD).
- Driver descriptors for the gateway (
scietex.modbus.driversentry-point group) and driver classes for a service (scietex.hal.vfd.driversgroup).
What each drive reports
| Field | Intek SPE-B | Vesper E5-8200 | Vesper E4-8400 |
|---|---|---|---|
frequency_hz |
yes¹ | yes | yes |
frequency_percent |
yes | yes | yes |
output_current |
yes | yes | yes |
output_voltage |
yes | yes | yes |
output_power |
yes | no (0.0) |
no (0.0) |
dc_bus_voltage |
yes | yes | yes |
heatsink_temperature_c |
no (None) |
no (None) |
yes |
motor_temperature_c |
no (None) |
no (None) |
no (None) |
Only the E4-8400 exposes a live temperature reading (004Dh, U1-46). The other
two report overheat only as a fault code, and a fault is not a temperature.
¹ The SPE-B reports the operating frequency only as a percentage of P0.10, so
frequency_hz is None until P0.10 has been read. A drive that refuses
P0.10 still reports frequency_percent, current, voltage and power; the
connection stays usable and only the Hz field degrades. set_frequency is
refused in that state, because no percentage can be computed.
Installation
Install the package via pip (assuming it's published to PyPI):
pip install scietex.hal.vfd
Alternatively, clone the repository and install locally:
git clone https://github.com/bond-anton/scietex.hal.vfd.git
cd scietex.hal.vfd
pip install .
Requirements
- Python 3.10 or higher.
scietex.hal.serial2.4 or newer (RS485 transport and Modbus gateway descriptors).pymodbus3.15 or newer (Modbus/TCP client for the gateway transport).
Usage
Every driver implements VFDProtocol: connect, close, read_data,
read_parameters, read_state, read_error_code, clear_error, start,
stop and set_frequency. Check driver.capabilities before issuing an
optional command.
Direct RS485 with the Intek SPE-B VFD:
import asyncio
from scietex.hal.serial import ModbusSerialConnectionConfig
from scietex.hal.vfd.intek import SPEvB
async def main(serial_conf: ModbusSerialConnectionConfig):
"""Main function."""
vfd = SPEvB(serial_conf, address=1, label="Intek VFD")
data = await vfd.read_data()
print(data)
if __name__ == "__main__":
serial_configuration = ModbusSerialConnectionConfig(
port="/dev/serial0", baudrate=19200
)
asyncio.run(main(serial_configuration))
The same drive behind the Scietex Modbus gateway:
import asyncio
from scietex.hal.vfd.intek import IntekSPEBModbusVFD
async def main():
"""Main function."""
vfd = IntekSPEBModbusVFD("gateway.local", port=502, unit_id=1)
await vfd.connect()
try:
print(await vfd.read_data())
print(await vfd.read_error_code())
finally:
await vfd.close()
if __name__ == "__main__":
asyncio.run(main())
A Vesper drive behind the gateway works the same way:
from scietex.hal.vfd.vesper import VesperE48400ModbusVFD
vfd = VesperE48400ModbusVFD("gateway.local", port=502, unit_id=1)
set_frequency takes Hz, not percent: the caller works in engineering units and
each driver converts with its own maximum-frequency parameter. The E5-8200's
communication manual names no maximum-frequency parameter, so its driver takes
max_frequency_hz from the constructor (default 50.0, the factory base
frequency); a caller whose drive runs a different maximum must pass it, or
frequency_percent will be wrong.
A drive that has never been configured for the gateway answers neither transport. See the per-family references for the register maps, the fault tables and the settings the gateway requires:
intek/docs/protocol.md— Intek SPE-B (Pd.01/Pd.05/Pd.02).vesper/docs/README.md— Vesper E5-8200 and E4-8400, plus the transport facts both manuals share.
Contributing
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m "Add your message"). - Push to the branch (
git push origin feature/YourFeature). - Open a Pull Request.
Run the checks before opening a pull request:
tox -e format,lint,type,test
format and lint run ruff, type runs ty, and test runs pytest across
Python 3.10, 3.12 and 3.14.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for scietex.hal.vfd 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scietex_hal_vfd-2.0.2.tar.gz | 50.2 kB | With provenance | Details for scietex_hal_vfd-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scietex_hal_vfd-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for scietex_hal_vfd-2.0.2-py3-none-any.whl |
Total release size: 104.5 kB
Release files / scietex_hal_vfd-2.0.2.tar.gz
| Download URL | scietex_hal_vfd-2.0.2.tar.gz |
|---|---|
| Size | 50.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
632e5968eb6bad9e04cfd303ba4cd7dc5ec3927b4823796d971846cd7da3db1c
|
|
BLAKE2b-256 checksum How to use checksums |
a92a02caaa6395abca69fd206263b9b9f9104e9404697e7f16125209350489b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / scietex_hal_vfd-2.0.2-py3-none-any.whl
| Download URL | scietex_hal_vfd-2.0.2-py3-none-any.whl |
|---|---|
| Size | 54.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d5ad242d0455161f2bf00b1af40628fe5e8946e63df80ffaa23b178eb0963fd
|
|
BLAKE2b-256 checksum How to use checksums |
2945591fbb2d6e32c845734bd3097c4fdc3165f97ca4d9614fe47b8e45fc6911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for scietex.hal.vfd 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scietex_hal_vfd-2.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.