PanelWorks: Visual Basic-style control panels in Python, open source on GitHub
In the 1990s I wrote a Visual Basic program that read a truck scale over a serial port for a recycling center. Drop a control on a form, double-click it, write the code behind it: nothing since has been as quick for putting a working panel in front of real equipment. PanelWorks is my attempt to bring that back, in Python, for the hardware we use today.
What it is
PanelWorks lets you draw a form (in a designer, or as a JSON file) and write Object_Event procedures like cmdStart_Click in plain Python. It runs as a real desktop window, and every control can be wired to the outside world without glue code:
- MQTT: bind a gauge or label to a topic, publish when a button is clicked, and see a banner when a device or the broker goes quiet.
- Serial: USB auto-detect and auto-reconnect, for Arduino and ESP32 boards.
- Modbus and SNMP: PLCs, meters, drives, UPSes, PDUs and switches.
- NUT: watch a UPS, with alarms when it goes on battery.
- Data, Charts and Alarms: log readings to SQLite, chart them live, and raise alarms on rules you write in plain text.
- Phone view and kiosk mode: open any running panel in a browser, or run it full-screen on a Raspberry Pi wall display.
- Make EXE: turn a panel into a program you can hand to someone else.
Claude can drive it too
Every PanelWorks panel is also an MCP server. An AI assistant such as Claude can read and set properties, click buttons, wait for events and even add controls while the panel runs. PanelWorks is listed in the official MCP Registry as io.github.KK4HFJ/panelworks.
Try it
pip install panelworks
panelworks --example
The examples run against built-in simulators (a pretend UPS, Modbus meter and serial devices), so you can try them before wiring anything. The manual covers everything from a click-by-click first panel to the full control reference.
- GitHub: github.com/KK4HFJ/panelworks
- PyPI: pypi.org/project/panelworks
What's next
Version 1.0 is out and stable, with bug fixes every Tuesday when there's something to fix. The book is out: Draw It, Wire It, Run It, the official guide to building control panels in Python with PanelWorks, with ESP32, Modbus, SNMP and home automation projects, each tested on real hardware. See the book's page or the announcement. There are also weekly PanelWorks tutorials on my Instructables page (sspence).
Reply to this post
A question, a correction, or your own results? Send it here. Replies come to me by email and aren't published. Your address is only used to answer you.