An updated API client is available for EMScope software version 4.1 and later. It extends the v4 interface with several protocol and usability improvements:
[flags : uint8][padding : 3 bytes][float32 values …]) instead of JSON, reducing overhead on high-frequency sweeps. The client decodes them transparently.self.freq is updated automatically and shared across consecutive binary frames.has_sweep_data(msg): a new helper method that returns True for both binary amplitude frames (EMI mode) and JSON values messages (impedance mode), replacing the manual “values” in msg check used in v4.repetition flag: self.repetition is set to True when a quasi-peak repeat sweep was triggered (200 Hz / 9 kHz bands only).set_detector_type(), set_measure_channel(), set_display_range(), set_amp_units(), etc.) alongside the generic set_value().asyncio.gather.The api_v5.py and api_example_v5.py files are provided. The api_example_v5_multi_detector.py file demonstrates simultaneous PK + QP + AV measurement using parallel connections.
Required libraries: websockets, matplotlib. Python 3.8 or later is required.
For a detailed description of the underlying WebSocket protocol, refer to the WebSocket API documentation.
The api.py and api_example.py files are provided for use with EMScope software versions 3.13 and earlier.
Required libraries: websockets, json. The matplotlib library is used in the example script.
A fully redesigned API client is available for EMScope software version 4.0. It introduces a cleaner interface, automatic RBW and display range management, robust session handling, and transparent keepalive ping/pong support.
The api_v4.py and api_example_v4.py files are provided.
Required libraries: websockets, matplotlib. Python 3.8 or later is required.