Skip to main content

scietex.vfd_service

Scietex microservice daemon for variable frequency drive (VFD) monitoring and control.

The service drives one or more VFDs through the Scietex Modbus gateway. Each drive is handled by a driver from scietex.hal.vfd, selected by entry point name in the service configuration. The service polls each drive on its own long-lived task, publishes readings to a per-drive Valkey stream, and exposes control tasks (vfd:start, vfd:stop, vfd:set-frequency, vfd:clear-error) on the data lane.

Supported drives

Driver entry point Drive Temperature reading
intek_spe_b_modbus Intek SPE-B none (overheat is a fault code)
vesper_e5_8200_modbus Vesper E5-8200 none (overheat is a fault code)
vesper_e4_8400_modbus Vesper E4-8400 / E4-P8402 power-module temperature (U1-46)

The gateway descriptors (intek_spe_b, vesper_e5_8200, vesper_e4_8400) live under the scietex.modbus.drivers group and are registered with the gateway, not with this service. The _modbus suffix distinguishes the HAL driver entry points from the gateway descriptors.

Configuration

The service reads vfd/vfd.yml under the framework config directory (SCIETEX_CONFIG_DIR, default /config in the container). The file is created with defaults on first start.

gateway:
  host: 127.0.0.1
  port: 15020
  timeout: 1.0
drives:
  - label: pump
    driver: intek_spe_b_modbus
    unit_id: 1
    poll_interval: 1.0
    # max_frequency_hz: 50.0
failure_threshold: 3
stream_maxlen: 10000
  • gateway — Modbus/TCP endpoint of the Scietex Modbus gateway.
  • drives[].label — unique label; the registry key and the stream key segment.
  • drives[].driver — HAL driver entry point name (see the table above).
  • drives[].unit_id — Modbus unit id the gateway routes to the drive. This is the drive's own configured address (Pd.02 on SPE-B, 09-00 on E5-8200, H5-01 on E4-8400).
  • drives[].poll_interval — seconds between reads.
  • drives[].max_frequency_hz — optional. Only meaningful for a drive whose protocol does not expose its configured maximum output frequency; the driver uses it to derive frequency_percent and to bound set_frequency. Omit it to keep the driver's own default (SPE-B reads P0.10 from the drive, E4-8400 reads E1-04; E5-8200 falls back to 50 Hz).
  • failure_threshold — consecutive failed reads before a drive is reported as disconnected. One dropped frame on an RS485 segment must not flip the status.
  • stream_maxlen — entries retained per drive's readings stream.

A configuration change at runtime is restart-required: the drive registry is not live-rebuilt.

Tasks

Control lane:

  • monitoring:start / monitoring:stop — payload {"label": "pump"} or empty for every drive.

Data lane:

  • vfd:read — payload {"label": "pump"}. Returns every parameter field plus the decoded fault (error_code, error_message).
  • vfd:start — {"label": "pump", "forward": true, "slow": false}.
  • vfd:stop — {"label": "pump", "freewheel": false}.
  • vfd:set-frequency — {"label": "pump", "frequency_hz": 42.5}.
  • vfd:clear-error — {"label": "pump", "comm": false}.

Every control task is gated on the drive's declared capabilities, so an unsupported command is rejected as UNSUPPORTED before the driver is called. vfd:read is ungated.

Valkey keys

  • Readings stream: scietex:{service}:{instance_id}:vfd:{label}:readings with fields ts, frequency_hz, frequency_percent, output_current, output_voltage, output_power, dc_bus_voltage, heatsink_temperature_c, motor_temperature_c, state. A field the drive does not report is written as an empty value, which is distinguishable from a reported 0.0.
  • Telemetry: scietex:{service}:{instance_id}:telemetry, pushed every 2 s with a 6 s TTL.

Running

start-vfd-service --conf-dir /etc/scietex

Flags: --conf-dir (auto-resolved when omitted), --service-name (default $SCIETEX_SERVICE_NAME or VFD), --logging-level (default $SCIETEX_LOGGING_LEVEL or INFO). It runs in the foreground until SIGINT or SIGTERM.

Development

uv venv --python 3.14 .venv
uv pip install -e ".[dev,test,lint]" --python .venv/bin/python
tox -e format,lint,type,test

Container

./build_image.sh [--latest]

Builds and pushes registry.buro-nts.ru/scietex-vfd-service:<version> for linux/amd64 and linux/arm64. The image installs the released wheel from PyPI, so publish the version first.

Deployment prerequisites

The gateway speaks 8-N-1 on its serial port. Each drive must be configured to match before the gateway can talk to it:

  • Intek SPE-B — Pd.01 → 3 (8-N-1), Pd.05 → 1 (standard Modbus), Pd.02 → the unit id used in vfd.yml.
  • Vesper E5-8200 — 09-01 → 0 (RTU), 09-03 → 0 (1 stop bit), 09-04 → 0 (no parity), 09-05 → 0 (8 data bits), 09-00 → the unit id.
  • Vesper E4-8400 — H5-08 → 0 (RTU), H5-09 → 0 (1 stop bit), H5-10 → 0 (8 data bits), H5-03 → 0 (no parity), H5-01 → the unit id.

The drive must also accept its setpoint from the communication channel (P0.03 = 9 on SPE-B, b1-01/b1-02 = 2 on E4-8400). See the HAL protocol docs for the full register maps.

Metadata

Release files for scietex.vfd-service 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scietex.vfd-service 0.1.2
File Size Uploaded Provenance Actions
scietex_vfd_service-0.1.2.tar.gz 34.3 kB With provenance Details for scietex_vfd_service-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scietex.vfd-service 0.1.2
File Interpreter ABI Platform Actions
scietex_vfd_service-0.1.2-py3-none-any.whl Python 3 none any Details for scietex_vfd_service-0.1.2-py3-none-any.whl

Total release size: 59.2 kB

Release files / scietex_vfd_service-0.1.2.tar.gz

Download URL scietex_vfd_service-0.1.2.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef8b138ab2e61a96e040e9bd2db5aa55d505ffe6fc955c7964fbbc1799088c33
BLAKE2b-256 checksum
How to use checksums
c6f5806602544604336ebd8f32f501ebf0b2815190c95587f3312f25441da2ad
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 log

Release files / scietex_vfd_service-0.1.2-py3-none-any.whl

Download URL scietex_vfd_service-0.1.2-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb90f31d70d9379d21267610745bd07a4c7d13d89a9fa49756ee46e10a1df8b4
BLAKE2b-256 checksum
How to use checksums
e673060ca4e98a743ada0d8d028d40c8371e52e74a6a08a6965996cc0d3d7b45
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 log

Security for scietex.vfd-service 0.1.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.

Select from 2 files

Attestation for scietex_vfd_service-0.1.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page