Skip to main content

pyvse

Python SDK for IFM VSE100 / VSA004 acceleration sensors. Reverse-engineered communication protocol. Not affiliated with or endorsed by IFM.

Install

pip install pyvse

Dependencies: numpy (required), pandas + matplotlib (optional, for export/visualization).

Quick start

One-shot collect

import pyvse

with pyvse.connect("192.168.0.1") as client:
    data = client.raw("50K").collect(seconds=5.0)
    data.to_csv("run1.csv")
    df = data.to_dataframe()   # pandas DataFrame: time_s, accel_g
    arr = data.to_numpy()      # np.ndarray shape (N,), unit: g

Live stream

import pyvse

with pyvse.connect("192.168.0.1") as client:
    for frame in client.raw("50K").stream(batch_size=700):
        print(frame.g_values.mean())   # np.ndarray shape (700,), unit: g

Stream to CSV (memory-efficient)

import pyvse

with pyvse.connect("192.168.0.1") as client:
    with pyvse.CSVSink("run1.csv", sample_rate=50_000) as sink:
        for frame in client.raw("50K").stream():
            sink.push(frame.g_values)

Stream to PlotJuggler

import pyvse

with pyvse.connect("192.168.0.1") as client:
    with pyvse.PlotJugglerSink() as pj:          # default: 127.0.0.1:9870 UDP
        for frame in client.raw("50K").stream():
            pj.push_all(frame.g_values)           # one UDP message per sample

API reference

pyvse.connect(host, port=3321, timeout=5.0) → VSEClient

Returns a context manager. Use with to ensure clean disconnect.

VSEClient

Method Returns Description
raw(rate="50K") RawCommand rate: "50K" or "100K"

RawCommand

Method Returns Description
collect(seconds) RawData Collect fixed-length capture
stream(batch_size=700) Iterator[RawFrame] Live stream; runs until interrupted

RawData

Attribute / Method Description
g_values np.ndarray shape (N,), float64, unit: g
sample_rate int, Hz
time_axis np.ndarray of timestamps in seconds
to_numpy() Returns g_values
to_dataframe() pandas DataFrame with columns time_s, accel_g
to_csv(path) Write CSV with time_s, accel_g columns

RawFrame

Attribute Description
g_values np.ndarray shape (batch_size,), float64, unit: g
sample_rate int, Hz

CSVSink(path, sample_rate)

Stream-friendly CSV writer. Use as context manager, call .push(g_values) per frame.

PlotJugglerSink(host="127.0.0.1", port=9870)

Pushes data to PlotJuggler via UDP JSON streamer.

Method Description
push(g_values, channel="accel_g") Send batch mean as single message
push_all(g_values, channel="accel_g") Send each sample as individual message

Exceptions

Exception Raised when
VSEConnectionError TCP connect fails
VSETimeoutError Socket read times out
VSEProtocolError Unexpected response from device
VSEError Base class for all pyvse errors

Disclaimer

Independent implementation developed through observation of device communication. Not affiliated with or endorsed by IFM.

Metadata

Release files for pyvse 0.0.1

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

Source distribution (sdist)

Source distribution for pyvse 0.0.1
File Size Uploaded Provenance Actions
pyvse-0.0.1.tar.gz 10.7 kB Without provenance Details for pyvse-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / pyvse-0.0.1.tar.gz

Download URL pyvse-0.0.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1d117c0aae79a0cbc16eb29bb45436ea598ed9698c8d16e404fc3ac6ecb82eb
BLAKE2b-256 checksum
How to use checksums
7c52163edd3324419d39d72ecd1f49dcabe2f11aed9cba671671b7d11ba565af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / pyvse-0.0.1-py3-none-any.whl

Download URL pyvse-0.0.1-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbfc800dcea9c7b5789fcc7eac0853aa29a3dd28cf205720ae224566a2c3a892
BLAKE2b-256 checksum
How to use checksums
eeca033330fe35bb02d96c58e7550927536ffe5b3ff2439fdd27d5d6b807fc81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for pyvse 0.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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