A lightweight Python serial port monitor with a Tkinter GUI. Features include:
- Console view for incoming and outgoing data.
- Send text or files to the serial port.
- Configurable encoding display (UTF-8, ANSI, HEX, DEC, BIN).
- Simple live plotting of parsed sensor values.
- Customizable parsers (Regex or CSV).
- User preferences stored in ~/.serial_monitor.json.
- Python 3.12+
- Tkinter 0.1.0+
- pyserial 3.5+
python -m venv venv
# for linux
source venv/bin/activate
# for windows
.venv\Scripts\activate
pip install -r requirements.txtor, if using Poetry(recomendated):
poetry installpython -m serial_monitor.appOr via Poetry:
poetry run serial-monitorWhen you start the application, you’ll see two main tabs:
- Console Tab
- View incoming data(plot)
- Send messages manually (press Enter or click Send).
- Send files using the 📂 button.
- Toggle DTR and RTS signals.
Displays parsed sensor values in real time.
Supports zooming:
- Mouse wheel → time scale (X axis).
- Shift + Mouse wheel → Y axis scaling.
Select Port and Baudrate from the dropdowns.
Click the 🔌 Connect button. If not connected, pressing Send flashes the button as a reminder.
Open Settings → Preferences… in the menu.
Here you can configure:
- Display Mode: UTF-8, ANSI, HEX, DEC, BIN
- Parity: None, Even, Odd, Mark, Space
- DTR/RTS defaults
- Log file path for saving communication(#TODO)
- Send delay between file lines
- Parser config file (JSON)
❗Settings are automatically saved to ~/.serial_monitor.json.
Parsers allow you to extract structured values for plotting. Example Regex parser (in exaple/temp_n_num.json):
{
"type": "regex",
"pattern": "TEMP:(?P<TEMP>[0-9.]+) HUM:(?P<HUM>[0-9.]+)"
}With sample input (in exaple/temp_n_hum_values.txt):
TEMP:23.4 HUM:50.1
TEMP:22.8 HUM:48.7⬆️This produces two series: TEMP and HUM, both plotted in the graph.
- Enter → send message.
- Mouse wheel → zoom time axis.
- Shift + Mouse wheel → zoom Y axis.
License
MIT — see LICENSE