Skip to main content

pyvms — Vibration Monitoring System

PyPI License Python

Python client library for communicating with Logic Elements VMS-1201 Vibration Monitoring System devices: register read/write, continuous timestamp/logger data streaming, firmware update, and network discovery.

Features

  • Read/write MCU, Master FPGA and per-channel Frontend FPGA registers over TCP
  • Continuous streaming and parsing of timestamp and logger (waveform) data
  • Firmware update over TCP (MCU, Master FPGA, Frontend FPGA)
  • UDP broadcast discovery and remote network (re)configuration of devices
  • Helper conversions for Frontend analog values (temperature, thresholds, min/max)

Installation

pip install pyvms

Optional extra (adds matplotlib, used when plotting logger data):

pip install pyvms[extra]

Requires Python >= 3.12.

Quick start

The VMS device always initiates the TCP connection — listen() blocks until the device connects.

Discover devices on the network

from pyvms import Discovery

d = Discovery(broadcast="10.0.0.255")
devices = d.probe()
print(devices)

Read/write registers over the configuration socket

from pyvms import ConfigSocket, Master, Fe

conf = ConfigSocket()
conf.listen(port=50001)  # blocks until the VMS device connects

active_cards = conf.read_master(Master.CHANNEL_ON)
value = conf.read_fe(fe=1, address=Fe.MINIMUM_MAXIMUM)

conf.close()

Stream timestamp / logger data

from pyvms import TimeSocket, TimeStats

time_sock = TimeSocket()
time_sock.listen(port=50000)  # blocks until the VMS device connects

stats = TimeStats()
time_sock.receive_loop(time=10, stats=stats)  # collect for 10 seconds
print(stats.print())

time_sock.close()

Update firmware

from pyvms import ConfigSocket, Protocol

conf = ConfigSocket()
conf.listen(port=50001)
conf.update_firmware("mcu_firmware.bin", target=Protocol.FW_MCU, mask=0)

conf.close()

Testing

The database layer has unit tests that fake the MySQL driver, so they need neither hardware nor a server:

python -m unittest tests.TestDbMySql

The protocol tests require a real VMS-1201 device on the network — the test process listens on the configuration/timestamp TCP ports and waits for the device to connect, so they cannot run standalone or in CI without hardware. They also depend on an internal Logic Elements package (lecore) not published with pyvms.

python -m unittest tests.TestCommunication

Development

Build and publish the package:

python -m pip install --upgrade build twine
py -m build
py -m twine upload dist/*

See how_to_build.md for the full setup, including creating a virtual environment.

License

MIT © Logic Elements s.r.o. — see LICENSE.

Homepage: https://github.com/LogicElements/py-vms

Metadata

Release files for pyvms 0.2.0

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

Source distribution (sdist)

Source distribution for pyvms 0.2.0
File Size Uploaded
pyvms-0.2.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyvms 0.2.0
File Interpreter ABI Platform
pyvms-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.7 kB

Release files / pyvms-0.2.0.tar.gz

Download URL pyvms-0.2.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1cdc4b4150e03e99cbe44d1795495d809ca87b85ec7e14671cc4ba2408dc28f7
BLAKE2b-256 checksum
How to use checksums
4e7d3a4fa49773141ec814416972a6b7e383bd867c3f3f175b6c1af0bbd0b03b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / pyvms-0.2.0-py3-none-any.whl

Download URL pyvms-0.2.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b5e5e9d3bd9d665fb06b7856a932d9f6d061cff4de787c2aff29101b2e6c1f0
BLAKE2b-256 checksum
How to use checksums
73027e9eb38bd6b9e5986edce4ffea8bd1ba3182bd0c3a33e991ee59d1d9c47a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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