-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlinkedin_post.txt
More file actions
31 lines (18 loc) · 1.58 KB
/
Copy pathlinkedin_post.txt
File metadata and controls
31 lines (18 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
I spent three years debugging 2,500 IoT fuel dispensing kiosks across Kenya and Rwanda. Every one of them had Modbus sensors: flow meters, level sensors, temperature probes.
When something broke at 2am (and it always broke at 2am), I had two options:
1. Fire up QModMaster on a Windows laptop
2. Write another throwaway Python script with pymodbus boilerplate
Both are terrible when you're SSH'd into a headless Linux gateway in the field.
So I built modbus-cli. It's curl for Modbus.
pip install modbus-cli
One command to read registers, write values, or scan an entire bus. No GUI, no config files.
modbus read 192.168.1.10 40001 --count 10
modbus scan 192.168.1.10 --range 1-10
modbus watch 192.168.1.10 40001 --count 8
The watch mode gives you a full-screen terminal dashboard with sparkline history per register, change detection, and live stats. I built it with Textual, the TUI framework from the Rich team. This would have saved me hours at KOKO Networks when a flow meter started drifting and I needed to watch raw values over time.
It auto-detects register types from standard Modbus addressing. Type 40001 and it knows you want a holding register. Type 30001 and it reads input registers. No flags needed.
TCP and serial RTU in the same tool. Just add --serial /dev/ttyUSB0.
The repo already has its first contributors. Someone added Docker support and another added JSON output, both within the first week.
If you work with Modbus devices and want a feature, open an issue. PRs welcome.
github.com/19bk/modbus-cli
#Modbus #IoT #Python #OpenSource #CLI #IndustrialAutomation #SCADA #PLC #Embedded