Skip to content

EsKay-Labs/Serial-Sentinel

Repository files navigation

Serial Sentinel

Serial Sentinel is a Python-based GUI application for monitoring serial port data, featuring real-time text display and plotting capabilities.

Features

  • Connect to any available serial port.
  • Selectable baud rates.
  • Real-time data display in a scrollable text area.
  • Syntax highlighting for common keywords (error, warning, info) and data types.
  • (Optional) Real-time plotting of numeric data found in serial messages (e.g., "Label: 123.45").
  • Customizable appearance:
    • Light/Dark mode.
    • Selectable color palettes for text display.
    • Adjustable font family, size, and style.
  • Copy displayed text to clipboard (full copy or selection).
  • Save entire serial log to a file.
  • IPC (Inter-Process Communication) mechanism allows external tools (like an MCP server) to trigger a dump of the current serial buffer to a log file.

Requirements

  • Windows Operating System (installer script is PowerShell-based).
  • Python 3.8 or higher. The installer script can attempt to download and install Python 3.10.11 if not found.

Installation

  1. Download:

    • If you cloned this repository, navigate to the project root directory.
    • If you downloaded a release ZIP, extract it to your desired location. This location will be the installation directory.
  2. Run the Installer Script:

    • Navigate to the root directory of the project (where install_serial_sentinel.ps1 is located).
    • Right-click on install_serial_sentinel.ps1 and select "Run with PowerShell".
    • Alternatively, open a PowerShell terminal, navigate to the directory, and run: .\install_serial_sentinel.ps1
    • The script will:
      • Check for Python and offer to install it if missing.
      • Create a Python virtual environment (venv/) in the project root.
      • Install required Python packages (customtkinter, pyserial, matplotlib, numpy) into the virtual environment from requirements.txt.
      • Create launchers (Serial Sentinel.vbs, Serial Sentinel.cmd) in the project root.
      • Create a desktop shortcut for easy launching.

How to Run

After successful installation:

  • Desktop Shortcut: Double-click the "Serial Sentinel" shortcut created on your desktop.
  • VBScript Launcher: Navigate to the installation directory and double-click Serial Sentinel.vbs. This method hides the console window.
  • CMD Launcher: Navigate to the installation directory and double-click Serial Sentinel.cmd. This method may show a console window.
  • Directly (for development/debugging):
    1. Activate the virtual environment: .\venv\Scripts\activate (from the project root in PowerShell/CMD).
    2. Run the main module: python -m SerialSentinel_GUI.main

Basic Usage

  1. Launch Serial Sentinel using one of the methods above.
  2. Select the desired COM Port from the dropdown list.
  3. Select the correct Baud Rate.
  4. Click "Connect". Serial data should start appearing in the text area.
  5. Use the "View Mode" options to show Text Only, Plot Only, or Both.
  6. If plotting is enabled and your serial data contains patterns like Label: Value (e.g., Temperature: 25.5), these will be plotted.
  7. Adjust Appearance Settings (font, colors) as desired.
  8. Click "Disconnect" to close the serial connection.

MCP Compatibility (Advanced)

Serial Sentinel includes an Inter-Process Communication (IPC) mechanism. If you have a compatible Model Context Protocol (MCP) server and client script configured:

  • The MCP server can send a signal to a running Serial Sentinel instance.
  • Upon receiving the signal, Serial Sentinel will dump its current text buffer to a timestamped log file in the logs/gui_serial_dumps/ directory (relative to the project root).
  • It will then write the path of this log file to ipc_temp/last_dump_path.txt (relative to project root), allowing the MCP client script to retrieve it.

This project contains the SerialSentinel_GUI application. The MCP server (SerialSentinel_MCP_Server) and the client script (SerialSentinel_MCP_ClientScript) that work with this GUI are separate components that would need to be run and configured independently if this advanced functionality is desired.

Troubleshooting

  • VBScript/Shortcut Fails: If the VBScript or shortcut fails, try running Serial Sentinel.cmd. If that works, the issue might be with pythonw.exe or VBScript execution policies. If the CMD fails, check the console output for Python errors.
  • "ModuleNotFoundError": Ensure you ran install_serial_sentinel.ps1 successfully, which sets up the virtual environment and installs dependencies. Try running it again.
  • GUI Launch Errors: Check gui_launch_error.log in the project root for any logged errors if the GUI fails to start silently.

License

(You can add your preferred license here, e.g., MIT, GPL, etc.)


This README template was generated by Cline, your AI software engineer.

About

Serial port monitoring tool with GUI and optional MCP integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors