DEV Community

Phil Yeh
Phil Yeh

Posted on Edited on

5 Python Tools I Built to Automate My Industrial IoT Workflow (Open Source)

Update: 🏷️ Black Friday Sale is ON! Use code BLACKFRIDAY for 15% OFF on the Ultimate Toolkit.

As a Senior Automation Engineer, I spend half my life debugging communication protocols. Modbus, MQTT, CAN Bus, Ethernet/IP... you name it.

The problem is, most professional tools (like Vector CANalyzer or proprietary PLC software) are:

  1. Expensive (Thousands of dollars).
  2. Windows-only (I love Docker/Linux).
  3. Closed Source (I can't customize them).

So, over the past few weekends, I decided to build my own "Survival Toolkit" using Python.

Here are the 5 open-source tools I created to replace expensive software, all available on my GitHub.


1. The "Privacy-First" AI Datasheet Reader

Problem: I have hundreds of PDF datasheets to read, but I can't upload them to ChatGPT due to NDA/Privacy concerns.
Solution: A 100% offline RAG system using Docker + Llama 3.

It runs entirely on my local machine (RTX 3060). No data leaves the building.

AI Architecture


2. The J1939 & CAN Bus Sniffer

Problem: Debugging vehicle ECUs usually requires a $300+ hardware adapter just to see the data.
Solution: A Python GUI that works with cheap USB-CAN adapters (slcan) and automatically decodes J1939 PGNs.

It even has a "Demo Mode" to simulate traffic if you don't have hardware.

CAN Bus Demo


3. The "Anti-Freezing" Modbus Logger

Problem: Writing a simple Python script to read RS485 is easy, but the GUI always freezes (blocks) while waiting for the sensor to reply.
Solution: A multi-threaded Modbus RTU Master.

It separates the UI thread from the Serial polling thread, so the app remains responsive 100% of the time.

Modbus Logger


4. The MQTT Data Recorder

Problem: Sometimes I just want to save MQTT sensor data to an Excel file for analysis, without setting up a database.
Solution: A lightweight MQTT Client that logs everything to CSV automatically.

Updated to support the latest Paho-MQTT v2.0 standard.

MQTT Logger


5. The Virtual Ethernet/IP Lab

Problem: Learning the CIP protocol (used by Rockwell/Omron PLCs) is hard without physical hardware.
Solution: A Mock PLC Server + Raw Socket Client.

It simulates the full Forward Open handshake and Implicit Messaging on your localhost.

Ethernet IP Demo


🎁 Conclusion

Building your own tools is the best way to learn. Not only do you save money on licenses, but you also get full control over the source code.

I have open-sourced the documentation and basic architecture for all these projects on GitHub.

If you want the complete, production-ready source code for ALL these tools (5-in-1), I've bundled them together here:

👉 The Ultimate Senior Engineer Toolkit (Gumroad)

Happy coding!

Top comments (4)

Collapse
 
canoconner801 profile image
Conner Cano •

Hi Chun Liang,

Happy to see your post. It's really useful news for me. I'd love to collaborate with you. How do you like it? I look forward to your response.

Thanks,
Conner

Collapse
 
philyeh profile image
Phil Yeh •

Hi Conner, thanks for reading! Could you share more details here about what kind of collaboration you have in mind?

Collapse
 
canoconner801 profile image
Conner Cano •

Since my background is in .NET and Python with Industrial IoT, I’d love to collaborate by helping modernize the UIs or build .NET versions of a couple of your tools — especially Modbus and MQTT. I think combining our stacks could make the toolkit more polished and cross-platform. happy to share more if that aligns with what you’re looking for.

Thread Thread
 
philyeh profile image
Phil Yeh •

Hi Conner, thanks for the offer!

For now, I’m intentionally sticking to Python & Tkinter. The main goal of these tools is to provide a lightweight, editable codebase that automation engineers (who mostly use Python) can easily customize without learning a new stack like .NET.

I want to keep the dependencies minimal for my customers. But I appreciate the reach-out, and I'll definitely let you know if I plan to expand into the C# ecosystem in the future!

Best, Phil