A comprehensive Python-based serial communication tool with advanced data visualization, command management, and data processing capabilities.
- Auto-detection of available serial ports
- Configurable baud rates (110 to 1,000,000 bps)
- Automatic reconnection on device disconnect
- Real-time data streaming with buffering
- Command history with up/down arrow navigation
- Real-time plotting of structured data
- Multiple data series with individual subplots
- Auto-scaling with configurable time windows
- Color-coded series for easy identification
- Interactive series selection (show/hide individual measurements)
- Structured data parsing with
[DATA],[PLOT], and[MEAS]tags - Multiple export formats: CSV, JSON, Excel, Text
- Data filtering with regex support
- Statistics calculation (min, max, average, standard deviation)
- Configurable buffer sizes (up to 10,000 points)
- Save and organize frequently used commands
- Command categories for better organization
- Custom terminators (auto \r\n or custom)
- Command descriptions and metadata
- Repeat commands with configurable intervals
- Import/Export command libraries
- Tabbed interface with Terminal, Data Plot, and Analysis views
- Dark theme optimized for long usage sessions
- Resizable panels and responsive layout
- Scroll pause/resume functionality
- Enhanced file handling with multiple format support
- Python 3.8 or higher
- pip package manager
pip install -r requirements.txtThe requirements.txt includes:
pyserial- Serial communicationcustomtkinter- Modern UI componentsmatplotlib- Data plottingpandas- Data processingopenpyxl- Excel file supportnumpy- Numerical operations
- Clone or download the repository
- Install dependencies:
pip install -r requirements.txt - Run the application:
python serial_monitor.py
- Connect Device: Select port and baud rate, click "Connect"
- Send Messages: Type in the message box and press Enter or click "Send"
- View Data: All received data appears in the terminal with timestamps
The application automatically detects and plots structured data with these tags:
[PLOT] voltage: 3.3
[PLOT] temperature: 25.6
[PLOT] current: 0.125
[DATA] sensor_id: 12345
[MEAS] pressure: 1013.25
- [PLOT] data appears in real-time plots
- [DATA] data is stored for analysis
- [MEAS] data is logged for measurements
- Add Commands: Click "Add Command" to save frequently used commands
- Organize: Use categories to group related commands
- Quick Send: Select from dropdown and click "Send Command"
- Repeat: Enable repeat mode with custom intervals
- Go to Analysis tab
- Click Export Data
- Choose data type (Raw, Filtered, Structured, etc.)
- Select format (CSV, JSON, Excel, Text)
- Include metadata for comprehensive reports
- Commands: Stored in
C:\ProgramData\SerialMonitor\commands.xml(Windows) - Settings: Configurable in
config.py
Edit config.py to modify:
- Window dimensions and colors
- Buffer sizes and limits
- Button styles and themes
- Default font settings
[PLOT] voltage_main: 12.6
[PLOT] voltage_backup: 11.8
[DATA] battery_level: 85
[MEAS] load_current: 2.3
[PLOT] temp_cpu: 45.2
[PLOT] temp_ambient: 23.1
[DATA] fan_speed: 1200
[MEAS] thermal_resistance: 0.8
[PLOT] sensor1: 100.5
[PLOT] sensor2: 200.3
[PLOT] sensor3: 150.7
[DATA] timestamp: 1640995200
[MEAS] calibration_offset: 0.05
- Use regex patterns to filter incoming data
- Real-time filtering with pattern matching
- Separate filtered and raw data buffers
- Real-time statistics calculation
- Data distribution analysis
- Export capabilities with metadata
- Historical data review
- Individual subplots for each measurement
- Configurable time windows (10s to 1 hour)
- Auto-scaling with manual override
- Series selection and color coding
Port Access Denied
- Ensure no other applications are using the serial port
- Run as administrator if necessary (Windows)
- Check device permissions (Linux)
Data Not Plotting
- Verify data format matches expected tags:
[PLOT] name: value - Check that values are numeric
- Use "Test Tags" button to verify plotting functionality
High Memory Usage
- Reduce buffer sizes in
config.py - Clear data buffers regularly
- Export and clear old data
Connection Issues
- Verify correct baud rate settings
- Check cable connections
- Try different USB ports
- Restart the device
Enable debug output by modifying the logging level in the source code for detailed troubleshooting information.
serial-monitor/
βββ serial_monitor.py # Main application entry point
βββ gui.py # Main GUI implementation
βββ config.py # Configuration settings
βββ serial_comm.py # Serial communication handler
βββ data_processor.py # Data processing and filtering
βββ plot_widget.py # Real-time plotting widget
βββ command_manager.py # Basic command management
βββ enhanced_command_manager.py # Advanced command management
βββ file_handler.py # Basic file operations
βββ enhanced_file_handler.py # Advanced file operations
βββ scroll_pause.py # Terminal scroll control
βββ requirements.txt # Python dependencies
βββ commands.xml # Saved commands (auto-generated)
βββ README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues, questions, or feature requests:
- Check the troubleshooting section
- Review existing issues
- Create a new issue with detailed information
- v1.0.0 - Initial release with basic serial communication
- v1.1.0 - Added data visualization and plotting
- v1.2.0 - Enhanced command management and data export
- v1.3.0 - Added structured data processing and analysis tools
Note: This application is designed for development, testing, and debugging of serial devices. Always ensure proper electrical safety when working with hardware devices.
This project is licensed under the GPL3 License. See the LICENSE file for details.
For questions or feedback:
- Email: dvidmakesthings@gmail.com
- GitHub: DvidMakesThings