A minimal desktop client that uses Tkinter and matplotlib to show live measurement curves streamed by an external server. It purpose is to show a minimal example of a python frontend that receives timeseries data via a websocket from a backend.
The example shows how to receive data from a DevDataServer as well as data from the OmnAIDevServer that provides data from a real life oscilloscope the OmnAIScope(https://omnaiscope.auto-intern.de/).
This example is part of the OmnAIView project an OpenSource project for an omnipotent Datavisualization and Dataanalyzing tool and shows an implementation in python instead of Angular.
This project works with all OmnAI compatible Data-Sources. Two prominent ones being:
Set up the DevDataServer according to its own README.md → “Server running on port 8080 (HTTP & WebSocket)” Tip: If you run the server on a different host or port, remember the address; you’ll need it in the client.
This assumes you have a working OmnAIScope, that you can connect to your computer.
- Download the executable from omnaiscope.auto-intern.de/download
- Run the exe
.\MiniOmni.exe -w This starts a websocket on port 8080.
Important note: The OmnAIBackend and the DevDataServer run on the same port so you are not able to use both at the same time without adjustments
- YouTube: Using the OmnAIScope on Windows as a signal recorder
- YouTube: Raspberry Pi Oscilloscope! Using the AUTO INTERN OmnAIScope as an analog signal recorder
Make sure you have installed Python3.12 (or newer). If you are running Linux, you additionally need to install python3-tk.
- Clone the Repo
- Navigate into the Base-Dir
- Setup Virtual Environment
- Install Dependencies
- RUN!
git clone git@github.com:omnai-project/OmnAIView-python.git
cd OmnAIView-python
python3.12 -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
python ./src/main.pygit clone git@github.com:omnai-project/OmnAIView-python.git
cd OmnAIView-python
python3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python .\src\main.pygit clone git@github.com:omnai-project/OmnAIView-python.git
cd OmnAIView-python
python -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
python ./src/main.pyIf you want to log the values measured run the application with :
python ./src/main.py --loggingClick “Connect to Websocket” A dialog pops up. Choose your datasource. Enter the server address in the form ip:port, e.g. localhost:8080, then confirm.
The client fetches the device list via get_devices.
A second dialog appears, listing all available devices as check-boxes.
Select one or more devices, choose a sample rate (Hz) and the data format (json or csv), then press “Start Measurement”.
The pop-up closes and the live curves appear:
Legend keys = device UUIDs
Line colours = RGB values sent by the server
The upper toolbar remains visible so you can reconnect after closing the window.
Click record to take a measurment. Important: While recording data is saved in RAM, make sure to not overflow it.
To analyze data the DevOmnAI-Analysis Server is used . To start the server follow its (own README)[https://github.com/AI-Gruppe/DevMathAnalysisServerOmnAI?tab=readme-ov-file#project-setup] .
After recording press the analysis button. You should receive the mean of the recorded waveform in a popup window.
Close the main window to end the WebSocket session cleanly.
Only one measurement session at a time.
No persistent recording – this client is a live scope.
Keeps the latest 1 000 samples per channel in memory; older points are discarded to save RAM.
MIT – see the original DevDataServer repository.